Predefined Protocol Support For Positioning Function Block Library Reference (IAI Corporation)
Predefined Protocol Support For Positioning Function Block Library Reference (IAI Corporation)
Predefined Protocol Support For Positioning Function Block Library Reference (IAI Corporation)
Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious
consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this reference and then keep the reference in a safe place for future reference.
1
CONDITIONS OF USE FOR THE PRODUCT
(1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions;
i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident;
and
ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the
case of any problem, fault or failure occurring in the PRODUCT.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries.
MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL
RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY
INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE
OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR
WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL
BULLETINS AND GUIDELINES FOR the PRODUCT.
("Prohibited Application")
Prohibited Applications include, but not limited to, the use of the PRODUCT in;
• Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the
public could be affected if any problem or fault occurs in the PRODUCT.
• Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality
assurance system is required by the Purchaser or End User.
• Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,
Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and
Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other
applications where there is a significant risk of injury to the public or property.
Notwithstanding the above restrictions, Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or
more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific
applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or
other safety features which exceed the general specifications of the PRODUCTs are required. For details, please
contact the Mitsubishi representative in your region.
2
INTRODUCTION
Thank you for purchasing the Mitsubishi Electric MELSEC iQ-R series, MELSEC-Q series, and MELSEC-L series
programmable controllers.
This reference describes function blocks which execute positioning control by connecting the MELSEC iQ-R series, MELSEC-
Q series, or MELSEC-L series programmable controller to IAI controllers.
Before using this product, please read this reference carefully and develop familiarity with the functions and performance of
the MELSEC iQ-R series, MELSEC-Q series, and MELSEC-L series programmable controllers to handle the product
correctly.
When applying the program examples provided in this reference to an actual system, ensure the applicability and confirm that
they will not cause system control problems.
Please make sure that the end users read this reference.
3
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
GENERIC TERM AND ABBREVIATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
CHAPTER 1 OVERVIEW 8
1.1 FB List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Acquisition Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
CPU module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Serial communication module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Supported models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
FB details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Performance value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Error code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.7 M+IAIServoControl_R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
FB details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Performance value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
CONTENTS
Error code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5
Error code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.8 M+CPU-IAIPosiSp_ServoControl-ST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
FB details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Performance value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Error code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.9 M+CPU-IAIPosiSp_CPRTCL-ST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
FB details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
APPENDIX 102
Appendix 1 Table Information (MELSEC iQ-R Series) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Position table structure (stPositionTable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Monitoring table structure (stMonitoringTable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Appendix 2 Table Information (MELSEC-Q/L Series) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Position table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Monitoring table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
6
RELEVANT MANUALS
Manual name [manual number] Description Available form
Predefined Protocol Support For Positioning Specifications, functions, and input/output labels of IAI controller function e-Manual
Function Block Library Reference (IAI Corporation) blocks PDF
[BCN-P5999-1179] (this reference)
e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated
tool.
e-Manual has the following features:
• Required information can be cross-searched in multiple manuals.
• Other manuals can be accessed from the links in the manual.
• Hardware specifications of each part can be found from the product figures.
• Pages that users often browse can be bookmarked.
• Sample programs can be copied to an engineering tool.
TERMS
Unless otherwise specified, this reference uses the following terms.
Term Description
Buffer memory Memory in an intelligent function module to store data such as setting values and monitor values.
For CPU modules, it refers to memory to store data such as setting values and monitor values of the Ethernet function,
or data used for data communication of the multiple CPU system function.
Device A memory of a CPU module to store data. Devices such as X, Y, M, D, and others are provided depending on the
intended use.
Engineering tool A tool used for setting up programmable controllers, programming, debugging, and maintenance.
Intelligent function module A module that has functions other than an input or output, such as an A/D converter module and D/A converter module.
Process CPU A CPU module that performs process control and sequence control. Process control function blocks and the online
module change function can be executed.
This module is also used with a redundant function module as a pair and configures a redundant system.
7
1 OVERVIEW
A function block (FB) in this reference is for connecting the MELSEC iQ-R, MELSEC-Q, or MELSEC-L series programmable
controller to IAI controllers via serial communication (Modbus RTU) and executing electric actuator positioning control.
1.1 FB List
This section shows the FB list of this reference.
Note that this reference does not describe the FB version information which is indicated such as "_00A" at the end of an FB
name.
MELSEC-Q/L series
FB name Description
M+CPU-IAIPosiSp_StartHomePosi-ST To move an electric actuator to the initial position (home position return).
M+CPU-IAIPosiSp_JogInching-ST To perform JOG or inching operation.
M+CPU-IAIPosiSp_ReadPosiTable-ST To read the data of the specified position table.
M+CPU-IAIPosiSp_TeachingPosi-ST To set a designated position to the specified position table (target position).
M+CPU-IAIPosiSp_StartPosi-ST To execute positioning operation based on the specified position table data.
M+CPU-IAIPosiSp_Monitoring-ST To monitor a current position and alarms, and reset alarms.
M+CPU-IAIPosiSp_ServoControl-ST To request a servo to turn ON or OFF.
M+CPU-IAIPosiSp_CPRTCL-ST To execute an instruction for predefined protocol communication (G_CPRTCL) by being called from other
FBs.
Do not use this FB in a user-created program as this is used only internally in other FBs.
Considerations
• To use FBs in this reference, it is necessary to write protocol setting data for a predefined protocol in advance by using the
predefined protocol information write function of Predefined Protocol Support Tool For Positioning. (Predefined Protocol
Support Tool For Positioning Operating Manual)
• When an execution command of an FB is turned ON, do not use the same channel of a serial communication module to
communicate with a controller.
• All FBs use serial communication module buffer memories (user setting area); therefore, do not access to the following
buffer memories:
MELSEC iQ-R series: Un\G3072 to 5600
MELSEC-Q/L series: Un\G3072 to 5520
1 OVERVIEW
8 1.1 FB List
1.3 System Configuration
The following shows the system configuration for using the FBs in this reference.
1
(1) (2)
(2)
(3)
(4)
For the specifications of modules to be used, refer to the user's manual of each module.
CPU module
Series Generic term Model
MELSEC iQ- RCPU R00CPU, R01CPU, R02CPU, R04CPU, R04ENCPU, R08CPU, R08ENCPU, R08PCPU, R16CPU,
R R16ENCPU, R16PCPU, R32CPU, R32ENCPU, R32PCPU, R120CPU, R120ENCPU, R120PCPU
MELSEC-Q QCPU Universal model QCPU Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, Q03UDCPU, Q03UDECPU, Q03UDVCPU,
Q04UDHCPU, Q04UDEHCPU, Q04UDVCPU, Q04UDPVCPU, Q06UDHCPU, Q06UDEHCPU,
Q06UDVCPU, Q06UDPVCPU, Q10UDHCPU, Q10UDEHCPU, Q13UDHCPU, Q13UDEHCPU,
Q13UDVCPU, Q13UDPVCPU, Q20UDHCPU, Q20UDEHCPU, Q26UDHCPU, Q26UDEHCPU,
Q26UDVCPU, Q26UDPVCPU, Q50UDEHCPU, Q100UDEHCPU
Process CPU Q02PHCPU, Q06PHCPU, Q12PHCPU, Q25PHCPU
MELSEC-L LCPU L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-
BT, L26CPU-PBT
*1 The first five digits of the serial number are '11062' or higher.
1 OVERVIEW
1.3 System Configuration 9
Supported models
Manufacturer Type Series Type and model
IAI Corporation Built-in Controller Type Actuator RCP6S RCP6S*1
ERC3 ERC3
ERC2 ERC2 (SE)
Controller PCON PCON-CA
PCON-CB
PCON-CFA
PCON-CFB
PCON-C
PCON-SE
PCON-CF
PCON-CY
PCON-CYB
DCON DCON-CA
DCON-CB
DCON-CYB
ACON ACON-CA
ACON-CB
ACON-C
ACON-SE
ACON-CY
ACON-CYB
SCON SCON-CA
SCON-CAL
SCON-CB
SCON-CB-F*2
SCON-C
*1 Reading from or writing to the positioning data using the following FBs is not supported. Use Teaching Pendant or PC Software
developed by IAI Corporation to read from or write to the positioning data.
M+IAIReadPositionTable_R, M+IAITeachingPosition_R
M+CPU-IAIPosiSp_ReadPosiTable-ST, and M+CPU-IAIPosiSp_TeachingPosi-ST
*2 Reading from or writing to the positioning data using the following FBs is not supported. Use Teaching Pendant or PC Software
developed by IAI Corporation to read from or write to the positioning data.
M+IAIStartHomePositioning_R, M+IAIReadPositionTable_R, M+IAITeachingPosition_R
M+CPU-IAIPosiSp_StartHomePosi-ST, M+CPU-IAIPosiSp_ReadPosiTable-ST, and M+CPU-IAIPosiSp_TeachingPosi-ST
1 OVERVIEW
10 1.3 System Configuration
2 DETAILS OF THE FB LIBRARY (MELSEC iQ-R
SERIES)
2.1 M+IAIStartHomePositioning_R 2
Overview
Moves an electric actuator to the initial position (home position return).
M+IAIStartHomePositioning_R
(1) B : i_bEN o_bENO : B (5)
o_bUnitErr : B (9)
o_uUnitErrId : UW (10)
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that a home position
return is completed.
(7) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(8) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(9) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(10) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 3585 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 72 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence M+IAIStartHomePositioning_R
M+IAIServoControl_R
FB compilation Subroutine type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Specify the axis number of the operation target in i_uAxis (target axis).
• This FB switches from PIO to Modbus communication at the rise of i_bEN (execution command), and executes a home
position return.
• o_bOK (normal completion) is turned ON when a home position return is completed.
• When a value out of the range is set for the start I/O number, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '100H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target channel, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '101H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target axis, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '102H' is stored in o_uErrId (error code).
• When the connected device is not the operation target, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '200H' is stored in o_uErrId (error code).
• When turning OFF i_bEN (execution command) before o_bOK (normal completion), o_bErr (error completion), or
o_bUnitErr (unit error completion) is turned ON, o_bErr (error completion) is turned ON for one scan only. In addition, the
error code '201H' is stored in o_uErrId (error code) for one scan.
• When turning ON i_bEN (execution command) of this FB while executing any of the following FBs, o_bErr (error
completion) is turned ON. In addition, the error code '202H' is stored in o_uErrId (error code).
M+IAIStartHomePositioning_R, M+IAIJogInching_R, M+IAIStartPositioning_R, and M+IAIServoControl_R
• When an error occurs while sending/receiving a message to/from the predefined protocol, o_bErr (error completion) is
turned ON and the processing of the FB is interrupted. An error code is stored in o_uErrId (error code). For details on the
error code, refer to MELSEC iQ-R Serial Communication Module User's Manual(Application).
• When this FB receives an error code due to an error occurred in an electric actuator, o_bUnitErr (unit error completion) is
turned ON and the processing of the FB is interrupted. In addition, the received error code is stored in o_uUnitErrId (unit
error code).
i_bEN
2
o_bENO
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr
OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
o_bOK OFF
o_bErr
o_bUnitErr OFF
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Subroutine type
• CPU module: R120CPU
• Serial communication module: RJ71C24-R4
• Controller: PCON-CB
• Electric actuator: RCP3-TA4C-I-28P-4-20-P3-P
• Electric actuator initial position: Home position (0.00 mm)
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
1380.000 ms 0.428 ms 6877 scans
M+IAIJogInching_R
(1) B : i_bEN o_bENO : B (10)
(9) B : i_bRJog
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_bJogOrInching JOG/Inching Bit ON, OFF ON: Inching operation
replacement OFF: JOG operation
(6) i_udJogSpeed JOG speed Double Word 1 to 999999 Specify the JOG speed.
[unsigned] For the inching operation, the specified speed is
ignored. (Unit: 0.01 mm/s)
(7) i_udInchingMovingDista Inching amount of Double Word 1 to 999999 Specify the inching amount of movement
nce movement [unsigned] For the JOG operation, the specified movement
amount is ignored. (Unit: 0.01 mm/s)
(8) i_bFJog JOG + command Bit ON, OFF Turn ON this label to perform the forward JOG or
inching operation.
(9) i_bRJog JOG - command Bit ON, OFF Turn ON this label to perform the reverse JOG or
inching operation.
FB details
Available device
■ Serial communication module
Target module Firmware version Engineering tool
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 5576 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 88 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence M+IAIJogInching_R
M+IAIServoControl_R
FB compilation Subroutine type
method
FB operation Real-time execution
2
i_bEN
o_bENO
Instruction command Not Instruction command communication Inching amount of Parameter data static
communication performed from M+IAIServoControl_R JOG speed write
movement write area write command
o_bParamOK OFF
o_bBusy OFF
o_bOK OFF
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
i_bEN
o_bENO
o_bParamOK
o_bBusy OFF
o_bOK OFF
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
i_bEN
o_bENO
Instruction command JOG/inching JOG+(-) Operation Controller status JOG+(-) Stop Controller status Not
communication replacement command (FF00H) signal read (0000H) signal read performed
o_bParamOK
o_bBusy
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
i_bEN
o_bENO
i_bJogOrInching
i_udJogSpeed K10000
i_bFJog
i_bRJog OFF
o_bParamOK
o_bBusy
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
i_bEN
o_bENO
i_bJogOrInching
2
i_udJogSpeed K10000
OFF
i_bFJog
i_bRJog
Instruction command JOG/inching JOG- Controller status signal JOG- Controller status signal
communication replacement command (FF00H) read (0000H) read
o_bParamOK
o_bBusy
o_bOK
OFF
o_bErr
o_uErrId 0
OFF
o_bUnitErr
o_uUnitErrId 0
• For JOG operation (when both JOG + command and JOG - command are turned ON simultaneously)
i_bEN
o_bENO
i_bJogOrInching OFF
i_udJogSpeed K10000
i_bFJog
i_bRJog
Instruction command JOG+ Controller status signal Stop command Controller status signal JOG+ Controller status signal
(FF00H) read (0000H) read (FF00H) read
communication
o_bParamOK
o_bBusy
o_bOK
OFF
o_bErr
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
i_bEN
o_bENO
i_bJogOrInching
i_udInchingMovingDistance K10000
i_bFJog
i_bRJog OFF
Instruction command JOG/inching JOG+ JOG+ Controller status signal Controller status signal
communication replacement command (FF00H) (0000H) read read
o_bParamOK
o_bBusy
o_bOK
o_bErr OFF
o_uErrId 0
OFF
o_bUnitErr
o_uUnitErrId 0
i_bEN
o_bENO 2
i_bJogOrInching
i_udInchingMovingDistance K10000
OFF
i_bFJog
i_bRJog
Instruction command JOG/inching JOG- JOG- Controller status signal Controller status signal
communication replacement command (FF00H) (0000H) read read
o_bParamOK
o_bBusy
o_bOK
o_bErr OFF
o_uErrId 0
OFF
o_bUnitErr
o_uUnitErrId 0
i_bEN
o_bENO
i_bJogOrInching
i_udInchingMovingDistance K10000
i_bFJog
i_bRJog
Instruction command JOG+ JOG+ Controller status Controller status Stop command Controller status
communication (FF00H) (0000H) signal read signal read (0000H) signal read
o_bParamOK
o_bBusy
o_bOK OFF
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bBusy
o_bOK OFF
o_bErr
OFF
o_bUnitErr
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Error code
Error code Description Corrective action
100H The value set for the start I/O number is out of the range. Set a value within the range from 00H to FEH for the start I/O
number and execute the FB again.
101H The value set for the target channel is out of the range. Set 1 or 2 for the target channel and execute the FB again.
102H The value set for the target axis is out of the range. Set a value within the range from 1 to 16 for the target axis and
execute the FB again.
103H The value set for the JOG speed is out of the range. Set a value within the range from 1 to 999999 for the JOG speed
and execute the FB again.
104H The value set for the inching amount of movement is out of the Set a value within the range from 1 to 999999 for the inching
range. amount of movement and execute the FB again.
200H An unsupported device is connected. Review and correct the connected device and execute the FB
again.
201H The execution command turned OFF during the processing. Do not turn OFF i_bEN (execution command) until o_bParamOK
(parameter setting completion flag) is turned ON.
(This error code is output for one scan only.)
202H Other FB which may affect the operation of an electric actuator is Stop the FB which may affect the operation of the electric actuator
executing. other than this FB, and execute this FB again.
Target FB:
• M+IAIStartHomePositioning_R
• M+IAIJogInching_R
• M+IAIStartPositioning_R
• M+IAIServoControl_R
203H Emergency stop or major failure is occurring. Check the status of a controller in M+IAIMonitoring_R.
After checking the status, remove the cause of the error and
execute the FB again.
Predefined An error code that occurs during communication. For details, refer to the following:
protocol error MELSEC iQ-R Serial Communication Module User's
code Manual(Application)
o_uUnitErrId : UW (11)
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_uTableNo Position table No. Word [unsigned] 0 to 767 Specify the position table number from which the
setting value is read.
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that reading position data
is completed.
(8) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(10) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(11) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
(12) o_stPositionTable Position table Structure For details, refer to the following:
(stPositionTable) Page 102 Position table structure
(stPositionTable)
Available device
■ Serial communication module
Target module Firmware version Engineering tool
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 2250 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 52 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence No dependence
FB compilation Subroutine type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Specify the axis number of the operation target in i_uAxis (target axis).
• Specify the position table number to be read in i_uTableNo (position table No.).
• This FB switches from PIO to Modbus communication at the rise of i_bEN (execution command), and reads the setting data
of the specified position table number of a controller.
• o_bOK (normal completion) is turned ON when reading the position table is completed.
• When a value out of the range is set for the start I/O number, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '100H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target channel, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '101H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target axis, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '102H' is stored in o_uErrId (error code).
• When a value out of the range is set for the position table number, o_bErr (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '105H' is stored in o_uErrId (error code).
• When the connected device is not the operation target, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '200H' is stored in o_uErrId (error code).
• When turning OFF i_bEN (execution command) before o_bOK (normal completion), o_bErr (error completion), or
o_bUnitErr (unit error completion) is turned ON, o_bErr (error completion) is turned ON for one scan only. In addition, the
error code '201H' is stored in o_uErrId (error code) for one scan.
• When an error occurs while sending/receiving a message to/from the predefined protocol, o_bErr (error completion) is
turned ON and the processing of the FB is interrupted. An error code is stored in o_uErrId (error code). For details on the
error code, refer to MELSEC iQ-R Serial Communication Module User's Manual(Application).
• When this FB receives an error code due to an error occurred in an electric actuator, o_bUnitErr (unit error completion) is
turned ON and the processing of the FB is interrupted. In addition, the received error code is stored in o_uUnitErrId (unit
error code).
i_bEN
2
o_bENO
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bOK OFF
o_bErr
o_bUnitErr OFF
o_uUnitErrId 0
o_stPositionTable 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Subroutine type
• CPU module: R120CPU
• Serial communication module: RJ71C24-R4
• Controller: PCON-CB
• Electric actuator: RCP3-TA4C-I-28P-4-20-P3-P
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
56.300 ms 0.379 ms 280 scans
M+IAITeachingPosition_R
(1) B : i_bEN o_bENO : B (7)
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_uTableNo Position table No. Word [unsigned] 0 to 767 Specify the position table number to which the
setting value is written.
(6) i_dPositionData Position data Double Word -999999 to 999999 Specify the target position data to be set.
[signed]
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that the position data
setting is completed.
(9) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(10) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(11) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(12) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
2
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 2069 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 44 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence No dependence
FB compilation Subroutine type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Specify the axis number of the operation target in i_uAxis (target axis).
• Specify the position table number to be set in i_uTableNo (position table No.).
• This FB switches from PIO to Modbus communication at the rise of i_bEN (execution command), and sets i_dPositionData
(position data) to the target position of the specified position table number of a controller. For details on the position table,
refer to the IAI Corporation manuals related to serial communication (Modbus version).
• o_bOK (normal completion) is turned ON when the position table setting is completed.
• When a value out of the range is set for the start I/O number, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '100H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target channel, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '101H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target axis, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '102H' is stored in o_uErrId (error code).
• When a value out of the range is set for the position table number, o_bErr (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '105H' is stored in o_uErrId (error code).
• When a value out of the range is set for the position data, o_bErr (error completion) is turned ON and the processing of the
FB is interrupted. In addition, the error code '106H' is stored in o_uErrId (error code).
• When the connected device is not the operation target, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '200H' is stored in o_uErrId (error code).
• When turning OFF i_bEN (execution command) before o_bOK (normal completion), o_bErr (error completion), or
o_bUnitErr (unit error completion) is turned ON, o_bErr (error completion) is turned ON for one scan only. In addition, the
error code '201H' is stored in o_uErrId (error code) for one scan.
• When turning ON i_bEN (execution command) of this FB while executing the following FB, o_bErr (error completion) is
turned ON. In addition, the error code '202H' is stored in o_uErrId (error code).
M+IAIStartPositioning_R
• When an error occurs while sending/receiving a message to/from the predefined protocol, o_bErr (error completion) is
turned ON and the processing of the FB is interrupted. An error code is stored in o_uErrId (error code). For details on the
i_bEN
o_bENO
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bOK OFF
o_bErr
o_uErrId
0 Error code 0
o_bUnitErr OFF
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Subroutine type
• CPU module: R120CPU
• Serial communication module: RJ71C24-R4
• Controller: PCON-CB
• Electric actuator: RCP3-TA4C-I-28P-4-20-P3-P
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
53.000 ms 0.373 ms 272 scans
o_uUnitErrId : UW (11)
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_uTableNo Position table No. Word [unsigned] 0 to 767 Specify the position table number whose
positioning operation is executed.
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that positioning operation
is completed.
(8) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(10) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(11) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 4110 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 76 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence M+IAIStartPositioning_R
M+IAIServoControl_R
FB compilation Subroutine type
method
FB operation Pulse execution (multiple scan execution type)
i_bEN
o_bENO
i_uTableNo
K1
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bOK OFF
o_bErr
o_bUnitErr OFF
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
M+IAIMonitoring_R
(1) B : i_bEN o_bENO : B (6)
(2) UW : i_uStartIONo o_bOK : B (7)
(3) UW : i_uCh o_bErr : B (8)
o_uUnitErrId : UW (11)
o_bMonitorOK : B (12)
o_stMonitoringTable : DUT (13)
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_bAlmReset Reset alarm Bit ON, OFF ON: An alarm is reset
OFF: An alarm does not operate
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that an alarm is cleared
normally.
(8) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(9) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(10) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(11) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
(12) o_bMonitorOK Monitoring status Bit OFF The ON state indicates that a current position and
alarms are monitored normally.
(13) o_stMonitoringTable Monitoring table Structure For details, refer to the following:
(stMonitoringTable) Page 102 Monitoring table structure
(stMonitoringTable)
Available device
■ Serial communication module
Target module Firmware version Engineering tool
2
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 2645 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 64 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence No dependence
FB compilation Subroutine type
method
FB operation Real-time execution
Processing
• Specify the axis number of the operation target in i_uAxis (target axis).
• This FB switches from PIO to Modbus communication at the rise of i_bEN (execution command), and starts monitoring for
a controller target axis. The monitoring data (such as a current position and alarm codes) is stored in o_stMonitoringTable
(monitoring table).
• o_bMonitorOK (monitoring status) is turned ON while monitoring the target axis.
• The alarm is reset by turning ON i_bEN (execution command), and then turning ON i_bAlmReset (reset alarm) while the
alarm is occurring.
• o_bOK (normal completion) is turned ON when the alarm reset is completed.
• When a value out of the range is set for the start I/O number, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '100H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target channel, o_bErr (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '101H' is stored in o_uErrId (error code).
• When a value out of the range is set for the target axis, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '102H' is stored in o_uErrId (error code).
• When the connected device is not the operation target, o_bErr (error completion) is turned ON and the processing of the FB
is interrupted. In addition, the error code '200H' is stored in o_uErrId (error code).
• When turning OFF i_bEN (execution command) before monitoring is started, o_bErr (error completion) is turned ON for one
scan only. In addition, the error code '201H' is stored in o_uErrId (error code) for one scan.
• When an error occurs while sending/receiving a message to/from the predefined protocol, o_bErr (error completion) is
turned ON and the processing of the FB is interrupted. An error code is stored in o_uErrId (error code). For details on the
error code, refer to MELSEC iQ-R Serial Communication Module User's Manual(Application).
• When this FB receives an error code due to an error occurred in an electric actuator, o_bUnitErr (unit error completion) is
turned ON and the processing of the FB is interrupted. In addition, the received error code is stored in o_uUnitErrId (unit
error code).
i_bEN
o_bENO
i_bAlmReset
o_bMonitorOK
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bOK OFF
o_bErr
o_uErrId
0 Error code 0
o_bUnitErr OFF
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Subroutine type
• CPU module: R120CPU
• Serial communication module: RJ71C24-R4
• Controller: PCON-CB
• Electric actuator: RCP3-TA4C-I-28P-4-20-P3-P
Measuring range Time required for Maximum scan time Number of scans
the processing*1 required for the
processing
From when i_bEN (execution command) turns ON to when 78.400 ms 0.377 ms 392 scans
o_bMonitorOK (monitoring status) turns ON
From when i_bAlmReset (reset alarm) turns ON to when an alarm 60.700 ms 0.499 ms 229 scans
reset is completed
Labels
Input label
No. Label Name Data type Range Description
(1) i_bEN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) i_uStartIONo Start I/O No. Word [unsigned] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) i_uCh Target channel Word [unsigned] 1, 2 Specify the channel of a serial communication
module.
(4) i_uAxis Target axis Word [unsigned] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) i_bServo Servo ON/OFF Bit ON, OFF ON: Servo ON
replacement OFF: Servo OFF
(6) i_bPress Servo press ON/ Bit ON, OFF ON: Servo press ON
OFF replacement OFF: Servo press OFF
Output label
No. Label 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 Normal completion Bit OFF The ON state indicates that the execution of servo
ON or OFF command (servo press ON or OFF
command) is completed.
(9) o_bErr Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(10) o_uErrId Error code Word [unsigned] 0 The error code of an error occurred in the FB is
stored.
(11) o_bUnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(12) o_uUnitErrId Unit error code Word [unsigned] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
RJ71C24 GX Works3 Version 1.055H or later
RJ71C24-R4 GX Works3 Version 1.055H or later
■ CPU module
RCPU
Basic specifications
Item Description
Language ST
Number of basic steps 2300 Steps
The number of steps of the FB embedded in a program varies depending on a CPU module used, the input and output definitions, and
the option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Number of points of a • Label: 36 points (Word)
label used • Latch label: 0 point (Word)
The number of points of a label used that is embedded in a program varies depending on a device specified for an argument and the
option settings of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
FB dependence No dependence
FB compilation Subroutine type
method
FB operation Pulse execution (multiple scan execution type)
i_bEN
o_bENO
o_bOK
o_bErr OFF
o_uErrId 0
o_bUnitErr OFF
o_uUnitErrId 0
■ In error completion
i_bEN
o_bENO
Instruction command
Not performed
communication
o_bOK OFF
o_bErr
o_uErrId
0 Error code 0
o_bUnitErr OFF
o_uUnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Error code
Error code Description Corrective action
100H The value set for the start I/O number is out of the range. Set a value within the range from 00H to FEH for the start I/O
number and execute the FB again.
101H The value set for the target channel is out of the range. Set 1 or 2 for the target channel and execute the FB again.
102H The value set for the target axis is out of the range. Set a value within the range from 1 to 16 for the target axis and
execute the FB again.
200H An unsupported device is connected. Review and correct the connected device and execute the FB
again.
201H The execution command turned OFF during the processing. Do not turn OFF i_bEN (execution command) until o_bOK (normal
completion), o_bErr (error completion), or o_bUnitErr (unit error
completion) is turned ON.
(This error code is output for one scan only.)
202H Other FB which may affect the operation of an electric actuator is Stop the FB which may affect the operation of the electric actuator
executing. other than this FB, and execute this FB again.
Target FB:
• M+IAIStartHomePositioning_R
• M+IAIJogInching_R
• M+IAIStartPositioning_R
• M+IAIServoControl_R
Predefined An error code that occurs during communication. For details, refer to the following:
protocol error MELSEC iQ-R Serial Communication Module User's
code Manual(Application)
Ex.
When the start I/O number to which a serial communication module is mounted is 0FE0H
CASE iw_StartIONo OF
0:
G_CPRTCL(TRUE = FB_EN,H0,iw_Ch,K1,iow_18ControlData,ob_2CompDevice);
1:
G_CPRTCL(TRUE = FB_EN,H1,iw_Ch,K1,iow_18ControlData,ob_2CompDevice);
15:
G_CPRTCL(TRUE = FB_EN,H0F,iw_Ch,K1,iow_18ControlData,ob_2CompDevice);
Describe a value, in which the start I/O number is divided by 16,
254: in decimal (FEH = K254)
G_CPRTCL(TRUE = FB_EN, H0FE, iw_Ch, K1, iow_18ControlData, ob_2CompDevice);
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview
Moves an electric actuator to the initial position (home position return).
M+CPU-IAIPosiSp_StartHomePosi-ST
(1) B : FB_EN FB_ENO : B (5)
ob_UnitErr : B (9)
ow_UnitErrId : W (10)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
Output label
No. Label Name Data type Default value Description
(5) FB_ENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(6) FB_OK Normal completion Bit OFF The ON state indicates that a home position
return is completed.
(7) FB_ERROR Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(8) ERROR_ID Error code Word [signed] 0 The error code of an error occurred in the FB is
stored.
(9) ob_UnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(10) ow_UnitErrId Unit error code Word [signed] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
*1
QJ71C24N The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later 3
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 3744 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.08K points (Word), 0.04K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_StartHomePosi-ST
M+CPU-IAIPosiSp_ServoControl-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Before executing this FB, check that the G_CPRTCL instruction which is executed for the specified start I/O number exists
in the M+CPU-IAIPosiSp_CPRTCL-ST program. (Page 55 Checking the start I/O number, Page 101 M+CPU-
IAIPosiSp_CPRTCL-ST)
• Specify the axis number of the operation target in iw_Axis (target axis).
• This FB switches from PIO to Modbus communication at the rise of FB_EN (execution command) and executes a home
position return.
• FB_OK (normal completion) is turned ON when a home position return is completed.
• When a value out of the range is set for the start I/O number, FB_ERROR (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '10' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target channel, FB_ERROR (error completion) is turned ON and the processing
of the FB is interrupted. In addition, the error code '11' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target axis, FB_ERROR (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '12' is stored in ERROR_ID (error code).
• When the connected device is not the operation target, FB_ERROR (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '20' is stored in ERROR_ID (error code).
• When turning OFF FB_EN (execution command) before FB_OK (normal completion), FB_ERROR (error completion), or
ob_UnitErr (unit error completion) is turned ON, FB_ERROR (error completion) is turned ON for one scan only. In addition,
the error code '21' is stored in ERROR_ID (error code) for one scan.
FB_EN
FB_ENO
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr
OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
FB_OK OFF
FB_ERROR
ob_UnitErr OFF
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Macro type
• CPU module: Q04UDVCPU
• Serial communication module: QJ71C24N
• Controller:
• Electric actuator: ERC3-SA5C-I-42P-12-50-SE-P-CN
• Electric actuator initial position: Home position (0.00 mm)
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
1620.000 ms 0.847 ms 5610 scans
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview 3
Executes JOG or inching operation.
M+CPU-IAIPosiSp_JogInching-ST
(1) B : FB_EN FB_ENO : B (10)
(9) B : ib_RJog
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) ib_JogOrInching JOG/Inching Bit ON, OFF ON: Inching operation
replacement OFF: JOG operation
(6) id_JogSpeed JOG speed Double Word 1 to 999999 Specify the JOG speed.
[signed] For the inching operation, the specified speed is
ignored. (Unit: 0.01 mm/s)
(7) id_IncMovDist Inching amount of Double Word 1 to 999999 Specify the inching amount of movement
movement [signed] For the JOG operation, the specified movement
amount is ignored. (Unit: 0.01 mm/s)
(8) ib_FJog JOG + command Bit ON, OFF Turn ON this label to perform the forward JOG or
inching operation.
(9) ib_RJog JOG - command Bit ON, OFF Turn ON this label to perform the reverse JOG or
inching operation.
FB details
Available device
■ Serial communication module
Target module Firmware version Engineering tool
*1
QJ71C24N The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 6289 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.07K points (Word), 0.04K point (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_JogInching-ST
M+CPU-IAIPosiSp_ServoControl-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Real-time execution
FB_EN
FB_ENO
Instruction command Not Instruction command communication from Inching amount of Parameter data static
communication performed M+CPU-IAIPosiSp_ServoControl-ST JOG speed write
movement write area write command
ob_ParamOK OFF
ob_Busy OFF
FB_OK OFF
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
FB_EN
FB_ENO
ob_ParamOK
ob_Busy OFF
FB_OK OFF
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
FB_EN
FB_ENO
Instruction command JOG/inching JOG+(-) Operation Controller status JOG+(-) Stop Controller status Not
communication replacement command (FF00H) signal read (0000H) signal read performed
ob_ParamOK 3
ob_Busy
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
FB_EN
FB_ENO
ib_JogOrInching
id_JogSpeed K10000
ib_FJog
ib_RJog OFF
ob_ParamOK
ob_Busy
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
FB_EN
FB_ENO
ib_JogOrInching
ib_JogSpeed K10000
OFF
ib_FJog
ib_RJog
Instruction command JOG/inching JOG- Controller status signal JOG- Controller status signal
communication replacement command (FF00H) read (0000H) read
ob_ParamOK
ob_Busy
FB_OK
OFF
FB_ERROR
ERROR_ID 0
OFF
ob_UnitErr
ow_UnitErrId 0
• For JOG operation (when both JOG + command and JOG - command are turned ON simultaneously)
FB_EN
FB_ENO
ib_JogOrInching OFF
id_JogSpeed K10000
ib_FJog
ib_RJog
Instruction command JOG+ Controller status signal Stop command Controller status signal JOG+ Controller status signal
(FF00H) read (0000H) read (FF00H) read
communication
ob_ParamOK
ob_Busy
FB_OK
OFF
FB_ERROR
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
FB_EN
FB_ENO
ib_JogOrInching
id_IncMovDist K10000
3
ib_FJog
ib_RJog OFF
Instruction command JOG/inching JOG+ JOG+ Controller status signal Controller status signal
communication replacement command (FF00H) (0000H) read read
ob_ParamOK
ob_Busy
FB_OK
FB_ERROR OFF
ERROR_ID 0
OFF
ob_UnitErr
ow_UnitErrId 0
FB_EN
FB_ENO
ib_JogOrInching
id_IncMovDist K10000
OFF
ib_FJog
ib_RJog
Instruction command JOG/inching JOG- JOG- Controller status signal Controller status signal
communication replacement command (FF00H) (0000H) read read
ob_ParamOK
ob_Busy
FB_OK
FB_ERROR OFF
ERROR_ID 0
OFF
ob_UnitErr
ow_UnitErrId 0
FB_EN
FB_ENO
ib_JogOrInching
id_IncMovDist K10000
ib_FJog
3
ib_RJog
Instruction command JOG+ JOG+ Controller status Controller status Stop command Controller status
communication (FF00H) (0000H) signal read signal read (0000H) signal read
ob_ParamOK
ob_Busy
FB_OK OFF
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
ob_Busy
FB_OK OFF
FB_ERROR
OFF
ob_UnitErr
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Error code
Error code Description Corrective action
(Decimal)
10 The value set for the start I/O number is out of the range. Set the start I/O number to which a serial communication module is
mounted and execute FB again.
11 The value set for the target channel is out of the range. Set 2 for the target channel and execute the FB again.
12 The value set for the target axis is out of the range. Set a value within the range from 1 to 16 for the target axis and
execute the FB again.
13 The value set for the JOG speed is out of the range. Set a value within the range from 1 to 999999 for the JOG speed
and execute the FB again.
14 The value set for the inching amount of movement is out of the Set a value within the range from 1 to 999999 for the inching
range. amount of movement and execute the FB again.
20 An unsupported device is connected. Review and correct the connected device and execute the FB
again.
21 The execution command turned OFF during the processing. Do not turn OFF FB_EN (execution command) until ob_ParamOK
(parameter setting completion flag) is turned ON.
(This error code is output for one scan only.)
22 Other FB which may affect the operation of an electric actuator is Stop the FB which may affect the operation of the electric actuator
executing. other than this FB, and execute this FB again.
Target FB:
• M+CPU-IAIPosiSp_StartHomePosi-ST
• M+CPU-IAIPosiSp_JogInching-ST
• M+CPU-IAIPosiSp_StartPosi-ST
• M+CPU-IAIPosiSp_ServoControl-ST
23 Emergency stop or major failure is occurring. Check the status of a controller in M+CPU-IAIPosiSp_Monitoring-
ST.
After checking the status, remove the cause of the error and
execute the FB again.
24 The G_CPRTCL instruction which is executed for the specified start Add the G_CPRTCL instruction, which is executed for the specified
I/O number is not defined. start I/O number, to the M+CPU-IAIPosiSp_CPRTCL-ST program.
For details, refer to the following:
Page 55 Checking the start I/O number
Predefined An error code that occurs during communication. For details, refer to the following:
protocol error Q Corresponding Serial Communication Module User's Manual
code (Basic)
MELSEC-L Serial Communication Module User's Manual
(Basic)
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview
Reads the data of the specified position table.
M+CPU-IAIPosiSp_ReadPosiTable-ST
(1) B : FB_EN FB_ENO : B (7)
(2) W : iw_StartIONo FB_OK : B (8)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) iw_TableNo Position table No. Word [signed] 0 to 767 Specify the position table number from which the
setting value is read.
(6) iw_TableStartPos Position table Word [signed] 0 to FFFFH Specify the start number of D device, which stores
starting position position table values, in hexadecimal.
For details on the position table, refer to the
following:
Page 104 Position table
FB details
Available device
■ Serial communication module
Target module Firmware version Engineering tool
QJ71C24N*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 2075 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.04K points (Word), 0.01K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_ReadPosiTable-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
FB_EN
FB_ENO
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
FB_OK OFF
FB_ERROR
ob_UnitErr OFF
ow_UnitErrId 0
Position table 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Macro type
• CPU module: Q04UDVCPU
• Serial communication module: QJ71C24N
• Controller:
• Electric actuator: ERC3-SA5C-I-42P-12-50-SE-P-CN
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
65.000 ms 0.815 ms 247 scans
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview
Sets the designated position to the specified position table (target position).
M+CPU-IAIPosiSp_TeachingPosi-ST
(1) B : FB_EN FB_ENO : B (7)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) iw_TableNo Position table No. Word [signed] 0 to 767 Specify the position table number to which the
setting value is written.
(6) id_PositionData Position data Double Word -999999 to 999999 Specify the target position data to be set.
[signed]
Output label
No. Label Name Data type Default value Description
(7) FB_ENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(8) FB_OK Normal completion Bit OFF The ON state indicates that the position data
setting is completed.
(9) FB_ERROR Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(10) ERROR_ID Error code Word [signed] 0 The error code of an error occurred in the FB is
stored.
(11) ob_UnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(12) ow_UnitErrId Unit error code Word [signed] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
*1
QJ71C24N The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later 3
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 2017 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.04K points (Word), 0.01K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_TeachingPosi-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Before executing this FB, check that the G_CPRTCL instruction which is executed for the specified start I/O number exists
in the M+CPU-IAIPosiSp_CPRTCL-ST program. (Page 55 Checking the start I/O number, Page 101 M+CPU-
IAIPosiSp_CPRTCL-ST)
• Specify the axis number of the operation target in iw_Axis (target axis).
• Specify the position table number to be set for iw_TableNo (position table No.).
• This FB switches from PIO to Modbus communication at the rise of FB_EN (execution command) and sets id_PositionData
(position data) to the target position of the specified position table number of a controller. For details on the position table,
refer to the IAI Corporation manuals related to serial communication (Modbus version).
• FB_OK (normal completion) is turned ON when the position table setting is completed.
• When a value out of the range is set for the start I/O number, FB_ERROR (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '10' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target channel, FB_ERROR (error completion) is turned ON and the processing
of the FB is interrupted. In addition, the error code '11' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target axis, FB_ERROR (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '12' is stored in ERROR_ID (error code).
• When a value out of the range is set for the position table number, FB_ERROR (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '15' is stored in ERROR_ID (error code).
• When a value out of the range is set for the position data, FB_ERROR (error completion) is turned ON and the processing
of the FB is interrupted. In addition, the error code '16' is stored in ERROR_ID (error code).
FB_EN
FB_ENO
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
FB_OK OFF
FB_ERROR
ERROR_ID
0 Error code 0
ob_UnitErr OFF
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Macro type
• CPU module: Q04UDVCPU
• Serial communication module: QJ71C24N
• Controller:
• Electric actuator: ERC3-SA5C-I-42P-12-50-SE-P-CN
Time required for the Maximum scan time Number of scans required for
processing*1 the processing
63.000 ms 0.815 ms 243 scans
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview 3
Executes positioning operation based on the specified position table data.
M+CPU-IAIPosiSp_StartPosi-ST
(1) B : FB_EN FB_ENO : B (6)
ow_UnitErrId : W (11)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) iw_TableNo Position table No. Word [signed] 0 to 767 Specify the position table number whose
positioning operation is executed.
Output label
No. Label Name Data type Default value Description
(6) FB_ENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(7) FB_OK Normal completion Bit OFF The ON state indicates that positioning operation
is completed.
(8) FB_ERROR Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(9) ERROR_ID Error code Word [signed] 0 The error code of an error occurred in the FB is
stored.
(10) ob_UnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(11) ow_UnitErrId Unit error code Word [signed] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
*1
QJ71C24N The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 4483 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.08K points (Word), 0.04K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_StartPosi-ST
M+CPU-IAIPosiSp_ServoControl-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
FB_EN
FB_ENO
iw_TableNo
K1
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
FB_OK OFF
FB_ERROR
ob_UnitErr OFF
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview
Monitors a current position and alarms, and reset the alarms.
M+CPU-IAIPosiSp_Monitoring-ST
(1) B : FB_EN FB_ENO : B (7)
(2) W : iw_StartIONo FB_OK : B (8)
(3) W : iw_Ch FB_ERROR : B (9)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) ib_AlmReset Reset alarm Bit ON, OFF ON: An alarm is reset
OFF: An alarm does not operate
(6) iw_TableStartPos Monitoring table Word [signed] 0 to FFFFH Specify the start number of D device, which stores
starting position monitoring table values, in hexadecimal.
For details on the monitoring table, refer to the
following:
Page 105 Monitoring table
FB details
Available device
■ Serial communication module
Target module Firmware version Engineering tool
QJ71C24N*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 2511 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.03K points (Word), 0.02K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_Monitoring-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Real-time execution
FB_EN
FB_ENO
ib_AlmReset
3
Instruction command Not PIO/Modbus Connected Various monitor Various monitor
Alarm reset Various monitor Various monitor Not
communication performed switching device read information read information read information read information read performed
ob_MonitorOK
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
Monitor table Various monitor Various monitor information Various monitor information
0 information (alarm occurring)
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
FB_OK OFF
FB_ERROR
ERROR_ID
0 Error code 0
ob_UnitErr OFF
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Macro type
• CPU module: Q04UDVCPU
• Serial communication module: QJ71C24N
• Controller:
• Electric actuator: ERC3-SA5C-I-42P-12-50-SE-P-CN
Measuring range Time required for Maximum scan time Number of scans
the processing*1 required for the
processing
From when FB_EN (execution command) is turned ON to when 91.700 ms 0.700 ms 330 scans
ob_MonitorOK (monitoring status) is turned ON
From when ib_AlmReset (reset alarm) is turned ON to when an 73.800 ms 0.785 ms 169 scans
alarm reset is completed
Advanced preparation is required for using this FB. For details, refer to the following:
Page 55 Importing M+CPU-IAIPosiSp_CPRTCL-ST
Page 55 Checking the start I/O number
Overview
Requests a servo to turn ON or OFF.
M+CPU-IAIPosiSp_ServoControl-ST
(1) B : FB_EN FB_ENO : B (7)
Labels
Input label
No. Label Name Data type Range Description
(1) FB_EN Execution command Bit ON, OFF ON: The FB is activated.
OFF: The FB is not activated.
(2) iw_StartIONo Start I/O No. Word [signed] 00H to FEH Specify the value obtained by dividing the start I/O
number to which a target serial communication
module is mounted by 16.
(3) iw_Ch Target channel Word [signed] 2 Specify the channel of a serial communication
module.
(4) iw_Axis Target axis Word [signed] 1 to 16 Specify the value obtained by incrementing the
axis number set in a controller by one.
(5) ib_Servo Servo ON/OFF Bit ON, OFF ON: Servo ON
replacement OFF: Servo OFF
(6) ib_Press Servo press ON/ Bit ON, OFF ON: Servo press ON
OFF replacement OFF: Servo press OFF
Output label
No. Label Name Data type Default value Description
(7) FB_ENO Execution status Bit OFF ON: The execution command is ON.
OFF: The execution command is OFF.
(8) FB_OK Normal completion Bit OFF The ON state indicates that the execution of servo
ON or OFF command (servo press ON or OFF
command) is completed.
(9) FB_ERROR Error completion Bit OFF The ON state indicates that an error has occurred
in the FB.
(10) ERROR_ID Error code Word [signed] 0 The error code of an error occurred in the FB is
stored.
(11) ob_UnitErr Unit error completion Bit OFF The ON state indicates that an error has occurred
in the module.
(12) ow_UnitErrId Unit error code Word [signed] 0 The error code of an error occurred in the module
is stored.
Available device
■ Serial communication module
Target module Firmware version Engineering tool
*1
QJ71C24N The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later
higher.
QJ71C24N-R4*1 The first five digits of the serial number are '11062' or GX Works2 Version 1.570U or later 3
higher.
LJ71C24*1 GX Works2 Version 1.570U or later
■ CPU module
• QCPU*1
• LCPU
*1 Universal model QCPUs and process CPUs only
Basic specifications
Item Description
Language ST
Number of basic steps 2264 steps
The number of steps of the FB which is embedded in a program varies depending on the CPU module being used, input/output
definitions, and option settings of GX Works2. For the option settings of GX Works2, refer to the GX Works2 Version 1 Operating
Manual (Common).
Number of points of a • Label: 0.03K points (Word), 0.02K points (Bit)
label used • Latch label: 0 point (Word), 0 point (Bit)
The number of points of a label used which is embedded in a program varies depending on the device specified for an argument and
option settings of GX Works2. For the option settings of GX Works2, refer to GX Works2 Version 1 Operating Manual (Common).
FB dependence M+CPU-IAIPosiSp_ServoControl-ST
M+CPU-IAIPosiSp_CPRTCL-ST
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
Processing
• Before executing this FB, check that the G_CPRTCL instruction which is executed for the specified start I/O number exists
in the M+CPU-IAIPosiSp_CPRTCL-ST program. (Page 55 Checking the start I/O number, Page 101 M+CPU-
IAIPosiSp_CPRTCL-ST)
• Specify the axis number of the operation target in iw_Axis (target axis).
• This FB switches from PIO to Modbus communication at the rise of FB_EN (execution command). The FB requests a servo
to turn ON when ib_Servo (servo ON/OFF replacement) is turned ON, and requests to turn OFF when ib_Press is turned
OFF. In addition, the FB requests a servo press to turn ON when ib_Press (servo press ON/OFF replacement) is turned
ON, and requests to turn OFF when ib_Press is turned OFF. Note whether the servo turns ON or OFF is not checked with
this FB. Check the servo status using M+CPU-IAIPosiSp_Monitoring-ST. (Page 90 M+CPU-IAIPosiSp_Monitoring-ST)
• At the completion of the servo ON/OFF command execution, FB_OK (normal completion) is turned ON.
• When a value out of the range is set for the start I/O number, FB_ERROR (error completion) is turned ON and the
processing of the FB is interrupted. In addition, the error code '10' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target channel, FB_ERROR (error completion) is turned ON and the processing
of the FB is interrupted. In addition, the error code '11' is stored in ERROR_ID (error code).
• When a value out of the range is set for the target axis, FB_ERROR (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '12' is stored in ERROR_ID (error code).
• When the connected device is not the operation target, FB_ERROR (error completion) is turned ON and the processing of
the FB is interrupted. In addition, the error code '20' is stored in ERROR_ID (error code).
• When turning OFF FB_EN (execution command) before FB_OK (normal completion), FB_ERROR (error completion), or
FB_EN
FB_ENO
FB_OK
FB_ERROR OFF
ERROR_ID 0
ob_UnitErr OFF
ow_UnitErrId 0
■ In error completion
FB_EN
FB_ENO
Instruction command
Not performed
communication
FB_OK OFF
FB_ERROR
ERROR_ID
0 Error code 0
ob_UnitErr OFF
ow_UnitErrId 0
• Use the protocol send/receive setting of Predefined Protocol Support Tool For Positioning (Q/L) to change a communication
timeout or the number of retries. (Predefined Protocol Support Tool For Positioning Operating Manual)
Performance value
The following table lists the performance values of this FB under the following conditions.
• FB compilation method: Macro type
• CPU module: Q04UDVCPU
• Serial communication module: QJ71C24N
• Controller:
• Electric actuator: ERC3-SA5C-I-42P-12-50-SE-P-CN
Input label Time required for Maximum scan time Number of scans
ib_Servo ib_Press the processing*1 required for the
(Servo ON/OFF (Servo press ON/OFF processing
replacement) replacement)
OFF OFF 59.400 ms 0.700 ms 224 scans
ON OFF 58.800 ms 0.700 ms 225 scans
ON ON 58.800 ms 0.700 ms 222 scans
OFF ON 60.200 ms 0.700 ms 222 scans
FB details
3
Basic specifications
Item Description
FB compilation Macro type
method
FB operation Pulse execution (multiple scan execution type)
Processing
This FB is called from the following FBs and executes an instruction for predefined protocol communication (G_CPRTCL).
• M+CPU-IAIPosiSp_StartHomePosi-ST
• M+CPU-IAIPosiSp_JogInching-ST
• M+CPU-IAIPosiSp_ReadPosiTable-ST
• M+CPU-IAIPosiSp_TeachingPosi-ST
• M+CPU-IAIPosiSp_StartPosi-ST
• M+CPU-IAIPosiSp_Monitoring-ST
• M+CPU-IAIPosiSp_ServoControl-ST
Restrictions or precautions
• Do not use this FB in a user-created program as this is used only internally in other FBs.
• This FB uses the G_CPRTCL instruction. For details, refer to MELSEC-Q/L Structured Programming Manual (Special
Instructions).
• When the start I/O number of a serial communication module which executes the G_CPRTCL instruction is other than 00H
to F0H, the start I/O number needs to be set after adding the G_CPRTCL instruction to a program. For details, refer to the
following:
Page 55 Checking the start I/O number
*1 For details, refer to the IAI Corporation manuals related to serial communication (Modbus version).
APPX
102 Appendix 1 Table Information (MELSEC iQ-R Series)
Label Name Data type Range Description
uCurrentAlmCode Current alarm code Word [unsigned] 0000H to FFFFH To store the current alarm code in hexadecimal.
'0000H' is stored when no alarm is generated.
uInputPort Input port Word [unsigned] 0000H to FFFFH To store the input port value of a controller in hexadecimal.*1
uOutputPort Output port Word [unsigned] 0000H to FFFFH To store the output port value of a controller in
hexadecimal. *1
uStatus1 Device status1 Word [unsigned] 0000H to FFFFH To store the controller status in hexadecimal.*1
uStatus2 Device status2 Word [unsigned] 0000H to FFFFH To store the controller status in hexadecimal.*1
uExtendedDeviceStatus Extended device Word [unsigned] 0000H to FFFFH To store the controller status (extended device) in
status hexadecimal. *1
udSystemStatus System status Double Word 00000000H to To store the internal operation status of a controller.*1
[unsigned] FFFFFFFFH
dCurrentSpeed Current speed Double Word -999999 to 999999 To store the monitor data of actual motor speed in 0.01 mm/
[signed] s units.
dElectricCurrentValue Electric current Double Word -2147483648 to To store the monitor data of the motor current (torque
value [signed] 2147483647 current command value) in 1 mA units.
dDeviation Deviation Double Word -2147483648 to To store the deviation over a 1 ms period between the
[signed] 2147483647 position command value and the feedback value (actual
position) in 1 pulse units.
udSystemOpeTime System operating Double Word 0 to 4294967295 To store the total time since the controller power is turned
time [unsigned] ON in 1 ms units.
uSpecialInputPort Special input port Word [unsigned] 0000H to FFFFH To store the status of input ports other than the normal input
port.*1
uZoneStatus Zone status Word [unsigned] 0000H to FFFFH To store the status of zone output in hexadecimal.*1
uDoneOrRunProgramNo Positioning Word [unsigned] 0 to 1023 To store the positioning completed position No. or running
completed position program number.
No. status/Running
program No.
uExpansionSystemStaus Extended system Word [unsigned] 0000H to FFFFH To store the internal operation status of a controller
status (extended device) in hexadecimal.*1
*1 For details, refer to the IAI Corporation manuals related to serial communication (Modbus version).
A
APPX
Appendix 1 Table Information (MELSEC iQ-R Series) 103
Appendix 2 Table Information (MELSEC-Q/L Series)
Position table
The following table shows the list of position table when the start number of D device specified for iw_TableStartPos (position
table starting position) is D0.
Add the value of the start number of D device, which is specified for position table starting position, to the following device
numbers.
Device Item Data type Range Description
D0 Target position Double Word [signed] -999999 to 999999 To store the set target position [0.01 mm units]
in the specified position table number.
D1
D2 Positioning width Double Word [signed] 1 to 999999 To store the set positioning width [0.01 mm
units] in the specified position table number.
D3
D4 Speed command Double Word [signed] 1 to 999999 To store the set speed [0.01 mm/s units] in the
specified position table number.
D5
D6 Individual zone Double Word [signed] -999999 to 999999 To store the set individual zone boundary plus
boundary plus side side [0.01 mm units] in the specified position
D7
table number.
D8 Individual zone Double Word [signed] -999999 to 999999 To store the set individual zone boundary minus
boundary minus side side [0.01 mm units] in the specified position
D9
table number.
D10 Acceleration command Word [signed] 0001H to 012CH To store the set acceleration [0.01 G units] in
hexadecimal in the specified position table
number.
D11 Deceleration command Word [signed] 0001H to 012CH To store the set deceleration [0.01 G units] in
hexadecimal in the specified position table
number.
D12 Pressing current limit Word [signed] 0033H to 01FEH (0033H to 00B2H) To store the set pressing current limit value in
value The range may varies depending on hexadecimal in the specified position table
the model of an electric actuator. number.
D13 Load current threshold Word [signed] 0 to the value depending on the To store the set load current threshold value in
setting range of an electric actuator. hexadecimal in the specified position table
number.
D14 Control flag Word [signed] 0000H to 30FEH To store the set control flag in hexadecimal in
specification • Bit 1: Push-motion operation the specified position table number.*1
• Bit 2: Forward direction (reverse
direction) after approach
• Bit 3: Pitch feed
• Bit 4 and 5: Parameter set
• Bit 6 and 7: Acceleration pattern
• Bit 12 and 13: Vibration control
• Others: Not used
*1 For details, refer to the IAI Corporation manuals related to serial communication (Modbus version).
APPX
104 Appendix 2 Table Information (MELSEC-Q/L Series)
Monitoring table
The following table shows the list of monitoring table when the start number of D device specified for iw_TableStartPos
(monitoring table starting position) is D0.
Add the value of the start number of D device, which is specified for monitoring table starting position, to the following device
numbers.
Device Name Data type Range Description
D0 Alarm detail code Word [signed] 0000H to FFFFH*1 To store the latest alarm detail code in hexadecimal.
'0000H' is stored when no alarm is generated.
D1 Alarm address Word [signed] 0000H to FFFFH*1 To store the latest alarm address in hexadecimal.
'FFFFH' is stored when no alarm is generated.
D2 Alarm code Word [signed] 0000H to FFFFH*1 To store the latest alarm code in hexadecimal.
'0000H' is stored when no alarm is generated.
D3 Alarm occurrence time Double Word [signed] 0 to 4294967295*1 To store the latest alarm occurrence time.
(Passed time from the origin time or power ON [s])
D4
D5 Current position monitor Double Word [signed] -999999 to 999999 To store a current position in 0.01 mm units.
D6
D7 Current alarm code Word [signed] 0000H to FFFFH*1 To store the current alarm code in hexadecimal.
'0000H' is stored when no alarm is generated.
D8 Input port Word [signed] 0000H to FFFFH*1 To store the input port value of a controller in
hexadecimal. *2
D9 Output port Word [signed] 0000H to FFFFH*1 To store the output port value of a controller in
hexadecimal. *2
D10 Device status1 Word [signed] 0000H to FFFFH*1 To store the controller status in hexadecimal.*2
D11 Device status2 Word [signed] 0000H to FFFFH*1 To store the controller status in hexadecimal.*2
D12 Extended device status Word [signed] 0000H to FFFFH*1 To store the controller status (extended device) in
hexadecimal. *2
D13 System status Double Word [signed] 00000000H to To store the internal operation status of a controller.*2
FFFFFFFFH*1
D14
D15 Current speed Double Word [signed] -999999 to 999999 To store the monitor data of actual motor speed in 0.01 A
mm/s units.
D16
D17 Electric current value Double Word [signed] -2147483648 to To store the monitor data of the motor current (torque
D18 2147483647 current command value) in 1 mA units.
D19 Deviation Double Word [signed] -2147483648 to To store the deviation over a 1 ms period between the
2147483647 position command value and the feedback value (actual
D20
position) in 1 pulse units.
D21 System operating time Double Word [signed] 0 to 4294967295*1 To store the total time since the controller power is turned
D22 ON in 1 ms units.
D23 Special input port Word [signed] 0000H to FFFFH*1 To store the status of input ports other than the normal
input port.*2
D24 Zone status Word [signed] 0000H to FFFFH*1 To store the status of zone output in hexadecimal.*2
D25 Positioning completed Word [signed] 0 to 1023 To store the positioning completed position No. or
position No. status/Running running program number.
program No.
D26 Extended system status Word [signed] 0000H to FFFFH*1 To store the internal operation status of a controller
(extended device) in hexadecimal.*2
APPX
Appendix 2 Table Information (MELSEC-Q/L Series) 105
MEMO
APPX
106 Appendix 2 Table Information (MELSEC-Q/L Series)
INSTRUCTION INDEX
M
M+CPU-IAIPosiSp_CPRTCL-ST . . . . . . . . . . . 101
M+CPU-IAIPosiSp_JogInching-ST . . . . . . . . . . . 61
M+CPU-IAIPosiSp_Monitoring-ST . . . . . . . . . . . 90
M+CPU-IAIPosiSp_ReadPosiTable-ST . . . . . . . . 72
M+CPU-IAIPosiSp_ServoControl-ST . . . . . . . . . 96
M+CPU-IAIPosiSp_StartHomePosi-ST . . . . . . . . 56
M+CPU-IAIPosiSp_StartPosi-ST . . . . . . . . . . . . 83
M+CPU-IAIPosiSp_TeachingPosi-ST . . . . . . . . . 78
M+IAIJogInching_R . . . . . . . . . . . . . . . . . . . . . . 16
M+IAIMonitoring_R . . . . . . . . . . . . . . . . . . . . . . 44
M+IAIReadPositionTable_R . . . . . . . . . . . . . . . . 27
M+IAIServoControl_R . . . . . . . . . . . . . . . . . . . . 49
M+IAIStartHomePositioning_R . . . . . . . . . . . . . . 11
M+IAIStartPositioning_R . . . . . . . . . . . . . . . . . . 37
M+IAITeachingPosition_R . . . . . . . . . . . . . . . . . 32
107
MEMO
108
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
June 2019 BCN-P5999-1179-A First edition
June 2020 BCN-P5999-1179-B ■Added or modified parts
SAFETY PRECAUTIONS, TERMS, Section 1.1, Section 1.3, Chapter 3, Appendix 2
109
TRADEMARKS
The company names, system names and product names mentioned in this manual are either registered trademarks or
trademarks of their respective companies.
In some cases, trademark symbols such as '' or '' are not specified in this manual.
110
BCN-P5999-1179-B(2006)
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
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.