Simple Motion - Block - Reference
Simple Motion - Block - Reference
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
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.
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)
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.
Name
M+FX5SSC_StartPositioning
Overview
Item Description
Function overview Starts the positioning operation.
Symbol
M+FX5SSC_StartPositioning
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.
o_bOK
(Completed without error)
o_bOK
(Completed without error)
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
Name
M+FX5SSC_JOG
2
Overview
Item Description
Function overview Performs the JOG operation or inching operation.
Symbol
M+FX5SSC_JOG
(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".
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)
i_bFJog
(Forward run JOG command)
i_bRJog
(Reverse run JOG command)
o_bOK
(Completed without error)
o_bErr (Error flag)
i_bEN
(Execution command)
o_bOK
(Completed without error)
o_bErr (Error flag)
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.)
Name
M+FX5SSC_MPG
Overview
Item Description
Function overview Performs the manual pulse generator operation.
Symbol
M+FX5SSC_MPG
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.
o_bOK
(Completed without error)
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.
• 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.
Name
M+FX5SSC_ChangeSpeed
2
Overview
Item Description
Function overview Changes the speed.
Symbol
M+FX5SSC_ChangeSpeed
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.
i_bEN
(Execution command)
o_bENO
(Execution status)
o_bOK
(Completed without error)
i_bEN
(Execution command)
o_bENO
(Execution status)
o_bOK
(Completed without error)
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.
Name
M+FX5SSC_ChangeAccDecTime
Overview
Item Description
Function overview Changes the acceleration/deceleration time at a speed change.
Symbol
M+FX5SSC_ChangeAccDecTime
(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.
i_bEnable (Acceleration/deceleration
time change enabled flag)
• (When Cd.12: Acceleration/deceleration time change value during speed change, enable/disable is disabled)
i_bEnable (Acceleration/deceleration
time change enabled flag)
i_bEnable (Acceleration/deceleration
time change enabled flag)
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.
Name
M+FX5SSC_ChangePosition
Overview
Item Description
Function overview Changes the target position.
Symbol
M+FX5SSC_ChangePosition
(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".
(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
Cd.27/Cd.28:
Current value
Target position change value
o_bOK
(Completed without error)
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.
Name
M+FX5SSC_Restart
2
Overview
Item Description
Function overview Restarts the axis being stopped.
Symbol
M+FX5SSC_Restart
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).
Restart command
o_bOK
(Completed without error)
o_bErr (Error flag)
Restart command
o_bOK
(Completed without error)
o_bErr (Error flag)
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
Name
M+FX5SSC_OperateError
2
Overview
Item Description
Function overview Monitors errors and warnings, and resets errors.
Symbol
M+FX5SSC_OperateError
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.
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
i_bEN
(Execution command)
o_bENO
(Execution status)
i_bErrReset 2
(Error reset command)
Axis error reset 0 1 0
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)
i_bEN
(Execution command)
o_bENO
(Execution status)
i_bErrReset
(Error reset command)
Axis error reset 0
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)
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.
Name
M+FX5SSC_InitializeParameter
2
Overview
Item Description
Function overview Initializes the parameter.
Symbol
M+FX5SSC_InitializeParameter
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)
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
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
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)
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
Name
M+FX5SSC_ChangeServoParameter
2
Overview
Item Description
Function overview Changes the servo parameter after the servo amplifier is activated.
Symbol
M+FX5SSC_ChangeServoParameter
(5) D : i_dChangeValue
Setting value
(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.
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.
Name
M+FX5SSC_ChangeTorqueControlMode
2
Overview
Item Description
Function overview Activates the torque control mode.
Symbol
M+FX5SSC_ChangeTorqueControlMode
(5) UW : i_uTorqueTimeConstDrivingMode
(6) UW : i_uTorqueTimeConstRegenerativeMode
(7) UD : i_udSpeedLimit
*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.
Servo status control mode Currently activated control mode Torque control mode activated
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.
Name
M+FX5SSC_ChangeSpeedControlMode
2
Overview
Item Description
Function overview Activates the speed control mode.
Symbol
M+FX5SSC_ChangeSpeedControlMode
(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".
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
Servo status control mode Currently activated control mode Speed control mode activated
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.
Name
M+FX5SSC_ChangePositionControlMode
Overview
Item Description
Function overview Activates the position control mode.
Symbol
M+FX5SSC_ChangePositionControlMode
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.
Servo status control mode Currently activated control mode Position control mode activated
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.
Name
M+FX5SSC_ChangeContinuousTorqueMode
2
Overview
Item Description
Function overview Activates the continuous operation to torque control mode.
Symbol
M+FX5SSC_ChangeContinuousTorqueMode
(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
*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.
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.
Name
M+FX5SSC_Sync
Overview
Item Description
Function overview Starts and ends the synchronous control.
Symbol
M+FX5SSC_Sync
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.
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.
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
(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.
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.
Name
M+FX5SSC_DisableSyncEncoder
Overview
Item Description
Function overview Disables inputs from the synchronous encoder axis.
Symbol
M+FX5SSC_DisableSyncEncoder
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.
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.
Name
M+FX5SSC_EnableSyncEncoder
2
Overview
Item Description
Function overview Enables inputs from the synchronous encoder axis.
Symbol
M+FX5SSC_EnableSyncEncoder
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.
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.
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
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.
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
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.
Name
M+FX5SSC_ConnectSyncEncoder
Overview
Item Description
Function overview Connects a synchronous encoder via CPU.
Symbol
M+FX5SSC_ConnectSyncEncoder
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
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.
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
(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.
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.
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
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.
Synchronous control change No processing 1: Change cam axis current value per cycle
command
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.
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
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.
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.
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
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.
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.
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
(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.
Synchronous control
change command No processing 4: Cam axis current value per cycle movement
Synchronous control
change request
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.
Name
M+FX5SSC_MakeRotaryCutterCam
2
Overview
Item Description
Function overview Automatically generates the cam for a rotary cutter.
Symbol
M+FX5SSC_MakeRotaryCutterCam
(5) UD : i_udSheetLength
(6) UD : i_udSheetSyncWidth
(7) UD : i_udSyncAxisLength
(8) UD : i_udSyncStartPoint
(9) W : i_wSyncSectionAccelerationRatio
■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
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
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
(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".
(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
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
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
(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".
(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
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
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
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