0% found this document useful (0 votes)
117 views102 pages

Simple Motion - Block - Reference

Uploaded by

Magdalena Madej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views102 pages

Simple Motion - Block - Reference

Uploaded by

Magdalena Madej
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

MELSEC iQ-F FX5

Simple Motion Module Function Block Reference


CONTENTS
CHAPTER 1 List of FBs 2

CHAPTER 2 Simple Motion Module FB 4


2.1 M+FX5SSC_SetPositioningData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 M+FX5SSC_StartPositioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 M+FX5SSC_JOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

CONTENTS
2.4 M+FX5SSC_MPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 M+FX5SSC_ChangeSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.6 M+FX5SSC_ChangeAccDecTime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7 M+FX5SSC_ChangePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.8 M+FX5SSC_Restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.9 M+FX5SSC_OperateError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.10 M+FX5SSC_InitializeParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.11 M+FX5SSC_WriteFlash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.12 M+FX5SSC_ChangeServoParameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.13 M+FX5SSC_ChangeTorqueControlMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.14 M+FX5SSC_ChangeSpeedControlMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.15 M+FX5SSC_ChangePositionControlMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.16 M+FX5SSC_ChangeContinuousTorqueMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.17 M+FX5SSC_Sync. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.18 M+FX5SSC_ChangeSyncEncoderPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.19 M+FX5SSC_DisableSyncEncoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.20 M+FX5SSC_EnableSyncEncoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.21 M+FX5SSC_ResetSyncEncoderError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.22 M+FX5SSC_ConnectSyncEncoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.23 M+FX5SSC_MoveCamReferencePosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.24 M+FX5SSC_ChangeCamPositionPerCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.25 M+FX5SSC_ChangeMainShaftGearPositionPerCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.26 M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.27 M+FX5SSC_MoveCamPositionPerCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.28 M+FX5SSC_MakeRotaryCutterCam. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
2.29 M+FX5SSC_CalcCamCommandPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
2.30 M+FX5SSC_CalcCamPositionPerCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

INSTRUCTION INDEX 96

REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98

1
1 List of FBs
This FB list is for using the MELSEC iQ-F series Simple Motion module.
Name Description
M+FX5SSC_SetPositioningData Sets positioning data (Da.1 to Da.4, Da.6 to Da.10, Da.20 to Da.22).
M+FX5SSC_StartPositioning Starts the positioning operation.
M+FX5SSC_JOG Performs the JOG operation or inching operation.
M+FX5SSC_MPG Performs the manual pulse generator operation.
M+FX5SSC_ChangeSpeed Changes the speed.
M+FX5SSC_ChangeAccDecTime Changes the acceleration/deceleration time at a speed change.
M+FX5SSC_ChangePosition Changes the target position.
M+FX5SSC_Restart Restarts the axis being stopped.
M+FX5SSC_OperateError Monitors errors and warnings, and resets errors.
M+FX5SSC_InitializeParameter Initializes the parameter.
M+FX5SSC_WriteFlash Writes the parameter, positioning data, and block start data in the buffer memory to the flash
ROM.
M+FX5SSC_ChangeServoParameter Changes the servo parameter after the servo amplifier is activated.
M+FX5SSC_ChangeTorqueControlMode Activates the torque control mode.
M+FX5SSC_ChangeSpeedControlMode Activates the speed control mode.
M+FX5SSC_ChangePositionControlMode Activates the position control mode.
M+FX5SSC_ChangeContinuousTorqueMode Activates the continuous operation to torque control mode.
M+FX5SSC_Sync Starts and ends the synchronous control.
M+FX5SSC_ChangeSyncEncoderPosition Changes the synchronous encoder axis current value and synchronous encoder axis current
value per cycle.
M+FX5SSC_DisableSyncEncoder Disables inputs from the synchronous encoder axis.
M+FX5SSC_EnableSyncEncoder Enables inputs from the synchronous encoder axis.
M+FX5SSC_ResetSyncEncoderError Reads error information from the synchronous encoder axis, and resets the error.
M+FX5SSC_ConnectSyncEncoder Connects a synchronous encoder via CPU.
M+FX5SSC_MoveCamReferencePosition Adds the movement amount set in the synchronous control change value to the cam reference
position to move the cam reference position.
M+FX5SSC_ChangeCamPositionPerCycle Changes the cam axis current value per cycle to a synchronous control change value.
M+FX5SSC_ChangeMainShaftGearPositionPerCycle Changes the current value per cycle after main shaft gear to a synchronous control change value.
M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle Changes the current value per cycle after auxiliary shaft gear to a synchronous control change
value.
M+FX5SSC_MoveCamPositionPerCycle Adds the movement amount set in the synchronous control change value to a cam axis current
value per cycle to move the cam axis current value per cycle.
M+FX5SSC_MakeRotaryCutterCam Automatically generates the cam for a rotary cutter.
M+FX5SSC_CalcCamCommandPosition Calculates a cam axis feed current value, and outputs the calculation result.
M+FX5SSC_CalcCamPositionPerCycle Calculates a cam axis current value per cycle, and outputs the calculation result.

1 List of FBs
2
MEMO
1

1 List of FBs
3
2 Simple Motion Module FB

2.1 M+FX5SSC_SetPositioningData

Name
M+FX5SSC_SetPositioningData

Overview
Item Description
Function overview Sets positioning data (Da.1 to Da.4, Da.6 to Da.10, Da.20 to Da.22).
Symbol
M+FX5SSC_SetPositioningData

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uAxis o_bErr : B (7)

(4) UW : i_uDataNo o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module
used.
(4) i_uDataNo Positioning data No. Word [unsigned] 1 to 100 Specify the positioning data No.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed without Bit OFF When ON, it indicates that setting the positioning
error data has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in
the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


4 2.1 M+FX5SSC_SetPositioningData
■Disclosed labels
Variable name Name Data type Setting range Description
pb_uOpePattern Da.1: Operation Word [unsigned] 0: Positioning complete Specify whether positioning
pattern 1: Continuous positioning control of a certain data No. is to be
3: Continuous path control ended with just that data, or
whether the positioning for
the next data No. is to be 2
carried out in succession.
pb_uCtrlSys Da.2: Control Word [unsigned] 01H: ABS Linear 1 Sets the control system for
method 02H: INC Linear 1 positioning control.
03H: Feed 1
04H: FWD V1
05H: RVS V1
06H: FWD V/P
07H: RVS V/P
08H: FWD P/V
09H: RVS P/V
0AH: ABS Linear 2
0BH: INC Linear 2
0CH: Feed 2
0DH: ABS ArcMP
0EH: INC ArcMP
0FH: ABS ArcRGT
10H: ABS ArcLFT
11H: INC ArcRGT
12H: INC ArcLFT
13H: FWD V2
14H: RVS V2
15H: ABS Linear 3
16H: INC Linear 3
17H: Feed 3
18H: FWD V3
19H: RVS V3
1AH: ABS Linear 4
1BH: INC Linear 4
1CH: Feed 4
1DH: FWD V4
1EH: RVS V4
80H: NOP
81H: Address CHG
82H: JUMP
83H: LOOP
84H: LEND
pb_uAccTimeNo Da.3: Acceleration Word [unsigned] 0: Acceleration time 0 Set any of the acceleration
time No. 1: Acceleration time 1 time 0 to 3 as the
2: Acceleration time 2 acceleration time for
3: Acceleration time 3 positioning.
pb_uDecTimeNo Da.4: Deceleration Word [unsigned] 0: Deceleration time 0 Set any of the deceleration
time No. 1: Deceleration time 1 time 0 to 3 as the
2: Deceleration time 2 deceleration time for
3: Deceleration time 3 positioning.
pb_uInterpolatedAx Da.20: Axis to be Word [unsigned] 0H: Axis 1 selected Set the axis to be
No1 interpolated No.1 1H: Axis 2 selected interpolated (interpolation
2H: Axis 3 selected axis) to execute the 2- to 4-
3H: Axis 4 selected axis interpolation operation.
4H: Axis 5 selected
5H: Axis 6 selected
6H: Axis 7 selected
7H: Axis 8 selected
pb_uInterpolatedAx Da.21: Axis to be Word [unsigned] 0H: Axis 1 selected Set the axis to be
No2 interpolated No.2 1H: Axis 2 selected interpolated (interpolation
2H: Axis 3 selected axis) to execute the 3- and 4-
3H: Axis 4 selected axis interpolation operation.
4H: Axis 5 selected
5H: Axis 6 selected
6H: Axis 7 selected
7H: Axis 8 selected

2 Simple Motion Module FB


2.1 M+FX5SSC_SetPositioningData 5
Variable name Name Data type Setting range Description
pb_uInterpolatedAx Da.22: Axis to be Word [unsigned] 0H: Axis 1 selected Set the axis to be
No3 interpolated No.3 1H: Axis 2 selected interpolated (interpolation
2H: Axis 3 selected axis) to execute the 4-axis
3H: Axis 4 selected interpolation operation.
4H: Axis 5 selected
5H: Axis 6 selected
6H: Axis 7 selected
7H: Axis 8 selected
pb_uMcode Da.10: M code Word [unsigned] Da.2: Control method = 82H: JUMP instruction Set an "M code", a "condition
• 0 to 10 data No.", or the "Number of
Da.2: Control method = 83H: LOOP LOOP to LEND repetitions"
• 1 to 65535 corresponding to the "Da.2:
Da.2: Control method = Other than the above Control method".
• 0 to 65535
pb_uDwellTime Da.9: Dwell time Word [unsigned] Da.2: Control method = 82H: JUMP instruction Set the "dwell time" or
• 1 to 600 "positioning data No."
Da.2: Control method = 82H: Other than JUMP corresponding to the "Da.2:
instruction Control method".
• 0 to 65535
pb_udCmdSpd Da.8: Command Double word Pr.1: Unit setting = 0, 1, 2 Set the command speed for
speed [signed] • 1 to 2000000000 positioning.
Pr.1: Unit setting = 3
• 1 to 1000000000
FFFFFFFFH: Current speed
(Speed set for the previous positioning data No.)
pb_dPositAdr Da.6: Positioning Double word Pr.1: Unit setting = 0, 1, 3 Set the address to be used
address [signed] • Da.2: Control method = 06H to 09H: 0 to 2147483647 as the target value for
• Da.2: Control method = Other than 06H to 09H:- positioning control.
2147483648 to 2147483647
Pr.1: Unit setting = 2
• Da.2: Control method = 01H, 0AH, 15H, 1AH, 81H,
20H, 22H, 23H: 0 to 35999999
• Da.2: Control method = 02H, 0BH, 16H, 1BH, 03H,
0CH, 17H, 1CH, 20H, 22H, 23H: -2147483648 to
2147483647
• Da.2: Control method = 06H, 07H: 0 to 2147483647
(INC mode), 0 to 35999999 (ABS mode)
• Da.2: Control method = 08H, 09H: 0 to 2147483647
pb_dArcAdr Da.7: Arc address Double word -2147483648 to 2147483647 This data is required only
[signed] when performing circular
interpolation control.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 311 steps
Function description • By turning ON i_bEN (Execution command), the set positioning data is written to the buffer memory.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When the setting value of the positioning data No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 101 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (single scan execution type)

2 Simple Motion Module FB


6 2.1 M+FX5SSC_SetPositioningData
Item Description
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)


2
Positioning data setting No processing Write No processing
processing

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Positioning data setting No processing


processing

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.
101 (Hexadecimal) The setting value of i_uDataNo (Positioning Please try again after confirming the setting.
data No.) is out of the range. The
positioning data No. is not within the range
of 1 to 100.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis and the axis to be interpolated into 8 axes.

2 Simple Motion Module FB


2.1 M+FX5SSC_SetPositioningData 7
2.2 M+FX5SSC_StartPositioning

Name
M+FX5SSC_StartPositioning

Overview
Item Description
Function overview Starts the positioning operation.
Symbol
M+FX5SSC_StartPositioning

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uAxis o_bErr : B (7)

(4) UW : i_uStartNo o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module
used.
(4) i_uStartNo Cd.3: Positioning Word [unsigned] 1 to 600: Positioning data No. Set the positioning start No. corresponding to the
start No. 7000 to 7004: Block start control to be started in Cd.3: Positioning start No.
designation
9001: Machine home position
return
9002: Fast-home position return
9003: Current value changing
9004: Simultaneous starting of
multiple axes

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that executing this FB has
without error been completed. However, this label does not turn
ON when a module error occurs at the start.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in
the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


8 2.2 M+FX5SSC_StartPositioning
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 497 steps
Function description • By turning ON i_bEN (Execution command), the control corresponding to i_uStartNo (Cd.3: Positioning start No.) is started.
• This FB is activated by turning ON the positioning start signal.
• Only when the conditions are met, the positioning start signal is turned ON by turning ON i_bEN (Execution command). The
conditions are the following: READY signal is ON, positioning start signal is OFF, start complete signal is OFF, and BUSY
signal is OFF. If any of the conditions is not met, the error code 200 (hexadecimal) is stored in o_uErrId (Error code).
• When the start complete signal is turned ON or i_bEN (Execution command) is turned OFF, the positioning start signal is
turned OFF.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When the setting value of the positioning start No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 102 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Parameter writing processing No processing Write No processing

Positioning start signal

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Parameter writing processing No processing

Positioning start signal

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


2.2 M+FX5SSC_StartPositioning 9
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• This FB turns ON and OFF the positioning start signal. Thus, do not operate the positioning start signal by the other means
while being executed.
• When this FB is used twice or more, create an interlock to prevent the FBs from being activated at the same time.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• This FB does not set the data when started. Data required for controlling the start No. must be set on the parameter or buffer
memory.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.
102 (Hexadecimal) The setting value of i_uStartNo (Cd.3: Please try again after confirming the setting.
Positioning start No.) is out of the range.
The positioning start No. is not within the
range of 1 to 600, 7000 to 7004, and 9001
to 9004.
200 (Hexadecimal) The condition for positioning start is not Execute the FB when all of the following conditions are met.
met. Any of the following conditions is not • READY signal: On
met. • Positioning start signal: Off
• READY signal: On • Start complete signal: Off
• Positioning start signal: Off • BUSY signal: Off
• Start complete signal: Off
• BUSY signal: Off

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


10 2.2 M+FX5SSC_StartPositioning
2.3 M+FX5SSC_JOG

Name
M+FX5SSC_JOG
2
Overview
Item Description
Function overview Performs the JOG operation or inching operation.
Symbol
M+FX5SSC_JOG

(1) B : i_bEN o_bENO : B (8)

(2) DUT : i_stModule o_bOK : B (9)

(3) UW : i_uAxis o_bErr : B (10)

(4) B : i_bFJog o_uErrId : UW (11)

(5) B : i_bRJog

(6) UD : i_udJogSpeed

(7) UW : i_uInching

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F Simple
depending on the Motion module.
module label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module used.
(4) i_bFJog Forward run JOG Bit ON, OFF Turn ON this label when performing the forward run JOG
command operation or forward run inching operation.
(5) i_bRJog Reverse run JOG Bit ON, OFF Turn ON this label when performing the reverse run JOG
command operation or reverse run inching operation.
(6) i_udJogSpeed Cd.17: JOG speed Double word Pr.1: Unit setting = mm/ Specify the JOG speed.
[unsigned] inch/degree *1 For inching operation, set 0.
• 1 to 2000000000*2
Pr.1: Unit setting = pulse
• 1 to 1000000000
(7) i_uInching Cd.16: Inching Word [unsigned] 0 to 65535 Specify the inching movement amount.
movement amount 0: JOG operation For JOG operation, set 0.
(0 to 32767: Set by
decimal number. 32768
to 65535: Convert the
number to hexadecimal
number and set.)

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

2 Simple Motion Module FB


2.3 M+FX5SSC_JOG 11
■Output labels
No. Variable name Name Data type Default value Description
(8) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(9) o_bOK Completed without Bit OFF ON: The JOG command is ON.
error OFF: The JOG command is OFF.
(10) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(11) o_uErrId Error code Word [unsigned] 0 The generated error code in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 447 steps
Function description • By turning ON i_bFJog (Forward run JOG command) or i_bRJog (Reverse run JOG command) after i_bEN (Execution
command) is turned ON, the JOG operation or inching operation is performed.
• When i_bFJog (Forward run JOG command) and i_bRJog (Reverse run JOG command) are ON at the same time, the
operation stops.
• When i_bEN (Execution command) is turned OFF from ON during operation that has been started by i_bFJog (Forward run
JOG command) or i_bRJog (Reverse run JOG command), the operation stops.
• When i_bRJog (Reverse run JOG command) is turned ON during forward run JOG operation, the operation stops. However,
when i_bRJog (Reverse run JOG command) is turned OFF from ON, the forward run JOG operation restarts. (This relation
is also applied to the reverse run JOG operation and i_bFJog (Forward run JOG command).
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Real-time execution
Timing chart When operation completes without an error

i_bEN
(Execution command)

o_bENO (Execution status)

i_bFJog
(Forward run JOG command)
i_bRJog
(Reverse run JOG command)
o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN
(Execution command)

o_bENO (Execution status)

JOG operation Standby

o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


12 2.3 M+FX5SSC_JOG
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• This FB turns ON and OFF the forward run JOG start signal (Cd.181) or reverse run JOG start signal (Cd.182). Thus, do not 2
turn ON or OFF the forward run JOG start signal (Cd.181) or reverse run JOG start signal (Cd.182) by the other means while
this FB is being executed.
• When this FB is used twice or more or other FB that operates the same as the signal this FB does, create an interlock to
prevent the FBs from being activated at the same time.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Setting a large value for the JOG speed from the beginning is dangerous. For the safety, set a small value first, and increase
the value gradually while checking the operation to determine the value optimal for the control.
• When values other than 0 are set in both i_uInching (Cd.16: Inching movement amount) and i_udJogSpeed (Cd.17: JOG
speed), inching operation is performed.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting. (Turn OFF the
out of the range. The target axis is not forward run JOG command or reverse run JOG command, turn
within the range of 1 to 8. ON i_bEN from OFF, and turn ON the forward run JOG command
or reverse run JOG command again.)

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


2.3 M+FX5SSC_JOG 13
2.4 M+FX5SSC_MPG

Name
M+FX5SSC_MPG

Overview
Item Description
Function overview Performs the manual pulse generator operation.
Symbol
M+FX5SSC_MPG

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uAxis o_bErr : B (7)

(4) UD : i_udMPGInputMagnification o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending on module.
the module label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module used.
(4) i_udMPGInputMagnif Cd.20: Manual Double word 1 to 10000 Set the input magnification of the manual pulse generator 1 pulse.
ication pulse generator [unsigned] When the setting value is 0, the magnification is 1.
1 pulse input When the setting value is 10,001 or higher, the magnification is
magnification 10,000.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that the manual pulse generator operation
without error has been enabled.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


14 2.4 M+FX5SSC_MPG
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 305 steps
Function description • By turning ON or OFF i_bEN (Execution command), manual pulse generator operation is enabled or disabled.
• This FB is constantly executed after i_bEN (Execution command) is turned ON.
• The workpiece moves according to the pulses input from the manual pulse generator while o_bOK (Completed without error)
is ON.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Real-time execution
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• Do not change i_uAxis (Target axis) while i_bEN (Execution command) is ON.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

2 Simple Motion Module FB


2.4 M+FX5SSC_MPG 15
Version upgrade history
Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


16 2.4 M+FX5SSC_MPG
2.5 M+FX5SSC_ChangeSpeed

Name
M+FX5SSC_ChangeSpeed
2
Overview
Item Description
Function overview Changes the speed.
Symbol
M+FX5SSC_ChangeSpeed

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uAxis o_bErr : B (7)

(4) UD : i_udSpeedChangeValue o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F Simple
depending on the Motion module.
module label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module
used.
(4) i_udSpeedChangeValue Cd.14: New speed Double word Pr.1: Unit setting = mm/ Set a new speed.
value [unsigned] inch/degree*1
• 0 to 2000000000*2
Pr.1: Unit setting = pulse
• 0 to 1000000000

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed without Bit OFF When ON, it indicates that changing the speed has
error been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the
FB.
(8) o_uErrId Error code Word [unsigned] 0 The generated error code in the FB is stored.

2 Simple Motion Module FB


2.5 M+FX5SSC_ChangeSpeed 17
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 243 steps
Function description • By turning ON i_bEN (Execution command), the speed used for the control is changed to a new speed.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN
(Execution command)

o_bENO
(Execution status)

New-speed data No processing Write No processing


writing processing

Speed change request


(buffer memory)

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN
(Execution command)

o_bENO
(Execution status)

New-speed data No processing


writing processing

Speed change request


(buffer memory)

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


18 2.5 M+FX5SSC_ChangeSpeed
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis. 2
• Every input must be provided with a value for proper FB operation.
• When i_bEN (Execution command) is turned ON while the BUSY signal is OFF, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 201 (Hexadecimal) is stored in o_uErrId (Error code).

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.
201 (Hexadecimal) This FB is executed before positioning Please try again during positioning operation.
operation starts.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


2.5 M+FX5SSC_ChangeSpeed 19
2.6 M+FX5SSC_ChangeAccDecTime

Name
M+FX5SSC_ChangeAccDecTime

Overview
Item Description
Function overview Changes the acceleration/deceleration time at a speed change.
Symbol
M+FX5SSC_ChangeAccDecTime

(1) B : i_bEN o_bENO : B (7)

(2) DUT : i_stModule o_bOK : B (8)

(3) UW : i_uAxis o_bErr : B (9)

(4) B : i_bEnable o_uErrId : UW (10)

(5) UD : i_udNewAccelerationTime

(6) UD : i_udNewDecelerationTime

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F Simple
depending on the Motion module.
module label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module used.
(4) i_bEnable Acceleration/ Bit ON: Enabled Set this label to enable or disable acceleration/deceleration
deceleration time OFF: Disabled time changes.
change enabled flag
(5) i_udNewAccelerat Cd.10: New Double word 0 to 8388608 (ms) Set a new acceleration time.
ionTime acceleration time [unsigned] When 0 is set, the acceleration time is not changed after the
value speed is changed. In this case, the previously set
acceleration time is applied to the control.
(6) i_udNewDecelerat Cd.11: New Double word 0 to 8388608 (ms) Set a new deceleration time.
ionTime deceleration time [unsigned] When 0 is set, the deceleration time is not changed after the
value speed is changed. In this case, the previously set
deceleration time is applied to the control.

■Output labels
No. Variable name Name Data type Default value Description
(7) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(8) o_bOK Completed without Bit OFF When ON, it indicates that setting acceleration/deceleration
error time change has been completed.
(9) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(10) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


20 2.6 M+FX5SSC_ChangeAccDecTime
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 269 steps
Function description • By turning ON i_bEN (Execution command), the setting of the acceleration/deceleration time is changed according to
i_bEnable (Acceleration/deceleration time change enabled flag). When i_bEnable (Acceleration/deceleration time change
enabled flag) is ON, i_udNewAccelerationTime (Cd.10: New acceleration time value) and i_udNewDecelerationTime (Cd.11:
New deceleration time value) are set and Cd.12: Acceleration/deceleration time change value during speed change, enable/
disable is changed to 1: Enables modifications to acceleration/deceleration time. When i_bEnable (Acceleration/deceleration
time change enabled flag) is OFF, i_udNewAccelerationTime (Cd.10: New acceleration time value) and
i_udNewDecelerationTime (Cd.11: New deceleration time value) are not set and Cd.12: Acceleration/deceleration time
change value during speed change, enable/disable is changed to 0: Disables modifications to acceleration/deceleration
time.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (single scan execution type)

2 Simple Motion Module FB


2.6 M+FX5SSC_ChangeAccDecTime 21
Item Description
Timing chart When operation completes without an error
• (When Cd.12: Acceleration/deceleration time change value during speed change, enable/disable is enabled)

i_bEN (Execution command)

o_bENO (Execution status)

i_bEnable (Acceleration/deceleration
time change enabled flag)

Cd.10/Cd.11: New acceleration time


Current value New value
value/New deceleration time value
Acceleration/deceleration time
Disabled Enabled Disabled
change value, enable/disable

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

• (When Cd.12: Acceleration/deceleration time change value during speed change, enable/disable is disabled)

i_bEN (Execution command)

o_bENO (Execution status)

i_bEnable (Acceleration/deceleration
time change enabled flag)

Cd.10/Cd.11: New acceleration time


Current value
value/New deceleration time value
Acceleration/deceleration time
Enabled Disabled
change value, enable/disable

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

i_bEnable (Acceleration/deceleration
time change enabled flag)

Cd.10/Cd.11: New acceleration time


Current value
value/New deceleration time value
Acceleration/deceleration time
Disabled
change value, enable/disable

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


22 2.6 M+FX5SSC_ChangeAccDecTime
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis. 2
• A duplicated coil warning may occur during compile operation. However, this is not a problem and the FB will operate without
an error.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


2.6 M+FX5SSC_ChangeAccDecTime 23
2.7 M+FX5SSC_ChangePosition

Name
M+FX5SSC_ChangePosition

Overview
Item Description
Function overview Changes the target position.
Symbol
M+FX5SSC_ChangePosition

(1) B : i_bEN o_bENO : B (6)

(2) DUT : i_stModule o_bOK : B (7)

(3) UW : i_uAxis o_bErr : B (8)

(4) D : i_dTargetNewPosition o_uErrId : UW (9)

(5) UD : i_udTargetNewSpeed

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs depending Specify the module label of the MELSEC iQ-F
on the module label. Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the
module used.
(4) i_dTargetNewPosi Cd.27: Target Double word Pr.1: Unit setting = mm Set the new positioning address when
tion position change [signed] • ABS: -2147483648 to 2147483647 changing the target position during positioning
value (New • INC: -2147483648 to 2147483647 operation.
address) Pr.1: Unit setting = inch
• ABS: -2147483648 to 2147483647
• INC: -2147483648 to 2147483647
Pr.1: Unit setting = degree
• ABS: 0 to 35999999
• INC: -2147483648 to 2147483647
Pr.1: Unit setting = pulse
• ABS: -2147483648 to 2147483647
• INC: -2147483648 to 2147483647
(5) i_udTargetNewSp Cd.28: Target Double word Pr.1: Unit setting = mm/inch/degree*1 Set the new speed when changing the target
eed position change [unsigned] • 0 to 2000000000*2 position during positioning operation.
value (New Pr.1: Unit setting = pulse When 0 is set, the speed is not changed.
speed) • 0 to 1000000000

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

2 Simple Motion Module FB


24 2.7 M+FX5SSC_ChangePosition
■Output labels
No. Variable name Name Data type Default value Description
(6) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) o_bOK Completed Bit OFF When ON, it indicates that the module has

(8) o_bErr
without error
Error flag Bit OFF
accepted the target position change values.
When ON, it indicates that an error has
2
occurred in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The generated error code in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 296 steps
Function description • By turning ON i_bEN (Execution command), the target position is changed according to the value set in
i_dTargetNewPosition (Cd.27: Target position change value (New address)) and the speed is changed according to the
value set in i_udTargetNewSpeed (Cd.28: Target position change value (New speed)) during position control.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Cd.27: Target position Current value New value

change value (New address)


Cd.28: Target position Current value New value
change value (New speed)
o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Cd.27/Cd.28:
Current value
Target position change value

o_bOK
(Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


2.7 M+FX5SSC_ChangePosition 25
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.
• When i_bEN (Execution command) is turned ON while the BUSY signal is OFF, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 201 (Hexadecimal) is stored in o_uErrId (Error code).

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.
201 (Hexadecimal) This FB is executed before positioning Please try again during positioning operation.
operation starts.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


26 2.7 M+FX5SSC_ChangePosition
2.8 M+FX5SSC_Restart

Name
M+FX5SSC_Restart
2
Overview
Item Description
Function overview Restarts the axis being stopped.
Symbol
M+FX5SSC_Restart

(1) B : i_bEN o_bENO : B (4)

(2) DUT : i_stModule o_bOK : B (5)

(3) W : i_uAxis o_bErr : B (6)

o_uErrId : UW (7)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module
used.

■Output labels
No. Variable name Name Data type Default value Description
(4) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(5) o_bOK Completed Bit OFF When ON, it indicates that the module has
without error accepted the restart command request.
(6) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in
the FB.
(7) o_uErrId Error code Word [unsigned] 0 The generated error code in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 282 steps
Function description • Only when the conditions are met, the positioning operation that is stopped due to an error is restarted by turning ON i_bEN
(Execution command). The conditions are the following: the positioning complete signal is OFF and the axis operation status
is a stop. When any of the conditions is not met, o_bErr (Error flag) turns ON, the FB processing is interrupted, and the error
code 202 (Hexadecimal) is stored in o_uErrId (Error code).
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).

2 Simple Motion Module FB


2.8 M+FX5SSC_Restart 27
Item Description
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Restart command

o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Restart command

o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.
202 (Hexadecimal) The conditions for positioning restart are Please try again when all the following conditions are satisfied.
not met. • Positioning complete signal: Off
Any of the following conditions is not met. • Axis operation status: Stop
• Positioning complete signal: Off
• Axis operation status: Stop

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


28 2.8 M+FX5SSC_Restart
2.9 M+FX5SSC_OperateError

Name
M+FX5SSC_OperateError
2
Overview
Item Description
Function overview Monitors errors and warnings, and resets errors.
Symbol
M+FX5SSC_OperateError

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uAxis o_bModuleErr : B (7)

(4) B : i_bErrReset o_uModuleErrId : UW (8)

o_bModuleWarn : B (9)

o_uModuleWarnId : UW (10)

o_bErr : B (11)

o_uErrId : UW (12)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module
used.
(4) i_bErrReset Error reset Bit ON, OFF ON: Errors are reset.
command OFF: Errors are not reset.

2 Simple Motion Module FB


2.9 M+FX5SSC_OperateError 29
■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed without Bit OFF When ON, it indicates that resetting the error has
error been completed.
(7) o_bModuleErr Axis error detection Bit OFF When ON, it indicates that an axis error has
occurred.
(8) o_uModuleErrId Axis error code Word [unsigned] 0 An error code of an error that has occurred in the
module of the specified axis is stored.
(9) o_bModuleWarn Axis warning Bit OFF When ON, it indicates that an axis warning has
detection occurred.
(10) o_uModuleWarnId Axis warning code Word [unsigned] 0 A warning code of a warning that has occurred in
the module of the specified axis is stored.
(11) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in
the FB.
(12) o_uErrId Error code Word [unsigned] 0 The generated error code in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 396 steps
Function description • By turning ON i_bEN (Execution command), errors of the target axis are monitored.
• When a module error occurs, an error code is stored in o_uModuleErrId (Axis error code).
• After i_bEN (Execution command) is turned ON, the generated error is reset by turning ON i_bErrReset (Error reset
command).
• When a warning occurs in the module, the warning can be reset by turning ON i_bErrReset (Error reset command).
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Real-time execution

2 Simple Motion Module FB


30 2.9 M+FX5SSC_OperateError
Item Description
Timing chart When operation completes without an error

i_bEN
(Execution command)
o_bENO
(Execution status)
i_bErrReset 2
(Error reset command)
Axis error reset 0 1 0

Error detection signal

o_bModuleErr
(Axis error detection)
o_uModuleErrId
0 Error code 0
(Axis error code)
o_bModuleWarn
(Axis warning detection)
o_uModuleWarnId 0 Warning code 0
(Axis warning code)
o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN
(Execution command)
o_bENO
(Execution status)
i_bErrReset
(Error reset command)
Axis error reset 0

Error detection signal

o_bModuleErr
(Axis error detection)
o_uModuleErrId
(Axis error code) 0

o_bModuleWarn
(Axis warning detection)
o_uModuleWarnId 0
(Axis warning code)
o_bOK
(Completed without error)
o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Do not change i_uAxis (Target axis) while i_bEN (Execution command) is ON.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

2 Simple Motion Module FB


2.9 M+FX5SSC_OperateError 31
Version upgrade history
Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


32 2.9 M+FX5SSC_OperateError
2.10 M+FX5SSC_InitializeParameter

Name
M+FX5SSC_InitializeParameter
2
Overview
Item Description
Function overview Initializes the parameter.
Symbol

M+FX5SSC_InitializeParameter

(1) B : i_bEN o_bENO : B (3)

(2) DUT : i_stModule o_bOK : B (4)

o_bErr : B (5)

o_uErrId : UW (6)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.

■Output labels
No. Variable name Name Data type Default value Description
(3) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(4) o_bOK Completed Bit OFF When ON, it indicates that initializing the
without error parameter has been completed.
(5) o_bErr Error flag Bit OFF Always OFF
(6) o_uErrId Error code Word [unsigned] 0 Always 0

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 66 steps
Function description By turning ON i_bEN (Execution command), the setting data stored in the buffer memory and the flash ROM of the FX5-
40SSC-S/FX5-80SSC-S is reset to the factory setting.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)

2 Simple Motion Module FB


2.10 M+FX5SSC_InitializeParameter 33
Item Description
Timing chart

i_bEN (Execution command)

o_bENO (Execution status)

Cd.2: Parameter initialization request 0 1 0

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• Every input must be provided with a value for proper FB operation.
• Before using this FB, make sure that the PLC READY signal is OFF.
• After the setting data is initialized, reset the CPU module or restart the power of the programmable controller.

Error codes
Error code Description Action
None None None

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


34 2.10 M+FX5SSC_InitializeParameter
2.11 M+FX5SSC_WriteFlash

Name
M+FX5SSC_WriteFlash
2
Overview
Item Description
Function overview Writes the parameter, positioning data, and block start data in the buffer memory to the flash ROM.
Symbol
M+FX5SSC_WriteFlash

(1) B : i_bEN o_bENO : B (3)

(2) DUT : i_stModule o_bOK : B (4)

o_bErr : B (5)

o_uErrId : UW (6)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC iQ-F
depending on the module label. Simple Motion module.

■Output labels
No. Variable name Name Data type Default value Description
(3) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(4) o_bOK Completed Bit OFF When ON, it indicates that writing the setting data
without error to the flash ROM has been completed.
(5) o_bErr Error flag Bit OFF Always OFF
(6) o_uErrId Error code Word [unsigned] 0 Always 0

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 66 steps
Function description By turning ON i_bEN (Execution command), the setting data in the buffer memory is written to the flash ROM.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)

2 Simple Motion Module FB


2.11 M+FX5SSC_WriteFlash 35
Item Description
Timing chart

i_bEN (Execution command)

o_bENO (Execution status)

Cd.1: Flash ROM writing request 0 1 0

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• Every input must be provided with a value for proper FB operation.
• Before using this FB, make sure that the PLC READY signal is OFF.

Error codes
Error code Description Action
None None None

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


36 2.11 M+FX5SSC_WriteFlash
2.12 M+FX5SSC_ChangeServoParameter

Name
M+FX5SSC_ChangeServoParameter
2
Overview
Item Description
Function overview Changes the servo parameter after the servo amplifier is activated.
Symbol
M+FX5SSC_ChangeServoParameter

(1) B : i_bEN o_bENO : B (6)

(2) DUT : i_stModule o_bOK : B (7)

(3) UW : i_uAxis o_bErr : B (8)

(4) UW : i_uParameterNo. o_uErrId : UW (9)

(5) D : i_dChangeValue

2 Simple Motion Module FB


2.12 M+FX5SSC_ChangeServoParameter 37
Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending module.
on the module
label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module used.
(4) i_uParameterNo Cd.131: Parameter Word [unsigned] H0001 to H0C40 Set the servo parameter No. to be changed.
No. Set the data in the same specifications as [Cd.131] of the system
control data.
Even when the data No. different from the data specifications of
[Cd.131] is specified, the execution of this FB is completed
normally.
In this case, an error may occur in the Simple Motion module.
The following figure shows the data specifications of [Cd.131].

Setting value

Parameter No. setting


01h to 40h
Parameter group
Writing mode 0: PA group
0: Writing to the RAM 1: PB group
2: PC group
3: PD group
4: PE group
5: PF group
9: PO group
A: PS group

(5) i_dChangeValue Cd.132: Change Double word Refer to the Servo Set the servo parameter value to be changed.
data [signed] Amplifier
Instruction
Manual.

■Output labels
No. Variable name Name Data type Default value Description
(6) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) o_bOK Completed without Bit OFF When ON, it indicates that changing the servo parameter has been
error completed.
(8) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


38 2.12 M+FX5SSC_ChangeServoParameter
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 274 steps
Function description • By turning ON i_bEN (Execution command), the servo parameter after the servo amplifier is started is changed.
• When the target axis of the input label is incorrectly set, o_bErr turns ON and the error code is stored in o_bErrId.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Parameter writing processing No processing Write No processing

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Parameter writing processing No processing

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.
• Before using this FB, make sure that communication with the servo amplifier is established.
• When this FB fails writing the parameter, o_bOK (Completed without error) does not turn ON.
• The setting items and range differ depending on the module used in the system.
• This FB does not support the servo parameter write with 2-word.

2 Simple Motion Module FB


2.12 M+FX5SSC_ChangeServoParameter 39
Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


40 2.12 M+FX5SSC_ChangeServoParameter
2.13 M+FX5SSC_ChangeTorqueControlMode

Name
M+FX5SSC_ChangeTorqueControlMode
2
Overview
Item Description
Function overview Activates the torque control mode.
Symbol
M+FX5SSC_ChangeTorqueControlMode

(1) B : i_bEN o_bENO : B (8)

(2) DUT : i_stModule o_bOK : B (9)

(3) UW : i_uAxis o_bErr : B (10)

(4) W : i_wCommandTorque o_uErrId : UW (11)

(5) UW : i_uTorqueTimeConstDrivingMode

(6) UW : i_uTorqueTimeConstRegenerativeMode

(7) UD : i_udSpeedLimit

2 Simple Motion Module FB


2.13 M+FX5SSC_ChangeTorqueControlMode 41
Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the
depending on the MELSEC iQ-F Simple Motion
module label. module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending
on the module used.
(4) i_wCommandTorque Cd.143: Command Word [signed] -10000 to 10000 Set the command torque at toque
torque at torque control mode.
control mode
(5) i_uTorqueTimeConstDrivingMode Cd.144: Torque time Word [unsigned] 0 to 65535 Set the time constant for the driving
constant at torque (0 to 32767: Set by of torque control mode.
control mode decimal number. 32768
(Forward direction) to 65535: Convert the
number to hexadecimal
number and set.)
(6) i_uTorqueTimeConstRegenerativeMode Cd.145: Torque time Word [unsigned] 0 to 65535 Set the time constant for the
constant at torque (0 to 32767: Set by regeneration of torque control
control mode decimal number. 32768 mode.
(Negative direction) to 65535: Convert the
number to hexadecimal
number and set.)
(7) i_udSpeedLimit Cd.146: Speed limit Double word Pr.1: Unit setting = mm/ Set the speed limit value at torque
value at torque [unsigned] inch/degree*1 control mode.
control mode • 0 to 2000000000*2
Pr.1: Unit setting = pulse
• 0 to 1000000000

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

■Output labels
No. Variable name Name Data type Default value Description
(8) o_bENO Execution status Bit OFF ON: The execution command is
ON.
OFF: The execution command is
OFF.
(9) o_bOK Completed without Bit OFF When ON, it indicates that changing
error to the torqu control mode has been
completed.
(10) o_bErr Error flag Bit OFF When ON, it indicates that an error
has occurred in the FB.
(11) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB
is stored.

2 Simple Motion Module FB


42 2.13 M+FX5SSC_ChangeTorqueControlMode
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 424 steps
Function description • By turning ON i_bEN (Execution command), the torque control mode is activated for the specified axis.
• When this FB is executed under torque control, the command torque and speed limit value are changed.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching No processing Write No processing


request writing

Servo status control mode Currently activated control mode Torque control mode activated

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching No processing


request writing

Servo status control mode Currently activated control mode

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.
• When this FB fails switching the mode, o_bOK (Completed without error) does not turn ON.

2 Simple Motion Module FB


2.13 M+FX5SSC_ChangeTorqueControlMode 43
Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


44 2.13 M+FX5SSC_ChangeTorqueControlMode
2.14 M+FX5SSC_ChangeSpeedControlMode

Name
M+FX5SSC_ChangeSpeedControlMode
2
Overview
Item Description
Function overview Activates the speed control mode.
Symbol
M+FX5SSC_ChangeSpeedControlMode

(1) B : i_bEN o_bENO : B (7)

(2) DUT : i_stModule o_bOK : B (8)

(3) UW : i_uAxis o_bErr : B (9)

(4) D : i_dCommandSpeed o_uErrId : UW (10)

(5) UW : i_uSpeedAccelerationTime

(6) UW : i_uSpeedDecelerationTime

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC
depending on the module label. iQ-F Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on
the module used.
(4) i_dCommandSpeed Cd.140: Command Double word Pr.1: Unit setting = mm/inch/ Set the command speed at speed
speed at speed [signed] degree*1 control mode.
control mode • -2000000000 to 2000000000*2
Pr.1: Unit setting = pulse
• -1000000000 to 1000000000
(5) i_uSpeedAccelerationTime Cd.141: Word [unsigned] 0 to 65535 Set the acceleration time at speed
Acceleration time at (0 to 32767: Set by decimal control mode.
speed control mode number. 32768 to 65535: Convert
the number to hexadecimal
number and set.)
(6) i_uSpeedDecelerationTime Cd.142: Word [unsigned] 0 to 65535 Set the deceleration time at speed
Deceleration time at (0 to 32767: Set by decimal control mode.
speed control mode number. 32768 to 65535: Convert
the number to hexadecimal
number and set.)

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

2 Simple Motion Module FB


2.14 M+FX5SSC_ChangeSpeedControlMode 45
■Output labels
No. Variable name Name Data type Default value Description
(7) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(8) o_bOK Completed without Bit OFF When ON, it indicates that changing to
error the speed control mode has been
completed.
(9) o_bErr Error flag Bit OFF When ON, it indicates that an error has
occurred in the FB.
(10) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is
stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 372 steps
Function description • By turning ON i_bEN (Execution command), the speed control mode is activated for the specified axis.
• When this FB is executed under speed control, the command speed is changed.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching request writing No processing Write No processing

Servo status control mode Currently activated control mode Speed control mode activated

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching No processing


request writing

Servo status control mode Currently activated control mode

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


46 2.14 M+FX5SSC_ChangeSpeedControlMode
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis. 2
• Every input must be provided with a value for proper FB operation.
• When this FB fails switching the mode, o_bOK (Completed without error) does not turn ON.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


2.14 M+FX5SSC_ChangeSpeedControlMode 47
2.15 M+FX5SSC_ChangePositionControlMode

Name
M+FX5SSC_ChangePositionControlMode

Overview
Item Description
Function overview Activates the position control mode.
Symbol
M+FX5SSC_ChangePositionControlMode

(1) B : i_bEN o_bENO : B (4)

(2) DUT : i_stModule o_bOK : B (5)

(3) UW : i_uAxis o_bErr : B (6)

o_uErrId : UW (7)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending on module.
the module label.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending on the module used.

■Output labels
No. Variable name Name Data type Default value Description
(4) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(5) o_bOK Completed Bit OFF When ON, it indicates that changing to the positioning control
without error mode has been completed.
(6) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(7) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


48 2.15 M+FX5SSC_ChangePositionControlMode
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 419 steps
Function description • By turning ON i_bEN (Execution command), the position control mode is activated for the specified axis.
• When this FB is executed during position control, the execution is completed without any processing.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching request writing No processing Write No processing

Servo status control mode Currently activated control mode Position control mode activated

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching request writing No processing

Servo status control mode Currently activated control mode

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis.
• Every input must be provided with a value for proper FB operation.
• When this FB fails switching the mode, o_bOK (Completed without error) does not turn ON.

2 Simple Motion Module FB


2.15 M+FX5SSC_ChangePositionControlMode 49
Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


50 2.15 M+FX5SSC_ChangePositionControlMode
2.16 M+FX5SSC_ChangeContinuousTorqueMode

Name
M+FX5SSC_ChangeContinuousTorqueMode
2
Overview
Item Description
Function overview Activates the continuous operation to torque control mode.
Symbol
M+FX5SSC_ChangeContinuousTorqueMode

(1) B : i_bEN o_bENO : B (12)

(2) DUT : i_stModule o_bOK : B (13)

(3) UW : i_uAxis o_bErr : B (14)

(4) D : i_dSpeedLimit o_uErrId : UW (15)

(5) UW : i_uSpeedAccelerationTime

(6) UW : i_uSpeedDecelerationTime

(7) W : i_wCommandTorque

(8) UW : i_uTorqueTimeConstDrivingMode

(9) UW : i_uTorqueTimeConstRegenerativeMode

(10) UW : i_uAutoSwitchingMode

(11) D : i_dAutoSwitchingParameter

2 Simple Motion Module FB


2.16 M+FX5SSC_ChangeContinuousTorqueMode 51
Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the
depending on the module label. MELSEC iQ-F Simple Motion module.
(3) i_uAxis Target axis Word [unsigned] 1 to 8 Specify the axis No.
The setting range differs depending
on the module used.
(4) i_dSpeedLimit Cd.147: Speed limit Double word Pr.1: Unit setting = mm/inch/ Set the speed limit value at
value at continuous [signed] degree*1 continuous operation to torque control
operation to torque • -2000000000 to 2000000000*2 mode.
control mode Pr.1: Unit setting = pulse
• -1000000000 to 1000000000
(5) i_uSpeedAccelerationTime Cd.148: Acceleration Word [unsigned] 0 to 65535 Set the acceleration time at
time at continuous (0 to 32767: Set by decimal continuous operation to torque control
operation to torque number. 32768 to 65535: Convert mode.
control mode the number to hexadecimal
number and set.)
(6) i_uSpeedDecelerationTime Cd.149: Deceleration Word [unsigned] 0 to 65535 Set the deceleration time at
time at continuous (0 to 32767: Set by decimal continuous operation to torque control
operation to torque number. 32768 to 65535: Convert mode.
control mode the number to hexadecimal
number and set.)
(7) i_wCommandTorque Cd.150: Target Word [signed] -10000 to 10000 Set the target torque at continuous
torque at continuous operation to torque control mode.
operation to torque
control mode
(8) i_uTorqueTimeConstDriving Cd.151: Torque time Word [unsigned] 0 to 65535 Set the time constant for the driving at
Mode constant at (0 to 32767: Set by decimal continuous operation to torque control
continuous operation number. 32768 to 65535: Convert mode.
to torque control the number to hexadecimal
mode (Forward number and set.)
direction)
(9) i_uTorqueTimeConstRegen Cd.152: Torque time Word [unsigned] 0 to 65535 Set the time constant for the
erativeMode constant at (0 to 32767: Set by decimal regeneration at continuous operation
continuous operation number. 32768 to 65535: Convert to torque control mode.
to torque control the number to hexadecimal
mode (Negative number and set.)
direction)
(10) i_uAutoSwitchingMode Cd.153: Control Word [unsigned] 0 to 2 Set the switching condition of the
mode auto-shift control mode to switch to continuous
selection operation to torque control mode.
(11) i_dAutoSwitchingParameter Cd.154: Control Double word Pr.1: Unit setting = mm/inch Set the condition value when the
mode auto-shift [signed] • -2147483648 to 2147483647*2 control mode auto-shift selection is
parameter Pr.1: Unit setting = degree set to 1 or 2.
• 0 to 35999999*2
Pr.1: Unit setting = pulse
• -2147483648 to 2147483647

*1 When "Pr.1 Unit setting" is set to "degree" and "Pr.83 Speed control 10  multiplier setting for degree axis" is valid, the value is set as 10
times of setting value.
*2 The value is set corresponding to the setting of "Pr.1 Unit setting".

■Output labels
No. Variable name Name Data type Default value Description
(12) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(13) o_bOK Completed without Bit OFF When ON, it indicates that changing to the continuous
error operation to torque control mode has been completed.
(14) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the
FB.
(15) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


52 2.16 M+FX5SSC_ChangeContinuousTorqueMode
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 633 steps
Function description • By turning ON i_bEN (Execution command), the continuous operation to torque control mode is activated for the specified
axis.
• When this FB is executed during continuous operation to torque control mode, the speed limit value and target torque are
changed.
• When the setting value of the target axis is out of the range, o_bErr (Error flag) turns ON, the FB processing is interrupted,
and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)

2 Simple Motion Module FB


2.16 M+FX5SSC_ChangeContinuousTorqueMode 53
Item Description
Timing chart When operation completes without an error
• When the control mode auto-shift selection is set to 0

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching


No processing Write No processing
request writing

Continuous operation to torque


Servo status control mode Currently activated control mode control mode activated

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

• When the control mode auto-shift selection is set to other than 0

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching


No processing Write No processing
request writing

Feed current value or Mode switching condition value


real current value

Continuous operation to torque


Servo status control mode Currently activated control mode control mode activated

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Control mode switching


No processing
request writing

Servo status control mode Currently activated control mode

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

2 Simple Motion Module FB


54 2.16 M+FX5SSC_ChangeContinuousTorqueMode
Item Description
Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• Ensure that i_bEN (Execution command) is capable of being turned OFF by the program. Do not use this FB in programs
that are only executed once such as a subroutine and FOR-NEXT loop because i_bEN (Execution command) cannot be
turned OFF.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the target axis. 2
• Every input must be provided with a value for proper FB operation.
• When this FB fails switching the mode, o_bOK (Completed without error) does not turn ON.

Error codes
Error code Description Action
100 (Hexadecimal) The setting value of i_uAxis (Target axis) is Please try again after confirming the setting.
out of the range. The target axis is not
within the range of 1 to 8.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
target axis into 8 axes.

2 Simple Motion Module FB


2.16 M+FX5SSC_ChangeContinuousTorqueMode 55
2.17 M+FX5SSC_Sync

Name
M+FX5SSC_Sync

Overview
Item Description
Function overview Starts and ends the synchronous control.
Symbol
M+FX5SSC_Sync

(1) B : i_bEN o_bENO : B (4)

(2) DUT : i_stModule o_bOK : B (5)

(3) UW : i_uOutputAxis o_bErr : B (6)

o_uErrId : UW (7)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending on module.
the module label.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Specify the axis No. for which synchronous control is started.
The setting range differs depending on the module used.

■Output labels
No. Variable name Name Data type Default value Description
(4) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(5) o_bOK Completed without Bit OFF When ON, it indicates that synchronous control has been
error started.
(6) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(7) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


56 2.17 M+FX5SSC_Sync
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 195 steps
Function description • By turning ON i_bEN (Execution command), synchronous control of the output axis No. is started. Turning OFF i_bEN
(Execution command) ends the synchronous control.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• The synchronous control does not start while the READY signal is OFF, the BUSY signal is ON, or the error detection signal
is ON.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Axis operation status Standby Synchronous control activated Standby

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Axis operation status Standby

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


2.17 M+FX5SSC_Sync 57
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
output axis No.into 8 axes.

2 Simple Motion Module FB


58 2.17 M+FX5SSC_Sync
2.18 M+FX5SSC_ChangeSyncEncoderPosition

Name
M+FX5SSC_ChangeSyncEncoderPosition
2
Overview
Item Description
Function overview Changes the synchronous encoder axis current value and synchronous encoder axis current value per cycle.
Symbol
M+FX5SSC_ChangeSyncEncoderPosition

(1) B : i_bEN o_bENO : B (6)

(2) DUT : i_stModule o_bOK : B (7)

(3) UW : i_uSyncEncAxis o_bErr : B (8)

(4) UW : i_uStartControl o_uErrId : UW (9)

(5) D : i_dNewPosition

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs depending Specify the module label of the MELSEC iQ-F
on the module label. Simple Motion module.
(3) i_uSyncEncAxis Synchronous Word [unsigned] 1 to 4: Synchronous encoder axis Set the synchronous encoder axis No. whose
encoder axis No. No. current value is to be changed.
(4) i_uStartControl Cd.320: Word [unsigned] 1: Start for synchronous encoder When 1 is set, synchronous encoder axis control
Synchronous axis control is started.
encoder axis 101 to 108: High-speed input start When 101 to 108 is set, the synchronous
control start for synchronous encoder axis encoder axis control starts based on the high-
control (axis 1 to axis 8) speed input request (external command signal).
The setting range differs depending on the
module used.
(5) i_dNewPosition Cd.322: Double word Pr.321: Synchronous encoder axis Set the new current value after a current value
Synchronous [signed] unit setting = mm/inch/degree/pulse change.
encoder axis • -2147483648 to 2147483647*1
current value
setting address

*1 The value is set corresponding to the setting of "Pr.321 Synchronous encoder axis unit setting".

■Output labels
No. Variable name Name Data type Default value Description
(6) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) o_bOK Completed Bit OFF When ON, it indicates that setting the synchronous encoder axis
without error current value change has been completed.
(8) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


2.18 M+FX5SSC_ChangeSyncEncoderPosition 59
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 269 steps
Function description • The operation method differs depending on the setting value of the synchronous encoder axis control start. When the setting
value is 1, the synchronous encoder axis current value is changed by turning ON i_bEN (Execution command). When the
setting value is 101 to 108, the synchronous encoder axis current value is changed by the high speed input request [DI] after
i_bEN (Execution command) is turned ON.
• When the setting value of the synchronous encoder axis No. is out of the range, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the synchronous encoder axis for which the synchronous encoder axis enabled flag is OFF,
o_bErr (Error flag) turns ON, the FB processing is interrupted, and the error code 301 (Hexadecimal) is stored in o_uErrId
(Error code).
Compiling method Macro type
FB operation type Pulsed execution (single scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis control No processing 0: Current value change


method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis control No processing


method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the synchronous encoder axis No.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


60 2.18 M+FX5SSC_ChangeSyncEncoderPosition
Error codes
Error code Description Action
100 (Hexadecimal) The synchronous encoder axis No. is not Please try again after confirming the setting.
within the setting range.
301 (Hexadecimal) The synchronous encoder axis enabled Please try again after confirming the setting.
flag of the synchronous encoder axis No. is 2
OFF.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.18 M+FX5SSC_ChangeSyncEncoderPosition 61
2.19 M+FX5SSC_DisableSyncEncoder

Name
M+FX5SSC_DisableSyncEncoder

Overview
Item Description
Function overview Disables inputs from the synchronous encoder axis.
Symbol
M+FX5SSC_DisableSyncEncoder

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uSyncEncAxis o_bErr : B (7)

(4) UW : i_uStartControl o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs depending Specify the module label of the MELSEC iQ-F
on the module label. Simple Motion module.
(3) i_uSyncEncAxis Synchronous Word [unsigned] 1 to 4: Synchronous encoder axis Set the synchronous encoder axis No. whose
encoder axis No. No. inputs are to be disabled.
(4) i_uStartControl Cd.320: Word [unsigned] 1: Start for synchronous encoder When 1 is set, synchronous encoder axis control
Synchronous axis control is started.
encoder axis 101 to 108: High-speed input start When 101 to 108 is set, the synchronous
control start for synchronous encoder axis encoder axis control starts based on the high-
control (axis 1 to axis 8) speed input request (external command signal).
The setting range differs depending on the
module used.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that disabling the synchronous encoder axis
without error counter has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


62 2.19 M+FX5SSC_DisableSyncEncoder
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 216 steps
Function description • The operation method differs depending on the setting value of the synchronous encoder axis control start. When the setting
value is 1, the synchronous encoder axis counter is disabled by turning ON i_bEN (Execution command). When the setting
value is 101 to 108, the synchronous encoder axis counter is disabled by the high speed input request [DI] after i_bEN
(Execution command) is turned ON.
• When the setting value of the synchronous encoder axis No. is out of the range, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the synchronous encoder axis for which the synchronous encoder axis enabled flag is OFF,
o_bErr (Error flag) turns ON, the FB processing is interrupted, and the error code 301 (Hexadecimal) is stored in o_uErrId
(Error code).
Compiling method Macro type
FB operation type Pulsed execution (single scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis No processing 1: Counter disable


control method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis No processing


control method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the synchronous encoder axis No.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


2.19 M+FX5SSC_DisableSyncEncoder 63
Error codes
Error code Description Action
100 (Hexadecimal) The synchronous encoder axis No. is not Please try again after confirming the setting.
within the setting range.
301 (Hexadecimal) The synchronous encoder axis enabled Execute the FB again after turning ON the synchronous encoder
flag of the synchronous encoder axis No. is axis setting enabled flag.
OFF.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


64 2.19 M+FX5SSC_DisableSyncEncoder
2.20 M+FX5SSC_EnableSyncEncoder

Name
M+FX5SSC_EnableSyncEncoder
2
Overview
Item Description
Function overview Enables inputs from the synchronous encoder axis.
Symbol
M+FX5SSC_EnableSyncEncoder

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uSyncEncAxis o_bErr : B (7)

(4) UW : i_uStartControl o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs depending Specify the module label of the MELSEC iQ-F
on the module label. Simple Motion module.
(3) i_uSyncEncAxis Synchronous Word [unsigned] 1 to 4: Synchronous encoder axis Set the synchronous encoder axis No. whose
encoder axis No. No. inputs are to be enabled.
(4) i_uStartControl Cd.320: Word [unsigned] 1: Start for synchronous encoder When 1 is set, synchronous encoder axis control
Synchronous axis control is started.
encoder axis 101 to 108: High-speed input start When 101 to 108 is set, the synchronous
control start for synchronous encoder axis encoder axis control starts based on the high-
control (axis 1 to axis 8) speed input request (external command signal).
The setting range differs depending on the
module used.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that enabling the synchronous encoder axis
without error counter has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


2.20 M+FX5SSC_EnableSyncEncoder 65
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 216 steps
Function description • The operation method differs depending on the setting value of the synchronous encoder axis control start. When the setting
value is 1, the synchronous encoder axis counter is enabled by turning ON i_bEN (Execution command). When the setting
value is 101 to 108, the synchronous encoder axis counter is enabled by the high speed input request [DI] after i_bEN
(Execution command) is turned ON.
• When the setting value of the synchronous encoder axis No. is out of the range, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the synchronous encoder axis for which the synchronous encoder axis enabled flag is OFF,
o_bErr (Error flag) turns ON, the FB processing is interrupted, and the error code 301 (Hexadecimal) is stored in o_uErrId
(Error code).
Compiling method Macro type
FB operation type Pulsed execution (single scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis control No processing 2: Counter enable


method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous encoder axis control No processing


method

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the synchronous encoder axis No.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


66 2.20 M+FX5SSC_EnableSyncEncoder
Error codes
Error code Description Action
100 (Hexadecimal) The synchronous encoder axis No. is not Please try again after confirming the setting.
within the setting range.
301 (Hexadecimal) The synchronous encoder axis enabled Execute the FB again after turning ON the synchronous encoder
flag of the synchronous encoder axis No. is axis setting enabled flag. 2
OFF.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.20 M+FX5SSC_EnableSyncEncoder 67
2.21 M+FX5SSC_ResetSyncEncoderError

Name
M+FX5SSC_ResetSyncEncoderError

Overview
Item Description
Function overview Reads error information from the synchronous encoder axis, and resets the error.
Symbol
M+FX5SSC_ResetSyncEncoderError

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uSyncEncAxis o_bModuleErr : B (7)

(4) B : i_bResetError o_uErrorNo : UW (8)

o_bModuleWarn : B (9)

o_uWarningNo : UW (10)

o_bErr : B (11)

o_uErrId : UW (12)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending on module.
the module label.
(3) i_uSyncEncAxis Synchronous Word [unsigned] 1 to 4: Synchronous Set the synchronous encoder axis No. from which the error No.
encoder axis No. encoder axis No. and warning No. are read.
(4) i_bResetError Error reset Bit ON, OFF Turn ON this label to reset errors. Turn OFF this label after the
request error reset is completed.

2 Simple Motion Module FB


68 2.21 M+FX5SSC_ResetSyncEncoderError
■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that the error detection flag and warning
without error detection flag of the synchronous encoder axis status have been
turned OFF.
2
(7) o_bModuleErr Error detection Bit OFF When ON, it indicates that the synchronous encoder axis error
has occurred.
(8) o_uErrorNo Error No. Word [unsigned] 0 When the synchronous encoder axis error is detected, the error
code corresponding to the error is stored.
(9) o_bModuleWarn Warning detection Bit OFF When ON, it indicates that the synchronous encoder axis
warning has occurred.
(10) o_uWarningNo Warning No. Word [unsigned] 0 When the synchronous encoder axis warning is detected, the
warning code corresponding to the warning is stored.
(11) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(12) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 447 steps
Function description • By turn ON i_bEN (Execution command), the synchronous encoder axis error and warning information of the synchronous
encoder axis No. are read.
• When the error reset request is ON, the error and warning are reset.
• When the setting value of the synchronous encoder axis No. is out of the range, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Real-time execution

2 Simple Motion Module FB


2.21 M+FX5SSC_ResetSyncEncoderError 69
Item Description
Timing chart When operation completes without an error (error reset)

i_bEN (Execution command)

o_bENO (Execution status)

i_bResetError (Error reset request)

Synchronous encoder axis reset

o_uErrorNo (Error No.) 0 Error No. 0

Synchronous encoder axis error flag

o_bModuleErr (Error detection)

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When operation completes without an error (warning reset)

i_bEN (Execution command)

o_bENO (Execution status)

i_bResetError (Error reset request)

Synchronous encoder axis reset

o_uWarningNo (Warning No.) 0 Warning No. 0

Synchronous encoder axis warning flag

o_bModuleWarn (Warning detection)

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

2 Simple Motion Module FB


70 2.21 M+FX5SSC_ResetSyncEncoderError
Item Description
Timing chart When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)


2
i_bResetError (Error reset request)

Synchronous encoder axis reset

o_uErrorNo (Error No.) 0

o_uWarningNo (Warning No.) 0

Synchronous encoder axis error flag

Synchronous encoder axis warning flag

o_bModuleErr (Error detection)

o_bModuleWarn (Warning detection)

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the synchronous encoder axis No.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The synchronous encoder axis No. is not Please try again after confirming the setting.
within the setting range.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.21 M+FX5SSC_ResetSyncEncoderError 71
2.22 M+FX5SSC_ConnectSyncEncoder

Name
M+FX5SSC_ConnectSyncEncoder

Overview
Item Description
Function overview Connects a synchronous encoder via CPU.
Symbol
M+FX5SSC_ConnectSyncEncoder

(1) B : i_bEN o_bENO : B (4)

(2) DUT : i_stModule o_bOK : B (5)

(3) UW : i_uSyncEncAxis o_bErr : B (6)

o_uErrId : UW (7)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple Motion
differs depending on module.
the module label.
(3) i_uSyncEncAxis Synchronous Word [unsigned] 1 to 4: Synchronous Set the synchronous encoder axis No. for which the connection
encoder axis No. encoder axis No. command of the synchronous encoder via CPU is executed.

■Output labels
No. Variable name Name Data type Default value Description
(4) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(5) o_bOK Completed Bit OFF When ON, it indicates that the connecting valid flag of the
without error synchronous encoder axis status has been turned ON.
(6) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the FB.
(7) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 226 steps

2 Simple Motion Module FB


72 2.22 M+FX5SSC_ConnectSyncEncoder
Item Description
Function description • By turning ON i_bEN (Execution command), the synchronous encoder of the synchronous encoder axis No. is connected via
CPU.
• When the setting value of the synchronous encoder axis No. is out of the range, o_bErr (Error flag) turns ON, the FB
processing is interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the synchronous encoder axis for which the synchronous encoder axis enabled flag is OFF,
o_bErr (Error flag) turns ON, the FB processing is interrupted, and the error code 301 (Hexadecimal) is stored in o_uErrId
(Error code). 2
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Connection command of synchronous


encoder via CPU No processing 1: Connect synchronous encoder via CPU

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Connection command of synchronous No processing


encoder via CPU

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the synchronous encoder axis No.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
100 (Hexadecimal) The synchronous encoder axis No. is not Please try again after confirming the setting.
within the setting range.
301 (Hexadecimal) The synchronous encoder axis enabled Execute the FB again after turning ON the synchronous encoder
flag of the synchronous encoder axis No. is axis setting enabled flag.
OFF.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.22 M+FX5SSC_ConnectSyncEncoder 73
2.23 M+FX5SSC_MoveCamReferencePosition

Name
M+FX5SSC_MoveCamReferencePosition

Overview
Item Description
Function overview Adds the movement amount set in the synchronous control change value to the cam reference position to move the cam
reference position.
Symbol
M+FX5SSC_MoveCamReferencePosition

(1) B : i_bEN o_bENO : B (6)

(2) DUT : i_stModule o_bOK : B (7)

(3) UW : i_uOutputAxis o_bErr : B (8)

(4) D : i_dSyncCtrlChangeValue o_uErrId : UW (9)

(5) UW : i_uSyncCtrlReflectionTime

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC
depending on the module label. iQ-F Simple Motion module.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Set the axis No. whose cam reference
position is to be moved.
The setting range differs depending on the
module used.
(4) i_dSyncCtrlChangeValue Cd.408: Double word -2147483648 to 2147483647 Set the amount of the cam reference
Synchronous [signed] *1*2 position movement.
control change
value
(5) i_uSyncCtrlReflectionTime Cd.409: Word [unsigned] 0 to 65535 (ms) Set the reflection time for the synchronous
Synchronous (0 to 32767: Set by decimal control change.
control reflection number. 32768 to 65535: Convert
time the number to hexadecimal
number and set.)

*1 The output axis position unit is set to the value corresponding to the setting of "Pr.1 Unit setting" and the cam axis cycle unit is set to the
value corresponding to the setting of "Pr.438 Cam axis cycle unit setting".
*2 The setting range is the same even if the unit differs.

■Output labels
No. Variable name Name Data type Default value Description
(6) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) o_bOK Completed Bit OFF When ON, it indicates that moving the cam
without error reference position has been completed.
(8) o_bErr Error flag Bit OFF When ON, it indicates that an error has
occurred in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is
stored.

2 Simple Motion Module FB


74 2.23 M+FX5SSC_MoveCamReferencePosition
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 427 steps
Function description • By turning ON i_bEN (Execution command), the cam reference position of the output axis No. is moved.
• If i_bEN (Execution command) is turned OFF during movement of the cam reference position, the operation stops during the
movement and o_bOK (Completed without error) does not turn ON.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the output axis No. with which synchronous control is not executed, o_bErr (Error flag) turns
ON, the FB processing is interrupted, and the error code 300 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing 0: Cam reference position movement
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• If this FB is used together with other synchronous control change FBs that have the same output axis No., secure one
operation cycle or more after o_bOK (Completed without error) of this FB turns ON and before the FBs are executed.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


2.23 M+FX5SSC_MoveCamReferencePosition 75
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.
300 (Hexadecimal) The FB is executed for the output axis No. Please try again after confirming the setting.
with which synchronous control is not
executed.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
output axis No.into 8 axes.

2 Simple Motion Module FB


76 2.23 M+FX5SSC_MoveCamReferencePosition
2.24 M+FX5SSC_ChangeCamPositionPerCycle

Name
M+FX5SSC_ChangeCamPositionPerCycle
2
Overview
Item Description
Function overview Changes the cam axis current value per cycle to a synchronous control change value.
Symbol
M+FX5SSC_ChangeCamPositionPerCycle

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uOutputAxis o_bErr : B (7)

(4) D : i_dSyncCtrlChangeValue o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Set the axis No. whose cam axis current value per cycle
is to be changed.
The setting range differs depending on the module
used.
(4) i_dSyncCtrlChangeValue Cd.408: Double word -2147483648 to Set the cam axis current value per cycle to be changed.
Synchronous [signed] 2147483647*1*2 The setting value is converted within the range from 0 to
control change (Cam axis length per cycle - 1).
value

*1 The output axis position unit is set to the value corresponding to the setting of "Pr.1 Unit setting" and the cam axis cycle unit is set to the
value corresponding to the setting of "Pr.438 Cam axis cycle unit setting".
*2 The setting range is the same even if the unit differs.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that changing the cam axis
without error current value per cycle has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the
FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


2.24 M+FX5SSC_ChangeCamPositionPerCycle 77
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 317 steps
Function description • By turning ON i_bEN (Execution command), the cam axis current value per cycle of the output axis No. is changed.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the output axis No. with which synchronous control is not executed, o_bErr (Error flag) turns
ON, the FB processing is interrupted, and the error code 300 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change No processing 1: Change cam axis current value per cycle
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing
command
Synchronous control change
request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• If this FB is used together with other synchronous control change FBs that have the same output axis No., secure one
operation cycle or more after o_bOK (Completed without error) of this FB turns ON and before the FBs are executed.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


78 2.24 M+FX5SSC_ChangeCamPositionPerCycle
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.
300 (Hexadecimal) The FB is executed for the output axis No. Please try again after confirming the setting.
with which synchronous control is not 2
executed.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the ouput
axis No.into 8 axes.

2 Simple Motion Module FB


2.24 M+FX5SSC_ChangeCamPositionPerCycle 79
2.25 M+FX5SSC_ChangeMainShaftGearPositionPerCycle

Name
M+FX5SSC_ChangeMainShaftGearPositionPerCycle

Overview
Item Description
Function overview Changes the current value per cycle after main shaft gear to a synchronous control change value.
Symbol
M+FX5SSC_ChangeMainShaftGearPositionPerCycle

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uOutputAxis o_bErr : B (7)

(4) D : i_dSyncCtrlChangeValue o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Set the axis No. whose current value per cycle after
main shaft gear is to be changed.
The setting range differs depending on the module
used.
(4) i_dSyncCtrlChangeValue Cd.408: Double word -2147483648 to Set the current value per cycle after main shaft gear to
Synchronous [signed] 2147483647*1*2 be changed.
control change The setting value is converted within the range from 0 to
value (Cam axis length per cycle - 1).

*1 The output axis position unit is set to the value corresponding to the setting of "Pr.1 Unit setting" and the cam axis cycle unit is set to the
value corresponding to the setting of "Pr.438 Cam axis cycle unit setting".
*2 The setting range is the same even if the unit differs.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that changing the current value
without error per cycle after main shaft gear has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the
FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


80 2.25 M+FX5SSC_ChangeMainShaftGearPositionPerCycle
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 317 steps
Function description • By turning ON i_bEN (Execution command), the current value per cycle after main shaft gear of the output axis No. is
changed.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the output axis No. with which synchronous control is not executed, o_bErr (Error flag) turns
ON, the FB processing is interrupted, and the error code 300 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing 2: Change current value per cycle after main shaft gear
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• If this FB is used together with other synchronous control change FBs that have the same output axis No., secure one
operation cycle or more after o_bOK (Completed without error) of this FB turns ON and before the FBs are executed.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


2.25 M+FX5SSC_ChangeMainShaftGearPositionPerCycle 81
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.
300 (Hexadecimal) The FB is executed for the output axis No. Please try again after confirming the setting.
with which synchronous control is not
executed.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
output axis No. into 8 axes.

2 Simple Motion Module FB


82 2.25 M+FX5SSC_ChangeMainShaftGearPositionPerCycle
2.26 M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerC
ycle
Name 2
M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle

Overview
Item Description
Function overview Changes the current value per cycle after auxiliary shaft gear to a synchronous control change value.
Symbol
M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle

(1) B : i_bEN o_bENO : B (5)

(2) DUT : i_stModule o_bOK : B (6)

(3) UW : i_uOutputAxis o_bErr : B (7)

(4) D : i_dSyncCtrlChangeValue o_uErrId : UW (8)

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Set the axis No. whose current value per cycle after
auxiliary shaft gear is to be changed.
The setting range differs depending on the module
used.
(4) i_dSyncCtrlChangeValue Cd.408: Double word -2147483648 to Set the current value per cycle after auxiliary shaft gear
Synchronous [signed] 2147483647*1*2 to be changed.
control change The setting value is converted within the range from 0 to
value (Cam axis length per cycle - 1).

*1 The output axis position unit is set to the value corresponding to the setting of "Pr.1 Unit setting" and the cam axis cycle unit is set to the
value corresponding to the setting of "Pr.438 Cam axis cycle unit setting".
*2 The setting range is the same even if the unit differs.

■Output labels
No. Variable name Name Data type Default value Description
(5) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) o_bOK Completed Bit OFF When ON, it indicates that changing the current value
without error per cycle after auxiliary shaft gear has been completed.
(7) o_bErr Error flag Bit OFF When ON, it indicates that an error has occurred in the
FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is stored.

2 Simple Motion Module FB


2.26 M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle 83
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 317 steps
Function description • By turning ON i_bEN (Execution command), the current value per cycle after auxiliary shaft gear of the output axis No. is
changed.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the output axis No. with which synchronous control is not executed, o_bErr (Error flag) turns
ON, the FB processing is interrupted, and the error code 300 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing 3: Change current value per cycle after auxiliary shaft gear
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• If this FB is used together with other synchronous control change FBs that have the same output axis No., secure one
operation cycle or more after o_bOK (Completed without error) of this FB turns ON and before the FBs are executed.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


84 2.26 M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.
300 (Hexadecimal) The FB is executed for the output axis No. Please try again after confirming the setting.
with which synchronous control is not 2
executed.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
output axis No. into 8 axes.

2 Simple Motion Module FB


2.26 M+FX5SSC_ChangeAuxiliaryShaftGearPositionPerCycle 85
2.27 M+FX5SSC_MoveCamPositionPerCycle

Name
M+FX5SSC_MoveCamPositionPerCycle

Overview
Item Description
Function overview Adds the movement amount set in the synchronous control change value to a cam axis current value per cycle to move the
cam axis current value per cycle.
Symbol
M+FX5SSC_MoveCamPositionPerCycle

(1) B : i_bEN o_bENO : B (6)

(2) DUT : i_stModule o_bOK : B (7)

(3) UW : i_uOutputAxis o_bErr : B (8)

(4) D : i_dSyncCtrlChangeValue o_uErrId : UW (9)

(5) UW : i_uSyncCtrlReflectionTime

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range differs Specify the module label of the MELSEC
depending on the module label. iQ-F Simple Motion module.
(3) i_uOutputAxis Output axis No. Word [unsigned] 1 to 8 Set the axis No. whose cam axis current
value per cycle is to be moved.
The setting range differs depending on the
module used.
(4) i_dSyncCtrlChangeValue Cd.408: Double word -2147483648 to 2147483647*1*2 Set the amount of the cam axis current
Synchronous [signed] value per cycle movement.
control change
value
(5) i_uSyncCtrlReflectionTime Cd.409: Word [unsigned] 0 to 65535 (ms) Set the reflection time for the synchronous
Synchronous (0 to 32767: Set by decimal control change.
control reflection number. 32768 to 65535: Convert
time the number to hexadecimal
number and set.)

*1 The output axis position unit is set to the value corresponding to the setting of "Pr.1 Unit setting" and the cam axis cycle unit is set to the
value corresponding to the setting of "Pr.438 Cam axis cycle unit setting".
*2 The setting range is the same even if the unit differs.

■Output labels
No. Variable name Name Data type Default value Description
(6) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) o_bOK Completed Bit OFF When ON, it indicates that moving the
without error cam axis current value per cycle has been
completed.
(8) o_bErr Error flag Bit OFF When ON, it indicates that an error has
occurred in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code generated in the FB is
stored.

2 Simple Motion Module FB


86 2.27 M+FX5SSC_MoveCamPositionPerCycle
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 427 steps
Function description • By turning ON i_bEN (Execution command), the cam axis current value per cycle of the output axis No. is moved.
• If i_bEN (Execution command) is turned OFF during movement of the cam axis current value per cycle, the operation stops
during the movement and o_bOK (Completed without error) does not turn ON.
• When the setting value of the output axis No. is out of the range, o_bErr (Error flag) turns ON, the FB processing is
interrupted, and the error code 100 (Hexadecimal) is stored in o_uErrId (Error code).
• When this FB is executed for the output axis No. with which synchronous control is not executed, o_bErr (Error flag) turns
ON, the FB processing is interrupted, and the error code 300 (Hexadecimal) is stored in o_uErrId (Error code).
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart When operation completes without an error

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control
change command No processing 4: Cam axis current value per cycle movement

Synchronous control
change request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0

When an error occurs

i_bEN (Execution command)

o_bENO (Execution status)

Synchronous control change


No processing
command

Synchronous control change


request

o_bOK (Completed without error)

o_bErr (Error flag)

o_uErrId (Error code) 0 Error code 0

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• The FB cannot be used in an interrupt program.
• When this FB is used twice or more, precaution must be taken to avoid repetition of the output axis No.
• If this FB is used together with other synchronous control change FBs that have the same output axis No., secure one
operation cycle or more after o_bOK (Completed without error) of this FB turns ON and before the FBs are executed.
• Every input must be provided with a value for proper FB operation.

2 Simple Motion Module FB


2.27 M+FX5SSC_MoveCamPositionPerCycle 87
Error codes
Error code Description Action
100 (Hexadecimal) The output axis No. is not within the setting Please try again after confirming the setting.
range.
300 (Hexadecimal) The FB is executed for the output axis No. Please try again after confirming the setting.
with which synchronous control is not
executed.

Version upgrade history


Version Date Description
00A 2015/04/23 First edition
01A 2016/07/15 Add the 8-axis module for the applicable module. Extend the
output axis No. into 8 axes.

2 Simple Motion Module FB


88 2.27 M+FX5SSC_MoveCamPositionPerCycle
2.28 M+FX5SSC_MakeRotaryCutterCam

Name
M+FX5SSC_MakeRotaryCutterCam
2
Overview
Item Description
Function overview Automatically generates the cam for a rotary cutter.
Symbol
M+FX5SSC_MakeRotaryCutterCam

(1) B : i_bEN o_bENO : B (10)

(2) DUT : i_stModule o_bOK : B (11)

(3) UW : i_uCamNo o_bErr : B (12)

(4) UW : i_uResolution o_uErrId : UW (13)

(5) UD : i_udSheetLength

(6) UD : i_udSheetSyncWidth

(7) UD : i_udSyncAxisLength

(8) UD : i_udSyncStartPoint

(9) W : i_wSyncSectionAccelerationRatio

2 Simple Motion Module FB


2.28 M+FX5SSC_MakeRotaryCutterCam 89
Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uCamNo Cd.609: Cam auto- Word [unsigned] 1 to 128 Set the cam No. to be automatically generated.
generation cam No.
(4) i_uResolution Cd.611: Cam auto- Word [unsigned] 256/512/1024/2048/ Set the resolution of the cam to be generated.
generation data: 4096/8192/16384
Cam resolution
(5) i_udSheetLength Cd.611: Cam auto- Double word 1 to 2147483647 Set the sheet length.
generation data: [unsigned] [(Optional) same unit Set this value in the cam axis length per cycle.
Sheet length (such as 0.1 mm)]
(6) i_udSheetSyncWidth Cd.611: Cam auto- Double word 1 to 2147483647 Set the sheet length of the synchronous section.
generation data: [unsigned] [(Optional) same unit
Sheet synchronous (such as 0.1 mm)]
width
(7) i_udSyncAxisLength Cd.611: Cam auto- Double word 1 to 2147483647 Set the cycle length of the rotary cutter shaft.
generation data: [unsigned] [(Optional) same unit
Synchronous axis (such as 0.1 mm)]
length
(8) i_udSyncStartPoint Cd.611: Cam auto- Double word 1 to 2147483647 Set the length from the beginning of the sheet to the start
generation data: [unsigned] [(Optional) same unit of the synchronous section.
Synchronization (such as 0.1 mm)]
starting point
(9) i_wSyncSectionAcce Cd.611: Cam auto- Word [signed] -5000 to 5000 [0.01%] Set this label when the synchronous speed in the
lerationRatio generation data: synchronous section needs to be adjusted.
Synchronous The speed is "Synchronous speed  (100% +
section acceleration Acceleration ratio)" in the synchronous section.
ratio

■Output labels
No. Variable name Name Data type Default value Description
(10) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(11) o_bOK Completed without Bit OFF When ON, it indicates that the cam automatic generation
error has been completed.
(12) o_bErr Error flag Bit OFF Always OFF
(13) o_uErrId Error code Word [unsigned] 0 Always 0

2 Simple Motion Module FB


90 2.28 M+FX5SSC_MakeRotaryCutterCam
FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
2
Programming language Ladder
Number of steps (maximum) 157 steps
Function description By turning ON i_bEN (Execution command), the cam for a rotary cutter is automatically generated.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart

i_bEN (Execution command)

o_bENO (Execution status)

Cam auto-generation request

o_bOK (Completed without error)

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Even if a warning occurs in the execution of this FB, o_bOK (Completed without error) turns ON.
• The FB cannot be used in an interrupt program.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
None None None

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.28 M+FX5SSC_MakeRotaryCutterCam 91
2.29 M+FX5SSC_CalcCamCommandPosition

Name
M+FX5SSC_CalcCamCommandPosition

Overview
Item Description
Function overview Calculates a cam axis feed current value, and outputs the calculation result.
Symbol

M+FX5SSC_CalcCamCommandPosition

(1) B : i_bEN o_bENO : B (8)

(2) DUT : i_stModule o_bOK : B (9)

(3) UW : i_uCamNo o_dResult : D (10)

(4) D : i_dStroke o_bErr : B (11)

(5) UD : i_udLengthPerCycle o_uErrId : UW (12)

(6) D : i_dReferencePosition

(7) UD : i_udCommandPositionPerCycle

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution Bit ON, OFF ON: The FB is activated.
command OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uCamNo Cd.613: Cam Word [unsigned] 0 to 256 Set the cam No. used for the calculation cam.
position calculation:
Cam No.
(4) i_dStroke Cd.614: Cam Double word -2147483648 to Set the cam stroke amount used for the cam position
position calculation: [signed] 2147483647*1 calculation.
Stroke amount
(5) i_udLengthPerCycle Cd.615: Cam Double word 1 to 2147483647 *2 Set the cam axis length per cycle used for the cam
position calculation: [unsigned] position calculation.
Cam axis length per
cycle
(6) i_dReferencePosition Cd.616: Cam Double word -2147483648 to Set the cam reference position used for the cam position
position calculation: [signed] 2147483647*1 calculation.
Cam reference
position
(7) i_udCommandPosition Cd.617: Cam Double word 0 to (Cam axis Set the cam axis current value per cycle used for the cam
PerCycle position calculation: [unsigned] length per cycle) *2 position calculation.
Cam axis current
value per cycle

*1 The setting range is the same even if the output axis position unit differs.
*2 The setting range is the same even if the cam axis cycle unit differs. The cam axis cycle unit is set to the value corresponding to the
setting of "Pr.438 Cam axis cycle unit setting".

2 Simple Motion Module FB


92 2.29 M+FX5SSC_CalcCamCommandPosition
■Output labels
No. Variable name Name Data type Default value Description
(8) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(9) o_bOK Completed without Bit OFF When ON, it indicates that calculating the cam axis feed

(10) o_dResult
error
Cam position Double word 0
current value has been completed.
The result of the cam axis feed current value calculation is
2
calculation result [signed] stored.
(11) o_bErr Error flag Bit OFF Always OFF
(12) o_uErrId Error code Word [unsigned] 0 Always 0

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 135 steps
Function description By turning ON i_bEN (Execution command), the cam axis feed current value is calculated.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart

i_bEN (Execution command)

o_bENO (Execution status)

Cam position calculation request

o_dResult (Cam position


calculation result) 0 Calculation result 0

o_bOK (Completed without error)

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Even if a warning occurs in the execution of this FB, o_bOK (Completed without error) turns ON.
• The FB cannot be used in an interrupt program.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
None None None

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.29 M+FX5SSC_CalcCamCommandPosition 93
2.30 M+FX5SSC_CalcCamPositionPerCycle

Name
M+FX5SSC_CalcCamPositionPerCycle

Overview
Item Description
Function overview Calculates a cam axis current value per cycle, and outputs the calculation result.
Symbol
M+FX5SSC_CalcCamPositionPerCycle

(1) B : i_bEN o_bENO : B (9)

(2) DUT : i_stModule o_bOK : B (10)

(3) UW : i_uCamNo o_dResult : D (11)

(4) D : i_dStroke o_bErr : B (12)

(5) UD : i_udLengthPerCycle o_uErrId : UW (13)

(6) D : i_dReferencePosition

(7) UD : i_udCommandPositionPerCycle

(8) D : i_dCommandPosition

Labels
■Input labels
No. Variable name Name Data type Setting range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_stModule Module label Structure The setting range Specify the module label of the MELSEC iQ-F Simple
differs depending on Motion module.
the module label.
(3) i_uCamNo Cd.613: Cam position Word [unsigned] 0 to 256 Set the cam No. used for the calculation cam.
calculation: Cam No.
(4) i_dStroke Cd.614: Cam position Double word -2147483648 to Set the cam stroke amount used for the cam position
calculation: Stroke [signed] 2147483647*1 calculation.
amount
(5) i_udLengthPerCycle Cd.615: Cam position Double word 1 to 2147483647*2 Set the cam axis length per cycle used for the cam
calculation: Cam axis [unsigned] position calculation.
length per cycle
(6) i_dReferencePosition Cd.616: Cam position Double word -2147483648 to Set the cam reference position used for the cam
calculation: Cam [signed] 2147483647*1 position calculation.
reference position
(7) i_udCommandPosition Cd.617: Cam position Double word 0 to (Cam axis Set the current value from which the cam search used
PerCycle calculation: Cam axis [unsigned] length per cycle)*2 for the cam position calculation is started.
current value per cycle
(8) i_dCommandPosition Cd.618: Cam position Double word -2147483648 to Set the cam axis feed current value used for the cam
calculation: Cam axis [signed] 2147483647*1 position calculation.
feed current value

*1 The setting range is the same even if the output axis position unit differs.
*2 The setting range is the same even if the cam axis cycle unit differs. The cam axis cycle unit is set to the value corresponding to the
setting of "Pr.438 Cam axis cycle unit setting".

2 Simple Motion Module FB


94 2.30 M+FX5SSC_CalcCamPositionPerCycle
■Output labels
No. Variable name Name Data type Default value Description
(9) o_bENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(10) o_bOK Completed without Bit OFF When ON, it indicates that calculating the cam axis

(11) o_dResult
error
Cam position Double word 0
current value per cycle has been completed.
The result of the cam axis current value per cycle
2
calculation result [signed] calculation is stored.
(12) o_bErr Error flag Bit OFF Always OFF
(13) o_uErrId Error code Word [unsigned] 0 Always 0

FB details
Item Description
Applicable hardware and Applicable module FX5-40SSC-S, FX5-80SSC-S
software
Applicable CPU MELSEC iQ-F series
Applicable engineering software FX5-40SSC-S: GX Works3 (Version 1.010L or later)
FX5-80SSC-S: GX Works3 (Version 1.030G or later)
Programming language Ladder
Number of steps (maximum) 149 steps
Function description By turning ON i_bEN (Execution command), the cam axis current value per cycle is calculated.
Compiling method Macro type
FB operation type Pulsed execution (multiple scan execution type)
Timing chart

i_bEN (Execution command)

o_bENO (Execution status)

Cam position calculation request

o_dResult (Cam position


calculation result) 0 Calculation result 0

o_bOK (Completed without error)

Restrictions and precautions • The FB does not include error recovery processing. Program the error recovery processing separately in accordance with
the required system operation.
• Even if a warning occurs in the execution of this FB, o_bOK (Completed without error) turns ON.
• The FB cannot be used in an interrupt program.
• Every input must be provided with a value for proper FB operation.

Error codes
Error code Description Action
None None None

Version upgrade history


Version Date Description
00A 2015/04/23 First edition

2 Simple Motion Module FB


2.30 M+FX5SSC_CalcCamPositionPerCycle 95
INSTRUCTION INDEX

M
M+FX5SSC_CalcCamCommandPosition . . . . . . 92
M+FX5SSC_CalcCamPositionPerCycle . . . . . . . 94
M+FX5SSC_ChangeAccDecTime . . . . . . . . . . . 20
M+FX5SSC_
ChangeAuxiliaryShaftGearPositionPerCycle . . . . 83
M+FX5SSC_ChangeCamPositionPerCycle . . . . . 77
M+FX5SSC_ChangeContinuousTorqueMode . . . 51
M+FX5SSC_
ChangeMainShaftGearPositionPerCycle . . . . . . . 80
M+FX5SSC_ChangePosition . . . . . . . . . . . . . . . 24
M+FX5SSC_ChangePositionControlMode . . . . . . 48
M+FX5SSC_ChangeServoParameter . . . . . . . . . 37
M+FX5SSC_ChangeSpeed . . . . . . . . . . . . . . . . 17
M+FX5SSC_ChangeSpeedControlMode . . . . . . . 45
M+FX5SSC_ChangeSyncEncoderPosition . . . . . 59
M+FX5SSC_ChangeTorqueControlMode . . . . . . 41
M+FX5SSC_ConnectSyncEncoder . . . . . . . . . . . 72
M+FX5SSC_DisableSyncEncoder . . . . . . . . . . . 62
M+FX5SSC_EnableSyncEncoder . . . . . . . . . . . . 65
M+FX5SSC_InitializeParameter . . . . . . . . . . . . . 33
M+FX5SSC_JOG . . . . . . . . . . . . . . . . . . . . . . . 11
M+FX5SSC_MakeRotaryCutterCam . . . . . . . . . . 89
M+FX5SSC_MoveCamPositionPerCycle . . . . . . . 86
M+FX5SSC_MoveCamReferencePosition . . . . . . 74
M+FX5SSC_MPG . . . . . . . . . . . . . . . . . . . . . . . 14
M+FX5SSC_OperateError . . . . . . . . . . . . . . . . . 29
M+FX5SSC_ResetSyncEncoderError . . . . . . . . . 68
M+FX5SSC_Restart . . . . . . . . . . . . . . . . . . . . . 27
M+FX5SSC_SetPositioningData . . . . . . . . . . . ... 4
M+FX5SSC_StartPositioning . . . . . . . . . . . . . ... 8
M+FX5SSC_Sync . . . . . . . . . . . . . . . . . . . . . . . 56
M+FX5SSC_WriteFlash . . . . . . . . . . . . . . . . . . . 35

96
MEMO

97
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
April 2015 BCN-B62005-719-A First edition
October 2016 BCN-B62005-719-B Added model
FX5-80SSC-S
Added or modified parts
Chapter 1, 2

Japanese manual number: BCN-B62005-717-B


This manual confers no industrial property rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held
responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.

© 2015 MITSUBISHI ELECTRIC CORPORATION

98
Manual number: BCN-B62005-719-B(1610)MEE

When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.

HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS: 1-14, YADA-MINAMI 5-CHOME, HIGASHI-KU, NAGOYA, JAPAN

Specifications are subject to change without notice.

You might also like