0% found this document useful (0 votes)
514 views757 pages

MotionWorks IEC Toolboxes Rev 2021

The document provides an introduction to Toolboxes in MotionWorks IEC projects. Toolboxes are pre-built function blocks and code that can be imported as libraries to simplify programming. The document lists several toolboxes including Cam, Communications, File Read/Write, Group, Kinematics, Math, PackML, PLCopen, and Winding Toolboxes. It explains that toolboxes increase efficiency by reducing development time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
514 views757 pages

MotionWorks IEC Toolboxes Rev 2021

The document provides an introduction to Toolboxes in MotionWorks IEC projects. Toolboxes are pre-built function blocks and code that can be imported as libraries to simplify programming. The document lists several toolboxes including Cam, Communications, File Read/Write, Group, Kinematics, Math, PackML, PLCopen, and Winding Toolboxes. It explains that toolboxes increase efficiency by reducing development time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 757

Toolbox Introduction

Toolbox Help Documentation


Help version created 7/23/2021

Toolbox Introduction

Yaskawa has created several IEC-61131 projects for MotionWorks IEC which can be imported for use by another project as a
User Library, or "Toolbox." These toolboxes were designed to save time by providing application code for a wide variety of situ-
ations.

l Cam Toolbox contains functions that increase the power of the PLCopen cam function in the firmware library by provid-
ing extras such as functions for calculating motion profiles, making adjustments based on latch inputs, and EStop
recovery.

l Communications toolbox provides advanced communication protocol function blocks (DNS, SMTP, FTP).

l File Read / Write Toolbox builds upon the basic file manipulation functions available in the ProConOS firmware library to
more quickly read and write application data files.

l Group Toolbox is the successor to Gantry Toolbox and provides enhancements to PLCopen Part 4 for interpolation,
including G Code support. Its GroupCommManager and Pendant_Driver function blocks make it easy to add manual
mode and position teaching support for any group based application.

l Kinematics Toolbox contains forward and inverse kinematics for selected mechanisms.

l Math Toolbox provides compatibility with the built in function that include EN and ENO outputs, and also provides other
tools such as ATAN2, and Floating Point Remainder (REM).

l PackML is both a Template and Toolbox for designing applications to take advantage of the PackML specification. It
emphasizes machine state and transition logic and provides predefined PackML data structures.

l PLCopen Toolbox contains functions that build upon the PLCopen standard functions. It can serve as a starting point
for every project.

l NEW! Winding Toolbox contains functions which perform calculations and other control for various winding applic-
ations.

l Yaskawa Toolbox contains functions that add basic functionality, such as PID Control, or a Moving Average Filter.

A toolbox or user library is just another project. What makes it a user library is the import method. When a project is impor-
ted as a user library, only the functions, function blocks and datatypes are available to the main project. None of the hard-
ware specific information of the user library applies.

Page 1 of 757
Please refer to the document TN.MCD.08.130 on www.yaskawa.com for a comprehensive look at how user libraries can
increase programming efficiency by reducing development time.

See our Youtube channel for video tutorials and examples for MotionWorks IEC and many of our toolboxes.

Page 2 of 757
Common DataTypes

PLCopen Help Documentation


Help version created 7/23/2021

DataType: AXIS_ARRAY
AXIS_ARRAY is a sub structure of the AXES_GROUP_REF structure which identifies the physical motors or virtual axes that par-
ticipate in the group.

Data Type Declaration


* Element Data Description Usage
Type
C AXIS_ ARRAY: Logical axis reference. This value can be located on the Configuration MyAXES_GROUP_
ARRAY [1..32] OF tab in the Hardware Configuration (logical axis number). Note that this REF.AxisRef[1].Ax-
AXIS_REF array is 1 based, not zero. isNum

Example

Page 3 of 757
PLCopen Help Documentation
Help version created 7/23/2021

AXES_GROUP_REF
An AXES_GROUP_REF identifies a group of axes that work together as a single mechanical unit. AXES_GROUP_REF is used as a
VAR_IN_OUT for PLCopen Part 4 - Interpolation Function Blocks.

Variables of this type are automatically declared in the Global Variables grid when the MotionWorks IEC project is configured
with a Group in the Hardware Configuration. When a group is configured with Mechatrolink axes, the group structure is
mapped to a %M memory area at specific location, and a portion of the contents of the structure is updated by the MPiec firm-
ware at the task interval to which the group I/O is assigned.

Data Type Declaration


* Element Data Type Description Usage
MyAXES_GROUP_REF AXES_GROUP_REF
C Name STRING32 ARRAY[1..32] OF MyAXES_GROUP_REF.Name
BYTE. An array of
ASCII characters
representing the
Group name as
entered in the Hard-
ware Configuration.
Tip: Use the BUF_
TO_STRING func-
tion block to convert
this data to a
STRING type. See
example below.
C Handle UINT This is a unique MyAXES_GROUP_REF.Handle
value used internally
to identify the group
with lower level func-
tion blocks.
C Mechanism STRING32 ARRAY[1..32] OF MyAXES_GROUP_REF.Mechanism
BYTE] Reserved for
future use.
C AxisRef AXIS_ARRAY Array of AXIS_ MyAXES_GROUP_REF.Axis[1].AxisNum
REF identifying
the physical
motors or virtual
axes. Note that
this array is 1
based, not 0.
C Padding1 UINT reserved
C Status GROUP_STATUS Structure con-
taining status and
alarm inform-
ation.
C Axis GROUP_COORD_SYS Structure con- MyAxesGroup.Axis.CmdPos[1]
taining position,
velocity and accel-
eration data for
the Axis Coordin-
ate System.
C Machine GROUP_COORD_SYS Structure con- MyAxesGroup.Machine.CmdPos[1]
taining position,
velocity and accel-
eration data for

Page 4 of 757
* Element Data Type Description Usage
MyAXES_GROUP_REF AXES_GROUP_REF
the Machine
Coordinate Sys-
tem.
C World GROUP_COORD_SYS Structure con- MyAxesGroup.World.CmdPos[1]
taining position,
velocity and accel-
eration data for
the World Coordin-
ate System.
C Part GROUP_COORD_SYS Structure con- MyAxesGroup.Part.CmdPos[1]
taining position,
velocity and accel-
eration data for
the Part Coordin-
ate System.
C Tool GROUP_COORD_SYS Structure con- MyAxesGroup.Tool.CmdPos[1]
taining position,
velocity and accel-
eration data for
the Tool Coordin-
ate System.
C Limits GROUP_LIMITS Position, Velocity, MyAxesGroup.Limits.MachineLimits.MaxVelocity
Acceleration and [1]
Jerk limits for the
Axes, Machine
and Tool Coordin-
ate Systems
C Reserved Reserved Reserved for future ---
expansion.
C Host_ID INT 0 = Group is oper- MyAXES_GROUP_REF.Host_ID
ated locally on the
MPiec via
Mechatrolink. 1 =
group is operated
remotely via
MLX200 gateway.
C Mechanism_ID INT Indicates the type of MyAXES_GROUP_REF.Mechanism_ID
mechanism: 0 =
Gantry, 1 = Scara, 2
= MPP3, custom =
32767
C Interface_ID INT Required when MyAXES_GROUP_REF.Interface_ID
Host_ID = 1. This
identifies on which of
the potentially 8
MLX200 interfaces
in the system the
AxesGroup exists.
C Device_ID INT Robot number MyAXES_GROUP_REF.Device_ID
within the MLX200
Gateway. This value
must be 1.
C MaxLinearVelocity LREAL Maximum linear velo- MyAXES_GROUP_REF.MaxLinearVelocity
city of the TCP
C MaxAngularVelocity LREAL Maximum angular MyAXES_GROUP_REF.MaxAngularVelocity
velocity of the TCP
C MaxLinearAcceleration LREAL Maximum linear MyAXES_GROUP_REF.MaxLinearAcceleration
acceleration of the
TCP
C MaxAngularAcceleration LREAL Maximum angular MyAXES_GROUP_REF.MaxAngularAcceleration
acceleration of the
TCP
C MaxLinearJerk LREAL Maximum linear jerk MyAXES_GROUP_REF.MaxLinearJerk

Page 5 of 757
* Element Data Type Description Usage
MyAXES_GROUP_REF AXES_GROUP_REF
of the TCP
C MaxAngularJerk LREAL Maximum angular MyAXES_GROUP_REF.MaxAngularJerk
jerk of the TCP
C ActiveCoordinateFrame INT ACS, MCS, PCS... MyAXES_GROUP_REF.ActiveCoordinateFrame
C ActiveCoordinateSystem INT Cartesian, Polar, MyAXES_GROUP_REF.ActiveCoordinateSystem
Spherical. (Only
Cartesian is sup-
ported.) Others for
future use.
C ActiveTool INT As entered in the MyAXES_GROUP_REF.ActiveTool
UserApplicationData
structure.
C ActivePartFrame INT As entered in the MyAXES_GROUP_REF.ActivePartFrame
UserApplicationData
structure.

Page 6 of 757
PLCopen Help Documentation
Help version created 7/23/2021

DataType: AXIS_REF
The AXIS_REF data type identifies an axis and thus provides the interface to the hardware or virtual axes. AXIS_REF is ref-
erenced as a VAR_IN_OUT in all function blocks. It is represented as an input and an output connected by a horizontal line in
the graphical representation of a function block.

Data Type Declaration


* Element Data Description Usage
Type
MyAxisRef AXIS_
REF
U AxisNum UINT The value of AxisNum is determined by the logical axis number assigned by the Hardware MyAxisRef.AxisNum
Configuration. See the Configuration tab under each axis.

Example
MyServo.AxisNum:=UINT#3;

Page 7 of 757
PLCopen Help Documentation
Help version created 7/23/2021

AxisParameterStruct
For use with the CamSlave_FeedToLength and CamSlave_WindowCheck function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyAxisParameterStruct AxisParameterStruct
C ActualPosition LREAL 1000 MyAxisParameterStruct.ActualPosition
C ActualPositionCyclic LREAL 1005 MyAxisParameterStruct.ActualPositionCyclic
C ActualPositionNonCyclic LREAL 1006 MyAxisParameterStruct.ActualPositionNonCyclic
C ActualTorque LREAL 1004 MyAxisParameterStruct.ActualTorque
C ActualVelocity LREAL 1001 MyAxisParameterStruct.ActualVelocity
C AtVelocity BOOL 1141 MyAxisParameterStruct.AtVelocity
C BufferedMotionBlocks LREAL 1600 MyAxisParameterStruct.BufferedMotionBlocks
C CamMasterCycle LREAL 1512 MyAxisParameterStruct.CamMasterCycle
C CamMasterPosition LREAL 1500 MyAxisParameterStruct.CamMasterPosition
C CamMasterShiftedCyclic LREAL 1502 MyAxisParameterStruct.CamMasterShiftedCyclic
C CamMasterShiftedPosition LREAL 1501 MyAxisParameterStruct.CamMasterShiftedPosition
C CamMasterScale LREAL 1510 MyAxisParameterStruct.CamMasterScale
C CamMasterShift LREAL 1511 MyAxisParameterStruct.CamMasterShift
C CamOffset LREAL 1531 MyAxisParameterStruct.CamOffset
C CamScale LREAL 1530 MyAxisParameterStruct.CamScale
C CamShiftRemaining LREAL 1513 MyAxisParameterStruct.CamShiftRemaining
C CamState LREAL 1540 MyAxisParameterStruct.CamState
C CamTableIDEngaged LREAL 1541 MyAxisParameterStruct.CamTableIDEngaged
C CamTableOutput LREAL 1520 MyAxisParameterStruct.CamTableOutput
C CommandedAcceleration LREAL 1012 MyAxisParameterStruct.CommandedAcceleration
C CommandedPosition LREAL 1010 MyAxisParameterStruct.CommandedPosition
C CommandedPositionCyclic LREAL 1015 MyAxisParameterStruct.CommandedPositionCyclic
C CommandedPositionNonCyclic LREAL 1016 MyAxisParameterStruct.CommandedPositionNonCyclic
C CommandedTorque LREAL 1014 MyAxisParameterStruct.CommandedTorque
C CommandedVelocity LREAL 1011 MyAxisParameterStruct.CommandedVelocity
C InPosition BOOL 1140 MyAxisParameterStruct.InPosition
C LatchPositionNonCyclic LREAL 1031 MyAxisParameterStruct.LatchPositionNonCyclic
C PositionError LREAL 1130 MyAxisParameterStruct.PositionError
C PositionWindow LREAL 1120 MyAxisParameterStruct.PositionWindow

Page 8 of 757
PLCopen Help Documentation
Help version created 7/23/2021

DataType: COORD_SYS_LIMITS_6
COORD_SYS_LIMITS_6 is a sub structure of AXES_GROUP_REF.Limits.WorldLimits and PartLimits. This structure is for the
MCS and PCS Coordinate systems.

Data Type Declaration


* Element Data Description Usage
Type
MyAxesGroup.Limits.AxisLimits COORD_SYS_
LIMITS
C MinPosition MC_COORD_ MyAxesGroup.Limits.AxisLimits.MinPosition[2]
REF
C MinVelocity MC_COORD_ MyAxesGroup.Limits.AxisLimits.MinVelocity[1]
REF
C MinAcceleration MC_COORD_ MyAxesGroup.Limits.AxisLimits.MinAcceleration
REF [4]
C MinJerk MC_COORD_ MyAxesGroup.Limits.AxisLimits.Jerk[1]
REF
C MaxPosition MC_COORD_ MyAxesGroup.Limits.AxisLimits.MaxPosition[3]
REF
C MaxVelocity MC_COORD_ MyAxesGroup.Limits.AxisLimits.MaxVelocity[2]
REF
C MaxAcceleration MC_COORD_ MyAxesGroup.Limits.AxisLimits.MaxAcceleration
REF [2]
C MaxJerk MC_COORD_ MyAxesGroup.Limits.AxisLimits.MaxJerk[5]
REF

Page 9 of 757
PLCopen Help Documentation
Help version created 7/23/2021

DataType: GROUP_LIMITS
GROUP_LIMITS is a sub structure of AXES_GROUP_REF and contains the following information.

Data Type Declaration


* Element Data Type Description Usage
MyAxesGroup.Limits GROUP_LIMITS
C AxisLimits COORD_SYS_LIMITS MyAxesGroup.Limits.AxisLimits
C MachineLimits COORD_SYS_LIMITS MyAxesGroup.Limits.MachineLimits
C WorldLimits COORD_SYS_LIMITS_6 MyAxesGroup.Limits.WorldLimtis
C PartLimits COORD_SYS_LIMITS_6 MyAxesGroup.Limits.PartLimits

Page 10 of 757
PLCopen Help Documentation
Help version created 7/23/2021

DataType: GROUP_STATUS
GROUP_STATUS is a sub structure of AXES_GROUP_REF and contains the following information.

Data Type Declaration


* Element Data Type Description Usage
GROUP_STATUS
C Active BOOL Indicates if the group is MyAXES_GROUP_REF.Status.Active
made active via the MC_
GroupEnable function
block.
C Padding BYTE Reserved for future use
C State UINT Reserved for future use MyAXES_GROUP_REF.Status.State
C Alarm UDINT Indicates if there is an MyAXES_GROUP_REF.Status.Alarm
alarm for the group or any
axis of the group.
C NumMotionSegments UINT The number of motion MyAXES_GROUP_
segments currently in the REF.Status.NumMotionSegments
motion queue.
C FreeMotionSegments UINT The number of motion MyAXES_GROUP_
segments available to be REF.Status.FreeMotionSegments
added to the motion
queue.
C AxisStatus GRP_AXIS_STATUS_ARRAY Array which reports the MyAXES_GROUP_REF.Status.Ax-
power status of each axis. isStatus[1]
For Mechatrolink Servo
axes, this is equivalent to
the PON flag.
Reserved 256 bytes of reserved space. --- ---

Page 11 of 757
PLCopen Help Documentation
Help version created 7/23/2021

DataType: VECTOR
The VECTOR data type specifies a coordinate position for a grouped system. This datatype has other applications also, such as
TransitionParameter.

Data Type Declaration


* Element Data Description Usage
Type
U/C Vector Array [1..32] This datatype is generically used in several instances where an array of LREAL val- MyVector
of ues is required. [1]
LREAL

Example

Consider the following code for a simple XYZ gantry mechanism. MyVector and AnotherVector can be connected directly to the
MC_MoveLinearAbsolute or MC_MoveLinearRelative function blocks "Position" VAR_INPUT.

MyVector[1]:=LREAL#25.0; (* Specify the X axis position *)

MyVector[2]:=LREAL#25.0; (* Specify the Y axis position *)

MyVector[3]:=LREAL#3.5; (* Specify the Z axis position *)

AnotherVector[1]:=LREAL#1..765; (* Specify the X axis position *)

AnotherVector[2]:=LREAL#2.131; (* Specify the Y axis position *)

AnotherVector[3]:=LREAL#0.220; (* Specify the Z axis position *)

Page 12 of 757
PLCopen Help Documentation
Help version created 7/23/2021

RTC Struct
This datatype is for use with the Y_SetRTC function block from the Y_Motion firmware library and the RealTimeClock function
block from the Yaskawa Toolbox.

Data Type Declaration


* Element Data Type Description Usage
MyRTCStruct RTC_STRUCT
U/C Year INT MyRTCStruct.Year
U/C Month INT MyRTCStruct.Month
U/C Day INT MyRTCStruct.Day
U/C Hour INT MyRTCStruct.Hour
U/C Minute INT MyRTCStruct.Minute
U/C Second INT MyRTCStruct.Second
U/C Millisecond INT MyRTCStruct.Millisecond

Page 13 of 757
PLCopen Help Documentation
Help version created 7/23/2021

Data Type: TRIGGER_REF


This data type is for use with the MC_TouchProbe and MC_AbortTrigger function blocks.

MC_TouchProbe requires a trigger referenced via a variable of the type TRIGGER_REF.

Data Type Declaration


* Element Data Description Usage
Type
MyTriggerRef TRIGGER_
REF
U Bit UINT See chart below for required value based on the device and physical input pin MyTriggerRef.Bit
used.
U ID UINT Unique ID for each trigger on the same axis; used as a link between MC_ MyTriggerRef.ID
TouchProbe and MC_AbortTrigger. Typically the value should be zero as only
one trigger per axis is supported on Mechatrolink II and the MP2000iec style
option cards.
If using simultaneous MC_TouchProbe function blocks with a Mechatrolink-III
Servopack, specify unique IDs.
U Input Input_REF Reserved for future use MyTriggerRef.Input.ID
U Pattern DETECTION_ Reserved for future use MyTriggerRef.Pattern
PATTERN

Notes
Prior to firmware 2.5, the TRIGGER_REF.ID element was not used by the MP2000iec controllers and any value would be accep-
ted. In 2.5, the TRIGGER_REF.ID field must be a zero for MP2000iec series controllers. In older help documentation, an
example showed the ID set to 1, and many users set TRIGGER_REF.ID to 1 in their projects, which causes MC_TouchProbe to
output ErrorID 4630 when using firmware 2.5 or higher. The solution is to set MyTriggerRef.ID to zero which will work for all
firmware versions. Only on the MP3000iec controllers can another value be used for the case of multiple latches configured on
the same axis.

The following chart details the correct values for the TRIGGER_REF structure based on the hardware latch to be detected.

Page 14 of 757
Page 15 of 757
PLCopen Help Documentation
Help version created 7/23/2021

Data Type: Y_DISENGAGE_DATA


This data type is for use with the Y_CamOut function block. Y_DisengageMethod#AtPosition is the only disengage method sup-
ported. To disengage the slave from a master when the machine is already stopped, use MC_Stop for the slave axis.

Data Type Declaration


* Element Data Type Description Usage
MyYDisengageData Y_DISENGAGE_DATA
U EndMode Y_DisengageMethod Enumeration: MyYDisengageData.EndMode
0:Y_DisengageMethod#AtPosition
1:Y_DisengageMethod#Immediate
2:Y_DisengageMethod#EndOfProfile
U RampOut INT Reserved for future use MyYDisengageData.RampOut
U RampOutData1 LREAL Reserved for future use MyYDisengageData.RampOutData1
U RampOutData2 LREAL Reserved for future use MyYDisengageData.RampOutData2
U RampOutData3 LREAL Reserved for future use MyYDisengageData.RampOutData3
U RampOutData4 LREAL Reserved for future use MyYDisengageData.RampOutData4

Code Example:

Page 16 of 757
PLCopen Help Documentation
Help version created 7/23/2021

Data Type: Y_ENGAGE_DATA


This data type is for use with the Y_CamIn function block.

Data Type Declaration


* Element Data Type Description Usage
MyYEngageData Y_ENGAGE_
DATA
U StartMode Y_ Enumeration: MyYEngageData.StartMode
EngageMethod 0:Y_EngageMethod#AtPosition (Default)
The slave will engage when the master position is within the
range of [EngagePosition +/- (EngageWindow/2)]. Master-
Relative is ignored. Use this setting for normal circumstances.
The intended usage requires setting YCamIn.Execute:=TRUE
at some point before the master and slave are to be syn-
chronized. The motion engine, operating at the
MECHATROLINK or dual port RAM update interval will monitor
for the exact position to start the camming process.

1:Y_EngageMethod#Immediate
Y_CamIn does not wait for the master position to reach the
EngagePosition. The EngagePosition and the EngageWindow
inputs are ignored. This mode is intended for use when the mas-
ter is not moving, such as during fault or E-Stop recovery in the
middle of a cam cycle. In this scenario, the slave may be moved
to the equivalent cam position of the master, then the cam can
be re-engaged immediately using MasterRelative:=FALSE to
preserve the original synchronization. If MasterRelative=TRUE,
then CamMasterShift (Parameter 1511) is adjusted so that the
master position at the time YCamIn.Execute changes to TRUE
corresponds to the start of the table domain. This scenario
would change the synchronization between the master and
slave. Immediate Mode is not recommended for application
scenarios where the master is in motion, as a position drift or
phase lag may be introduced.

2:Y_EngageMethod#Linked
The new cam profile will be switched on the fly at the end of the
current cam table. This mode is intended for use when cams
with different Machine Cycles are to be run without stopping.
Use the Linked mode or applications where the product size
must be changed on the fly. Do not use linked mode if Y_
CamShift is used for the same slave axis.

3: Y_EngageMethod#AtAbsolutePosition (requires firm-


ware 3.2.0 or higher)
The slave will engage when the master axis absolute position
crosses the position specified by the EngagePosition input of
the function block. The intended usage requires setting
YCamIn.Execute:=TRUE at some point before the master's
absolute position reaches the specified position. The motion
engine, operating at the MECHATROLINK or dual port RAM
update interval will monitor for the exact position to start the
camming process. The slave will start to follow the master when
the master crosses the specified Engage position according to
the Y_CamIn function block input.

Page 17 of 757
U MasterRelative BOOL Only MasterRelative:=FALSE is supported. MyYEngageData.MasterRelative
U SlaveAbsolute BOOL When SlaveAbsolute:=FALSE, the initial position of the slave will MyYEngageData.SlaveAbsolute
be used as the base offset for the camming operation. For
example, if the cam slave table data goes from 0 to 20, back to
0, but the slave's commanded position when the engage event
occurs is 4.5, the slave will travel from 4.5 to 24.5, and back to
4.5. If SlaveAbsolute:=TRUE for the same scenario, the slave
will jump from 4.5 to 0 when the engage event occurs. (This is
not desirable behavior.) If SlaveAbsolute mode is used, the
application program must ensure that the slave axis is posi-
tioned at the proper position for camming to operate correctly.
RampIn INT Reserved for future use ---
RampInData1 LREAL Reserved for future use ---
RampInData2 LREAL Reserved for future use ---
RampInData3 LREAL Reserved for future use ---
RampInData4 LREAL Reserved for future use ---

Code Example:
MyEngageData.StartMode:=Y_EngageMethod#AtAbsolutePosition;

Page 18 of 757
Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

The following is an alphabetical listing of the Enumerated Types defined in the MotionBlockTypes file:

Enumerated #INT Enum Value Description


Type Value
MC_BufferMode
0 Aborting This is the Default mode. The FB aborts an ongoing motion and the command
affects the axis immediately.
1 Buffered The FB affects the axis as soon as the previous movement is complete. The axis will
stop between the movements.
2 BlendingLow The FB controls the axis after the previous FB has finished, but the axis will not stop
between the movements. The velocity is blended with the lowest velocity of both
commands.
3 BlendingPrevious The FB controls the axis after the previous FB has finished (equivalent to buffered),
but the axis will not stop between the movements. Blending with the velocity of the
previous move.
4 BlendingNext The FB controls the axis after the previous FB has finished, but the axis will not stop
between the movements. Blending with velocity of this (next) function.
5 BlendingHigh The FB controls the axis after the previous FB has finished (equivalent to buffered),
but the axis will not stop between the movements. Blending with highest velocity of
the previous and this (next) function.

MC_Detection_
Pattern 0 Rising_Edge
1 Falling_Edge

MC_Direction
0 Positive_Direction In a rotary application, forces the axis to move in a positive direction.
1 Shortest_Way For use in applications where the Load Type is configured as a rotary or modularized
axis.
2 Negative_Direction In a rotary application, forces the axis to move in a negative direction.
3 Current_Direction For use in applications where the Load Type is configured as a rotary or modularized
axis.
Only applies if an existing move is in progress and another function block such as
MC_MoveAbsolute or MC_MoveRelative is executed. Once the axis is at StandStill,
using MC_Direction_CurrentDirection will default to the positive direction

MC_Exe-
cutionMode 0 Immediately Functionality is immediately valid. May influence ongoing motion, but not the state.
1 Delayed Functionality is valid when the ongoing motion command set Done, Aborted, or
Error outputs.
2 Queued Functionality is valid when ALL previous motion commands set Done, Aborted, or
Error outputs.

Page 19 of 757
Enumerated #INT Enum Value Description
Type Value
MC_PathChoice
0 ClockWise
1 CounterClockWise

MC_SwitchMode
0 On Unsupported
1 Off Unsupported
2 EdgeOn
3 EdgeOff Unsupported
4 EdgeSwitchPositive Unsupported
5 EdgeSwitchNegative Unsupported

MC_Trans-
itionMode 0 TMNone No transition curve inserted. Motion blocks are not modified. The only Trans-
itionMode usable with the "Buffered" BufferMode.
1 TMStartVelocity Transition with given start velocity. Adds a segment to the motion queue unless
motion is tangent.
2 TMConstantVelocity Transition with given constant velocity. Adds a segment to the motion queue unless
motion is tangent.
3 TMCornerDistance Transition with given corner distance. Adds a segment to the motion queue unless
motion is tangent.
4 TMMaxCornerDeviation Geometry limited parabolic transition with the path defined by the programmed tar-
get point to the apex of the parabola. The system will enforce this exact path, but will
adjust the curve if the input segments are too short. Note that the FMK imple-
mentation is logically “ExactCornerDeviation” even though the PLCOpen spec calls
for “MaxCornerDeviation”
10 TMMLXBlend This mode is only user with MotomanSync remote hosted robots controlled by the
YRC1000 series and related controllers. The transition parameter values are 0~8
with 0 defining a motion that stops at the segment end point and 1~8 apply blend
distances defined in the robot controller.
11 TMMaxCornerDeviation Geometry limited parabolic transition with the path defined by specified corner dis-
tance from the start point of the curve to the programmed target point. The blend
will begin no sooner than this distance to the programmed target point and can be
started at any point closer without generating an error. The system is free to pick
any paths that obey this constraint. This will limit the path to a maximum distance
which is useful if there are obstacles in the way. It is also useful for applications that
can tolerate a variable blend radius depending on the speed, motion sequence, or
timing.

Y_AdjustMode
0 MasterDistance The cam adjustment starts immediately, and completes when the master has trav-
elled the specified distance. If MasterDistance is 0.0, then the cam adjustment fin-
ishes in the same scan it starts.
1 ElapsedTime The cam adjustment starts immediately, and completes within the specified time. If
Time=0.0, then the adjustment completes in the same scan it starts.
2 WithinRange The cam adjustment starts when the master is crosses the StartPosition, and com-
pletes when the master reaches the EndPosition. If the master position is already
between StartPosition and EndPosition, then the adjustment starts immediately,
but still completes at the EndPosition, which means that the correction speeds may
be higher.

Page 20 of 757
Enumerated #INT Enum Value Description
Type Value
Y_ControlMode This enumerated type is for use with Y_DirectControl
0 NoControlMode This is not a valid value.
1 PositionMode The ServoPack will be controlled in position mode. A new command target must be
calculated in the controller at a frequency suitable for the application. No accel-
eration or speed profiling is added by the system, except for the command filtering
provided by pn 811/812, or pn 216/217 if using the MP2600iec.
2 VelocityTLMode The ServoPack will be operated in velocity mode. The Torque input of the Y_Dir-
ectControl function block will serve as the torque Limit in this mode.
3 TorqueVLMode The ServoPack will be operated in torque mode. The Velocity input of the Y_Dir-
ectControl function block will serve as the velocity limit in this mode. If the velocity
limit is reached, the servo will apply increased torque if necessary to keep the velo-
city within the limits.
4 PositionTrqFFMode The ServoPack will be operated in position mode. The Torque input of the Y_Dir-
ectControl function block will serve as the torque feed forward value in this mode.
5 VelocityTrqFFMode The ServoPack will be operated in velocity mode. The Torque input of the Y_Dir-
ectControl function block will serve as the torque feed forward value in this mode.

Y_TableType
0 Undefined
1 MasterSlaveArray This is the only TableType supported.

Page 21 of 757
Cam Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with Cam Toolbox

The Cam Toolbox contains function blocks that combine PLCopen blocks like Y_CamIn, Y_CamShift, Y_SlaveOffset, Y_
CamSlave, Y_ReleaseCamTable etc. These toolbox function blocks provide enhanced application level functionality that can be
used for cam applications like random rotary knife, linear flying shear, labeler, bottle filler etc.

Requirements for v372


To use the Cam Toolbox, the main project must also contain the following:

Firmware libraries:

l YMotion (only if using CamSlave_FeedToLength2)

User libraries:

The following User Libraries must be listed above the Cam Toolbox and in the following order:

l Math_Toolbox (v300 or higher)


l DataTypes_Toolbox (v300 or higher)
l PLCopen_Toolbox (v300 or higher)

Using the Cam Toolbox


Cam Toolbox contains functions which provide enhanced support for the Y_Cam* PLCopen function blocks.

See Yaskawa's Youtube video - Camming Demonstration with Yaskawa MP2300Siec for more info.

Page 22 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Cam Toolbox Revision History

Current Version:
2021-07-07 v372 released

1) Labeler FB - New addition to the toolbox. DCR 4456.

2) CamShiftControl FB - Was not reporting all possible internal error conditions. DCR 4992.

3) SetCamMasterCycle FB - If an internal function wasn't allowed to finish (CommandAborted go low), then it would cause
errors with other camming functions. DCR 3371.

4) SetCamMasterCycle FB - Did not 'wake up' parameter 1502. DCR 5332.

Previous Versions:
2020-02-06 v370 released (There were no changes when the December 2020 Toolbox installer was released,
therefore there is no 371 release.)

1) CamGenerator - If an all cubic cam was generated more than once, spline coefficients were incorrect in the subsequent cal-
culations because of improper initialization. DCR 3782.

2019-02-06 v352 released

1) CamGenerator.TableSize code change in v350 was wrong, caused false Error 10041. DCR 2057.

2) CamGenerator FB - Cubic spline calculations limited by the segment CamSegmentStruct index number. Cubic Splines no
longer limited by their placement within the overall CamSegmentStruct. DCR 1740.

2018-06-26 v350 released

1) CAM_Analyzer FB - Did not ouptut correct values for MaximumAcceleration and MaximumJerk. DCR 1266.

2) CamTableManager FB - Fixed bug introduced in last version when making the number of tables configurable. DCR 1629.

3) CamGenerator - Deprecated the use of the TableSize VAR_INPUT, it is no longer referenced in code in favor of using the
UPPER_BOUND function to determine the size of the CamSegment structure. Also removed other hard coded size checks used
for the Spline formula Type. DCR 1969.

2017-12-06 v340 released

1) CamTableManager - Added VAR_INPUT to specify the number of cam tables to keep in memory before removing. DCR 1104 .

2) CamGenerator - Improved reporting of a resolution ErrorID 10039. DCR 1171.

Page 23 of 757
2016-09-18 v302 released

1) CamControl FB - Changed CamControl to set ControlData.Shifting based on CamShift.Done instead of Busy. DCR 780.

2) Added EngageWindow to CamSynchStruct. This will help to map user values into Y_CamIn for features like the new
"Labeler" Function Block. DCR 782.

2015-01-31 v301 released

1) CamGenerator - DCR 766, fixed Tangent Blending to blend with non-zero slave starting position. Change also added for Cam
Editor in MotionWorks IEC v3.1

2) CamShift_Control - Changed line 215 to ControlData.Shifting:=Y_CamShift_1.Busy OR Y_CamShift_1.Done. DCR 682.

2015-01-31 v300 created

1) Identical to v206, but recompiled specifically for MotionWorks IEC v3.x.

2014-11-14 v206 released. Developed using firmware 2.6

2015-01-31 v300 released. Identical to v206, but recompiled specifically for MotionWorks IEC v3.x.

1) CalcBezier - Improved code.

2) SlaveOffset_Control - Changed equation for first correction. Added manual offset input for adjusting while in motion.

3) CamGenerator - ParabolicVelocityBlend formula - Code added for blending improvement (Lines (132- 138)

4) CamTableUpdate - Changes made to prevent outputs from flickering (Refer to DCR 467)

5) CamControl - Changes made to iActive code to prevent flickering outputs in case of an Error and also

lockup of function if data in CamControl structure changes after function block goes dormant.

6) SlaveRegistrationCheck - Added (DefaultSize * LREAL 1.1) to NextCheckPoint calculation on rising edge of Enable (line 27)

7) SetCamMasterCycle - Improvement by adding Y_CamShift with zero phaseshift to keep prm 1502 updating after this block
executes.

2014-03-07 v205 released. Developed using firmware 2.5

1) CamBlend - Changed EngageData.SlaveAbsolute to FALSE. This is to support changing master cycles without changing the
position scale in the Hardware Configuration.

2) CamBlend - Removed NC CamOutBusy from rung 11. This bit could cause the RampOut bit to fire twice.

3) CamBlend - Changes made to improve RampIn to RampOut transition without entering Running mode. Added NC
RampOutBusy on rung 4. Added ActiveTable_RampIn in rung 11. Added ActiveTable_RampOut on Rung 4 to allow RampOut to
RampIn transition in consecutive cycles. Added NC RampOutBusy and NC RampInBusy on rung 19 to prevent iActive from turn-
ing off prematurely.

4) CamBlend - Removed CamOut FB from CamBlend. Non periodic RampOut is sufficient. This eliminates false error outputs.

5) CamShift_Control - Added new datatype 'SynchPosition'. This is the position in the cam table where the master and slave
become synchronized.

6) CamShift_Control - Simplified the equation for correction for initial shift for modes 1 and 2.

7) SlaveOffset_Control - New FB, similar to CamShift_Control. Buffered offsets on a slave axis can be accomplished by buf-
fering registration marks. New datatype SlaveOffsetStruct accompanies SlaveOffset_Control FB.

8) SetCamMasterCycle - New FB in this version. Sets the cam master cycle the first time to change it from default of 1.0 to the
Master cycle of the cam table to be used. Only necessary for applications that use Y_CamShift before engaging the cam.

Page 24 of 757
9) CamGenerator - CalcSpline formula completely re written with new algorithm.

10) CamGenerator - New Bezier curve added. Bezier segment requires straight segments before and after the Bezier curve.
This is a modified bezier which will never cause reverse motion.

11) CamSlaveFeedToLength - Further improvement based on customer feedback for the change made in v204. TestTrack DCR
7. SlaveRegistrationCheck is completely shut down if no cam is active, this prevents MissedLatchError from occuring.

12) CamControl, CamShift_Control - Added support for Multi Use Latches, which is a new feature of the PLCopen Toolbox v206
ProductBuffer function block.

Starting in Cam Toolbox v204 – All firmware library DataType definitions were moved to a new toolbox called the DataTypes
Toolbox. Formerly, the PLCopen Toolbox contained the MotionInfoTypes and the PLCTaskInfoTypes datatype files. These were
removed and are now included in the DataTypes Toolbox. If upgrading from an older version of Cam Toolbox, you must do the
following:
 1) Include the DataTypes Toolbox in the main project.
 2) Remove any other Yaskawa supplied datatype files with firmware library definitions such as:
   a. ControllInfoTypes
   b. YDeviceCommTypes

Note: Compiler issues yielding the message "Error during generating native code" will be experienced under the following com-
bined conditions: 1) Using Cam Toolbox v204 or higher AND using an MP3000iec series controller AND using MotionWorks IEC
v2.x. The remedy is to downgrade to Cam Toolbox v203 or use MotionWorks IEC v3.x.

2013-09-01 v204 released. Developed using 2.4.0 firmware


1) CamBlend - Added ErrorID 10084. One of the Cam Tables has an invalid TableID.

2) CamBlend - Fixed ExecuteStandStill contact in RETURN rung to be normally closed.

3) CamGenerator - Corrected mistake with Tangent Match & Tangent Blend formulas introduced in v202 when CamGenerator
was improved to allow blending segments.

4) CamBlend - Added check: If BlendData.Window = 0, then the code defaults the value to 1% of the CamMasterCycle.

5) CamGenerator - Added curve type 32 for Arc profile. Also added radius and direction to CamSegmentStruct

6) Removed references to Math Toolbox functions where possible. Now only the CamShiftControl function block requires the
Math Toolbox.

7) Because of the reintroduction of functions with EN/ENO, the MP2600 requires firmware 2.1.

8) SlaveRegistrationCheck - Added ErrorID 10086 to report if the MaxPosCorrection or MaxNegCorrection are not set correctly.

9) CamSlaveFeedToLength - Added RecordedPosition as output. Also included interlock to prevent adjustments from occur-
ring if the slave is not engaged.

10) CamGenerator - Added Parabolic with blended velocity as formula code 33. (for multi segment)

11) CamShift_Control - Consolidated Rotary Knife and Linear Flying shear math.

2013-01-16 v203 released. Created using 2.4.0 firmware


1) CamGenerator - Improved to support wrap around cubic spline segments at the beginning and the end of the cam. (YEU) 7
spline categories tested.

2) CamGenerator - Added TableShift support into the CamSegmentStruct. Initial shifts can be applied to the cam data without
using the Y_CamShift function block.

Page 25 of 757
2012-11-19 v203 created using 2.3.0 firmware
1) CamGenerator - Improved support for wrap around cubic spline segments at the beginning and the end of the cam.

(YEU) 7 spline categories tested.

2) CamGenerator - Added TableShift support into the CamSegmentStruct for CamGenerator. Initial shifts can be applied to the
data

    without using the Y_CamShift function block.

2012-10-18 v202 released. Created using 2.2.0 firmware


1) CamGenerator - Improved to allow blending segments such as straight line, parabolic, modified sine without forcing a zero
speed transition.

2) CamGenerator - Improved for blending of Cubic Spline segments to other segment types.

3) SlaveRegistrationCheck - Changed 'Missed Latch Error' to occur when the missed latch counter is >= the MissedLatchLimit.
Previously it was not causing error until the MissedLatchLimit was exceeded.

4) CamBlend - Added DisengageData to CamBlend's Y_CamOut for compatibility on MP2600iec and MP3200iec

2011-03-09 v201 released. Created using 2.1.0 firmware


1) CamGenerator - Added Cubic Spline CurveType as Type #31.

2) CamAnalyzer - Added new function block.

3) CamFileMgmt - CamTableMgmt renamed CamTableManager.

4) CamSlave_Lookup - Fixed false 10113 ErrorID from occurring.

5) CamSlave_Recover - Fixed unconnected line in the first rung.

6) DataTypes - Increased CamPair and CamSegmentArray from 200 to 400.

2011-07-29 v200 released. Created using 2.0.0 firmware


1) Built from v009beta for MotionWorks IEC 2.0

2011-04-02 v009 released. Created using 1.2.4 firmware


1) Added CamSlave_Lookup and CamSlave_Recover function blocks for e-stop recovery capability.

2) Added input 'ExecuteStandstill' to CamBlend. This input causes the running cam to engage immediately, which enhances
the E-Stop recovery capability of CamBlend.

3) Removed SETCOIL from CamBlend CommandAborted.

2011-04-01 v008 released. Created using 1.2.4 firmware


1) Fixed Y_CamStructSelect in PathGenerator to comply with PLCopen rule to read TableID only on the scan.

    when done is high. (Also to comply with firmware change made for 1.2.3.)

Page 26 of 757
2) Reworked PathGenerator to support any variety of arcs beyond just simple 0,90,180,270 quadrants.

3) Removed spaces from project file name for improved usage with MotionWorks IEC 2.0.

4) Removed PathGenerator and MovePath, ported over to Gantry Toolbox.

5) Included YMotion firmware library in ZWT, required for CamSlaveFeedToLength2 function block.

    NOTE: This toolbox will work with 1.2.3 firmware unless CamSlaveFeedToLength2 is used, which requires firmware 1.2.4.

6) Improved CamBlend's CommandAborted output behavior to ignore Commandaborted caused by itself.

2011-02-02 v007 released


1) Fixed incorrect parameter in CamBlend for checking the half way point of the cam cycle.

    Step 5 had 1520, it is changed to 1512. Also streamlined the code to only include one check for Halfway instead of two.

2) Added CamSlaveFeedToLength2, which incorporates Y_ProbeContinuous from the Y_Motion firmware library and

    requires firmware 1.2.4 or higher. NOTE: After the 2.0 product release, Y_ProbeContinuous will be available in

    PLCopenPlus firmware library v2_3.

2010-11-15 v006 released


Moved on to v006, beta005 never released.

1) Increased flexibility of CamSlave_FeedToLength / SlaveRegistrationCheck by making Max Positive and Negative Correction

    inputs and outputs.

2) Added CamShift_Control FB for 'Rotary' and 'Out and Back' cam motions.

3) Added TB_CurveType#Polynomial345 to CamGenerator, Polynomial345.

4) Added Cam_Control FB which works with the Product Buffer for slaves that must stop when no product is coming.

2010-08-01 v005beta created)


Moved on to v005, beta004 never released.

1) Merged code changes with Doug Meyer, for CamSlavePullToLength and CamSlaveFeedToLength for MaxCorrection

    and Time based correction. NOTE: Function block interface changed for these functions.

2) Removed LatchError from occurring in CamSlavePullToLength and CamSlaveFeedToLength.

3) Moved window logic into the main Enable section of SlaveRegistrationCheck to allow on the fly updates.

2010-07-02 v004beta created


Moved on to v004, beta003 never released.

1) Added logic to SlaveRegistrationCheck to add one CamCycle if the LatchTableReference is negative.

Page 27 of 757
2010-03-15 v003beta created
1) Fixed mistake in case statement to allow Simple Harmonic as one of the Valid Curve Types. Was 4, should be 3.

2) Changed Max CamSegmentArray size to 200 from 20.

3) Changed CamSlave_FeedToLength to use Stair Step method of latch lookup in cam table. Original method used an

    interpolated latch algorithm.

4) Removed Y_EngageMethod#Linked as a StartMode inside CamBlend.

5) Changed the second and third Y_CamIn functions inside CamBlend to use StartMode = Absolute to eliminate drifting

    caused by switching tables while master in motion.

6) Added NOT(Error) contact to prevent the CamSlave_FeedToLength function from running if there was an error.

7) Added PathGenerator and MovePath for creating XY paths with straight line and circular interpolation.

8) Added CamSlavePullToLength and supporting function CS_PTL_ScaleCalc.

2010-03-12 v002 released


1) Changed CamGenerator straight line segment to include option for calculating points at spec'ed resolution.

2) Initial version would ignore resolution and just use beginning and end points for straight line.

3) Improved CamGenerator. It was recalculating the entire profile over and over each scan while execute was held high.

    Changed to F_TRIG to let initialize section run on the first scan, and the cam calcs on the second.

4) Improved CamBlend Output behavior. (Some bits remained on when both execute inputs were off.

2010-02-01 v001beta created


Created Cam Toolbox by moving the following Function blocks from PLCopen Toolbox v019beta:

1) CamBlend

2) CamMaster_Lookup

3) CamSlave_FeedToLength

4) CamSlave_WindowCheck

5) CamGenerator

6) CamTableUpdate

7) SlaveRegistrationCheck

8) SlaveIndex_Lookup

Page 28 of 757
Cam DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: BlendStruct

Used by the CamBlend function block

Data Type Declaration


* Element Data Type Description Usage
MyBlendStruct BlendStruct
U RampInTableID UINT The TableID of the Cam profile which MyBlendStruct.RampInTableID
accelerates the slave to synchronize with
the master.
U RampInSwitchOverPos LREAL A position where the slave has the same MyBlendStruct.RampInSwitchOverPos
position in both the RampIn and Run-
ning table, typically near the last 90 to
100% of the profile.
U RunningTableID UINT The TableID of the Cam profile is used in MyBlendStruct.TableID
normal operation.
U StandStillEngagePos LREAL This input can be used if the slave is MyBlendStruct.StandStillEngagePos
being engaged to the master at stand-
still. (E-Stop recovery where the slave
engages to a stationary master). This
input will engage the slave to the running
table.
U RampOutTableID UINT TableID of the Cam profile which decel- MyBlendStruct.RampOutTableID
erates the slave to a stop at a descried
location.
U RampOutSwitchOverPos LREAL Specify a position where the slave would MyBlendStruct.RampOutSwitchOverPos
be at the same position in both the
RampIn and Running table, typically
near the last 90 to 100% of the profile.
U Window LREAL Switchover / Engage window in master MyBlendStruct.Window
units.

Page 29 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamPairs

Used by the CamGenerator function block.

Data Type Declaration


* Element Data Type Description Usage
MyCamPairs CamPairs
U CamPairs ARRAY[0..400] OF MyCamPairs[0]
UDINT

Page 30 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamParameters

Supporting structure for CamSegmentStruct. For use with the CamGenerator func-
tion block.

Data Type Declaration


* Element Data Type Description Usage
MyCamParameters CamParameters
U MasterEnd LREAL Position of the master at the end of the current MyCamSegmentStruct.MyCamParameters
segment. [x].MasterEnd
U SlaveEnd LREAL Position of the slave at the end of the current seg- MyCamSegmentStruct.MyCamParameters
ment. [x].SlaveEnd
U CurveType INT Formula code to indicate the motion profile for MyCamSegmentStruct.MyCamParameters
the segment. [x].CurveType
U Resolution REAL Determines how many data points are calculated MyCamSegmentStruct.MyCamParameters
along this segment. If the master delta for this [x].Resolution
segment is 10 units, and the resolution is 0.5,
then 20 points calculated. For CurveType-
e=StraightLine, there is no need to specify a res-
olution for most applications. Set the Resolution
value to zero to conserve on calculated cam data
points.

Page 31 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamSegmentArray

Supporting structure for CamSegmentStruct. For use with the CamGenerator function block.

Data Type Declaration


*
Element Data Type Description Usage
MyCamSegmentArray CamSegmentArray
U CamSegmentArray ARRAY[0..400] OF CamParameters MyCamSegmentArray[0]

Notes:
This is an internal sub structure for CamSegmentStruct and is not intended to be referenced directly by the user.

Page 32 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamSegmentStruct

For use with the CamGenerator function block.

Page 33 of 757
Data Type Declaration

Page 34 of 757
* Element Data Type Description Usage
MyCamSegmentStruct CamSegmentStruct

Page 35 of 757
* Element Data Type Description Usage
U CamParameters CamSegmentArray

Page 36 of 757
* Element Data Type Description Usage
U MasterEnd LREAL Location of the mas- MyCamSegmentStruct.CamParameters
ter at the end of the [x].MasterEnd
current segment
U SlaveEnd LREAL Location of the slave MyCamSegmentStruct.CamParameters
at the end of the cur- [x].SlaveEnd
rent segment
U CurveType INT Formula code to MyCamSegmentStruct.CamParameters
indicate the motion [x].CurveType
profile for this seg-
ment
U Resolution REAL Determines how MyCamSegmentStruct.CamParameters
many data points [x].Resolution
are calculated along
this segment
U ArcRadius LREAL If CurveType = Arc, MyCamSegmentStruct.ArcRadius
this element
describes the
radius. Not used for
any other
CurveTypes.
U ArcDirection INT If CurveType = Arc, MyCamSegmentStruct.ArcDirection
(1=ccw, -1=cw).
Not used for any
other CurveTypes.
U SplineStartSlope LREAL If the first Segment MyCamSegmentStruct.SplineStartSlope
is CurveType =
CubicSpline, this
value is the pos-
itional slope of the
profile as the cam
begins. Typically
this value is zero
unless the cam is
blended with other
cams, and the slope
cannot be auto-
matically determ-
ined by the
CamGenerator.
U SplineEndSlope LREAL If the last Segment MyCamSegmentStruct.SplineEndSlope
is CurveType =
CubicSpline, this
value is the pos-
itional slope of the
profile as the cam
completes. Typically
this is zero unless
the cam is blended
with other cams,
and the slope can-
not be automatically
determined by the
CamGenerator.
U TableShift LREAL If non zero, this MyCamSegmentStruct.TableShift
value represents
the amount of initial
shift in the master
slave values that is
applied to the table
data.
U LastSegment INT Informs the MyCamSegmentStruct.LastSegment

CamGenerator
which element of
the CamSeg-
mentStruct con-

Page 37 of 757
* Element Data Type Description Usage
tains the last seg-
ment of cam data to
be applied.
C OutAndBackCam BOOL Flag which indicates MyCamSegmentStruct.OutAndBackCam
if the first and last
slave position are
the same (out and
back.) If they are dif-
ferent, the cam is
reciprocating, and
the slave will move
away from the initial
start position with
each passing cycle.
U UseSplineSlope BOOL Flag to indicate to MyCamSegmentStruct.UseSplineSlope
use the SplineSlope
parameters in this
structure.

Example

RampInCam.SlaveStart:=LREAL#0.5; (* Slave home position at 12 O'Clock *)

RampInCam.LastSegment:=INT#2;

RampInCam.CamParameters[1].CurveType:=TB_CurveType#TangentBlending;

RampInCam.CamParameters[1].MasterEnd:=LREAL#0.9;

RampInCam.CamParameters[1].SlaveEnd:=LREAL#0.9; (* Slave moves


SlaveEnd - SlaveStart during RampIn *)

RampInCam.CamParameters[1].Resolution:=REAL#0.01;

RampInCam.CamParameters[2].CurveType:=TB_CurveType#StraightLine;

RampInCam.CamParameters[2].MasterEnd:=LREAL#1.0;

RampInCam.CamParameters[2].SlaveEnd:=LREAL#1.0;

RampInCam.CamParameters[2].Resolution:=REAL#0.01;

Page 38 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamStruct

For use with Y_CamIn and Y_CamOut function blocks

Data Type Declaration


* Element Data Description Usage
Type
MyCamStruct CamStruct
U FileName STRING Filename that will be used by Y_CamFileSelect MyCamStruct.FileName
U TableType INT 0=Undefined, 1=M/S pair, 2=reserved, 3=reserved MyCamStruct.TableType
U TableSize UDINT The size of the cam table in bytes (Don't forget, 16 bytes per M/S MyCamStruct.TableSize
pair)
U TableID UINT Number returned from Y_CamFileSelect MyCamStruct.TableID
U EngagePosition LREAL Master location where slave must start synchronization MyCamStruct.EngagePosition
(Reference prm 1502 - CamMasterShiftedCyclic )
U EngageData Y_ENGAGE_ MyCamStruct.
DATA
U DisengagePosition LREAL Master location where slave must discontinue synchronization. MyCamStruct.DisengagePosition
(Reference prm 1502 - CamMasterShiftedCyclic)
U DisengageData Y_ MyCamStruct.
DISENGAGE_
DATA
U Window LREAL Size of the window in master units where the engage or dis- MyCamStruct.Window
engage event must take place.
U MasterCycle LREAL Defines the total Master axis travel over which the slave syn- MyCamStruct.MasterCycle
chronizes with the master. As the master goes beyond the
MasterCycle, the synchronization profile repeats.
U SlaveCycle LREAL Slave positions which correspond to the Master at prescribed MyCamStruct.SlaveCycle
intervals along the Cam profile.

Page 39 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CamSyncStruct

For use with the CamControl and CamShift_Control function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyCamSyncStruct CamSyncStruct
U Mode INT Describes the application so the function blocks can MyCamSyncStruct.Mode
apply the correct logic.
1 = Rotary Knife
2 = Linear Flying Shear
3 = Rotary Placer or Reciprocating Drill
U StartSyncPosition LREAL The first master position where the slave must be MyCamSyncStruct.StartSyncPosition
synchronized with the master.
U EndSyncPosition LREAL The final master position where the slave must be MyCamSyncStruct.EndSyncPosition
synchronized with the master.
U DecisionPosition LREAL Key location in the process where the controller MyCamSyncStruct.DecisionPosition
must decide to disengage the slave from the pro-
cess or continue camming and CamShift to the
next product.
U MaxShift LREAL If Mode = 3, this value helps the CamShift_Control MyCamSyncStruct.MaxShift
function block determine whether the slave should
advance or retard to synchronize with the next
product. For other modes, this input is not used.
U/C SafeEngageDistance LREAL The distance the master travels from the sensor MyCamSyncStruct.SafeEngageDistance
until the product is less than one machine cycle
away from the synchronization position.
If zero is entered, the CamShift_Control function
block will calculate the value automatically.
If the MachineCycle is greater than the distance
from the sensor to the synchronization point, enter
LREAL#0.0.
C Shifting BOOL Status flag set by the CamShift_Control function MyCamSyncStruct.Shifting
block to signal the CamControl function block.
C Pause BOOL Status flag set by the CamControl function block to MyCamSyncStruct.Pause
signal theCamShift_Control function block.

Page 40 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Matrix

For internal use by the CamGenerator for Cubic Spline calculations.

Data Type Declaration


*
Element Data Type Description Usage
MyMatrix Matrix
U Matrix ARRAY[0..20] OF SubMatrix MyMatrix[0]

Page 41 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SlaveOffsetStruct

For use with the SlaveOffset_Control function block.

Data Type Declaration


* Element Data Description Usage
Type
MySlaveOffsetStruct SlaveOffsetStruct
U StartSyncPosition LREAL The first master position where the slave must be MySlaveOffsetStruct.StartSyncPosition
synchronized with the master
U SyncPosition LREAL The master position that represents the center of MySlaveOffsetStruct.SyncPosition
the sync zone. Usually SyncPosition = (EndSyn-
cPosition - StartSyncPosition)/2.
U EndSyncPosition LREAL The final master position where the slave must be MySlaveOffsetStruct.EndSyncPosition
synchronized with the master, adjustments can
start after.

Page 42 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: TableIDStruct

For use with the CamTableUpdate function block.

Data Type Declaration


*
Element Data Description Usage
Type
MyTableIDStruct TableIDStruct
U Inactive UINT The CamTableID that is NOT currently being accessed to control MyTableIDStruct.Inactive
motion.
U Active UINT The CamTableID that IS currently being accessed to control MyTableIDStruct.Active
motion.

Page 43 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: UINTArray

For use with the CamTableManager Function Block.

Data Type Declaration


*
Element Data Type Description Usage
MyUINTArray UINTArray
U UINTArray ARRAY[0..4] OF An array for CamTableIDs that are released from memory in a FIFO MyUINTArray
UINT method. [0]

Page 44 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Y_MS_CAM_STRUCT

This data type is for use with the Y_CamStructSelect, Y_ReadCamTable, and Y_WriteCamTable function blocks. Y_MS_CAM_
STRUCT consists of the sub-structures found below. Refer to the Internally Created Cam Data diagram in the Cam Data Man-
agement section.

Data Type Declaration


* Element Data Type Description Usage
MyCam Y_MS_CAM_STRUCT
Header Y_CAM_HEADER
U TableType INT INT#1 = Master/Slave pair. If using the Y_ MyCam.Header.TableType
ReadCamTable function block, this value
must be set by the user before executing
the function.
Reserved1 UINT --- ---
U DataSize UDINT Total used size of MS_Data in bytes. (Each MyCam.Header.DataSize
Y_MS_PAIR is 16 bytes.)
MS_Header Y_MS_HEADER
U SlaveIncremental BOOL If TRUE, the slave data from pair to pair is MyCam.MS_Head-
relative. er.SlaveIncremental
U MasterIncremental BOOL If TRUE, the master data from pair to pair is MyCam.MS_Head-
relative. er.MasterIncremental
Reserved1 UINT --- ---
Reserved2 UINT --- ---
Reserved3 INT --- ---
MS_Data MS_Array_Type Array of all master / slave data pairs
used for the cam. ARRAY [0..2880] OF
Y_MS_PAIR
U/C Master LREAL Master position MyCam.MS_Data[0].Master
U/C Slave LREAL Slave position MyCam.MS_Data[0].Slave

Notes
MS_Data[x].Master and MS_Data[x].Slave can be set be either the user or a function block depending on whether this data-
type is used with Y_ReadCamTable or Y_WriteCamTable in the PLCopen Plus firmware library.

Code Example

Page 45 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types for Cam Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant)
representing a value which will configure the operation of the function block. Enu-
merated types are equivalent to a zero-based integer (INT) list.

Enumerated Types Declaration


Enumerated
#INT Value Enum Value Description
Type
ENUM Type for CamShift_Control to specify the application type.
0 n/a
1 RotaryKnife Rotary Knife, Rotary Punch, etc.
TB_Mode
Out and Back, like linear flying shear, walking
2 LinearFlyingShear
beam, bottle filler
3 RotaryPlacer

Page 46 of 757
Enumerated
#INT Value Enum Value Description
Type
Indicates the Cam formula to be applied between to positions.
0 n/a Not a valid CurveType
1 StraightLine
2 Parabolic
3 SimpleHarmonic
4 Cycloidal
5 ModifiedTrapezoid
6 ModifiedSine
7 ModifiedConstVelocity
8 AsymmetricalCycloidal
9 AsymmetricalModifiedTrapezoid
10 Trapecloid
11 OneDwellCycloidal_1
12 OneDwellCycloidal_2_3
13 OneDwellTrapezoid_1
14 OneDwellTrapezoid
15 OneDwellTrapezoid_2_3
16 OneDwellModifiedSine
17 OneDwellTrapecloid
TB_CurveType
18 NoDwellSimpleHarmonic
19 NoDwellModifiedTrapezoid
20 NoDwellModifiedConstVelocity
21 NC2Curve
22 TangentMatching
23 ReverseTrapecloid
24 DoubleHarmonic
25 ReverseDoubleHarmonic
26 TangentBlending
27 Unsupported27 Unsupported
28 Unsupported28 Unsupported
29 UserModifiedConstVelocity User specifies the accel / decel distances
5th order polynomial with C3 = 10, C4 = -15,
30 Polynomial345
C5 = 6
31 CubicSpline Cubic spline interpolation
32 Arc
33 ParabolicVelocityBlend Parabolic curve with velocity blending
Non reversing profile between two straight
34 Bezier
lines.

Page 47 of 757
Cam FBs

Toolbox Help Documentation


Help version created 7/23/2021

Cam_Analyzer

The Cam_Analyzer function block provides the slaves maximum velocity, acceleration, deceleration and jerk values for a spe-
cific cam profile based on a maximum expected master velocity.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B CamTable Y_MS_ This structure contains the resulting master/slave information for each data point
CAM_ and can be downloaded to the motion engine using Y_CamStructSelect.
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V MasterVelocity LREAL Master axis maximum velocity (in master LREAL#0.0
user units/sec.)
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another
block takes control before the action is completed, the Done output will not be set.

Page 48 of 757
This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to provide
Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V MaximumVelocity LREAL Peak slave velocity for the given cam profile at the maximum master velocity.
V MaximumAcceleration LREAL Peak slave acceleration for the given cam profile at the maximum master velocity.

V MaximumJerk LREAL Peak slave jerk for the given cam profile at the maximum master velocity.

Error Description
See the Function Block ErrorID list.

Example
Consider a linear flying shear application. The maximum slave velocity of the profile is in the speed matching region. The mas-
ter maximum velocity was given as 24 units/sec and the maximum velocity output of the CamAnalyzer is 24.

Page 49 of 757
Page 50 of 757
Page 51 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamBlend

This function block was designed for applications that require a one way cam profile, and the slave must be able to engage or
disengage smoothly from a moving master. It requires three separate cam tables with a portion of equivalent slave data, so an
on-the-fly changeover from one table to the next can occur. This function block uses three Y_CamIn functions blocks and one
Y_CamOut function block.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis.
B Slave AXIS_REF A logical reference to the slave axis.
V BlendData BlendStruct Structure containing the information required for engaging, disengaging, ramping
in, and ramping out.
VAR_INPUT Default
V ExecuteRampIn BOOL Upon the rising edge, this function block will pre- FALSE
pare to engage the RampIn cam profile at the
master position specified in the BlendData struc-
ture.
V ExecuteRampOut BOOL Upon the rising edge, this function block will pre- FALSE
pare to switch to the RampOut cam profile at the

Page 52 of 757
SwitchOver position specified in the BlendData
structure.
V ExecuteStandStill BOOL Upon the rising edge, this function block will pre- FALSE
pare to engage the slave to the Running cam pro-
file at the StandstillEngage position (calculated
after an E-Stop recovery routine) in the
BlendData structure
VAR_OUTPUT
E InSync BOOL Set high when the axis or group is synchronized with the axis or group it is com-
manded to follow. Synchronized means that the two are position locked, any trans-
itional period required to achieve synchronization has been completed.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
B Active BOOL For buffered modes, this output is set high at the moment the block takes control
of the axis. For non buffered modes, the outputs Busy and Active have the same
value.
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V BlendStatus UINT Outputs a value of 1 to indicate the RampIn Cam is Active, 2 indicates the Running
cam is Active, and 3 indicates the RampOut cam is Active. Refer to the slaves
CamState parameter [1540] to determine the state the active cam.
E EndOfProfile BOOL Pulsed output signaling the cyclic end of a CAM Profile

Notes
l Typically the RampInSwitchOverPos and the RampOutSwitchOverPos will be fixed at some predetermined position suit-
able for the application. Typically the RampInSwitchOverPos will occur very late in the cycle, and the
RampOutSwitchOverPos will occur very early in the cycle. This will provide for the optimum performance by allowing
the maximum possible time for the slave to accelerate up to the master's velocity and decelerate back to zero.

l If using the ExecuteStandStill mode, use the CamMaster_Lookup and CamSlave_Recover function blocks to determine
the master position that corresponds to the current slave position, and set BlendData.StandStillEngagePos accordingly
to preserve synchronization. The ExecuteStandStill mode was added to provide the capability of re-synchronizing after
an E-Stop.

See the CamBlend eLearning Module on Yaskawa's YouTube Channel.

Error Description
See the Function Block ErrorID list.

Page 53 of 757
Example 1

Timing Diagram

Page 54 of 757
Application Example

Timing Diagram
The speed matching, or normal running cam is designated as Profile #2. Profile #1 and Profile #3 will only run once, but Pro-
file #2 will run indefinitely. A simple straight line profile for Profile #2 is not required, and reasonable motion can be used if
the application requires it, keeping in mind that CamBlend was designed for one way slave motion that never stops while in nor-
mal operation, thus making it difficult to synchronize with the master smoothly without blending from one profile to another.

Page 55 of 757
Page 56 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamControl

The CamControl function makes decisions regarding Engage and Disengage logic for applications where products are buffered
and processed at random intervals. This function block requires the ProductBuffer function block from the PLCopen Toolbox
and the CamShift_Control block from the Cam Toolbox. The main inputs that feed the CamControl block are RegistrationData
and ControlData. This function block was designed for applications such as a Linear Flying Shear, Random Rotary Placer, Knife,
Drill, etc.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in
the Hardware Configuration (logical axis number).
V RegistrationData ProductBufferStruct Structure containing all information for the circular buffer to operate.
V ControlData CamSyncStruct Structure containing all information to allow both the CamControl and
CamShiftControl to make decisions to run the cam function effectively.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable FALSE
is held high and there are no errors.
V Action INT Designates this instance of this function block as one of the INT#0
several activities to occur based on the registration sensor.
For applications that have only one action, such as a cut or a
stamp, this input can be left unconnected. This input is
required for applications that have more than one action asso-
ciated with a sensor input, such as pick and place.

Page 57 of 757
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
V Engage BOOL Set high when the externally located Y_Cam_In function block(s) must be
executed.
V Disengage BOOL Set high when the externally located Y_Cam_Out function block(s) must be
executed.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
• The Engage output is to be used with a Y_CamIn function block placed external to this function block. This design allows for
one or more cam slaves to be operated via the logic provided.

• The Disengage output is to be used with a Y_CamOut function block placed external to this function block. This design
allows for one or more cam slaves to be operated via the logic provided.

• This function block is designed to work with the CamShift_Control function block. It waits for an initial Camshift will occur
before the first Engage event should take place. If the application requires the slave to become synchronized with the master
without a Camshift, simply use an R_TRIG of the CamControl.Valid to cause the CamData.Shifting bit to go high and low.

Error Description
See the Function Block ErrorID list.

Example
The operation of CamControl in deciding when to engage and disengage a cam is shown in the logic analyzer illustration below.
The rising edge of the CamControl.Shifting variable denotes the "first" product to be processed. First product in this imple-
mentation means the cam is disengaged, the ProductBuffer was empty, and a product arrived. Shifting starts immediately if it
is the first product in the ProductBuffer. CamControl waits for the falling edge of the Shifting bit to set the CamControl.Engage
output. While the cam is engaged, the CamControl block continues to monitor the product buffer for new products. When the
ProductBuffer indicates that no products have arrived and the cam cycle has past the ‘Decision Position,’ the CamCon-
trol.Disengage output is turned on.

Page 58 of 757
Page 59 of 757
Application Example
This example illustrates how the CamControl block can be applied in a linear flying shear application. In this application, the
items to be cut are defective areas (knots) in a piece of wood. The code shown here performs the following actions:

1. The ProductBuffer stores the position of each defect where a cut must be made.

2. The CamShift_Control synchronizes the master (conveyor moving the wood) and slave (saw).

3. The CamControl.Engage output must be connected to Y_CamIn.Execute. (Other logic requirements may be included if
necessary.)

4. Key Point: When defects are close together, the goal is to remain engaged, and use the CamShift function during the

Page 60 of 757
slave (saw) retraction stroke while not in contact with the wood to re-synchronize with the next defect (or knot) to be
cut.

5. The CamControl.Disengage output must be connected to Y_CamOutExecute. In this application, it will cause the slave
(saw) to disengage when the ProductBuffer indicates that there are no more defects to be cut.

Page 61 of 757
Page 62 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamGenerator

This function calculates positions required for various master / slave motion profiles. It was designed to replicate the formulas
available in Yaskawa’s CamTool & Cam Editor Windows software and includes additional curve types. The CamData input is a
structure of key data points required by the application, including a formula code for generating a pair of master / slave data
points at the resolution specified. The output CamTable is a Y_MS_CAM_STRUCT which can be downloaded to the Motion
Engine using the Y_CamStructSelect function block.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V CamData CamSegmentStruct This structure must be populated with the key datapoints required for the cam
profile.
V CamTable Y_MS_CAM_ Cam data structure. Can be downloaded to the motion engine using Y_
STRUCT CamStructSelect.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the
value and re-trigger the execute input.
V TableSize UDINT This has been deprecated in v350. The Calculated using UPPER_BOUND
function will now determine the TableSize function.

Page 63 of 757
using the UPPER_BOUND function. There is
no need to connect a variable.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another
block takes control before the action is completed, the Done output will not be set.
This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to provide
Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
• In MotionWorks IEC, array sizes must be hard coded at design time. The default size of the CamSegmentArray DataType can
be changed if more segments are required. Edit the Cam Toolbox’s DataType definition if necessary. The practical limit on the
number of segments, however also depends on teh size allocate for Y_MS_PAIR.

The default size of a Y_MS_CAM_STRUCT is defined in the PLCopen Toolbox as:

MS_Array_Type:ARRAY[0..2880] OF Y_MS_PAIR.

If the application requires more than 2880 master / slave pairs, this value can be increased by editing the DataTypes Toolbox
> DataTypes > MotionBlockTypes definition.

l The resolution specified for each point in the CamData STRUCT is resolution of the master. For example, if MasterEnd
= 100.0, and the previous segment's MasterEnd = 80.0, and the Resolution = 1.0, then 20 data points will be cal-
culated along the CurveType specified.

l See the Cam Curve Types for further details about creating cam profiles.

l See the CamGenerator eLearning Module on Yaskawa's YouTube Channel.

Error Description
See the Function Block ErrorID list.

Examples
Structured text to load a CamSegmentStruct:

Page 64 of 757
Example 1

Page 65 of 757
Example 2

Page 66 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamMaster_Lookup

This function block provides the master position given a slave position by searching the referenced CamTable. If there may be
two or more master positions for the slave, as in the case of out and back slave motion, a range of slave positions can be spe-
cified to limit the search for the corresponding master position. This function block is useful for E-Stop recovery routines.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B CamTable Y_MS_ Cam data structure
CAM_
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
V SlaveMin LREAL The smallest slave position to include when LREAL#0.0
searching for the master.
V SlavePosition LREAL The current slave position. LREAL#0.0
B SlaveMax LREAL The largest slave position to include when LREAL#0.0
searching for the master.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes

Page 67 of 757
control before the action is completed, the Done output will not be set. This output is reset
when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a Busy
output indicates the function is operating, but not ready to provide Valid information. (No
Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
B MasterPosition LREAL The master position which corresponds to the SlavePosition.

Notes
This function provide the exact master position that corresponds to the SlavePostion input by interpolating the CamTable. Con-
sider the following CamTable:

M S

0 0

10 0

20 5

30 10

40 20

If the SlavePosition is 15, the corresponding MasterPosition is 35.

Error Description
See the Function Block ErrorID list.

Page 68 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamShift_Control

The CamShift_Control block manages cam shifting for applications that buffer random products such as Linear Flying Shear or
Random Rotary Placer/Knife/Drill, etc. The purpose is to re-synchronize the slave for each item or product arriving on the mas-
ter axis.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis
B Slave AXIS_REF A logical reference to the slave axis
V RegistrationData ProductBufferStruct Structure containing all information for the circular buffer to operate.
V ControlData CamSyncStruct Structure containing all information about the cam profile that will be used
to calculate and implement cam shifts
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable FALSE
is held high and there are no errors.
V UpdateUsePointer BOOL RegistrationData.UsePointer will be updated when a product FALSE
has been processed only if this input is TRUE. If more than
one slave follow the master, only the last slave must update
the UsePointer.
V Action INT Designates this instance of this function block as one of the INT#1
several activities to occur based on the registration sensor.

Page 69 of 757
For applications that have only one action, such as a cut or a
stamp, this input can be left unconnected. This input is
required for applications that have more than one action asso-
ciated with a sensor input, such as pick and place.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V Shifting BOOL Set high if the function block is active and Y_CamShift is Busy.

V ItemsProcessed UDINT Provides a count of the number of products processed since this function
was enabled.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l This function block includes a Y_CamShift block, and will execute shifts at the appropriate position based on data
provided by the user via the ControlData structure.

l The shifted master position is available by reading slave axis parameter 1502.

l This function block requires the ProductBuffer function block from the PLCopen Toolbox and the CamControl block from
the Cam Toolbox. These three blocks work together to provide cam engage/disengage control as well as cam shifting
(synchronization) logic.

l The ‘Shifting’ bit is held high when a Y_CamShift is in progress.

l The CamShift_Control block uses data from RegistrationData and ControlData to make decisions on when to shift the
master position and by how much to shift the position. The user must provide valid data in the RegistrationData and
ControlData structures.

l In cases where multiple slaves are synchronized to a single master, the slaves can share the same ProductBuffer. Set
the last slave (last CamShift_Control function block) to update the UsePointer for the ProductBuffer.

Error Description
See the Function Block ErrorID list.

Code Example
The role of CamShift_Control in master / slave synchronization for each product is illustrated below.

Page 70 of 757
Page 71 of 757
Application Example
This example illustrates how the CamControl block can be applied in a linear flying shear application. In this application, the
items to be cut are defective areas (knots) in a piece of wood. The code shown here performs the following actions:

1. The ProductBuffer stores the position of each defect where a cut must be made.

2. The CamShift_Control synchronizes the master (conveyor moving the wood) and slave (saw).

3. The CamControl.Engage output must be connected to Y_CamIn.Execute. (Other logic requirements may be included if
necessary.)

4. Key Point: When defects are close together, the goal is to remain engaged, and use the CamShift function during the
slave (saw) retraction stroke while not in contact with the wood to re-synchronize with the next defect (or knot) to be
cut.

5. The CamControl.Disengage output must be connected to Y_CamOutExecute. In this application, it will cause the slave
(saw) to disengage when the ProductBuffer indicates that there are no more defects to be cut.

Page 72 of 757
Page 73 of 757
Page 74 of 757
Page 75 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_FeedToLength

CamSlave_FeedToLength was designed for use with camming applications that index a slave axis forward in one direction, and
require on the fly adjustments of the actual index length based on a sensor input that occurs while the slave is moving. The
sensor input is on the slave axis.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis.
B Slave AXIS_REF A logical reference to the slave axis.
V SlavePrms AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.
E TriggerData TRIGGER_REF Reference to the trigger signal source.. Refer to the PLCopen Plus
Function Block Manual for more details.

Page 76 of 757
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V ProductSize LREAL This value must be the same as the total one way LREAL#0.0
index of the cam profile for this slave.
V DistanceAfterLatch LREAL The desired additional travel distance after the LREAL#0.0
registration mark is detected
V MaxPosCorrection LREAL Limits the amount of positive correction that can be
applied.
V MaxNegCorrection LREAL Limits the amount of negative correction that can
be applied.
V AdjustMode INT An ENUM for TIME or range of master correction,
with the following values:
V MasterDistance LREAL Relative amount the master will travel (in cam mas-
ter units) from when the function block first
executes until the correction is complete. Only
used if AdjustMode = Y_AdjustMode#Master-
Distance.
V Duration LREAL Time of the correction used if AdjustMode is set for
TIME mode
V StartCorrection LREAL Earliest master position where the correction can LREAL#0.0
begin.
V FinishCorrection LREAL Latest master position where the correction must LREAL#0.0
be completed.
V SensorMinimum LREAL The earliest slave position where a sensor position LREAL#0.0
is valid for correction.
V SensorMaximum LREAL The latest slave position where a sensor position is LREAL#0.0
valid for correction. (function block
defaults to Pro-
ductSize if
unconnected.)
V MissedLatchLimit UINT The number of consecutive DefaultDistances UINT#0 (inter-
allowed to occur without seeing a registration mark preted as infin-
in the window, and not cause an Error. Valid regis- ite)
tration marks will reset the internal counter.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V ActualSize LREAL The actual indexed distance.
V LatchPosition LREAL The slave's position in the CamTable when the latch occurred.
B RecordedPosition LREAL The slaves latch position as reported by MC_TouchProbe.
V LimitedPosCorrection BOOL Indicates that the MaxPosCorrection is limiting the required cor-
rection.
V LimitedNegCorrection BOOL Indicates that the MaxNegCorrection is limiting the required cor-
rection.
V Adjusting BOOL Indicates that an adjustment is currently taking place (Busy output of
Y_SlaveOffset)
V MissedLatch BOOL Indicates that a latch was detected, but it was outside of the window
parameters specified.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Page 77 of 757
Notes
l This function block requires that the ReadAxisParameters function block from the PLCopen toolbox is also running,
preferably in the same task as CamSlaveFeedToLength.

l This function block does not support buffering of products. It is recommended to place the sensor less than 1 part
length away from where the correction must happen.

l Functionality differences between the CamSlave_FeedToLength and SlaveOffset_Control are given in the table shown
below.

CamSlave_ SlaveOffset_
FeedToLength Control

BufferProducts (SensorDistance > 1 part length) Not supported Supported

Reports missed Makes large


Successive triggers > 2 part lengths
latch correction

Missed Part Indicator Supported Not supported

Registration within window check Supported Not supported

Correction limits Supported Not Supported

l See the CamSlave_FeedToLength eLearning Module on Yaskawa's YouTube Channel.

Missed Latch Detection feature:

There are two parts to this feature.

1) It will report an ErrorID 10021 if the user enters a non zero value for the MissedLatchLimit and a consecutive number of
latches are not counted. (To detect a hardware failure or other problem with system such as a sensor blockage.)

2) If latches are detected, but are outside of the SensorMinimum and SensorMaximum range, it is not considered a missed
latch in terms of counting up to the MissedLatchLimit. In this condition, the function block will pulse the MissedLatch output to
indicate that no correction will be made because the latch is not in the specified area. The user can track the MissedLatch out-
put pulses to make adjustments to the machine, or open the window for first time synchronization of the master and slave.

In Cam Toolbox v204, this function block was modified to report the RecordedPosition as a new output so that applications can
use this information to re position or re home the axis after a manual operation without adding a separate MC_TouchProbe func-
tion block in the application. The function was also modified to prohibit its internal Y_SlaveOffset from executing if no cam is
engaged.

Error Description
See the Function Block ErrorID list.

Applications
l Label Feeder

l Punch Press

l Intermittent Form Fill and Seal

Page 78 of 757
Overview of Supporting Function Blocks

Page 79 of 757
Application Example
Consider a form fill and seal application as shown below. Feed belts control payout of film for the form fill and seal machine.

Distance After Latch is set to align the end of bag with the cutter/punch

Page 80 of 757
The film drive belt is the slave to a constantly running master. The nominal cam table is shown below. The master cycle is 0 - 1
units and the slave cycle is also between 0 and 1 units.

Page 81 of 757
A sample screen shot of data that must be entered for the system described above is shown in the figure below. Care should
be taken to ensure that the input parameters will generate motion that is physically achievable by the slave axis.

In the screen shot of the CamSlave_FeedToLength block shown below, the sensor detects a registration mark at 0.36201 units
of the slave cycle. Assuming that the previous registration mark was captured at 0.5 units of the slave cycle, the distance
between two successive registrations is 0.86201 units (0.5 + 0.36201). The actual bag length in this case is 0.86201 units.

Page 82 of 757
The calculation for the adjustment required by the slave axis (film feed) to place the film exactly at the cutter/pinch location is
explained below:

Correction = Nominal part size (1.0) Actual bag length (0.86201)= -0.1379

This will be the offset added/subtracted (for this cycle) to any previous offsets in the slave position.

A continuous sequence of short, long, short bag lengths is illustrated in the logic analyzer plots below.

The first occurrence of TouchProbe.Done triggers a calculation that results in a short bag. A small negative offset is calculated
and can be seen by the dip to negative velocity at the end of the first master cycle. The registration mark in the middle of the

Page 83 of 757
second master cycle triggers a calculation that results in a long bag and a positive offset. Notice the spike in slave velocity
between 0.65 and 0.86 units of the master cycle. The last registration mark in the middle of the third master cycle triggers a
calculation that results in a short bag and a negative offset. Notice the dip in slave velocity between 0.65 and 0.86 units of the
master cycle.

Page 84 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_FeedToLength2

CamSlave_FeedToLength2 is an enhancement of CamSlave_FeedtoLength. The only difference is the increased performance in


capturing latches that occur at higher frequency by incorporating the Y_ProbeContinuous function block. As with CamSlave_
FeedtoLength, this function block was designed for use with camming applications that index a slave axis forward in one dir-
ection, and require on the fly adjustments of the actual index length based on a sensor input. The sensor input is on the slave
axis.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis.
B Slave AXIS_REF A logical reference to the slave axis.

Page 85 of 757
V SlavePrms AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.
E TriggerData TRIGGER_REF Reference to the trigger signal source.. Refer to PLCopen Plus Func-
tion Block Manual for more details.
V Buffer CONTINUOUS_REF
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V ProductSize LREAL This value must be the same as the total one way LREAL#0.0
index of the cam profile for this slave.
V DistanceAfterLatch LREAL The desired additional travel distance after the LREAL#0.0
registration mark is detected
V MaxPosCorrection LREAL Limits the amount of positive correction that can
be applied.
V MaxNegCorrection LREAL Limits the amount of negative correction that can
be applied.
V AdjustMode INT An ENUM for TIME or range of master correction,
with the following values:
V MasterDistance LREAL Relative amount the master will travel (in cam mas-
ter units) from when the function block first
executes until the correction is complete. Only
used if AdjustMode = Y_AdjustMode#Master-
Distance.
V Duration LREAL Time of the correction used if AdjustMode is set
for TIME mode
V StartCorrection LREAL Earliest master position where the correction can LREAL#0.0
begin.
V FinishCorrection LREAL Latest master position where the correction must LREAL#0.0
be completed.
V SensorMinimum LREAL The earliest slave position where a sensor position LREAL#0.0
is valid for correction.
V SensorMaximum LREAL The latest slave position where a sensor position is LREAL#0.0 (func-
valid for correction. tion block
defaults to Pro-
ductSize if left
unconnected.)
V MissedLatchLimit UINT The number of consecutive DefaultDistances UINT#0 (inter-
allowed to occur without seeing a registration preted as infinite)
mark in the window, and not cause an Error. Valid
registration marks will reset the internal counter.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V ActualSize LREAL The actual indexed distance.
V LatchPosition LREAL The slave's position in the CamTable when the latch occurred.
V LimitedPosCorrection BOOL Indicates that the MaxPosCorrection is limiting the required cor-
rection.
V LimitedNegCorrection BOOL Indicates that the MaxNegCorrection is limiting the required cor-
rection.
V Adjusting BOOL Indicates that an adjustment is currently taking place (Busy output of
Y_SlaveOffset)
V MissedLatch BOOL Indicates that a latch was detected, but it was outside of the window
parameters specified.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Page 86 of 757
Notes
The slave axis must be Sigma-5 or Sigma-7 servo amplifier when using this function block.

Error Description
See the Function Block ErrorID list.

Applications
l Label Feeder

l Punch Press

Page 87 of 757
Overview of Supporting Function Blocks

Page 88 of 757
Page 89 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_Lookup

This function block returns the slave position corresponding to the given master position. This function block is used by
CamSlave_Recover.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B CamTable Y_MS_ Cam data structure.
CAM_
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
V MasterPosition LREAL The position of the master axis for which the cor- LREAL#0.0
responding slave position is required.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is reset
when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a Busy
output indicates the function is operating, but not ready to provide Valid information. (No

Page 90 of 757
Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V SlavePosition LREAL The slave position that relates to the master as described in the CamTable.

Notes
This function provides the exact slave position that corresponds to the MasterPostion input by interpolating the CamTable. Con-
sider the following CamTable:

M S

0 0

10 0

20 5

30 10

40 20

If the MasterPosition is 15, the corresponding SlavePosition is 2.5. (50% of the value between two master points is used to
determine the value 50% between the corresponding slave points.)

This function determines the equivalent slave position by looking in the CamTable only, It does not include any other cam
adjustments that may have been applied using any of the Y_CamAdjust function blocks.

See the CamSlave_Lookup eLearning Module on Yaskawa's YouTube Channel.

Error Description
See the Function Block ErrorID list.

Example
In the example shown below, the slave position corresponding to a master position of 10.0 is calculated. It can be seen that the
slave position from the cam profile is 9.9196950.

Page 91 of 757
Page 92 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_PullToLength

CamSlave_PullToLength was designed for applications where the slave mechanism pulls material forward but the mechanism
has a reciprocating stroke. This function block incorporates the ability to capture a registration mark on the material being
pulled, and make on-the-fly adjustments to the stroke length by executing a Y_CamScale function block. This block has the
same basic core operation as CamSlaveFeedToLength, which was designed for slaves that move in one direction but have the
same requirement.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis.
B Slave AXIS_REF A logical reference to the slave axis.
V SlavePrms AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.

Page 93 of 757
E TriggerData TRIGGER_REF Reference to the trigger signal source.. Refer to PLCopen Plus Func-
tion Block Manual for more details.
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high
and there are no errors.
V ProductSize LREAL This value must be the same as the LREAL#0.0
total one way index of the cam profile
for this slave.
V DistanceAfterLatch LREAL The desired additional travel distance LREAL#0.0
after the registration mark is detected
V MaxPosCorrection LREAL Limits the amount of positive cor- LREAL#0.0
rection that can be applied.
V MaxNegCorrection LREAL Limits the amount of negative cor- LREAL#0.0
rection that can be applied.
V AdjustMode INT An ENUM for TIME or range of master INT#0
correction, with the following values: (Y_AdjustMode#Master-
Distance)
Y_AdjustMode#MasterDistance: The
adjustment starts immediately and
completes when the master has trav-
elled the specified MasterDistance.

Y_AdjustMode#ElapsedTime: The
adjustment starts immediately and
completes within the specified Time.

Y_AdjustMode#WithinRange: The
adjustment starts when the master
first crosses the StartPosition and
completes when the master reaches
the EndPosition.
V MasterDistance LREAL Relative amount the master will travel LREAL#0.0
(in cam master units) from when the
function block first executes until the
correction is complete. Only used if
AdjustMode = Y_AdjustMode#Master-
Distance.
V Duration LREAL Time of the correction used if LREAL#0.0
AdjustMode is set for TIME mode
V StartCorrection LREAL Earliest master position where the cor- LREAL#0.0
rection can begin.
V FinishCorrection LREAL Latest master position where the cor- LREAL#0.0
rection must be completed.
V SensorMinimum LREAL The earliest slave position where a LREAL#0.0
sensor position is valid for correction.
V SensorMaximum LREAL The latest slave position where a LREAL#0.0 (function block
sensor position is valid for correction. SensorMaxium to ProductSize
if unconnected or set to
zero.)
V MissedLatchLimit UINT The number of consecutive UINT#0 (interpreted as infin-
DefaultDistances allowed to occur ite)
without seeing a registration mark in
the window, and not cause an Error.
Valid registration marks will reset the
internal counter.

Page 94 of 757
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V ActualSize LREAL The actual indexed distance.
V LatchPosition LREAL The slave's position in the CamTable when the latch occurred.
V LimitedPosCorrection BOOL Indicates that the MaxPosCorrection is limiting the required cor-
rection.
V LimitedNegCorrection BOOL Indicates that the MaxNegCorrection is limiting the required cor-
rection.
V Adjusting BOOL Indicates that an adjustment is currently taking place (Busy output of
Y_SlaveOffset)
V MissedLatch BOOL Indicates that a latch was detected, but it was outside of the window
parameters specified.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
This function block is an adaptation of CamSlave_FeedToLength. The main difference is that this function is designed for recip-
rocating slave motion, and uses the Y_CamScale function block instead of the Y_SlaveOffset function block.

Error Description
See the Function Block ErrorID list.

Page 95 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_Recover

The CamSlave_Recover block moves a Slave back into sync with the master axis after camming was interrupted unexpectedly,
such as E-Stop conditions, or alarms that disable the servo. This function block is particularly useful when resuming the cam
motion from the position where it was interrupted is necessary to avoid wasting products in process, or if machine char-
acteristics demand it, or if homing and re-starting the cycle is not feasible. The CamSlave_Recover function block can be used
to bring the slave axis to the position in the cam table that corresponds to the current master axis position. Linear interpolation
is performed for accuracy in case of coarse resolution between points in the cam table. Once CamSlave_Recover is Done, the
camming motion can resume. This function block contains an MC_MoveAbsolute function.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B SlaveAxis AXIS_ A logical reference to the slave axis.
REF
B CamTable Y_MS_ Cam data structure. Can be downloaded to the motion engine using Y_
CAM_ CamStructSelect.
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.

Page 96 of 757
B MasterPosition LREAL Master axis’ current position. The CamSlave_ LREAL#0.0
Recover function block will command the slave
axis to move to the slave position cor-
responding to this MasterPosition value.
B Velocity LREAL Velocity with which the slave axis recovers and LREAL#0.0
moves to the position from the cam table cor-
responding to the master axis position
B Acceleration LREAL Acceleration with which the slave axis recovers LREAL#0.0
and moves to the position from the cam table
corresponding to the master axis position
B Deceleration LREAL Deceleration with which the slave axis recovers LREAL#0.0
and moves to the position from the cam table
corresponding to the master axis position
E Jerk LREAL Not supported; reserved for future use. Value LREAL#0.0
of the jerk in [user units / second^3].
B Direction MC_Dir- The position of the slave axis for which the cor- LREAL#0.0
ection responding master position is required.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Active BOOL For buffered modes, this output is set high at the moment the block takes control of
the axis. For non buffered modes, the outputs busy and active have the same value
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.
V SlavePosition LREAL Slave position in the cam profile that corresponds to the MasterPosition input to the
function block

Notes
After CamSlave_Recover is Done, in most cases, the slave will be at a position different from the home position or dwell pos-
ition. Care should be taken before re-engaging the slave to the master axis. Engage Position and Engage Data inputs on the Y_
CamIn block should be verified to make sure that they are set correctly. Incorrect engage position and or engage method can
cause abrupt motion on the slave axis.

Recommended steps to recover from a cam cycle interruption

1) Clear all alarms after an E-Stop.

2) Enable the slave.

3) Verify the MasterPosition input is the position of the master axis to where the slave must to move to re-synchronize the cam
operation.

3) Execute CamSlave_Recover with valid inputs.

4) Once CamSlave_Recover.Done is TRUE, the slave is in position to continue the cam motion immediately.

5) Change the Y_CamIn.EngagePosition to the current master position. Set Y_CamIn.EngageData.SlaveAbsolute:= TRUE.

6) Execute Y_Camin. The cam will engage and when the master axis starts motion, the slave will move in synchronization with
the master.

See the CamSlave_Recover eLearning Module on Yaskawa's YouTube Channel.

Page 97 of 757
Error Description
See the Function Block ErrorID list.

Example
E-Stops can result in the instantaneous loss of control of the axes. Manually clearing debris or scrap from the machine and
adjustments after E-Stops and alarms can cause a change in motor position, all resulting in a de synchronization of the master
and slave.

The example given below illustrates how the CamSlave_Recover block can solve E-Stop recovery issues. The logic analyzer
plot shows the axes when the E-Stop occurred. At this point, the Y_CamIn outputs InSync and Busy change to FALSE. A slight
drift in the master axis position can be seen after the E-Stop. This can be due to axis inertia, or because of adjustments made
to the machine. The CamSlave_Recover block is executed to physically move the slave to the position that corresponds to the
master’s current position as determined by looking in the CamTable.

The distance that the slave axis traverses in this process can be seen in the illustration. Once the CamSlave_Recover is Done,
the slave can be re-engaged with the master using Y_Camin.

Important: In this recovery condition, the ‘EngagePosition’ must be set to the master axis’ current position and the
EngageData.SlaveAbsolute=TRUE must be applied.

Page 98 of 757
Page 99 of 757
Page 100 of 757
Toolbox Help Documentation
Help version created 7/23/2021

CamSlave_WindowCheck

This function block is used by the CamSlave_FeedToLength function blocks to determine when the MC_TouchProbe output is
valid and should be used for correction. It compares the CamTableOutput parameter 1520 to the SensorMinimum and
SensorMaximum, not the actual slave feedback.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V Prms AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.

VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
V ProductSize LREAL This value must be the same as the total LREAL#0.0
one way index of the cam profile for this
slave.
V SensorMinimum LREAL The earliest slave position where a sensor LREAL#0.0
position is valid for correction.
V SensorMaximum LREAL The latest slave position where a sensor LREAL#0.0
position is valid for correction.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V InWindow BOOL Indicates the slave output.

Page 101 of 757


B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
If SensorMinimum and SensorMaximum are both zero, this function does not check for a window and reports InWindow as
TRUE.

For the most accurate WindowCheck, this function block must be executed in a fast CYCLIC task. Since this function is used by
CamSlave_WindowCheck, that block also should be executed in a fast CYCLIC task.

Error Description
See the Function Block ErrorID list.

Page 102 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CamTableManager

This function block serves as a FIFO buffer for CamTableIDs. Each time a new CamTableID is created, it will delete the cam
memory allocated to the oldest CamTable by using the Y_RemoveCamTable function block from the PLCopenPlus firmware lib-
rary. This function block cleans up cam memory for applications which routinely build new cam tables on the fly. A circular buf-
fer of four cam tables is maintained in the CamTableManager. When the function block is executed a fifth time, it releases the
memory area of the oldest cam table ID. Memory managed is that of the motion engine, not the PLC application.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trigger
the execute input.
V CamTableID UINT The most recent CamTableID create by Y_ UINT#0
CamFileSelect or Y_CamStructSelect.
V TableLimit UINT The number of cam tables to leave in memory UINT#5
before they are removed.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes con-
trol before the action is completed, the Done output will not be set. This output is reset when
Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted,
or Error is true. In the case of a function block with an Enable input, a Busy output indicates
the function is operating, but not ready to provide Valid information. (No Error)

Page 103 of 757


B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes
l This function block is unnecessary in applications which use a single, static cam table, or when there are several cams
but once created, they are used permanently and not recalculated. There is capacity in the controller memory for
dozens of cam tables. CamTableManager prevents the situation where a machine has been continuously running for
weeks and enough cams were created that the memory becomes exhausted.

l Even though the memory for cam tables has been released, the Y_CamStructSelect function block will continue to alloc-
ate a new (increasing) CamTableID.

l See the CamTableManager eLearning Module on Yaskawa's YouTube Channel.

Error Description
See the Function Block ErrorID list.

Example 1
An example of using the CamTableManager is shown below. On the fifth execute of the CamTableManager block, the memory
for the oldest CamTable ID gets released. In the example shown below, the memory for CamID 1 gets released. The next exe-
cution of the CamTableManager will release the memory for CamID 2.

Page 104 of 757


Page 105 of 757
Application Example

Page 106 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CamTableUpdate

This function block aids with cam file management when on the fly changes to the table data are required. It supports two
tables: one which may be actively running in the motion engine, and one that may be recalculated and transferred to the
motion engine. It contains the Y_CamStructSelect and Y_WriteCamTable function blocks.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description

VAR_IN_OUT
B Slave AXIS_REF A logical reference to the slave axis.
B CamTable Y_MS_CAM_ Cam data structure. Can be downloaded to the motion engine using Y_
STRUCT CamStructSelect.
V TableIDs TableIDStruct Contains an Active and Inactive TableID
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trigger
the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has been completed successfully. If another

Page 107 of 757


block takes control before the action is completed, the Done output will not be set. This
output is reset when execute goes low.
B Busy BOOL Set high upon the rising edge of the 'Execute' or 'Enable' input, and reset if Done, Com-
mandAborted, or Error is true.
B Error BOOL Set high if error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID BOOL If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
• If both TableIDs in the TableIDs input are zero, then this block automatically uses Y_CamStructSelect to send the first CamT-
able and obtain the CamTableID.

• If the event causing the cam tables to update is fired too frequently, this block limits the cam table transfer and swap by hold-
ing in a Busy state while the previous table transferred is still waiting to become the active table. In this way, it helps to stage
the table swapping so that the application does not resort to writing over an active table, which can cause the slave to jump.

Error Description
See the Function Block ErrorID list.

Example 1:
In this example, assume that some event has occurred which triggers the need for a new cam table to be generated using
CamGeneator. CamGenerator in turn fires CamTableUpdate to send the new CamTable to the motion engine. CamTableUpdate
manages the active and inactive TableIDs, which can then be used with Y_CamIn. The Table.Active variable will contain the
TableID of the last table transferred, so the next time the rising edge of Y_CamIn is triggered, the new table will be used. This
can be done while camming is currently engaged.

Page 108 of 757


Example 2: Using Two Cam Tables
• One will be actively running the motion

• One will be "on deck" to take new changes

Page 109 of 757


Toolbox Help Documentation
Help version created 7/23/2021

MasterIndex_Lookup

This function block returns the array index value corresponding to the given master position.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B CamTable Y_MS_ Cam data structure. Can be downloaded to the motion engine using Y_CamStructSelect.
CAM_
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
V MasterPosition LREAL The position of the master axis for which the LREAL#0.0
index in the cam table is required.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is reset
when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a Busy
output indicates the function is operating, but not ready to provide Valid information. (No

Page 110 of 757


Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V MasterIndex UDINT The array index corresponding to the master axis position in the Y_MS_CAM_STRUCT
structure.

Notes
• The MasterPosition input should be a value between the maximum and minimum values of the master’s position profile for
the index value to be valid.

Error Description
See the Function Block ErrorID list.

Page 111 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SetCamMasterCycle

This function block prepares the motion engine with the cam table data so that cam adjustments involving blocks like Y_
CamShift can be executed before Y_CamIn is executed. This is necessary for applications where calculations that involve the
cam master cycle (parameter 1512) or cam master shifted cyclic position (parameter 1502) must be made before the Y_
CamIn function block is executed.

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Master AXIS_ A logical reference to the master axis.
REF
B Slave AXIS_ A logical reference to the slave axis.
REF
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated.
To modify an input, change the value and re-
trigger the execute input.
B CamTableID UINT A reference to the cam memory in the motion UINT#0
engine.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.

Page 112 of 757


B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
1) Although there will be no slave motion, the slave axis must be enabled using MC_Power before executing this function
block.

2) A valid CamTableID must be input before executing SetCamMastercycle.

Error Description
See the Function Block ErrorID list.

Page 113 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SlaveIndex_Lookup

This function block returns the array index value corresponding to the given slave position. This function block is used by
CamMasterLookup to determine the equivalent master location for a given slave position.

Library
Cam Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B CamTable Y_MS_ Cam data structure. Can be downloaded to the motion engine using Y_CamStructSelect.
CAM_
STRUCT
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trigger
the execute input.
V SlavePosition LREAL The position of the slave axis for which the cor- LREAL#0.0
responding master position is required.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is reset
when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-

Page 114 of 757


mandAborted, or Error is true. In the case of a function block with an Enable input, a Busy
output indicates the function is operating, but not ready to provide Valid information. (No
Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V SlaveIndex UDINT The array index of the Y_MS_CAM_STRUCT of the SlavePosition.

Notes
• The SlavePosition input should be a value between the maximum and minimum values of the slave’s position profile for the
index value to be valid.

• If the SlavePosition input is a value between two slave positions in the cam table, the SlaveIndex will return the lower index.

Error Description
See the Function Block ErrorID list.

Page 115 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SlaveOffset_Control

This function block makes corrections on a cammed slave axis for applications that require adjustments while the axis is in
motion. Some applications, such as labeling, require on the fly adjustments based on sensor input that occurs while the label
is moving. The actual pitch between consecutive labels may be different from the nominal pitch. The correction amount is the
difference between the nominal part size and the actual part size measured by the sensor. In this type of application, the
sensor input is wired to the slave axis.

The SlaveOffset_Control block is similar to CamSlave_FeedToLength in functionality. Both function blocks make corrections on
a cammed slave axis based on sensor input. Both function blocks make corrections while the slave axis is in motion. The dif-
ference between the two blocks is that SlaveOffset_Control makes use of the ProductBuffer block while the CamSlave_
FeedToLength does not. This allows the SlaveOffset_Control to buffer latched registration data. This can be used in applic-
ations where the sensor is more than one part length away from the point of action (SensorDistance > 1 part length). SlaveOff-
set_Control lacks the window check feature, correction limit feature and missed latch limit feature available in the CamSlave_
FeedToLength block.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Master AXIS_REF A logical reference to the master axis
B Slave AXIS_REF A logical reference to the slave axis
V RegistrationData ProductBufferStruct Structure containing all information for the circular buffer
to operate.

Page 116 of 757


V OffsetControlData SlaveOffsetStruct Structure containing all information to calculate and imple-
ment slave offsets.
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high and
there are no errors.
V DefaultSize LREAL Default pitch between consecutive parts LREAL#0.0
V TheoreticalFirstPosition LREAL Ideal absolute position of the first part LREAL#0.0
that will be detected by the sensor after
homing is done.
V ManualOffset LREAL One time adjustment that can be made LREAL#0.0
while the slave is in motion. A change in
the manual offset value will trigger the off-
set value to be added to the calculated cor-
rection.
V UpdateUsePointer BOOL RegistrationData.UsePointer will be FALSE
updated when a product has been pro-
cessed only if this input is TRUE. If more
than one slave follows the same master as
a parallel activity, only one instance of
this function block must update the
UsePointer.
V Action INT Designates this instance of this function INT#0
block as one of the several activities to
occur based on the registration sensor.
For applications that have only one action,
such as a cut or a stamp, this input can
be left unconnected. This input is
required for applications that have more
than one action associated with a sensor
input, such as pick and place.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the
outputs of the function are valid.
V Offsetting BOOL Set high if the function block is active and Y_SlaveOffset
is Busy.
B Error BOOL Set high if an error has occurred during the execution of
the function block. This output is cleared when 'Execute'
or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This out-
put is reset when 'Execute' or 'Enable' goes low.
V ItemsProcessed UDINT Provides a count of the number of products processed
since this function was enabled.

Notes
l This function block includes the Y_SlaveOffset function block, and will execute Offsets at the appropriate position
based on data provided by the user via the SlaveOffsetStruct structure.

l In cases where multiple slaves are synchronized to a single master, the slaves can share the same ProductBuffer . Set
the last slave (last SlaveOffset_Control function block) to update the UsePointer for the ProductBuffer.

l SlaveOffset_Control provides similar functionality as CamSlave_FeedToLength as summarized in the table shown


below.

Page 117 of 757


CamSlave_FeedToLength SlaveOffset_Control

BufferProducts (SensorDistance > 1


Not supported Supported
part length)

Successive triggers > 2 part lengths Reports missed latch Makes large correction

Missed Part Indicator Supported Not supported

Registration within window check Supported Not supported

Correction limits Supported Not Supported

Error Description
See the Function Block ErrorID list.

Application Example 1
Consider a rotary disc cammed to a master conveyor running a one way cam in the clockwise direction as shown. The home
position is defined as shown below. Product length (nominal distance between parts ) on the slave is 71 degrees. The nominal
cam slave travel is 71 degrees. Position 0 (bottom dead center) is the position that needs to be synchronized with the master.
The sensor distance is 90 units. If the first part is at 35.5 units and if the parts are exactly at the specified nominal lengths,
then the second part (first part captured by the sensor) will be at 106.5. However, the actual registered position of this part
may not be 106.5. In this case, the second product will not get synchronized with the master if it runs the nominal cam of 71
units. If the second product were at 105.5 units, an offset of 1 unit will have to be made for the synchronization to be effective.

The figure below shows how to configure the SlaveOffsetStruct.

Page 118 of 757


The SlaveOffset_Control block for the application described above can be set up as shown below.

Page 119 of 757


Page 120 of 757
Toolbox Help Documentation
Help version created 7/23/2021

SlaveRegistrationCheck

This function block was designed for use by the CamSlave_FeedToLength, CamSlave_FeedToLength2, and CamSlave_
PullToLength function blocks. It monitors variables related to a cam slave index and fires the output “MakeCorrection" which
can be connected to Y_SlaveOffset along with the AbsoluteCorrection output. The function also provides the interpolated value
of the cam table output when the latch was detected.

Library
Cam Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Con-
figuration tab in the Hardware Configuration (logical axis number).
B AxisPrm AxisParameterStruct Structure containing all parameters available for the Slave. Populate
this structure using the ReadAxisParameters function block.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V DefaultSize LREAL Default length of the product in user units. LREAL#0.0

Page 121 of 757


V DistanceAfterLatch LREAL The desired additional travel distance after LREAL#0.0
the registration mark is detected
B RecordedPosition LREAL Position where trigger event occurred in LREAL#0.0
user units. In accordance with PLCopen, this
output is only valid when the Done output is
high.
V LatchInput BOOL Typically connected to MC_ FALSE
TouchProbe.Done, signals the function to cal-
culate any required correction amount.
V MissedLatchLimit UINT The number of consecutive DefaultDistances UINT#0 (interpreted
allowed to occur without seeing a regis- as infinite)
tration mark in the window, and not cause an
Error. Valid registration marks will reset the
internal counter.
V MaxPosCorrection LREAL Limits the amount of positive correction that LREAL#0.0
can be applied.
V MaxNegCorrection LREAL Limits the amount of negative correction that LREAL#0.0
can be applied.
V SensorMinimum LREAL The earliest slave position where a sensor LREAL#0.0
position is valid for correction.
V SensorMaximum LREAL The latest slave position where a sensor pos- LREAL#0.0 (function
ition is valid for correction. block sets
SensorMaxium to Pro-
ductSize if uncon-
nected or set to
zero.)
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V ActualSize LREAL The actual indexed distance.
V AbsoluteCorrection LREAL The absolute value of the slave offset for use with Y_SlaveOffset.
V LatchTableReference LREAL The position of the latch corresponding to the cam table.
V MakeCorrection BOOL Used to signal that the correction calculation is valid. Typically used
in conjunction with Y_SlaveOffset.Execute. Note: this output will
pulse for one scan.
V MissedLatch UDINT Flag which indicates that the controller did not find a valid regis-
tration mark within the SensorMinimum and SensorMaximum pos-
itions.
V LimitedPosCorrection BOOL Indicates that the MaxPosCorrection is limiting the required cor-
rection.
V LimitedNegCorrection BOOL Indicates that the MaxNegCorrection is limiting the required cor-
rection.
V MissedWindow BOOL Indicates that a latch occurred, but was ignored because it was out-
side the range of SensorMinimum and SensorMaximum.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Page 122 of 757


Notes
l This function block determines where in the cam profile the latch occurred and compares it to the expected location to
make a determination about the correction required.

l This function block also monitors the travel distance of the slave, and if the slave traveled 10% more than the Pro-
ductDistance and no valid latch was detected, a missed mark is counted. If the number of consecutive missed marks
equals the MissedLatchLimit input variable, ErrorID UINT#10021 is output.

l Set MissedLatchLimit:=0 to disable monitoring for missed latches.

l Separate correction limits are provided for positive and negative to account for applications where it is not possible to
make such corrections. For example, negative corrections typically cannot be applied to labeling applications because
the material will become loose (slack).

Error Description
See the Function Block ErrorID list.

Page 123 of 757


Creating Cam Tables

Toolbox Help Documentation


Help version created 7/23/2021

Cam Curve Characteristics

Cam Curve does not mean a shape curve which expresses a cam profile, but rather a ”motion curve” of the follower moved by
the cam. A motion curve is generally shown with time on the horizontal axis and displacement on the vertical axis. The purpose
of a cam is to move an object smoothly in a minimum time, without vibration and with minimum power. For this purpose, vari-
ous motion curves have been developed. These curves are not only used for cam mechanisms but can also be applied to vari-
ous other motions. The maximum non dimensional values such as Vm, Am, and Jm are called the characteristic values of the
cam curve. From these characteristic values and from the shapes of the acceleration curves, the general properties of the cam
curves can be known.

Curve Selection
The procedure for selecting a curve is as follows:

1. Velocity V and Acceleration A are to be continuous


2. Low values of Vm and Qm are needed in low speed and heavy load applications.
3. Low values of Am and Jm are needed in high speed and light load applications.
4. Asymmetrical curve having the longer period of deceleration than acceleration should be used for situations when pos-
itioning accuracy is critical and residual vibration must be avoided.
5. A one-dwell curve should be used when the motion has no stop at the endpoint and must return immediately.
6. Select a curve from the modified constant velocity group when constant velocity is required in the middle part of the
stroke.
7. Select a curve from the modified trapezoid group when acceleration is to be minimized.
8. The modified sine curve is recommended if there are no limitations.

Page 124 of 757


Page 125 of 757
Page 126 of 757
Cam Curve Types

Toolbox Help Documentation


Help version created 7/23/2021

Arc

The CamSegmentStruct elements ArcRadius and ArcDirection must be declared for proper usage of this curve type.

Page 127 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Asymmetrical Cycloidal

Page 128 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Asymmetrical Modified Trapezoid

Page 129 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Bezier

The Bezier curve type generates a non reversing bezier profile between two straight lines.

Page 130 of 757


Page 131 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Cubic Spline

In this example, the left or beginning portion of a motion profile was created using the cubic spline formula. The right or end
portion of the cycle includes two modified sine motions.

The CamData values are shown below:

(* test cubic spline *)


Profile4.SlaveStart:=LREAL#44.0; (* The slaves initial and final position is not zero, it is 44.0 *)

seg:=INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#StraightLine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#15.0;

Page 132 of 757


Profile4.CamParameters[Seg].SlaveEnd:=LREAL#44.0;

Profile4.CamParameters[Seg].Resolution:=REAL#0.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#17.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#43.9614;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#25.5;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#40.3036;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#34.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#30.4425;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#42.5;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#19.6003;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#43.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#19.0;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#51.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#10.0305;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Page 133 of 757


Profile4.CamParameters[Seg].MasterEnd:=LREAL#59.5;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#3.5477;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#68.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#0.6464;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#76.5;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#0.005;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#CubicSpline;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#85.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#0.0;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#StraightLine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#220.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#0.0;

Profile4.CamParameters[Seg].Resolution:=REAL#0.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#ModifiedSine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#250.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#14.7;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#StraightLine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#310.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#14.7;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Page 134 of 757


Profile4.CamParameters[Seg].CurveType:=TB_CurveType#ModifiedSine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#348.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#44.0;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

seg:=Seg + INT#1;

Profile4.CamParameters[Seg].CurveType:=TB_CurveType#ModifiedSine;

Profile4.CamParameters[Seg].MasterEnd:=LREAL#360.0;

Profile4.CamParameters[Seg].SlaveEnd:=LREAL#44.0;

Profile4.CamParameters[Seg].Resolution:=REAL#1.0;

Profile4.LastSegment:=Seg;

Page 135 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Cycloidal

Page 136 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Double Harmonic

This curve type is not supported.

Page 137 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Modified Constant Velocity

Page 138 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Modified Sine

Page 139 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Modified Trapezoid

Page 140 of 757


Toolbox Help Documentation
Help version created 7/23/2021

NC2 Curve

Notes: Deceleration is twice as long as acceleration, which provides the effect of restricting vibration.

Page 141 of 757


Toolbox Help Documentation
Help version created 7/23/2021

No Dwell Modified Constant Velocity

Page 142 of 757


Toolbox Help Documentation
Help version created 7/23/2021

No Dwell Modified Trapezoid

Page 143 of 757


Toolbox Help Documentation
Help version created 7/23/2021

No Dwell Simple Harmonic

Page 144 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Cycloidal_1

Page 145 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Cycloidal_2_3

Page 146 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Modified Sine

Page 147 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Trapecloid

Page 148 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Trapezoid

Page 149 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Trapezoid_1

Page 150 of 757


Toolbox Help Documentation
Help version created 7/23/2021

One Dwell Trapezoid_2_3

Page 151 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Parabolic

Designed for use as the only segment in the motion profile when a axis must be indexed. This curve has the feature that the
non dimensional maximum acceleration Am is the minimum (Am=4) among all curves. Downside – Can cause vibration. Modi-
fied Trapezoid is better.

Page 152 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ParabolicVelocityBlend

Page 153 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Reverse Double Harmonic

This curve type is not supported.

Page 154 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Reverse Trapecloid

This cam curve type is not supported.

Page 155 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Simple Harmonic

This curve is also one of the discontinuous curves that easily causes vibration, but since it has smooth and good (low) prop-
erties, it can be used for low speed applications. When this curve is used for no-dwell applications, (out & back) the dis-
continuity of acceleration at the starting and end points is not a factor and then this curve is regarded as the best curve for no-
dwell use. The modified sine curve is considered an improvement over the simple harmonic.

Page 156 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Tangent Blending

Provides the same profile as Tangent Matching, but designed for use with the CamBlend function block. The difference
between this and Tangent Matching is how the matching velocity is determined. For this formula type, two segments are
required: a straight line and a tangent blend. Which segment comes first dictates whether a “blend in” or “blend out” profile
is created.

See the CamBlend function block for application examples

Page 157 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Tangent Matching

Provides a speed matched profile to minimize jerk between segments. Matches to the previous and next segment. In the case
of the Tangent match segment coming first or last, a wraparound match is calculated. A straight line segment is required
before and after the tangent match segment.

Page 158 of 757


Page 159 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Trapecloid

Page 160 of 757


Communications Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with Communications Toolbox

Requirements for v372


To use the Communications Toolbox, the project must also contain the following:

Firmware libraries:

l YDeviceComm
l PROCONOS

User libraries:

The following User Libraries must be listed above the Communications Toolbox:

l Yaskawa_Toolbox (v371 or higher)

Page 161 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Communications Revision History

Current Version:
2021-04-27 v372 released

No changes, identical to v371

Previous Versions:
2020-11-23 v371 released

1) GetCommand FB - HOTFIX! Can errantly increment the UsePointer PAST the StorePointer when CR is the last character
received, AND the CircularByteBuffer has a LF as the next char from the previous circulation of chars. DCR 4403.

2) GetCommand FB - Improve to return CommandCreated=FALSE if Char StorePointer=UsePointer. DCR 4304.

2020-02-06 v370 released

1) Rename_FTP_SendData was reporting ErrorID=0 when Error TRUE. DCR 2684.

2) GetCommand FB was not referencing Enable VAR_INPUT. DCR 2978.

2019-02-06 v352 released

1) FTP_SendFile - Increased file size capability. DCR 773

2) FTP_SendFile - Improved for file size and writing speed. DCR 1102.

3) FTP_SendFile / (dns_translate_response FB) causing compile errors in MP2600iec and MP3000iec controller types. DCR
2338.

4) FTP_SendFile - Added Append VAR_INPUT. DCR 2342.

5) ReName_FTP_SendData - New function block. DCR 2389.

6) ReName_FTP_RecordData - New Function block. DCR 2389.

2018-08-06 v350 released

1) GetCommand - White spaces (extra CRLF) in G-Code files caused next line to be ignored. DCR 1525.

2) ReName_UserComm - New function block added to send / receive application specific structure via socket communication
with a host via UserComm.DLL

2017-12-06 v340 released

1) CommunicationChannel - Improved operation by not causing any errors when the host application closes the socket. DCR
1206.

2) CommunicationChannel - Added PacketCount and BytesReceived as VAR_OUTPUTs. DCR 1298.

Page 162 of 757


3) CommunicationChannel / InputBufferManager - Added auto setting of CircularByteBuffer.Size using UPPER_BOUND so the
user is not required to initialize it. DCR 1373.

2016-12-13 v301 released

1) CommunicationChannel - Changed PacketSizeError logic.

2) GetCommand FB - DCR 701 Bug fix when buffer ends with partial command.

3) CommunicationChannel - DCR 1028, added explicit setting of TCP read Buffer, added 'CopyBusy' flag to throttle Y_
ReadDevice DB

4) InputBufferManager - DCR 1029, FB was not making sure there was enough room for the entire copy from InputBuffer to Cir-
cularByteBuffer before starting to copy. Only a big problem (corrupted data) if heavy data streaming pushed the buffering
capacity to its limits.

5) CommandProcessor - DCR 816 - Changed WHILE LOOP to IF block to eliminate the risk of watchdog if a partial command was
sent, or if many many commands are sent. If necessary, performance can be increased by going back to the WHILE loop
strategy, but checks must be in place to safeguard against watchdog faults.

2015-01-31 v300 released

Created from v202, but recompiled specifically for MotionWorks IEC v3.x.

1) CircularBufferStruct DataType: Added BufferedCount and BufferedPercent in preparation for support of a host PC which
streams part data and must monitor the buffer levels.

2) CommunicationChannel - Changed CommConfig from VAR_INPUT to VAR_IN_OUT. This allows the RemoteIPAddress to be
added to the structure, and shared with other parts of the program to open additional sockets to the remote host.

2014-05-02: v202 released. Requires firmware 2.2.0 and the YDeviceComm firmware library

1) Improved capability by switching from a STRING of 512 character to a BYTE array of 2048 characters for Command Stream-
ing lower level functions. This change REQUIRES users who are upgrading from an older toolbox verison to CHANGE the data-
type of the CommandString variable in CommandProcessor function blocks in your main project from YTB_STRING512 to CTB_
CommandStruct.

2) GetCommand - Changed DataType of CommandString from YTB_STRING512 to CTB_CommandStruct. This allows the func-
tions to work on the data as a byte array instead of a string, which reduces scan time (fewer STRING operations) and allows for
longer command strings to be processed. Previous limit was 512 characters, now it is 2048 per line (between delimiters).

3) GetParameter - Same changes as listed for GetCommand.

4) CircularByteBuffer.PrmDelimiter - changed data type from YTB_STRING1 to BYTE. Related to improvements listed above.

5) GetParameter - Added DecimalDetected output. This can be used to prevent string conversion errors when using STRING_
TO_INT or similar conversions.

2013-09-02: v201 released. Requires firmware 2.2.0 and the


YDeviceComm firmware library
1) ReName_CommandProcessor - Changed logic to call a sub function "GetCommand" to reduce the amount of code that

resides on the user project side.

2013-08-08: v200 released. Requires firmware 2.2.0 and the


YDeviceComm firmware library
1) First release, includes Email, FTP, and Command Processing functions

Page 163 of 757


Communications DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: CircularBufferStruct

Data Structure used to manage a circular buffer of data used by several function blocks in the Communications Toolbox.

Data Type Declaration


* Element Data Type Description Usage
MyCircularBufferStruct CircularBufferStruct
C StorePointer INT Pointer updated when new elements MyCircularBufferStruct.StorePointer
added to buffer.
U UsePointer INT Pointer updated when elements of buffer MyCircularBufferStruct.UsePointer
have been read.
U Size INT Size of circular buffer. MyCircularBufferStruct.Size
U CmdDelimiters ARRAY[0..3] OF Specify the delimiters which separate Com- MyCircularBufferStruct.CmdDelimiters
BYTE; mand Strings. If no CmdDelimiters are [0]
specified, a carriage return or carriage
return line feed will be assumed.
U PrmDelimiter STRING Delimiters separating parameters within a MyCircularBufferStruct.PrmDelimiter
command. Default is a comma.
U LastDelimiter INT Element used by GetCommand. MyCircularBufferStruct.LastDelimiter

U/C Data YTB_ByteArray8192 Array of 8192 bytes of data. MyCircularBufferStruct.Data

Page 164 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CTB_CommandStruct

For use with the GetCommand and GetParameter function block. Contains information about the communication interface used.

Data Type Declaration


* Element Data Type Description Usage
MyCommStruct CommStruct
C ByteArray YTB_ByteArray2048 Contains string data for easy parsing MyCommandStruct.ByteArray
C Length INT Length of string contained in ByteArray MyCommandStruct.Length

Page 165 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CommStruct

For use with CommunicationChannel function block. Contains information about the communication interface used.

Data Type Declaration


* Element Data Type Description Usage
MyCommStruct CommStruct
U CommType INT Set 1 for Serial, 2 for Ethernet MyCommStruct.CommType
U InactivityTimeout TIME Use this to allow the MPiec to close the socket if no com- MyCommStruct.InactivityTimeout
munication has been received on the channel in the time spe-
cified.
U BufferSize UDINT The number of bytes to read per scan from buffer, if left at 0, MyCommStruct.BufferSize
the entire buffer will be transferred.
U Serial SerialConfig Attriutes required when communicating via serial interface, MyCommStruct.Serial.StopBits
such as the 218-IFY1 card.
U Ethernet EthernetConfig Network attributes required when communicating via MyCommStruct.Ethernet.LocalPort
TCP/IP or UDP.

Page 166 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: DelimiterArray

Supporting array for CircularBufferStruct

Data Type Declaration


DelimiterArray: ARRAY[0..3] OF BYTE;

Page 167 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: EthernetConfig

Supporting data structure for CommStruct, contains information about Ethernet interface configuration.

Data Type Declaration


* Element Data Type Description Usage
MyEthernetConfig EthernetConfig
U LocalIPAddress STRING Ethernet address of controller MyEthernetConfig.LocalIPAddress
U LocalPort UINT Ethernet port number to open MyEthernetConfig.LocalPort
C RemoteIPAddress STRING Ethernet address of the device the MPiec controller is MyEthernetConfig.RemoteIPAddress
communicating with.
C RemotePort UINT Port number used by the device the MPiec controller is MyEthernetConfig.RemotePort
communicating with.

Page 168 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: FTP_Data

Data Type Declaration


* Element Data Type Description Usage
MyFTP_Data FTP_Data
U Username YTB_STRING32 Username to log in to the FTP server. MyFTP_Data.Username
U Password YTB_STRING32 Password to log in to the FTP server. MyFTP_Data.Password
U LocalIP YTB_STRING16 Local IP of the controller. MyFTP_Data.LocalIP
U FTPDomain YTB_STRING128 The domain name of the FTP server that will be resolved via DNS. MyFTP_Data.FTPDomain
U FTPIP YTB_STRING16 The IP of the FTP server if a domain is not known or set. MyFTP_Data.FTPIP
U FTPPort UINT The port to connect to the FTP server through, default 21. MyFTP_Data.FTPPort
U DNSIP YTB_STRING16 The DNS lookup server IP. MyFTP_Data.DNSIP
U DNSPort UINT The DNS port to connect through, the default is 53. MyFTP_Data.DNSPort
U Timeout TIME Timeout for connecting to the FTP server or data connection, default 5s. MyFTP_Data.Timeout

Code Example
ftpdata.LocalIP := '192.168.1.1';

ftpdata.FTPDomain := 'ftp.example.com';

ftpdata.DNSIP := '8.8.8.8';

ftpdata.Username := 'mp2300';

ftpdata.Password := 'securepassword';

Page 169 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: RecipientArray

If more than 10 recipients are needed then the declaration of RecipientArray must be changed to reflect that.

Data Type Declaration


TYPE

RecipientArray : ARRAY[0..9] OF RecipientStruct;

END_TYPE

Page 170 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: RecipientStruct

* Element Data Type Description Usage


MyRecipientStruct RecipientStruct
U Email YTB_STRING128 MyRecipientStruct.Email
U Name YTB_STRING32 MyRecipientStruct.Name

Page 171 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SerialConfig

Supporting data structure for CommStruct, contains information about Serial interface configuration.

Data Type Declaration


* Element Data Type Description Usage
MySerialConfig SerialConfig
U PortNum UINT For use with Y_OpenSerialPort. MySerialConfig.PortNum
U BaudRate DINT For use with Y_SetDeviceOption. MySerialConfig.BaudRate
U DataBits DINT For use with Y_SetDeviceOption. MySerialConfig.DataBits
U StopBits DINT For use with Y_SetDeviceOption. MySerialConfig.StopBits
U Parity DINT For use with Y_SetDeviceOption. MySerialConfig.Parity
U HandShake DINT For use with Y_SetDeviceOption. MySerialConfig.HandShake
U CalcCheckSum BOOL For use with Y_SetDeviceOption. MySerialConfig.CalcCheckSum

Page 172 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SMTP_Data

Data Type Declaration


* Element Data Type Description Usage
MySMTP_ SMTP_Data
Data
U DNSIP YTB_STRING16 DNS server IP (local), used to perform lookup of mail server domain. MySMTP_Data.DNSIP
U DNSPort UINT DNS port, default is 53, leave blank unless other port is used. MySMTP_Data.DNSPort
U SMTPDomain YTB_STRING128 SMTP server domain name (e.g. smtp.yourcompany.com), used for MySMTP_Data.SMTPDo-
DNS lookup. main
U SMTPIP YTB_STRING16 The IP of the SMTP server, blank by default, provide IP to override DNS MySMTP_Data.SMTPIP
lookup.
U SMTPPort UINT SMTP port, usually 25 - note: does not support SSL encrypted SMTP. MySMTP_Data.SMTPPort
U LocalIP YTB_STRING16 Local IP of the controller. MySMTP_Data.LocalIP
U Domain YTB_STRING128 Domain for SMTP EHLO/HELO command, example: yaskawa.com. MySMTP_Data.Domain
U Sender YTB_STRING128 Sender e-mail address, example: [email protected]. MySMTP_Data.Sender
U SenderName YTB_STRING32 Name of sender, example: John Smith. MySMTP_Data.Sender-
Name
U Subject YTB_STRING128 Subject of the email. MySMTP_Data.Subject
U Recipient RecipientArray Array of STRING of email addresses which will receive the mes-
sage.
U Email YTB_STRING128 MySMTP_Data.RcptArray.[0].Email
U Name YTB_STRING32 MySMTP_Data.RcptArray.[0].Name
U Recipients INT Number of emails in Recipient. MySMTP_Data.NumRcpt
U Timeout TIME Timeout for connecting to the SMTP server, defaults to 5s. MySMTP_Data.Timeout

Code Example
smtpdata.LocalIP := '192.168.1.1';

smtpdata.SMTPDomain := 'smtp.example.com';

smtpdata.Domain := 'example.com';

smtpdata.Sender := '[email protected]';

smtpdata.SenderName := 'John Smith';

smtpdata.Subject := 'Hello from your MP2300iec';

smtpdata.RcptArray[0].email := '[email protected]';

smtpdata.RcptArray[0].name := 'Your Friend';

smtpdata.NumRcpt := 1;

Page 173 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types in the Communication Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

Enumerated Types Declaration


Enumerated Type #INT Value Enum Value Description
COM_Type Enumerated type to be used with CommStruct.CommType
0 na
1 Serial
2 Ethernet
Method For use with the GetParameter function. Specifies how the value is obtained.
0 Parameter
1 Character

Page 174 of 757


Communications FBs

Toolbox Help Documentation


Help version created 7/23/2021

CommunicationChannel

The CommunicationChannel function block is designed to manage an input stream of data from either a serial or TCP socket
communication interface. It collects portions of data from Y_ReadDevice each time that function’s Done output goes high, and
adds it to a circular buffer for further analysis. The CommConfig structure must be initialized by the user to configure the
necessary communication parameters.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V CircularByteBuffer CircularBufferStruct Structure containing a data buffer and other operational information
required to manage the CircularByteBuffer.
V CommConfig CommStruct Structure containing information to be used in
establishing socket or serial communication.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no
errors.
V ClearBuffer BOOL Resets the StorePointer and UsePointer, which FALSE
logically clears the contents of the circular buf-

Page 175 of 757


fer, but any existing data is not actually cleared.
V Timeout TIME If necessary, specify a time value when after no T#0mS
data is received, the MPiec should close the con-
nection. When Timeout is T#0S, the MPiec will
never close the connection on its own, the host
which initiated the connection can send a close
command, which is the normal procedure.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V Socket DINT File handle to be used when writing to device connected to the socket.
Only valid when non-zero.
V PacketCount BOOL Total packet count since this function block was enabled.

V BytesReceived UINT Total bytes received since this function was enabled.

Error Description
See the Function Block ErrorID list.

Setup
Follow these steps to initialize the CommConfig structure. Steps 1 & 2 show an optional easy way for the IEC application to
automatically obtain its own IP Address. One of the inputs required for the Y_DeviceComm basic functions is the MPiec con-
trollers own IP Address. This is necessary because the MPiec controller may have more than one physical Ethernet connector /
MAC address, and the YDeviceComm functions need to know which interface to use. Steps 1 & 2 show a way to automatically
obtain the IP address so the user will not be required to manually enter the controller's IP address for each system deployed.
It is also possibly to simply initialize the IPAddress as a sting such as IPAddress:='129.168.207.115';

1. Add a variable of type CONTROLLER_INFO to Global Variables as shown below. The Address must be %MD3.66560.

2. Add the following code to the initialize routine to obtain controller’s IP address. The variable IPAddress is a STRING.
The BUF_TO_STRING function block is located in the PROCONOS firmware library. As shown below, we are using it to

Page 176 of 757


extract 15 bytes of the IPAddress. These bytes equate to xxx.xxx.xxx.xxx of the IP Address.

3. Initialize variable of data type CommStruct as shown below. Set .LocalPort to the desired connection port number that
you choose to use in your application. If multiple sockets will be used, ensure they each have a unique port number.

Page 177 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DNS_LookUp

This function block performs a DNS lookup for a provided domain name (Address) using a specified DNS IP and port and
returns the number of answers, the resolved IPV4 address and the Time To Live of the returned IP.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
B Execute BOOL Upon the rising edge, all inputs are read and the DNS lookup FALSE
is performed. To perform a lookup on a different address or
perform the same lookup again, change the value and re-trig-
ger the execute input.
V LocalIP YC_ The IP address of the controller on the local network. STRING#''
STRING16
V Address YC_ The domain name to perform the look-up on (not an IPV4 STRING#''
STRING128 address).

V DNSIP YC_ The IP address of the DNS server to perform the lookup STRING#''
STRING16 through.

Page 178 of 757


V DNSPort UINT The port to connect to the DNS server through. UINT#53
E TimeOut TIME The amount of time the DNS server has to respond. TIME#5s
VAR_OUTPUT
B Done BOOL Set high upon the completion of a successful DNS lookup.
B Busy BOOL Set high upon the rising edge of 'Execute' and reset if Done or Error is true.
B Error BOOL Set high if an error has occurred during the DNS lookup. Cleared upon 'Execute' being
reset.
E ErrorID UINT If error is true, this output provides the Error ID. Cleared upon 'Execute' being reset.
V NumAnswers INT The number of answers returned by the DNS server. The answer with the longest TTL
is output at 'IP'
V TTL UDINT The Time To Live of the DNS response (i.e. how long the DNS server caches the answer
from the authoritative nameserver instead of reissuing the query).
V IP YC_ The 'IP' with the longest TTL that was returned by the DNS server that resolves to the
STRING16 domain name provided.

Notes
l 'Address' must be a domain name (i.e. www.yaskawa.com), not an IPV4 address. Passing an IPV4 address is referred
to as a "reverse DNS lookup" and is not supported by this function.

l The DNS server(s) the MPiec controller has access to depends on the network configuration. If there is no access to a
local DNS server (see "Setup" below) talk to your IT professional about DNS server options.

l The main purpose of this block is for use in other Communications blocks, such as FTP and SMTP.

Setup
To perform a DNS lookup, a connection to a DNS server must be established. The easiest way to determine what DNS server to
use is to open up the Windows command prompt (Windows Key + R -> "cmd" -> Enter) and type "ipconfig /all" and under
"DNS Servers" in the Ethernet LAN section you will find the DNS server(s) that the computer is configured to use.

Page 179 of 757


You can also perform DNS lookups from the command line which may help in verifying the results of the DNS lookup performed
on the controller while setting this block up.

Page 180 of 757


The basic command structure is "nslookup [hostname] [server]" where hostname and server are both optional (if you simply
type "nslookup" -> Enter it takes you in to the nslookup utility where you can then perform multiple lookups without retyping
"nslookup"). For example, typing "nslookup google.com" as in the image above returns a list of IP addresses resolved for
"google.com". You can also perform the lookup using a specified DNS server address which can be helpful if your block is
using a different DNS server than your computer is configured to use. This is done by filling in the second optional parameter,
such as "nslookup google.com 8.8.8.8" where "8.8.8.8" is a public DNS server managed by Google.

Page 181 of 757


Error Description
See the Function Block ErrorID list.

Example - External Address


The following example demonstrates the blocks ability to perform a look up for an external address ("google.com") using an
internal DNS server. The LocalIP, Address and DNSIP have all be configured and DNSPort and TimeOut have been left to
defaults.

Page 182 of 757


When comparing the output of the block ("74.125.225.131") to the dnslookup performed above, notice that the IP address is
in the list. You can also see that NumAnswers is set to 11 which matches the number of answers returned above. Finally, the
TTL is 0x0000012C which corresponds to 300 in decimal where 300s = 5 min, if you were to add the "Debug" option to
nslookup ("nslookup -d google.com") then you would see that this TTL also matches.

Page 183 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DWORD_OF_BYTE

This function combines four bytes into a DWORD. BYTE1 is the least significant portion of the resulting DWORD.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B EN BOOL Enables the function. FALSE
V BYTE1 BYTE The least significant byte of the DWORD to be assembled. BYTE#0
V BYTE2 BYTE BYTE#0
V BYTE3 BYTE BYTE#0
V BYTE4 BYTE The most significant byte of the DWORD to be assembled. BYTE#0
VAR_OUTPUT
B ENO BOOL High if the function is executing normally.

Page 184 of 757


Toolbox Help Documentation
Help version created 7/23/2021

FTP_SendFile

This function block uses the FTP (File Transfer Protocol) to write a file to a specified FTP server. The File must already exist on
the MPiec Controller's Flash or ramdisk for this function block to read and transfer data to the Destination FTP server. The File
must be created by some other method, or refer to ReName_FTP_SendData which doesn’t require a pre existing file.

Library
Comm Toolbox

Parameters
Parameter Data Type Description
*
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
V File YTB_ The full file name and location on the controller, STRING#''
STRING128 e.g. '/flash/user/data/example.csv'.
V FTPData FTP_Data The input structure that configures the FTP All zeros in structure
transfer such as FTP server address, port, etc.
V Destination YTB_ The full file name and destination on the FTP STRING#''
STRING64 server, e.g. 'metrics/example.csv'.
V Append BOOL To select whether an existing the file on the FALSE
server should be deleted and rewritten or the
new data should be appended to the existing
data.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes

Page 185 of 757


control before the action is completed, the Done output will not be set. This output is
reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
E ErrorID BOOL If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V ErrorString YTB_ If 'Error' is true and it is an FTP response code related error then this output contains the
STRING256 response string from the FTP server.

Notes
l This block utilizes FTP, not SFTP because SSL is not supported by the MPiec firmware. As a result, all FTP traffic sent
and received (e.g. username, password, file data) is sent unencrypted in plain text and is visible to anyone with access
to the network. This should not be a problem if the data being sent is not of a sensitive matter and the FTP server
account is CHROOT'd properly (talk to your IT professional about using FTP).

l The FTP server should either have an internal/external domain name or use a static IP address because if the address
changes, it will prevent the function from transferring files. See "Setup" for more details.

l The FTP user account must have "Write" privileges to successfully write files to the server. Optionally, the account may
also have "Append" privileges. If files already exists and the FTP account only has "Write" privileges, then the file will
be overwritten. If the file exists and the user account has "Append" privileges, then the file contents transferred will be
appended to the existing file.

Error Description
See the Function Block ErrorID list.

Basic Functionality Example - Transferring a File


This examples demonstrates how to configure the function using the data structure, create a file to send, and execute the
FTP_SendFile block.

Here is the code in the "Initialize" ST program which configures the file data and the FTP structure. The FTP server is hosted
on a local computer and does not have a domain name. Therefore, FTPIP was used and FTPPort was left blank as the local FTP
server is configured to use the default port of 21. The LocalIP is set to the controllers IP and the username/password com-
bination are set.

This program creates a file via the PROCONOS FILE_OPEN, STRING_TO_BUF, FILE_WRITE and FILE_CLOSE functions. The con-
tents of the file in "sample_file_data" is converted from a YC_STRING128 to YC_BYTE128 via the "SAMPLE_TO_BUF" block.
Once the file is created, the destination file name is prepared and the FTP function sends the file to the server.

Page 186 of 757


Page 187 of 757
The destination folder is empty to begin with and the FTP server log has been cleared prior to connection so that the results
will be obvious.

The PrepareFile contact is set true as is the Execute contact. Once both contacts are TRUE, the FTP_SendFile block sends the
newly created file.

Page 188 of 757


Page 189 of 757
The results of this block can be seen in the destination file explorer and the FTP server log:

The contents of the file match the "sample_file_data" string and the file can be seen in the explorer. In the FTP server log all of
the commands sent can be viewed and it can be seen that the file was transferred properly and successfully.

Page 190 of 757


Advanced Functionality Example - Transferring a Metrics File at a Specified
Rate
This examples demonstrates how to write a program to send a continuously updated metrics file (with date and time stamp) to
an FTP server. This kind of functionality is extremely useful to applications requiring data acquisition as the need to connect to
the controller directly is eliminated and file management is handled by the controller. For this example, the controller will con-
tinuously sample the speed and position of a servo that is jogging and the store the contents in a CSV file using the File_RW
Toolbox.

The same data configuration structure was used but there is no preset message for the file as it will be created dynamically.

In addition to the Communications Toolbox, two additional Yaskawa toolboxes are used: File_RW_Toolbox and PLCOpen_Tool-
box. The File_RW_Toolbox is used to create the CSV file that is uploaded to the FTP server and the PLCOpen_Toolbox is used to
control the single servo used in this example.

Controlling this example is very simple. The servo is turned on by "ServoEnable" which then in turn starts the jog at a constant
velocity. The rest of the example is controlled in the main program:

Page 191 of 757


Page 192 of 757
This entire program is enabled by the "MetricsEnable" contact which starts two timers: the 30 second timer which sends the
CSV file and the 1 second timer which takes a sample of the current position and velocity of the servo. The filename is gen-
erated each time the file is uploaded so that the timestamp is up to date and no files are overwritten.

The results of this example can be monitored by exploring the target upload directory and examining the FTP server log:

Page 193 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GetCommand

The GetCommand function block is a supporting function block for the ReName_CommandProcessor function block. It
extracts a CommandString from the CircularByteBuffer as identified by the CmdDelimiter specified in the CircularByteBuffer
structure.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V CircularByteBuffer CircularBufferStruct Structure containing a data buffer and other operational information
required to manage the CircularByteBuffer.
V CommandString CTB_Com- Input string containing at least two bytes of command characters and any
mandStruct optional parameters separated by a PrmDelimiter.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V CommandCreated BOOL Indicates that the CommandString VAR_IN_OUT contains a new Com-
mandString.
V CommandCode INT Integer value corresponding to the first two ASCII characters of the Com-
mandString.

Page 194 of 757


B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Error Description
See the Function Block ErrorID list.

Page 195 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GetParameter

The GetParameter function block provides a single parameter Value extracted from the CommandString. This is supporting
function block for use within the CommandProcessor function block.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V CommandString CTB_Com- Input string containing parameters separated by delimiters. such as MV;1.0;-
mandStruct 10.5;3.007
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V Method Method Determines method used to retrieve variable from data Method#Parameter
buffer. Method#Parameter uses the input Number to
determine the parameter number within the string to out-
put. Method#Character uses the number input as the
index in the byte array to start looking for the next valid
parameter.
V Delimiter YTB_STRING1 String value of the character separating parameters BYTE#44 (",")
within the CommandString.
V Number INT Depending on Method input, either the number of the INT#0
parameter value to be found.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.

Page 196 of 757


V Value STRING Value of the parameter.
V EndChar INT Last character index in byte buffer searched. When using Method#
V DecimalDetected BOOL Indicates if the Value output contains a decimal. (Useful to determine con-
version to a REAL or INT.)
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l There are two methods available with this function block; Values can be fetched via Parameter (Delimiter) count or by
StartCharacter. The Parameter method always counts delimiters from the beginning of the CommandString to explicitly
return the correct Value. If this Function block is executed in WHILE loop situation, it is more efficient to specify the
next StartCharacter as the Number Input by feed the previous EndChar back into the function block.

l If Method = Method#Parameter, GetParameter will search through the command string to find the parameter cor-
responding to the Number input. This method is useful for commands with fewer parameters or when parameters are
being read non-sequentially.

l l Example: CommandString = ‘MV,2,4,6’ Delimiter = ‘,’ Number = 2


When Valid = TRUE, Value = 4

l If Method = Method#Character, GetParameter will search the command string for the next parameter starting at the
character location equal to the Number input. The EndChar output can be used as feedback to the Number input to
find the next parameter. This method is useful when parameters are being read sequentially and provides a large per-
formance increase when parsing a CommandString with a large number of parameters.

l l Example: CommandString = ‘MV,2,4,6’ Delimiter = ‘,’ Number = 5


When Valid = TRUE, Value = 4, EndChar = 7

l Further examples of both methods are provided in ReName_CommandProcessor customization section.

Error Description
See the Function Block ErrorID list.

Page 197 of 757


Toolbox Help Documentation
Help version created 7/23/2021

InputBufferManager

The InputBufferManager function block manages a circular buffer of incoming data. It is a supporting function block for the
CommunicationChannel function block. A user should not need to access this function directly.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V InputBuffer YTB_ByteArray2048 Byte array containing data to be copied into the CircularByteBuffer.
V CircularByteBuffer CircularBufferStruct Structure containing a data buffer and other operational information
required to manage the CircularByteBuffer.
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high
and there are no errors.
V Execute BOOL Upon the rising edge, all other function INT#0
block inputs are read and the function
is initiated. To modify an input, change
the value and re-trigger the execute
input.
V BytesRead UDINT Number of bytes to be copied from UDINT#0
InputBuffer to CircularByteBuffer.
V ClearBuffer BOOL Resets the StorePointer and UsePointer, INT#0

Page 198 of 757


which logically clears the contents of
the circular buffer, but any existing
data is not actually cleared.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done out-
put will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
This is a hybrid function block that incorporates both PLCopen specified behaviors: Enable and Execute. This was mainly done
to separate two types of initialization: one that occurs when the Enable goes high, and another that occurs only when the
Execute goes high.

Error Description
See the Function Block ErrorID list.

Page 199 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReName_CommandProcessor

The ReName_CommandProcessor function block is a user customizable function block that parses data from a circular buffer
and copies it into a user defined structure of data to operate the machine. To use this function, copy and paste it into the main
project, rename it, and customize it and the MachinaData structure. It's designed to identify variable length commands in the
CircularByteBuffer and process them on a case by case basis.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V CircularByteBuffer CircularBufferStruct A string of characters such as MV;1.0;-10.5;3.007

V MachineData User Defined Create a user defined type which suits the needs of the application.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V CommandCount UDINT Reports the number of commands processed since Enable was set high.

Page 200 of 757


Notes
l This function block is a template for designing a unique command line interpreter and requires customization. See the
customization steps below.
l The command streaming tools provided in the Comm Toolbox are designed to interpret commands starting with a two
character (two byte) command code followed by either delimiter separated parameters or no parameters. The reason
for this is because two ASCII bytes can easily be converted to an INT, which is used with the CASE statement in this
function block. Example commands are located in the customization steps below.

Error Description
See the Function Block ErrorID list.

Customization Steps
1. Copy this Function block from the Comm Toolbox, paste it into your project, and rename with a different (but similar)
name.
2. Data type MyMachineStruct (VAR_IN_OUT ‘MachineData’) is only an example structure. A custom structure must be
designed to uniquely match the needs of the application. An example is shown below.

Page 201 of 757


3. Change the ‘MachineData’ DataType in the CommandProcessor function block to match your structure name.

4. Initialize the configuration elements in CircularByteBuffer.

1. a. CmdDelimiters are used to mark the end of a complete command. Up to four characters can be specified.
Typically, <cr>, which is BYTE#13 or <cr><lf>, which is BYTE#13 BYTE#10 are used. If CmdDelimiters not
specified, will default functionality will automatically accept Carriage Return or Carriage Return & Line Feed.
2. b. PrmDelimiter specifies the character that separates individual parameters within a command. If PrmDe-
limiter is not specified, the function will automatically default to a comma, (BYTE#44).
3. c. Size must represent the defined size of the DataType definition for the CircularBufferStruct’s “Data? Element.
If Size not specified, it will default to zero and the InputBufferManager function block will cause an error.
Normally, this value is 8192 as the structure definition is in the Comm Toolbox itself. If this must be increased
for any reason, modify the Comm Toolbox DataType definition and set the Size input accordingly.
5. Locate the comments “Customize the code below" and “Customize the code above"
6. Remove example commands to avoid potential errors in operation.

7. Add commands. Two examples are shown below:


1. Move Relative command:
1. MR,<axisnumber>,<distance>,<speed>,<accel/decel>
2. Calculate the CommandCode which corresponds to the ASCII characters ‘MR’. The equation is: CHAR_
TO_INT(‘M’) * 256 + CHAR_TO_INT(‘R’) = 19794.
3. Add the CommandCode to the case statement.
4. Use the GetParameter function block to separate command parameters. The example below uses
GetParameter with “Method#Parameter?

2. Load Positions command:


1. LP,<Position1>,<Position2>,…,<Position50>
2. Calculate the CommandCode which corresponds to the ASCII characters ‘LP’. The equation is: CHAR_
TO_INT(‘L’) * 256 + CHAR_TO_INT(‘P’) = 19536
3. Add the CommandCode to the case statement.

Page 202 of 757


4. Use the GetParameter function block to separate command parameters. The example below uses
GetParameter with “Method#Character"

Optional Customization Steps


The CommandProcessor can process one or many commands per scan. This is a performance tuning issue. If the host device
must send several setting at once, the MPiec controller may seem slow to process all the commands based on the Task interval.
If the Task Interval and priority are set such that the CommandProcessor will have time to continue scanning the Cir-
cularByteBuffer in one scan until ALL bytes have been processed, performance will be improved by changing the following
CommandProcessor code:

1. Remove AND NOT(CommandCreated) from main WHILE loop as shown

Page 203 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Rename_FTP_RecordData

This function works in combination with ReName_FTP_SendData. Both functions must be copied and pasted into the main pro-
ject and slightly customized for use. This function is designed to continuously record data using two databanks. Together,
ReName_FTP_RecordData and ReName_FTP_SendData handshake and synchronize operations such that Recording takes
place in one databank while the FTP transfer takes place using the other databank. Files of nearly unlimited size can be created
on an FTP Server. Customization consists of creating an application specific structure similar to "ReName_RecordedUserData"
in the main project which contains the specific data required by the application. This technique writes binary data to the file
and therefore requires a program to read and interpret the same data structure. The data is non ASCII, unless converted to
ASCII as part of the MotionWorks IEC customization using LREAL_TO_STRING and similar functions. Converting the data to
ASCII on the MPiec is not recommended, especially if high speed recording is desired. ReName_FTP_RecordData typically
executes in a faster task, even as fast as the Mecahtrolink update rate if necessary, recording up to 1000 samples of data in
each "DataBank." There are two Databanks; one which is being written to by FTP_RecordData, and the other which contains
data being uploaded to the FTP server. Rename_FTPSendData can typically execute in a slower task or the DEFAULT task.

Library
Comm Toolbox

Parameters
Parameter Data Type Description
*
VAR_IN_OUT
V RecordedData ReName_Recor- User customizable structure containg the data to be recorded. See examples
dedUserData below.
V NewSample ReName_Recor- A single element of the many samples in one of the databanks. All the data in one
dedSample sample is collected in one time slice.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE

Page 204 of 757


while Enable is held high and there are no
errors.
V Stream BOOL If Stream is True, a Sample will be added to the FALSE
UserData structure every task interval.
V Trigger BOOL If Stream is False, Samples can be added to the FALSE
UserData structure only upon the rising edge of
Trigger.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V ErrorString YC_STRING256 If 'Error' is true and it is an FTP response code related error then this output con-
tains the response string from the FTP server.

Notes
l This block utilizes FTP, not SFTP because SSL is not supported by the MPiec firmware. As a result, all FTP traffic sent
and received (e.g. username, password, file data) is sent unencrypted in plain text and is visible to anyone with access
to the network. This should not be a problem if the data being sent is not of a sensitive matter and the FTP server
account is CHROOT'd properly (talk to your IT professional about using FTP).

l The FTP server should either have an internal/external domain name or use a static IP address because if the address
changes, it will prevent the function from transferring files. See "Setup" for more details.

l The FTP user account must have "Write" privileges to successfully write files to the server. Optionally, the account may
also have "Append" privileges. If files already exists and the FTP account only has "Write" privileges, then the file will
be overwritten. If the file exists and the user account has "Append" privileges, then the file contents transferred will be
appended to the existing file.

Error Description
See the Function Block ErrorID list.

Example
(It is assumed that an FTP server is configured and access is possible.)

1. Open your project.


2. Open the Comm Toolbox in a second copy of MotionWorks IEC.
3. In the second copy (Comm Toolbox) Project Tree Window, select ReName_FTP_SendFile and ReName_FTP_RecordData
and Copy.
4. In the main project, Project Tree Window, right click on Logical POUs and select Paste.
5. For both of the new function blocks in your project, right click on them to access the properties page and rename the
function blocks.

DataTypes

Create a datatype which describes the information to be recorded. The four datatypes shown below make up "MyRe-
cordedUserData" which must be connected to the function blocks. Customize the detailed information to be recorded as shown
on lines 5 through 11. Add or subtract as many variables are required. All code shown here was copied and pasted from the

Page 205 of 757


Comm Toolbox, then all instances of "ReName_" were changed to "My." Change to anything meaningful and appropriate. The
only datatype which does not require modification and can remain in the Comm Toolbox is RecordStatusData.

Initialization

Editing the variables worksheets

Variables worksheet for ReName_FTP_RecordData:

Rename the dataypes.

Variables worksheet for ReName_FTP_SendData:

Rename the datatype.

Page 206 of 757


Function Blocks added to the Project:

MyFTP_RecordData_1 is in a "fast" task:

MyFTP_SendData is in the DEFAULT task:

Page 207 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReName_FTP_SendData

This function works in combination with ReName_FTP_RecordData. Both functions must be copied and pasted into the main
project and slightly customized for use. This function is designed to continuously record data using two databanks. Together,
ReName_FTP_RecordData and ReName_FTP_SendData handshake and synchronize operations such that Recording takes
place in one databank while the FTP transfer takes place using the other databank. Files of nearly unlimited size can be created
on the FTP Server. Customization consists of creating an application specific structure similar to "ReName_RecordedUserData"
in the main project which contains the specific data required by the application. This technique writes binary data to the file
and therefore requires a program to read and interpret the same data structure. The data is non ASCII, unless converted to
ASCII as part of the MotionWorks IEC customization using LREAL_TO_STRING and similar functions. Converting the data to
ASCII on the MPiec is not recommended, especially if high speed recording is desired. ReName_FTP_RecordData typically
executes in a faster task, even as fast as the Mecahtrolink update rate if necessary, recording up to 1000 samples of data in
each "DataBank." There are two Databanks; one which is being written to by FTP_RecordData, and the other which contains
data being uploaded to the FTP server. Rename_FTPSendData can typically execute in a slower task or the DEFAULT task.

Library
Comm Toolbox

Parameters
Parameter Data Type Description
*
VAR_IN_OUT
V RecordedData ReName_ Rename and customzie this structure based on the needs of the application.
RecordedData
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high and
there are no errors.
V File YC_ The full file name and location on the con- STRING#''

Page 208 of 757


STRING128 troller, e.g. '/flash/user-
/data/example.csv'.
V FTPData FTP_Data The input structure that configures the
FTP transfer such as FTP server address,
port, etc.
V Destination YC_ The full file name and destination on the STRING#''
STRING64 FTP server, e.g. 'metrics/example.csv'.
V Append BOOL To select whether an existing the file on FALSE
the server should be deleted and the new
data should be appended to the existing
data.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error).
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.
V ErrorString YC_ If 'Error' is true and it is an FTP response code related error then this output contains
STRING256 the response string from the FTP server.

Notes
l This block utilizes FTP, not SFTP because SSL is not supported by the MPiec firmware. As a result, all FTP traffic sent
and received (e.g. username, password, file data) is sent unencrypted in plain text and is visible to anyone with access
to the network. This should not be a problem if the data being sent is not of a sensitive matter and the FTP server
account is CHROOT'd properly (talk to your IT professional about using FTP).

l The FTP server should either have an internal/external domain name or use a static IP address because if the address
changes, it will prevent the function from transferring files. See "Setup" for more details.

l The FTP user account must have "Write" privileges to successfully write files to the server. Optionally, the account may
also have "Append" privileges. If files already exists and the FTP account only has "Write" privileges, then the file will
be overwritten. If the file exists and the user account has "Append" privileges, then the file contents transferred will be
appended to the existing file.

l There is a handshake system in place between ReName_FTP_RecordData and ReName_FTP_SendData so that if there is
a timing problem and ReName_FTP_RecordData must switch to the other DataBank but ReName_FTP_SendData is still
busy, and Error will occur. Timing issues could be based on the tasks in which both function blocks are executing, and
if further customization has been performed, such as by modifying the number of samples in each DataBank.

Error Description
See the Function Block ErrorID list.

Example Customization
(It is assumed that an FTP server is configured and access is possible.)

Page 209 of 757


1. Open your project.
2. Open the Comm Toolbox in a second copy of MotionWorks IEC.
3. In the second copy (Comm Toolbox) Project Tree Window, select ReName_FTP_SendFile and ReName_FTP_RecordData
and Copy.
4. In the main project, Project Tree Window, right click on Logical POUs and select Paste.
5. For both of the new function blocks in your project, right click on them to access the properties page and rename the
function blocks.

DataTypes

Create a datatype which describes the information to be recorded. The four datatypes shown below make up "MyRe-
cordedUserData" which must be connected to the function blocks. Customize the detailed information to be recorded as shown
on lines 5 through 11. Add or subtract as many variables are required. All code shown here was copied and pasted from the
Comm Toolbox, then all instances of "ReName_" were changed to "My." Change to anything meaningful and appropriate. The
only datatype which does not require modification and can remain in the Comm Toolbox is RecordStatusData.

Initialization

Editing the variables worksheets

Variables worksheet for ReName_FTP_RecordData:

Rename the dataypes.

Variables worksheet for ReName_FTP_SendData:

Rename the datatype.

Page 210 of 757


Function Blocks added to the Project:

MyFTP_RecordData_1 is in a "fast" task:

MyFTP_SendData is in the DEFAULT task:

Page 211 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Rename_UserComm

The ReName_UserComm function block is designed to facilitate simple data exchange with another device by opening a socket
and sending /receiving raw binary data. The function must be copied and pasted into the main project and slightly customized
for use. The overall design includes a C# DLL which must also be customized.

Library
Comm Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
V UserData ReName_ During customization, define and create any structure as required for the application.
UserStruct

VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V CommConfig BOOL Resets the StorePointer and UsePointer, FALSE
which logically clears the contents of the cir-
cular buffer, but any existing data is not
actually cleared.
V TimeOut TIME TIME FALSE

Page 212 of 757


VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V PacketCount UDINT Total packet count since this function block was enabled.

V BytesReceived UDINT Total bytes received since this function was enabled.

Error Description
See the Function Block ErrorID list.

Example
1. Open your project.
2. Open the Comm Toolbox in a second copy of MotionWorks IEC.
3. In the second copy (Comm Toolbox) Project Tree Window, select ReName_FTP_SendFile and ReName_FTP_RecordData
and Copy.
4. In the main project, Project Tree Window, right click on Logical POUs and select Paste.
5. For both of the new function blocks in your project, right click on them to access the properties page and rename the
function blocks.

Page 213 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SendEmail

This function block sends an e-mail via SMTP commands (Simple Mail Transfer Protocol) through a specified SMTP server. The
output is highly configurable including multiple recipients, any message body structure, specified sender e-mail and name
and other features listed below.

Library
Comm Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V MessageData SMTP_Data A user customized data structure for configuring the e-mail block.
V MessageBody YTB_ The e-mail body as a 4096 element byte array. If a larger body is required, this declar-
BYTE4096 ation can be changed and the library recompiled.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V BodyLength UDINT The length (number of bytes) of the e-mail body that will be UDINT#0
sent. While not necessary it is highly suggested, see notes
below.
VAR_OUTPUT
B Done BOOL Set high upon successfully sending an e-mail.

B Busy BOOL Set high upon the start of communications with the SMTP server and low when 'Done'

Page 214 of 757


or 'Error' go high.
B Error BOOL Set high when an error occurs during e-mail configuration and sending. Set low upon
Execute being reset.
E ErrorID UINT If Error is true, this output provides the ErrorID. Cleared upon 'Execute' being reset.

V ErrorString YTB_ If 'Error' is true and it is an SMTP response code related error then this output contains
STRING256 the response string from the SMTP server.

Notes
l The MPiec series controllers do not support SSL SMTP servers and therefore will most likely only work with local net-
work SMTP servers. Talk with your IT professional about connecting to a local SMTP server from an MPiec Series Con-
troller (see "Setup" below for more details about the required configuration).

l The "BodyLength" input is optional but highly suggested to reduce the packet size and the potential for large amounts
of padding ("0") bytes on the recipients side. All examples include this Input and demonstrate how to get the correct
length.

Error Description
See the Function Block ErrorID list.

Example
As this is a complicated function, additional examples are provided in separate help files listed under "Additional Examples"
and prefixed with "SMTP_". The example shown here sets up the block, creates a message body and sends an e-mail to
external Gmail account.

The variable EmailBodyString is of type YC_STRING256. Below is the configuration of the SMTP_Data structure:

The most basic form of sending an e-mail is simply converting a string to a byte array via the STRING_TO_BUF function block
provided in the PROCONOS firmware library. With the data structure shown above and this STRING_TO_BUF block, the email is
configured and ready for use.

Page 215 of 757


After toggling PrepareMessage, here is the result.

Page 216 of 757


And to demonstrate the end result, here is the e-mail in the inbox of the Gmail account used. The sender and subject are both
listed correctly and a portion of the send message can be seen.

Page 217 of 757


File Read Write Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with File Read / Write Toolbox

Requirements for v372


To use the File Read / Write Toolbox, the project must also contain the following:

Firmware libraries:

l PROCONOS

User libraries:

The following User Libraries must be listed above the File Read Write Toolbox:

l Yaskawa_Toolbox (v371 or higher)

The File Read / Write Toolbox contains some functions must be customized for use in every application.

The two customizable function blocks in this library are:

l Write_CSV_File

l Read_CSV_File

To use these functions, they must be copied and pasted into your main project as a function block with a different (but similar)
name. To do this, copy and paste the structured text and the variable definitions grid from the toolbox version. These four
main functions refer to other sub functions in the File Read Write toolbox, which do not require customization and can remain
in the File Read Write Toolbox. There is no need to move the following function blocks:

l Read_Buffer

l Read_Line

l Read_Value

More detailed customization information and examples are provided for the help for each of the functions blocks mentioned
above.

See Yaskawa's Youtube Webinar - CSV File Transfer with the File_RW Template.

Page 218 of 757


Toolbox Help Documentation
Help version created 7/23/2021

File RW Toolbox Revision History

Current Version:
2021-07-07 v372 released

1) ReadValue FB - G-Code Override commands with trailing spaces caused GCode_Processor to hangup. DCR 5199.

2) ReadValue FB - No longer outputs the comma delimiter with desired value (in Non GCode mode.) DCR 5416.

3) HC_WriteParameter FB - Error logic was not correct, could cause the function to hang busy in some cases. DCR 5520.

4) Read_XML_File FB - Was missing Done output in RETURN statement. DCR 5519.

5) HC_WriteParameter / Set_XML_Data FB - Was not detecting servo or external axistype to determine need to write legacy
parameters. DCR 5518.

6) DataCompare function blocks DataLogRecord, DataLogWrite and DataLogCompare reintroduced.

Previous Versions:
2020-11-30 v371 released.

1) ReadValue FB - added support to ignore comments added to G-Code % preamble. DCR 4697.

2) HC_WriteParameter - Fixed bug preventing the Hardware Configuration from detecting that parameters had been changed
via this function block. DCR 4808.

2020-02-06 v370 released.

1) Homing via Group Toolbox GroupToHome FB did not execute more than once when using the v352 Toolbox Installer version.
DCR 2985.

2) G-Code: [support comments with square brackets]. DCR 3173.

3) G-Code: support lower case in G-Code data. DCR 3329.

2018-12-28 v352 released.

1) ReadValue - Failure when CRLF falls exactly on a ReadBuffer boundary. (CR and end of buffer, LF at next beginning. DCR
2110.

2) ReadValue, Read_CSV_File - Increase size of STRING DataTypes from 80 to 128 chars. DCR 2111.

3) G-Code - lines containing both variables and comments allowed Comments to be passed through to G-Code parser. DCR
2228.

4) ReadValue - supports G-Code block skip mode. DCR 2191.

5) ReadValue - G-Code lines containing IF statements containing no spaces allowed conditional statements be copied into com-
mand buffer with extra character. DCR 2254.

6) ReadValue G-Code lines (with comments like this) were leaking a CR character into the command buffer. DCR 2349.

Page 219 of 757


2018-06-26 v350 released.

1) Read_CSV_FIle template FB - Fixed initialization Error. DCR 1439.

2) Data logging FBs - Improvement to programatically check array sizes (non hard coded) DCR 1722.

3) CreateFilePath - New function block to concatenate path filename and extension. DCR 1773.

2017-12-06 v340 released. Created using 3.4.0 firmware

1) GetTagName FB - New in v340. For example, <HeightZ>164</HeightZ> will return HeightZ. DCR 1066.

2) ReadBuffer FB - Fixed DataBuffer Initialization bug. DCR 925.

3) Read_CSV_File template - Fixed DataBuffer Initialization bug. DCR 1109.

4) HC_WriteParameter - Writing Prm 1833 did not update Axis.XML to change MachineCycle. DCR 1194.

5) ByteBufferStruct - Changed datatype for FilePosition from DINT TO UDINT. DCR 1225.

6) ReadValue - Now detects special statements in G-Code data for expressions and formulas. DCR 1241.

7) ReadValue - Was filtering out space characters, now includes in the output. DCR 1294.

2016-09-15 v301 released. Created using 3.2.0 firmware, but not necessary

1) ReadLine & ReadValue functions - Removed VAR_INPUT StartChar and VAR_OUTPUT EndChar, the function blocks now man-
age this data in the databuffer directly.

2) HC_WriteParameter - new function block added. Writes configuration parameters which are not available with MC_
WriteParameter.

3) ReadBuffer - Improved ReadBuffer to report when no data was read from file.

4) Read_CSV_File - The performance of this template POU was improved by using a two scan WHILE loop technique.

5) ReadValue - Improved automatic handling for files with CRLF, CR, or just LF.

2015-01-31 v300 released

1) Identical to v205, but recompiled specifically for MotionWorks IEC v3.x.

2015-01-15 v205 released. Created using 2.5.0 firmware

Merged new data logging from FileRW_Toolbox_v204HSv2.ZWT

1) Added Function Blocks: DataLogGenerate, DataLogGenerate_2Points, DataLogCompare, & DataLogComparLive. *)

2) DataLogCompareLive - Known issue: Setting Periodic to TRUE on the function block will only work when if log file has more
than 1000 entries in the log file otherwise the function block will error.

3) ReadValue - Added VAR_INPUT GCodeMode to support detection of numeric to alpha transitions as delimiters in G-Code.

2014-06-13 v204 released. Created using 2.5.0 firmware

1) ReadValue - Fixed bug introduced in v203 to auto detect CRLF, CR, or LF as line delimiters. A file with CRLF was being pop-
ulated into every other array index because the first character in the read after a new line was BYTE#10.

2) FileExists - Added new function block.

3) ReadValue - Added VAR_INPUT GCodeMode to support detection of numeric to alpha transitions as delimiters in G-Code.

4) Known Issue - When reading CSV files, the last line must contain the same line delimiter, CR or CRLF as all other lines in the
file, or the last line will not be read into the structure.

Page 220 of 757


2014-04-11 v203 released. Created using 2.5.0 firmware

1) Added support for files that only use line feed (BYTE#10) as a line delimiter instead of carriage return (BYTE#13).

Two locations in ReadBuffer FB, One location in ReadValue FB. *)

2013-09-02 v202 released. Created using 2.4.0 firmware

1) ReadValue - Added "OR (x = DataBuffer.Length)" to cause EOF flag even if the <CR> is not the last byte in a line

2) Read_CSV_File & Write_CSV_File - Added PreStringError 10017 to detect if the controller already has a String Conversion
alarm

posted before the function blocks execute.

2012-08-23 v201 released. Created using 2.2.0 firmware

1) Improved reading of very last portion of buffer. (partial buffer read when EOF occurred)

2) Tested Write_CSV_File Append mode. (Now supported.)

3) Added Write_CSV_File ErrorID 10119 to stop execution if the Row or Column data in the User Structure are zero.

4) Improved handling of ErrorID=22 by forcing a FILE_CLOSE if there was an error opening a file.

2012-02-08 v200 released. created using 2.1.0 firmware

1) First official release version with documentation provided for Read_CSV_File. (See Toolbox manual.)

2) Read_Binary_File and Write_Binary_File still under development for speed improvements.

2011-12-19 v004beta created using 2.1.0 firmware

1) Added ReadBuffer function block for use by Read_CSV_File to increase the efficiency of the file read operation.

Previously, logic was searching for one line of bytes at a time, and it took 6 scans to process each line. With the ReadBuffer FB,

Read_CSV_File can process a given buffersize in 6 scans. Default is 2048 bytes, settable by user.

Page 221 of 757


File_RW_DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: ByteBufferStruct

For use with the ReadBuffer, ReadLine, and ReadValue function blocks. These block are designed to share the same data.
DataBuffer is the largest piece of data, read directly from a file using the FILE_READ function block from the ProConOS firm-
ware library, ReadLine returns a line of ASCII data from the DataBuffer, and ReadValue returns a single value found between
two delimiters.

Data Type Declaration


* Element Data Type Description Usage
MyDataBuffer ByteBufferStruct
C BufferSize UINT Not Used. MyDataBuffer.BufferSize
C FilePosition DINT The location in the file which was last read into the DataBuffer. The loc- MyDataBuffer.FilePosition
ation in the file which is the beginning of the next read or write.
C Char YTB_ByteAr- Array of Bytes read from the file. This datatype is declared in MyDataBuffer.Char[4]
ray16384 the Yaskawa Toolbox.
U CharPointer UINT Points to the characters in DataBuffer.Char[] which one of the func- MyDataBuffer.CharPointer
tions is currently evaluating.
U CharsRead UINT Reports the actual number of characters read from the file, which may MyDataBuffer.CharsRead
be less than the full size of DataBuffer.Char[]. If this is the case, the
file was either smaller than the size of DataBuffer.Char[] or the end of
the file has been reached.
U CharBuffer UINT CharBuffer may be less than CharsRead because certain chars are MyDataBuffer.CharBuffer
filtered out, like TAB. BYTE#9

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: ChannelArray

Supporting array for ChannelStruct. For use with the DataLogCompare function block.

Data Type Declaration


TYPE

ChannelArray: ARRAY[1..6] OF ChannelStruct;


END_TYPE

Page 222 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: ChannelStruct

Used with the DataLogCompare function block.

Data Type Declaration


* Element Data Type Description Usage
MyChannelStruct ChannelStruct
C RefValue LREAL Value of the reference data point. MyChannelStruct.RefValue
C CompValue LREAL Value of the comparison data point.. MyChannelStruct.CompValue

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: CompareStruct

Used with the DataLogCompare function block.

Data Type Declaration


* Element Data Type Description Usage
MyCompareResults CompareStruct
C LoadingReferenceFile BOOL Denotes whether or not the Reference file is MyCompareResults.LoadingReferenceFile
being loaded into a Reference structure.
C LoadingComparisonFile BOOL Denotes whether or not the Comparison file is MyCompareResults.LoadingComparisonFile
being loaded into a Comparison structure.
C RowsCompared DINT The number of rows in each file that have been MyCompareResults.RowsCompared
compared.
C FileCompared BOOL Denotes whether or not the two files have been MyCompareResults.FileCompared
compared.
C NumOfDifferences INT Reports the number of differences found. MyCompareResults.NumOfDifferences
C Differences DiffValueArray An array of each difference found. MyCompareResults.Differences

Page 223 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: DataLoggingStruct

Structure containing parameters for recording and writing general purpose data. This structure is used with the DataLo-
gRecord and DataLogWrite function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyRecordingPrms DataLoggingStruct
C Version DINT The version of this structure [yyyymmdd]. MyRecordingPrms.Version
C ChannelsUsed WORD Denotes the channels that are used to MyRecordingPrms.ChannelsUsed
record data.
U MaxRecordingTime DINT The maximum amount of time in seconds MyRecordingPrms.MaxRecordingTime
to spend recording.
C TimeLimitReached BOOL Denotes whether or not the time limit has MyRecordingPrms.TimeLimitReached
been reached.
C SampleRate REAL The sample rate of the logged data [ms]. MyRecordingPrms.SampleRate
C Status StatusFlagsSet Status of recording and writing data for MyRecordingPrms.Status
each buffer.
C Size INT Denotes how many rows of data can be MyRecordingPrms.Size
stored.
C Max INT The LAST array index where data can be MyRecordingPrms.Max
stored.
C Data LoggedValuesSet The data that is recorded. MyRecordingPrms.Data

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: DiffStruct

Used with the DataLogCompare function block.

Data Type Declaration


* Element Data Type Description Usage
MyDiffStruct DiffStruct
C RefRow DINT The row in the Reference file where this difference is located. MyDiffStruct.RefRow
C CompRow DINT The row in the Comparison file where this difference is located. MyDiffStruct.CompRow
C Channel ChannelArray An array of channels. MyDiffStruct.Channel

Page 224 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: DiffValueArray

Supporting structure for CompareStruct. For use with the DataLogCompare function block.

Data Type Declaration


TYPE

DiffValueArray: ARRAY[0..1000] OF DiffStruct;


END_TYPE

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: LoggedValuesArray

Supporting array for LoggedValuesStruct. For use with the DataLogRecord and DataLogWrite function blocks.

Data Type Declaration


TYPE

LoggedValuesArray: ARRAY[0..4999] OF LoggedValuesStruct;


END_TYPE

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: LoggedValuesSet

Supporting structure for DataLoggingStruct. For use with the DataLogRecord and DataLogWrite function blocks.

Data Type Declaration


TYPE

Page 225 of 757


LoggedValuesSet: ARRAY[0..1] OF LoggedValuesArray;
END_TYPE

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: LoggedValuesStruct

Supporting structure for LoggedValuesArray. Used with the DataLogRecord and DataLogWrite function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyLoggedValues LoggedValuesStruct
C SampleNum DINT The sample number of this data set. MyLoggedValues.SampleNum
C Channel1 LREAL Value of the first input. MyLoggedValues.Channel1
C Channel2 LREAL Value of the second input. MyLoggedValues.Channel2
C Channel3 LREAL Value of the third input. MyLoggedValues.Channel3
C Channel4 LREAL Value of the fourth input. MyLoggedValues.Channel4
C Channel5 LREAL Value of the fifth input. MyLoggedValues.Channel5
C Channel6 LREAL Value of the sixth input. MyLoggedValues.Channel6

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: StatusFlagsSet

Supporting structure for DataLoggingStruct. For use with the DataLogRecord and DataLogWrite function blocks.

Data Type Declaration


TYPE

StatusFlagsSet: ARRAY[0..1] OF StatusFlagsStruct;


END_TYPE

Page 226 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: StatusFlagsStruct

Used with the DataLogRecord and DataLogWrite function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyStatusFlags StatusFlagsStruct
C Recording BOOL Denotes whether or not the data is being recorded. MyStatusFlags.Recording
C Writing BOOL Denotes whether or not the data is being written to a file. MyStatusFlags.Writing
C StorePointer INT The array index where the last data point is stored. MyStatusFlags.StorePointer
C Overwritten BOOL Flag which indicates if the buffer has circulated over the MyStatusFlags.Overwritten
beginning of the data; to prevent reuse.

Page 227 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types in the File R/W Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to 0, the second to 1, etc.

Enumerated Types Declaration


Enumerated #INT Value Enum Value Description
Type
ComparisonMode Enumerated type to be used with CommStruct.CommType
0 Percentage Uses a percentage of the current value in the
BaseFile to set the window.
1 PercentOfMax Uses a percentage of the maximum value found
in the BaseFile to set the window.
2 PercentOfAverage Uses a percentage of the average absolute value
found in the BaseFile to set the window.
3 RawWindow Uses a raw value to specify a window around the
BaseFile.
FTB_FileLocation Enumerated type to specify where a file is stored on the controller. Used with the CompareFiles and
WriteFile function blocks.
0 Ram The file is in ramdisk.
1 Flash The file is in flash.

Percentage

Page 228 of 757


PercentOfMax

PercentOfAverage

Page 229 of 757


RawWindow

Page 230 of 757


File_RW_FBs

Toolbox Help Documentation


Help version created 7/23/2021

DataLogCompare

This function block compares two files and reports the PercentMatching within the
user specified allowable PercentDeviation, SampleDeviation and OfffsetDeviation.

Library

FileRW Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V ReferenceFile STRING The name of the file on the controller that is presumed to STRING#''
have good data.
V ComparisonFile STRING The name of the file on the controller to be compared to the STRING#''
ReferenceFile.
V FileLocation FTB_FileLoca- Dictates whether the Comparison file is stored in ram- FTB_FileLoca-
tion disk/user/data (#Ram) or flash/user/data (#Flash) on the tion#Ram
controller.
V PercentDeviation YTB_LREALAr- Percentage by which a given sample in the ComparisonFile LREAL#0.0
ray8 can differ from the ReferenceFile and still be considered a

Page 231 of 757


match.
V SampleDeviation FTP_INTAr- The number of neighboring samples to search for a match- INT#0
ray8 ing value if a match cannot be attained in the equivalent
sample using the PercentDeviation and OffsetDeviation cri-
teria. Specify 0 to 20 samples.
V OffsetDeviation YTB_LREALAr- Maximum offset by which a given sample in the Com- LREAL#0.0
ray8 parisonFile can differ from the ReferenceFile and still be con-
sidered a match.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another
block takes control before the action is completed, the Done output will not be
set. This output is reset when Execute goes low. Set high when two files have
been compared.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to provide
Valid information. (No Error) Busy will be high while comparing two files to each
other.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V PercentMatching LREAL A summary reflecting the similarity of the two files.

Notes
l Three function blocks work together in this solution: DataLogRecord, DataLogWrite, and DataLogCompare.
l Start and Stop the DataLogRecord function in conjunction with an event signifying when the data should be recorded.
This is intended to be a single event, not a series of intermittent events. At some time after DataLogRecord is Valid,
Execute the DataLogWrite function, typically in a slower task than DataLogRecord. Typical usage includes DataLo-
gRecord in a task as fast as the Mechatrolink rate if necessary, DataLogWrite in a 32 to 64 mSec task, and DataLo-
gCompare in a 32 to 64 mSec task.
l These functions use a double buffer technique, swapping from one to other. DataLogRecord accesses one buffer while
DataLogWrite accesses the other. The two activities should never interfere with each other, error will be generated if
there is a timing conflict when trying to switch buffers. If this occurs, it is possible that DataLogWrite must be
executed at a faster interval.
l The comparison algorithm first checks for a match within the offset specified. If the data does not match, then it will
check within the allowed percentage. If still a match cannot be determined, the process repeats by iterating through
the number of samples before and after the equivalent time sample. If a SampleDeviation of 20 is provided, the process
will check up to 20 samples before and 20 after the sample in question.

Error Description

See the Function Block ErrorID list.

Example:
Initialize these structures for each item to be recorded by DataLogRecord. Each data set may require a different set of match-
ing criteria.

Page 232 of 757


Page 233 of 757
Toolbox Help Documentation
Help version created 7/23/2021

DataLogRecord

This function block records data on up to 6 channels every scan and stores the data in
DataLogPrms.Data[0] and DataLogPrms.Data[1] structures. The data could be down-
loaded and analyzed in Excel or other software, but the intention is to re-record at
some future time under the same conditions, and use the DataLogCompare function
block to analyze the two files for significant differences.

Library

FileRW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V DataLogPrms DataLoggingStruct Structure containing the parameters for recording the data.
VAR_INPUT Default
B Enable BOOL [[[Undefined variable Primary.ParameterDescription_Enablee]]] FALSE
V Channel1 LREAL The value of Channel 1 data to be recorded every scan. LREAL#0.0
V Channel2 LREAL The value of Channel 2 data to be recorded every scan. LREAL#0.0

Page 234 of 757


V Channel3 LREAL The value of Channel 3 data to be recorded every scan. LREAL#0.0
V Channel4 LREAL The value of Channel 4 data to be recorded every scan. LREAL#0.0
V Channel5 LREAL The value of Channel 5 data to be recorded every scan. LREAL#0.0
V Channel6 LREAL The value of Channel 6 data to be recorded every scan. LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to
provide Valid information. (No Error)
Busy will be high when recording data.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l Three function blocks work together in this solution: DataLogRecord, DataLogWrite, and DataLogCompare.
l Start and Stop the DataLogRecord function in conjunction with an event signifying when the data should be recorded.
This is intended to be a single event, not a series of intermittent events. At some time after DataLogRecord is Valid,
Execute the DataLogWrite function, typically in a slower task than DataLogRecord. Typical usage includes DataLo-
gRecord in a task as fast as the Mechatrolink rate if necessary, DataLogWrite in a 32 to 64 mSec task, and DataLo-
gCompare in a 32 to 64 mSec task.
l These functions use a double buffer technique, swapping from one to other. DataLogRecord accesses one buffer while
DataLogWrite accesses the other. The two activities should never interfere with each other, error will be generated if
there is a timing conflict when trying to switch buffers. If this occurs, it is possible that DataLogWrite must be
executed at a faster interval.
l The comparison algorithm first checks for a match within the offset specified. If the data does not match, then it will
check within the allowed percentage. If still a match cannot be determined, the process repeats by iterating through
the number of samples before and after the equivalent time sample. If a SampleDeviation of 20 is provided, the process
will check up to 20 samples before and 20 after the sample in question.

Error Description

See the Function Block ErrorID list.

Example:

Page 235 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DataLogWrite

This function block writes data recorded by DataLogRecord to a CSV file on the con-
troller.

Library

FileRW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V DataLogPrms DataLoggingStruct Structure containing the parameters for writing the data to a CSV file.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs FALSE
are read and the function is initiated. To modify an
input, change the value and re-trigger the execute
input.
V Abort BOOL Cancel writing data to the file. CommandAborted out- FALSE
put will be true once the function block successfully
aborts.
V FileName STRING The name of the file being written. Typically 'Refer- N/A
ence' or 'Comparison'. Cannot be left blank
V FileLocation FTB_FileLocation Denote whether to store the file in flash/user/data FTB_FileLoca-
(#Flash) or ramdisk/user/data (#Ram). Cannot be left tion#Ram
blank.
V Precision INT The number of decimal places to write (0 - 15). INT#0

Page 236 of 757


VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done output
will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
Busy will be high when writing data to the file.
E CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This
output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l Three function blocks work together in this solution: DataLogRecord, DataLogWrite, and DataLogCompare.
l Start and Stop the DataLogRecord function in conjunction with an event signifying when the data should be recorded.
This is intended to be a single event, not a series of intermittent events. At some time after DataLogRecord is Valid,
Execute the DataLogWrite function, typically in a slower task than DataLogRecord. Typical usage includes DataLo-
gRecord in a task as fast as the Mechatrolink rate if necessary, DataLogWrite in a 32 to 64 mSec task, and DataLo-
gCompare in a 32 to 64 mSec task.
l These functions use a double buffer technique, swapping from one to other. DataLogRecord accesses one buffer while
DataLogWrite accesses the other. The two activities should never interfere with each other, error will be generated if
there is a timing conflict when trying to switch buffers. If this occurs, it is possible that DataLogWrite must be
executed at a faster interval.
l The comparison algorithm first checks for a match within the offset specified. If the data does not match, then it will
check within the allowed percentage. If still a match cannot be determined, the process repeats by iterating through
the number of samples before and after the equivalent time sample. If a SampleDeviation of 20 is provided, the process
will check up to 20 samples before and 20 after the sample in question.

Error Description

See the Function Block ErrorID list.

Example:

Page 237 of 757


Toolbox Help Documentation
Help version created 7/23/2021

HC_ReadParameter

This Function Block is an extension of MC_ReadParameter from the PLCopenPlus_2_2a firmware library and reads con-
figuration specific parameters from the appropriate XML configuration file(s). See the table below for the parameters sup-
ported by this function.

Parameters
* Parameter Data Description
type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated.
To modify an input, change the value and re-
trigger the execute input.
B ParameterNumber UINT Hardware Configuration parameter number. UINT#0
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'

Page 238 of 757


or 'Enable' goes low.
B Value LREAL Value of the parameter.

Supported Parameters
Name Parameter R/W Default Min Max Comments
PositionScale 999 Write 1.0 1.0 1.0
External Encoder Res- 1047 Read/Write 1.0 10 16777216
olution
Load Type 1807 Read/Write 1.0 0 1 Rotary or lin-
ear
FeedConstant 1808 Read/Write 1.0 0.001 1000000000000
OutputRatio 1815 Read/Write 1.0 1 2147483647
MachineCycle 1833 Read/Write 1.0 0.001 1000000000000
InputRatio 1834 Read/Write 1.0 1 2147483647
User Units 1813 Read/Write 0.0 0 5 0=inches,
1=mm,
um=2,
3=pulses,
4=degrees,
5=revolutions

Notes
l This function block includes some very large datatypes. On the MP2600iec controller, the memory can be exceeded
when including this function. When using an MP2600iec, it may be required to edit the File R/W library's datatype file
by modifying the size of XMLLines: ARRAY[0..9999] OF STRING; to 0..500.
l Another recommendation when using this function is to reuse the same instance if several parameter reads are
required. This will save considerable memory, important for all controller platforms.
l Finally, consider executing this function in the DEFAULT task to avoid the risk of a PLC watchdog, or execute it in a
CYCLE task of 100 mSec.

Error Description
See the Function Block ErrorID list.

Related Function Blocks


HC_WriteParameter: Writes a Hardware Configuration parameter.

MC_WriteParameter: Writes an axis specific parameter available at run time.

Page 239 of 757


Toolbox Help Documentation
Help version created 7/23/2021

HC_WriteParameter

This Function Block is an extension of MC_WriteParameter from the PLCopenPlus_2_2a firmware library and writes con-
figuration specific parameters to the appropriate XML configuration file(s). See the table below for the parameters supported
by this function. Changes to parameters written by this function requires controller power cycle or reboot to take effect.

Parameters
* Parameter Data Description
type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated.
To modify an input, change the value and re-
trigger the execute input.
B ParameterNumber UINT Hardware Configuration parameter number. UINT#0
B Value LREAL Value of the parameter to be updated. LREAL#0.0
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Page 240 of 757


Supported Parameters
Name Parameter R/W Default Min Max Comments
PositionScale 999 Write 1.0 1.0 1.0
External Encoder Res- 1047 Read/Write 1.0 10 16777216
olution
Load Type 1807 Read/Write 1.0 0 1 Rotary or lin-
ear
FeedConstant 1808 Read/Write 1.0 0.001 1000000000000
OutputRatio 1815 Read/Write 1.0 1 2147483647
MachineCycle 1833 Read/Write 1.0 0.001 1000000000000
InputRatio 1834 Read/Write 1.0 1 2147483647
User Units 1813 Read/Write 0.0 0 5 0=inches,
1=mm,
um=2,
3=pulses,
4=degrees,
5=revolutions

Notes
l This function block includes some very large datatypes. On the MP2600iec controller, the memory can be exceeded
when including this function. When using an MP2600iec, it may be required to edit the File R/W library's datatype file
by modifying the size of XMLLines: ARRAY[0..9999] OF STRING; to 0..500.
l Another recommendation when using this function is to reuse the same instance if several parameter writes are
required. This will save considerable memory, important for all controller platforms.
l Finally, consider executing this function in the DEFAULT task to avoid the risk of a PLC watchdog, or execute it in a
CYCLE task of 100 mSec.

Error Description
See the Function Block ErrorID list.

Related Function Blocks


HC_ReadParameter: Reads a Hardware Configuration parameter.

MC_ReadParameter: Reads an axis specific parameter.

Example

Page 241 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Read_CSV_File

This function block will read CSV (ASCII) data from a file on the controllers flash or ram disk. The raw file data will be parsed
and copied into a user defined data structure. This function block requires customization to accommodate application specific
data requirements. Any variety of rows and columns and datatypes can be specified. Read_CSV_File must be customized to
accommodate the application specific data. See the example customization below.

Library
File RW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V Data MyDataStruct A user customized data structure containing the definition of the rows and columns of
data to be processed.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V FileName STRING The file to be read. Example STRING#'/- STRING#''
flash/user/data/mydata.csv'
V Separators SeparatorList Optional. If unconnected, the default separator is a comma Comma (BYTE#44)
(BYTE#44) to detect each value column by column. If a dif-
ferent or multiple characters must be treated as a value sep-
arator, populate the SeparatorList with up to four byte

Page 242 of 757


values equating to the ASCII value of the separators.
V HeaderRows UINT Optional. If connected, the value indicates the number of UINT#0
rows this function block must ignore before starting to look
for actual data.
V VerifyVersion BOOL Optional. If TRUE, this function block will expect the first FALSE
line of the file to contain a version code for identifying the
data format of the file, i.e columns, datatypes, etc.. This
allows for future changes to the MyDataStruct while retain-
ing the ability to parse older files created before a change
was made to the structure of the file.
V BufferSize UDINT Specifies the number of bytes in the file to process at one UDINT#2048
time. If unconnected, the default is 2048 bytes. BufferSize
can be adjusted up or down if necessary to accommodate
various file sizes and will depend upon the CYCLIC task in
which the Read_CSV_File function block is executed.
VAR_OUTPUT
E Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.
V ErrorRow INT If Error is true and pertains to a problem with the source data, this value will indicate
the location of processing when the error occurred.
V ErrorCol INT If Error is true and pertains to a problem with the source data, this value will indicate
the location of processing when the error occurred.

Notes
l Don't forget to include the ProConOS firmware library in the project. It is required for this function block.

l The filename must conform to 8.3 format, but is not case sensitive.

l Any separator can be specified provided it is an ASCII byte, and will not be confused with the actual data.

l Header rows are not required to contain the same number of separators as the data content. (Separators are not
checked in the header rows.)

Supports Carriage Return and Line Feed as end of line delimiters.

l It takes 6 scans per processing of each BufferSize of data. If a file has 20480 bytes, and the BufferSize is 2048, and
the function block is placed in a 100mSec scan, then the total time to process the file will be 60 scans, or 6 seconds.
(20480/2048 * 6 * 100) = 6000 mSec.

l See Yaskawa's Youtube Webinar - CSV File Transfer with the File_RW Template.

Error Description
See the Function Block ErrorID list.

Page 243 of 757


Example Customization
Read_CSV_File must be customized to accommodate the application specific data. Some supporting functions used by Read_
CSV_File (ReadBuffer and ReadValue) do not require customization and can remain in the File_RW_Toolbox. To effectively use
this function, follow these steps:

1) Copy & paste the MyDataStruct and associated datatypes into the main project, and rename them to avoid conflict with
MyDataStruct in the File_RW_Template.

2) Modify the "MyData" dataType definition shown above such that it represents the number of columns and the relevant data-
types. An example follows:

The 15 columns of data defined above relate to the data shown in the following Excel file. Notice that the data has three header
rows before the actual data begins. In this case, set the HeaderRows function block input correctly at UINT#3, otherwise, the
data will not be read properly.

Page 244 of 757


3) Initialize the data required for "MyDataStruct" as shown below. Most importantly, set Columns and MaxRecords.

4) Copy & paste the Read_CSV_File function block into the main project so it can be customized. This will allow you to retain
the original function in the template for future reference. Rename the function to avoid name conflict with Read_CSV_File in
the Toolbox.

Page 245 of 757


Customizing the code in the function block

5) To customize the function block, go to the variables grid and rename the datatype used as the VAR_IN_OUT to the datatype
you customized in step 2 above (Use the name as modified from ST code line 23 above).

6) Locate the comments near the middle of the Read_CSV_File function indicating the area to be customized. Modify the lines
that convert the STRING data from the file into the MyDataStruct structure.

Page 246 of 757


Customizing for file versioning

The function has the capability to read multiple versions of the same file. For example, assume that initially, the design
requires a data file to contain 4 columns of data to be used as INT. Later, after some machines are in the field, a design
change requires that the data file must now contain 5 columns of DINT. If a version code is applied as the first row, the func-
tion block can determine how to read the file for any number of variations. That may come later. This will allow the use of
older data files as well as newer formats.

Original file specification:

Modified file specification:

To use file versioning, follow the steps below:

Page 247 of 757


1. Set the VerifyVersion function block input to TRUE.

2. The first line of the data file must contain a version code. The version code does NOT count as a header row. See the
graphics above showing original and modified file specification

3. Customize the DataType to reflect the most current data specification.

Original DataType:

Modified DataType:

3) Customize the Read-CSV_File function block to determine if the version code detected is supported.

Original code:

Modified code:

4) Customize the Read_CSV_File function block to read multiple versions.

Original code:

Page 248 of 757


Modified code:

NOTE: The capability of the function block to read multiple file versions is limited by the changes that can be made to the
DataType Definition. It is not practical to use the version code to read completely different data formats. Make two copies of
the Read_CSV_File and customize accordingly.

Page 249 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadBuffer

This function block will read an ASCII value from the DataBuffer. It determines where to locate the value by referencing inform-
ation in the DataBuffer. It determines the end of a line by looking for a CR (BYTE#13) or LF (BYTE#10) or both.

Library
File RW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V DataBuffer ByteBufferStruct Structure containing a character buffer and other information for managing parsing
operations.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
V FileHandle UINT The FileHandle as output from the FILE_ UINT#0
OPEN function block from the ProConOS
firmware library. The file must be opened
before calling ReadBuffer.
V BufferSize UDINT Specify the portion of the file to read dur- UDINT#2048
ing each task interval.
VAR_OUTPUT
B Done BOOL Indicates that the function is operating normally and the outputs of the function are
valid.

Page 250 of 757


B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
V EOF BOOL EOF = End of File.

B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Error Description
See the Function Block ErrorID list.

Example
See the Read_CSV_File function block to learn more about how ReadBuffer can be utilized.

Page 251 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadLine

This function block will read an ASCII value from the DataBuffer. It determines where to locate the value by referencing inform-
ation in the DataBuffer. It determines the end of a line by looking for a CR (BYTE#13) or LF (BYTE#10) or both.

Library
File RW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V DataBuffer ByteBufferStruct Structure containing a character buffer and other information for managing parsing
operations.
V LineBuffer ByteBufferStruct Structure containing a character buffer and other information for managing parsing
operations. This is a subset of the data in DataBuffer; it will contain one line of data
based on the DataBuffer.CharPointer when the function is executed.
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high and
there are no errors.
VAR_OUTPUT
E Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V EOL BOOL EOL = End of Line. This bit will be set if one or both of the ASCII characters CR LF
(bytes 13 and 10 Hex) were found while searching for Separators.

Page 252 of 757


B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Error Description
See the Function Block ErrorID list.

Example
This ST code snippet assumes that the ReadBuffer function block was previously executed, which copied file contents into
DataBuffer.

Page 253 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadValue

This function block will read an ASCII value from the DataBuffer. It determines where to locate the value by referencing inform-
ation in the DataBuffer and the Separators VAR_INPUT.

Library
File RW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V DataBuffer ByteBufferStruct Structure containing a character buffer and other information for managing parsing
operations.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V Separators SeparatorList Optional. If unconnected, the default separator is a comma Comma
(BYTE#44) to detect each value column by column. If a different (BYTE#44)
or multiple characters must be treated as a value separator, pop-
ulate the SeparatorList with up to four byte values equating to the
ASCII separators.
V GCodeMode BOOL If set, it causes the function to interpret space characters or a UINT#0
change from numeric to alpha as a delimiter. For example, when
ReadValue is passed a DataBuffer containing "G1X10Y15" it will
return "G1" on the first call, "X10" on the second call, and "Y15"
on the third.

Page 254 of 757


VAR_OUTPUT
E Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V Value STRING The ASCII value copied from the DataBuffer.
V EOL BOOL EOL = End of Line. This bit will be set if one or both of the ASCII characters CR LF
(bytes 13 and 10 Hex) were found while searching for Separators.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes

Error Description
See the Function Block ErrorID list.

Example
This ST code snippet assumes that the ReadBuffer function block was previously executed, which copied file contents into
DataBuffer.

See the Read_CSV_File function block to learn more about how ReadBuffer can be utilized. In that function, "ReadVersion"
and "ReadColumn" are ReadValue function blocks.

Page 255 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Write_CSV_File

This function block will format and write a CSV (ASCII) file to the controllers flash or ram disk. The original data is a user spe-
cified structure. This function block requires customization to accommodate application specific data requirements. Any vari-
ety of rows and columns and datatypes can be customized. See the example customization below.

Library
File RW Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Data MyDataStruct A user customized data structure containing the information (possibly still in binary
format) to be written to a CSV file.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, this function block will prepare to FALSE
engage the RampIn cam profile at the master position spe-
cified in the BlendData structure.
V FileName BOOL The file to be written. Example: STRING#'ram- STRING#''
disk/user/data/mydata.csv'
V Append BOOL This flag indicates whether to delete an existing file and FALSE
create new data, or add to an existing file. If Append-
d=TRUE, data will be appended. Data.MaxRecords must be

Page 256 of 757


set by the user to indicate the number of rows in
MyDataStruct to append.
V Separator The byte value of the ASCII character to be used for sep- BYTE#44
BYTE arating values of data on a line. If unconnected, the
comma (BYTE#44) will be used.
V Version UDINT Optional. If used, this function block has the ability to be UDINT#0
customized to select between multiple output formats.
V BufferSize UDINT Specifies the number of bytes in the file to process at one UDINT#0
time. If unconnected, the default is 2048 bytes. BufferSize
can be adjusted up or down if necessary to accommodate
various file sizes and will depend upon the CYCLIC task in
which the Read_CSV_File function block is executed.
VAR_OUTPUT
B Done BOOL Set high when the axis or group is synchronized with the axis or group it is com-
manded to follow. Synchronized means that the two are position locked, any trans-
itional period required to achieve synchronization has been completed.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V ErrorRow If Error is true and pertains to a problem with the source data, this value will indicate
INT the location of processing when the error occurred.
V ErrorCol INT If Error is true and pertains to a problem with the source data, this value will indicate
the location of processing when the error occurred.

Notes
l Do not reference this function block from your project. Follow the customization examples below to make a renamed
copy of it and add it to your project.

l Don't forget to include the ProConOS firmware library in the project. It is required for this function block.

l It is strongly recommended to write files only to the Ramdisk portion of memory, not flash. Ramdisk is a temporary stor-
age location, so the file should be read by another device using an HTTP file get command.

l See Yaskawa's Youtube Webinar - CSV File Transfer with the File_RW Template.

Error Description
See the Function Block ErrorID list.

Customization Example 1
Write_CSV_File must be customized to accommodate your data. Some supporting functions used by Write_CSV_File
(ReadBuffer and ReadValue) do not require customization and can remain in the File_RW_Toolbox. Two locations requiring cus-
tomization are identified in the function block by several rows of comments indicating the need to customize. To effectively
use this function, follow these steps:

Page 257 of 757


1) Copy & paste the MyDataStruct and associated datatypes into your project, and rename them to avoid conflict with
MyDataStruct in the File_RW_Template.

2) Modify the "MyData" dataType definition shown above such that it represents the data to be written. An example follows
which shows a customized datatype:

3) Initialize the data required for "MyDataStruct" as shown below. Most importantly, set Columns and MaxRecords. MaxRe-
cords indicates how may lines of data are to be written to the file. In the case of Append mode =TRUE, set MaxRecords to the
number of lines from the MyDataStruct to be appended. Appending always starts from the first line (array element 0) of the
structure and adds data to the end of the file. It is not necessary to initialize (clear) the other data elements beyond MaxRe-
cords that may be from a previous use.

4) Copy & paste the Write_CSV_File function block into your main project so it can be customized. This will allow you to retain
the original function in the template for future reference. Rename the function to avoid name conflict with Write_CSV_File in
the Toolbox. To copy & paste the function block, open a second copy of MotionWorks IEC, and open the File_Read_Write tool-
box as a project. From the second MotionWorks IEC, copy & paste the function block into your project.

Page 258 of 757


Customizing the code in the function block

5) To customize the function block, go to the variables grid and rename the datatype used as the VAR_IN_OUT to the datatype
you customized in step 2 above (Use the name as modified from ST code line 23 above).

6) Locate the comments near the middle of the Write_CSV_File function indicating the area to be customized. Modify the lines
that convert binary data from the MyDataStruct structure to STRING data for the file.

Customizing for file versioning

The function has the capability to write multiple versions of the same structure. For example, a portion of the data from the
structure can be written to one file, and a different set of data can be written to another file.

To use file versioning, follow the steps below:

1) Set the 'Version' function block input to a unique value (Non zero).

2) Customize the DataType to reflect the most current data specification.

Original DataType:

Modified DataType:

3) Customize the Write_CSV_File function block to determine if a specific version if the file should be written.

Original code:

Page 259 of 757


Modified code:

4) Customize the Write_CSV_File function block to write multiple versions.

Original code:

Modified code:

Application Example
Set MyBuffer.MaxRecords to the number of items to be written to the file.

Page 260 of 757


Page 261 of 757
Group_Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with Group Toolbox

Group Toolbox is only supported on the MP3000iec series controllers.

Requirements for v372


Firmware version 3.7.1 or higher is strongly recommended.

To use the Group Toolbox, the main project must also contain the following:

Firmware libraries:

l YMotion
l YCoordinatedMotion
l PROCONOS
l Y_DeviceComm - if using Read_GCode_Stream, or GroupCommManager.

User libraries:

The following User Libraries must be listed above the Group Toolbox and in the following order:

It is strongly recommended to use the latest version of all supporting libraries, even though in some cases older versions are
acceptable.

l DataTypes_Toolbox
l Math_Toolbox
l Yaskawa Toolbox
l PLCopen_Toolbox
l PLCopenPart4
l FileRW Toolbox - if using G-Code function blocks.
l Comm Toolbox - if using Read_GCode_Stream or GroupCommManager.

Page 262 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Getting Started With G Code

Complete Solution: Yaskawa Compass


Additional resources and products are available from Yaskawa to make a complete G-Code solution.

1) Yaskawa Compass - Customizable CNC software interface. Part number PDE-U-GUICE

2) Compass Configuration and Customization Guide. Document number AN.MWIEC.06

3) Implementing an MPiec solution for G-Code Applications. Document number AN.MPIEC.27. The link includes a project tem-
plate.

The G-Code operation is divided into two main activities; data processing and motion processing.

Data Processing
This toolbox contains support for reading G-Codes in two different ways; use either the Read_GCode_File or Read_GCode_
Stream function blocks to prepare the data for motion on the mechanism. For the best performance, Yaskawa recommends
executing either of these functions in the DEFAULT task with its Watchdog disabled. See the examples in the function block
pages which demonstrate how to link the two activities (Data Processing and Motion Processing) together. The data link
between the data processing and motion is the MC_PATH_DATA_REF structure.

Data is managed in a circular buffer, meaning the path length can be virtually infinite. The default size of MC_PATH_DATA_REF
is 500 instructions. Contact Yaskawa for applications that may require a larger buffer.

Tool Compensation (G41, G42) is calculated in the data processing section. If a different tool is selected from a source other
than the G-Code data itself (some other PLC code writes to ToolStruct to change the tool), changes will not take effect until
Read_GCode_File or Read_GCode_Stream have processed the data again.

File Method:

G-Code data must be loaded onto the Flash or ramdisk file system of the MPiec controller. This can be accomplished using the
web sever, or if an automated method is required, files can be sent to the MPiec controller using the HTTP FILE POST method.
Click here for C Sharp application notes on www.yaskawa.com for transferring files. Please note that www.yaskawa.com
requires a login to access these documents. Writing files to flash is only recommended if the same part file will be used for an
extended period of time. (Frequent flash writes are not recommended.) Otherwise, consider writing files to ramdisk, or stream
the data via an Ethernet socket.

If the path is small such that the entire contents can fit into MC_PATH_DATA_REF at once, the Path can be re executed over
and over by re executing MC_MovePath. There is no need to re read the data with Read_GCode_File.

The following image is the MPiec controller's web interface showing the "/Flash/User/Data" directory.

Page 263 of 757


Streaming Method

This solution requires a PC application program such as Yaskawa Compass to communicate with the MPiec controller.

The Read_GCode_Stream function block will listen for data on the user specified port to receive the incoming byte stream of G-
Code instructions.

When using this method, the MPiec controller sends status information (StreamStruct) via UDP packets back to the PC applic-
ation at 50 mSec intervals. The packet contains position, buffer status data, and other info. Buffer status information is import-
ant for the PC application to throttle the G-Code stream effectively. The data buffers must not be overloaded nor should they be
starved. If the data stops and all motion becomes completed, MC_MovePath will remain Busy, waiting for new commands. This
is a possible under-run condition, or a normal pause between motion sequences that may be intended.

A DLL is available for use when creating a custom PC application. See AN.MPIEC.24 on www.yaskawa.com.

Motion Processing
The MC_MovePath function block executes all motion and other sequence related activities. It is typically executed in a rel-
atively fast task (~4 to 20 mSec), although this is only necessary if discrete input and output data must be read and set in a
critical time period. For applications which require smooth motion with many short segments, more than one motion instruc-
tion can be loaded into the firmware motion buffer during one IEC application task scan. See the MachineStruct for details on
configuring this feature.

Page 264 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Adding Custom G and M Codes

G and M codes not recognized by the G-Code solution from Yaskawa can be added to special function blocks in the User project
without modification to the Group Toolbox.

Overview

The overview graphic shows two halves of the G-Code solution divided into left (Processing) and right (Motion.) The colors
Red, Blue and Green depict data flow from G or M Codes to the MotionWorks IEC user application. There are two special func-
tion blocks required to customize the solution. Custom_Code_Processor and Custom_Code_Execute. The help for these blocks
contains detailed instructions for customization. A key point of this customization technique is the ability to add any data struc-
tures necessary to the Custom_Code_Execute function block as VAR EXTERNAL, which gives the solution the ability to link G-
Code instructions and parameters to application specific data which is unique to the equipment. See the examples included for
each of the Custom function blocks.

Customizable Features
l Read / Write values into the MachineStruct.
l Read / Write G-Code 'VarData.'
l Reference the InputFlags.
l Read / Write values into a user defined data structure.
l Wait for specific conditions to be met

Non Customizable Features


The customization solution described here was not intended to allow the user to add standard G codes involving motion which
are not already supported in the Toolbox. Contact Yaskawa Motion Application Engineering to discuss your application.

Page 265 of 757


Controlling Program Flow
Custom_Code_Execute has the ability to control processing based on logical conditions. A VAR_OUTPUT named 'OKToIn-
crement' is referenced by MC_MovePath after the call to Custom_Code_Execute to determine when it should advance to the
next Segment instruction. By default, OKToIncrement is TRUE, meaning the custom code will complete in one scan. See the
examples in Custom_Code_Execute for programmatically setting OKToIncrement.

Once the data is copied into the user defined data structure, the MotionWorks IEC application has full access to the data and
can be programmed to use the information with the relevant components, such as a SLIO remote I/O, LIO card, third party Eth-
ernet/IP device, etc.

Page 266 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Overriding G and M Codes

Overview
G-Codes supported by the Group Toolbox can be configured to pass execution of the command to user customizable code
rather than executing code prepared by Yaskawa for a particular feature. A very common override is the T command for a tool
changer. The build in T command simply assigns the new active tool number. If the machine requires the operation of a tool
changer, this motion logic must be created by the OEM.

Overrides are declared by editing the OverrideList function block. Once the Overrides are declared, the process of handling
overrides is nearly identical to the process of adding custom G and M codes. Two special function blocks are required to cus-
tomize the solution. Custom_Code_Processor and Custom_Code_Execute. The help for these blocks contains detailed instruc-
tions for customization. A key point of this customization technique is the ability to add any data structures necessary to the
Custom_Code_Execute function block as VAR EXTERNAL, which gives the solution the ability to link G-Code instructions and
parameters to application specific data which is unique to the equipment. See the examples included for each of the Custom
function blocks.

Customizable Features
l Read / Write values into the MachineStruct.
l Read / Write G-Code 'VarData.'
l Reference the InputFlags.
l Read / Write values into a user defined data structure.
l Wait for specific conditions to be met

Non Customizable Features


The customization solution described here was not intended to allow the user to add standard G codes involving motion which
are not already supported in the Toolbox. Contact Yaskawa Motion Application Engineering to discuss your application.

Controlling Program Flow


Custom_Code_Execute has the ability to control processing based on logical conditions. A VAR_OUTPUT named 'OKToIn-
crement' is referenced by MC_MovePath after the call to Custom_Code_Execute to determine when it should advance to the
next Segment instruction. By default, OKToIncrement is TRUE, meaning the custom code will complete in one scan. See the
examples in Custom_Code_Execute for programmatically setting OKToIncrement.

Once the data is copied into the user defined data structure, the MotionWorks IEC application has full access to the data and
can be programmed to use the information with the relevant components, such as a SLIO remote I/O, LIO card, third party Eth-
ernet/IP device, etc.

Page 267 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Getting Started with Pendant_Driver

Step 1: Configure the MPiec Controller as a Modbus TCP server


1) Go online with the Hardware Configuration and configure the MPiec controller as a Modbus slave (server). The pendant is
the Modbus master (client).

a) Check the box to use %M for bidirectional Holding Registers.

b) Select “Set all outputs off” when PLC stops. This is required for the safe operation of groups.

c) IO Task Assignment - Set the four server blocks to the task in which the pendant driver function block will run.

2) Save the configuration and cycle power on the MPiec controller.

3) Four Modbus groups will automatically be created in the Global variables worksheet upon saving. Create variables under
the FC16 and FC04 groups with the data types and addresses as shown in the figure below. The variable created in the FC16
group transmits data FROM the pendant TO the MPiec controller. The variable created in the FC04 group sends data FROM the
MPiec TO the pendant.

Note: The FS100 pendant with the Indusoft runtime uses a 7500 register offset from the base address for Holding Registers
and Input Registers. This is to minimize the chances that MotionWorks IEC projects using Modbus TCP for other functionality
in the 4x and 3x memory areas will not conflict with the pendant.

4) Add a variable of type UserApplicationData in the Global variables worksheet. This variable does not require an Address,
but set the 'retained' checkbox.

UserApplicationData can store 20 teach point lists with 50 points in each job, 24 part frames, 24 tools etc.

5) Add the Group_Toolbox to the project.

Page 268 of 757


6) When using a pendant to control a Mechatrolink group add the Y_GroupInputs function block from the
PLCopenPart4 library. Y_GroupInputs must be enabled and running for the Group to function.

The Y_GroupInputs block monitors machine safety flags like E-Stop, pendant liveman, guard circuit, safety circuit etc.
Yaskawa recommends that the user supplies these externally managed inputs to the function block such that these flags can
be referenced by various motion function blocks. The Y_GroupInputs function block does not play a part in satisfying the
safety requirements of the machine or group. If external safety devices are not used, the inputs can be left unconnected.

When using the pendant to control a remotely hosted group (MLX, DX, YRC, UC), add the MLX_Driver or MS_Driver
function block (from the relevant user library, see the PLCopenPlus function block help for details.

7)Add the Pendant_Driver function block to the main project. A 50 mSec CYCLIC task is recommended. Connect the variables
described in Steps 3 and 4.

8) When the Pendant_Driver block is enabled, it checks for a heartbeat signal from the pendant. If the heartbeat is updating,
the Valid output is set to TRUE.

9) The second check is to confirm the Group name entered on the pendant matches the Group name of AxesGroup connected
to the function block. If the Group name entered on the pendant matches the AxesGroup's configured name, the GroupSelec-
ted output will be set TRUE. This is the indication that the pendant is ready to operate the Group..

Page 269 of 757


10) To control another Group, use another instance of the Pendant_Driver. Change only the AxesGroup VAR_IN_OUT, the
other VAR_IN_OUT data must remain the same. The figure below illustrates how multiple Groups can be controlled from the
pendant.

Page 270 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Getting Started with Secondary Axes

If the group mechanism has a joint which is operated by two or more servos, they must have the exact same commanded pos-
ition before the group can be enabled using MC_GroupEnable.

Group Toolbox includes ReAlignPrimeAxes and GroupReAlignPrimeAxes function blocks which make enabling a group with sec-
ondary axes easier. Functions such as GroupCommManager, Pendant_Driver and GroupToHome execute those function blocks
if necessary to re-align the axes prior to executing MC_GroupEnable. This will prevent error 8966 from occurring.

For the alignment procedure to complete successfully, a Prime Axes Allowance must be specified. There are several ways in
which the functions in Group Toolbox can be applied; the following graphics explain each usage scenario and indicate the
required initialization.

Using GroupCommManager and a PC application / GroupComm.DLL


When executing GroupToHome via the Home Method.

Page 271 of 757


Same when executing Y_GroupPower and MC_GroupEnable via the ServoPowerAll Method.

When using the GroupToHome function block in the MotionWorks IEC pro-
ject directly
(Without using GroupComm.DLL or a Pendant)

Page 272 of 757


When using the GroupReAlignPrimeAxes function block in the MotionWorks
IEC project directly
(Without using GroupComm.DLL or a Pendant)

You must provide a value which represents the maximum safe expected motion the mechanism can tolerate.
The presumption is that the mechanism has previously been physically aligned and all motors operating the
joint have been set to the same position using MC_SetPosition. GroupReAlignPrimeAxes is only intended to per-
form small realignment motion to account for small position changes that may occur when the system is
powered off.

For example, a mechanism has two motors without brakes operating the Z axis. The mechanical rigidity of the system is not
perfect which allows both sides of the axis to settle due to gravity by differing amounts. In this example, assume that the axes
fell out of alignment by approximately 6 user units. In this situation, setting User-
ApplicationData.PrimeAlignment.Tolerance:=LREAL#10.0 will permit the GroupReAlignPrimeAxes function block to move the Z
prime axis to the same commanded position as the main Z axis. If the initial commanded positions differ by more than 10 user
units, error 10138 will be generated. Determine why the axes are so far out of alignment.

It is unsafe to set the PrimeAlignment variable to an arbitrarily large value to get around the ErrorID 10138.
If the commanded positions of each motor differ by an unexpected, significant amount (such as during com-
missioning or after an absolute encoder battery failure), mechanical damage could occur while the axes are
attempting to realign themselves to a mechanically impossible position. Instead, check the system, re-align
the servos and reset the Positions if necessary.

If the group does not contain joints with prime axes, the PrimeAxesTolerance parameter will never be referenced, and no pre-
alignment motion will be attempted.

Page 273 of 757


Toolbox Help Documentation
Help version created 7/23/2021

G-Code Emulation Modes

The default is no emulation mode selected (MyMachine.Emulation:=GTB_Emulation#na). Only a single mode can be selected.
Emulation modes alter the behavior of G-Code solution in the following ways:

Mode1

Feature Behavior

Interpret E register as positive values for acceleration and negative values for decel-
E Register
eration in units/sec2 .

F Register Velocity is units/sec rather than units/min.

Mode2

Feature Behavior

Feedrates for XY, Z, and rotational motion can be specified separately using axes letters as para-
meters. For example:

F 300 XY

F 50 Z
F
Feedrates will be checked such that the limit for a each axis is not exceeded. For example if the Z
feedrate has been set at 50 units/min, and a command such as G1 X40 Y200 Z12 F600 is
executed, the overall velocity of the command may be reduced to less than 600 if the Z component
of the move would require it to exceed 50.

G0 Rapid moves unaffected by Feedrate Override.

If executed by itself, clears all MachineData.LocalZeroOffset[] to zero.


G92
If Axes registers are provided, sets the new LocalZeroOffset for the specified axes.

G53 If executed by with no axes specified, the Z axis will be moved to MachineData.Origin[3].

Home Preset commands can be used with G1. For example G1 H#3 will move the
H
machine to the pre determined location identified as Home #3.

L30 / L31 Commands are recognized and support Tangent mode. See G-Code Support.

Additional spindles can be controlled using the parameter suffix M3.1 or M3.2 and like-
M3 / M4 / M5
wise for the spindle reverse and stop command.

Page 274 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Group Toolbox Revision History

Current Version:
2020-07-19 v372 released. fw 3.7.1 or higher recommended

New Features, Improvements:

1) G-Code - GCode_Procesor, Provide constant acceleration for feedrate overrides with a responsiveness of approximately 500
msec. DCR 5328.

2) SyncGroupToGroup / Pendant_Driver FBs - Report SecondaryGroup Power/ Enable status when secondary group is con-
figured in PendantData for better reflection of true machine state at the GUI level. DCR 6467.

3) Add Feature select bits as DWORD to MachineStruct. This allows for turning on/off various things such as constant accel
feedrate override. DCR 5178.

4) G-Code - Added support for G73 and G83 - chip break drilling cycle. DCR 5398.

5) G-Code - Added support for G80 - Cancel modal motion. DCR 1096.

6) Add provision to change an Overridden G-Code command's PostGCode STRING upon completion of the override. DCR 5568.

Changes:

1) G-Code - G0 rapid, if "F" is supplied, use the feedrate provided instead of MachineData.MaxDirectVelocity. DCR 5029.

2) G-Code - Change M104/M109 to not change the selected extruder. DCR 5111.

3) CustomTCPInWIndow FB - Change 'Tolerance' from REAL to LREAL. DCR 5116.

4) Tool Length compensation (G43) not to be applied until next Z command is included in G-Code. DCR 5698.

5) L30 Tangent - Segregate use of PathData.Colinearity and MachineData.Tangent.MaxAngle. DCR 5584.

6) Don't set Spindle directions to 0 (off) when in MDI (M30 is auto appended, which shuts off spindles). DCR 5531.

Bug Fixes:

1) Pendant_Driver jogging did not use UserData.Config.JogSpeed.Orientation when jogging Rx, Ry, Rz. DCR 5408.

2) Lookahead FB - Change var 'ContiguousMotionSegments' from UINT to UDINT to prevent failure when there are more than
65536 contiguous segments. DCR 5395.

3) Lookahead FB - Fix treatment of long segments when not using application layer feedrate override. DCR 5327.

4) Custom_Code_Execute FB -added an iActive bit so that it can be busy with Enable false.

5) G-Code - G02 Arc went counterclockwise when an arc greater than 180 degrees was specified. DCR 5268.

6) G-Code - Use of registers A B C is now OK when used with a G92 command even if not a -ER controller. DCR 5264.

(7) G-Code - Motion (G1 / G2 / G3) intermixed with custom or overrides was not taking the user setting 'ExactStopCheck-
k=FALSE' to provide custom codes synced with path motion. DCR 5256.

8) GroupStatus FB - Changed to NOT report ServoPack warnings as alarms. DCR 5224.

9) Compass Terminal MDI - G92 E0 followed by a G1 E move gives ExtruderOffsetInvalid. DCR 5211.

10) G-Code - Tangent disable G79 and L31 get stuck (tangent axis stuck in Stopping state). This was actually due to a firm-
ware bug introduced in v3.7.0. A workaround solution was applied in this Toolbox as well. DCR 5131.

Page 275 of 757


11) MC_MovePath - Was throwing Error 8999 after changing Y_GroupSetFrameOffset to use Queued mode. Fixed in
PLCopenPart4 library. DCR 5102.

12) G-Code Variables did not work with S Register. DCR 5011.

13) G-Code - Home Presets (G0 H3) not executing full sequence specification. DCR 4980.

14) ReadJointMap FB - Sometimes reported 10126 (no data) ErrorID after successfully reading XML file. DCR 4216.

15) Lookahead not considering arcs which would exceed centripetal acceleration. DCR 5709.

16) When changing from MCS to PCS or vice versa, update PreviousMotion position to be representative of new Coordinate Sys-
tem. DCR 5704.

17) DetermineFeedrate RotationalOnly move feedrate is not always correct. DCR 5607.

18) G92 E0 commands following a Tool change command (with tool offsets) sets local zero offset on non-specified axis. DCR
5602.

19) Compass may not handle conditional M30 before or at the end of file. DCR 5536.

Previous Versions:
2020-11-30 v371 released. fw 3.7.1 or higher recommended

New Features, Improvements:

1) G-Code - Add support for M82 / M83 command - Extruder Only Absolute / Relative Mode. DCR 3254.

2) Add Separate jog speed Z vs. XY as part of Pendant_Driver FB / Compass solution. DCR 3808.

3) G-Code - Add support for G1 H3 (Home Presets) under Mode 2 emulation. DCR 4020.

4) Pendant_Driver / Compass - allow jog keys to jog more than one axis simultaneously. DCR 4067.

5) G-Code - Added support for 'Set Chamber / Enclosure Temperature' codes M141 / M191. DCR 4153.

6) G-Code Processor - Implement Lookahead algorithm that integrates with StreamParser function block. DCR 4361.

7) MachineType = 3D printer can use separate Z velocities when MachineData.Emulation is set to Mode2 emulation. DCR 4388.

8) Pendant_Driver / Compass solution - added option to suppress soft overtravel alarms when jogging. DCR 4486.

9) G-Code - Added support for multiple spindles via M143 / M144 / M145 / M153 / M154 / M155. M3.1/ M5.1 DCR 4633.

10) GroupReAlignPrime Axes FB - Increased support for Multiple prime axes to 6. DCR 4701.

11) PendantData structure - Added status bits to indicate software limits exceeded. DCR 4721.

Changes:

12) Custom_Code_Processor stub FB - Added PrmSuffix as VAR_INPUT. Existing implementations of this function block must
add the new VAR_INPUT to the main project. DCR 4230.

Bug Fixes:

13) G-Code spindle - Make spindle speed go to zero when Feed Hold, system now waits for spindle to resume previous speed
before continuing path. DCR 4277.

14) G-Code - Local zero offsets were not accounting for PCS offsets when using G92 command. DCR 4366.

15) G-Code - T commands could cause CPU exception (invalid array index) if Tool number is out of bounds of the ToolData.Tool
array. DCR 4374.

16) CheckColinearity FB - was errantly assuming Colinearity if the previous segment had ExactStopCheck flag set. DCR 4512.

17) G-Code spindle - If Spindle was on before a Feed Hold, and part canceled during hold, previous spindle speed must be
cleared. DCR 4513.

18) MC_MovePath FB - Velocity & Accel were not limit checked properly - need to consider the feedrate override scaler in
effect. DCR 4518.

Page 276 of 757


19) G92 command was not working properly with G-Code Variables. DCR 4666.

20) MC_MovePath - G92 / set PCS / Segment type 17 was not working with MotomanSync groups. DCR 4746.

21) G-Code - Tool height offsets compounded if commands issued with no Z element. DCR 4781.

22) Calc3DCenter had divide by zero issues. DCR 4787.

23) Tool Height offsets were not being properly displayed, retained. DCR 4853.

24) Compass - Extruder positions were not updated until MC_MovePath has been executed. DCR 4681.

25) StramPaser FB - Initialize DataBuffer.BufferRead on FB startup to prevent G-Code lines with multiple bad commands from
causing additional errors. DCR 4925.

26) G0 commands now set to explicitly stop at the end of each segment, there were cases where blending G0 commands may
have been applied.

2020-05-03 v370 released. fw 3.7.0 or higher recommended

New Features, Improvements:

1) GridLookup FB - New function block added. DCR 1729.

2) GroupToHome - More efficient / faster by using previously populated JointMap as VAR_IN_OUT. DCR 1914.

3) GroupComm support for PLCi communication mode for Compass Software. DCR 2977.

4) G-Code - Support M190. (Wait for bed temperature to reach target temp.) DCR 2290.

5) PendantDriver did not respond to servo power toggle unless in manual mode. Now OK in Auto or manual when used with
Compass. DCR 2372.

6) PendantDriver / TeachPendant - Added ability for user customizable acceleration rates for jogging. DCR 2472.

7) PlaneMeasurement/GridMeasurement - Change the point from where the offsets are normalized. DCR 2692.

8) G-Code - Added recognition of % character for start of G Code file comment. DCR 2715.

9) MC_MovePath - Limit check velocities and accelerations differently when a MotomanSync robot is used. DCR 2739.

10) 3D-Printing - Extruder Jog now possible when set as an auxiliary axis in the group config. DCR 2901.

11) PlaneMeasurement/GridMeasurement - Added Analog measurement method. DCR 2960.

12) GridMeasurement - Changed path from "scanning" to "zig zag" to save time. DCR 2976.

13) PendantDriver - Now supports incremental jogging. DCR 3063.

14) HomeToSurface - New function block created. DCR 3086.

15) MC_MovePath - Allow infinite repeat mode when streaming. DCR 3104.

16) G-Code - Support separate feedrates for XY and Z. DCR 3181.

17) G-Code - Support Local Zeros (LZ) via G92. DCR 3186.

18) G-Code - CalcToolComp (G41, G42) reduction in Tolerance strictness. DCR 3256.

19) G-Code - Add support for more than one spindle in MachineStruct. DCR 3261.

20) G-Code - Add support for configuration of G-Code overrides (Macros). DCR 3262.

21) GridControl - Implement new function block to consolidate GridLookup and SyncGroupToGroup. DCR 3273

22) Pendant_Driver - Turn servos off when heartbeat with host is lost. DCR 3410.

23) MC_MovePath - Auto set Colinearity parameter 2111 to 10.0 degrees if left at firmware default. DCR 3414.

24) GroupToHome - Improve logic to handle servos being shut off in the middle of homing. DCR 3455.

25) GroupToHome - Added support for CommandAborted output. DCR 3460.

26) G-Code - Add support for G43, G44, G49 for Tool Length Offset. DCR 3478.

27) Pendant_Driver - If no name is specified for Tool File, User Frame or Teach Point List file, use a default name. DCR 3484

28) Pendant_Driver - (Compass) Reset Feed Hold when TriggerReset (Reset) is pressed. DCR 3500.

Page 277 of 757


29) Pendant_Driver / GroupCommManager - Improve servo off state logic to ensure MC_GroupDisable succeeds (to suc-
cessfully clear 8966 alarm). DCR 3507.

30) Improve G0 usage of DirectAccel / Decel. DCR 3573.

31) GroupReAlignPrimeAxes - Improve support for multi (3) prime joints. DCR 3585.

32) G-Code - Repurpose items in PathStatusStruct to provide GUI with byte offsets for Errors from Processing and MC_
MovePath. DCR 3586.

33) G-Code - Provided way to run G-Code commands (coming from Compass buttons) while in manual mode. DCR 3587.

34) ReadJointMap FB - Increase performance to execute in very fast task w/o causing watchdog. DCR 3631.

35) G-Code - Allow G92 offsets for all axes (Previously only E axis for 3D printer extruder allowed). DCR 3640.

36) G-Code - Added support for inclusion of additional G-Codes before and after a G-Code override is executed. DCR 3663.

37) G-Code - Added support for Tangent knife operation under emulation mode2. DCR 3668.

39) Add support for Mode2 B feedrate for rotational axes. DCR 3867.

Changes:

40) G-Code - Support G53 as described by the G-Code standard. DCR 3260.

41) 3D Printing - Added Definition for number of configured temp sensors to PrinterStruct. DCR 3420.

42) Pendant_Driver / GroupCommManager - Clearing alarms from Compass should be allowed in Auto/Manual/MDI.DCR 3512.

43) G-Code - No longer initialize G-Code registers (GCodeData strcuture) when Read_GCode_Stream / Read_GCodeFile starts
up or when ClearBuffer. DCR 3571.

44) Revert GetGroupDOF FB to rely on AxesGroup info for MotomanSync groups - (SCR 12547 is completed). DCR 3604.

Bug Fixes:

45) M30 failed to stop MC_MovePath from processing additional segments when there were motion segments in the firmware
buffer. DCR 2807.

46) G-Code - Support multiple actionable G-Code segments on a single line. DCR 2489.

47) PlaneMeasurement: Rotational axes spin back to zero (often causing overspeed) when block is executed. DCR 1787.

48) MC_MovePath - Velocity spike if ExactStopCheck = FALSE for segment before StandStill segment. DCR 2124.

49) G-Code - Fixed multiple issues with G28. DCR 2260.

50) G-Code - MachineData.Printer.ActiveExtruder did not indicate which extruder is Active. DCR 2292.

51) G-Code - Machinedata.Spindle.RPM did not get updated every time the 'S' G-Code parameter was issued. DCR 2327.

52) ReadJointMap - Information was incorrect if more than one Mechatrolink group was configured. DCR 2500.

53) 3D Printing - The velocity should not change if a M104 or M106 command is executed in the middle of motion commands.
DCR 2557.

54) G-Code - Fix Custom Code execution / path incrementation for scenario like [motion motion motion custom dwell other].
DCR 2688.

55) 3D Printing - Fix Extruder printer extruder offsets so as not to repeatedly add an offset for unspecified axes. DCR 2694.

56) MC_MovePath / LoadPositions FB - UnconfiguredExtruderError caught, but not preventing an array index out of bounds
crash. DCR 2781.

57) MC_MovePath - Spindle had potential for divide by zero exception. DCR 2971.

58) MC_MovePath - Make Spindle commands M3 M4 M5 G97 sync with other motion. DCR 2981.

59) 3D Printing - M140 now synced with motion. DCR 3055.

60) MC_MovePath - InputFlagsRequired was not getting reset after abort/done/error. DCR 3095.

61) Pendant_Driver - ReadPartFrameFile function block only worked once. DCR 3228.

62) GroupStatus - Now EXITs if MC_ReadAxisError is ever Busy to avoid watchdog. DCR 3253.

Page 278 of 757


63) G-Code - CalcToolComp not propagating Errors to user level. DCR 3258.

64) Read_GCode_Stream / Read_GCode_File - ErrorRow output was off by one depending on when Error occured. DCR 3266.

65) G-Code - G2 and G3 commands switching between R and IJK mode not using IJK parameters. DCR 3304.

66) Pendant_Driver - Errors when setting a tool not being caught in error handling. DCR 3322.

67) MC_MovePath - Tangent Axis Pre-alignment Velocity was referencing Rotational Acceleration instead of Velocity. DCR 3569.

68) GroupControl FB / MC_GroupReset was unable to clear group alarms while AxesGroup.Status.Active = TRUE. DCR 3602.

69) 3D Printing / MC_MovePath - Fixed infinite velocity error 8978 when executing a Tool Change. DCR 3653.

70) MC_MovePath / MotomanSync - Motion sequencing froze when also using conveyor tracking. DCR 3665.

71) Support G00 / G01 with no axes as just a mode setting, no motion should occur. DCR 3832.

New Features, Improvements

1) Updated StreamStatus struct and GCodeComm DLL to structure version 20190127. When using Group Toolbox v352 with
GCodeComm.DLL, version 3.4.2.0 of the DLL is required.

2) Updated MachineStruct to new structure version 0120190110.When using Group Toolbox v352 with GroupComm.DLL, ver-
sion 1.0.3.1 of the DLL is required.

3) ExternalExtruderControl - New function block added for controlling an extruder mounted to a MotomanSync robot. DCR
2614.

4) Custom_Code_Processor and Custom_Code_Execute - New function blocks created for custom G & M Codes as user cus-
tomizable FBs. DCR 2073.

5) Custom_Code_Execute - Provide mechanism for custom G & M codes to select execution synchronized with motion that does
not stop. DCR 2355.

6) Support unique Transition modes for each segment rather than just a single setting from MachineStruct.Prms. DCR 2026.

7) GetGroupDOF - Updated FB to support auxiliary axes (support coming in MotionWorks IEC 3.6) DCR 2198.

8) G Code - Improved validation for numeric parameters, and allow special cases like #var assignments to pass. DCR 2243.

9) G Code - Add Special SegmentType for G10 - to change Work Coordinate System Offset. DCR 2247.

10) PendantDriver - Changed to execute MC_GroupDisable when the PowerStateReq request is FALSE. DCR 2255.

12) G Code - M2 / M30 End of Program commands - If more than one, first one encountered in program flow prevails. DCR
2268.

12) MC_MovePath - Added SegmentType to indicate the end of the sequence. DCR 2271. Related to DCR 2268.

13) MC_MovePath - Improve determination of positions to apply that were not specified in the Segment data. DCR 2273.

14) G Code - Refactor Extruder position management. DCR 2381.

15) G Code - Add support for M0 and M1. DCR 2331.

16) PathStruct.InUse flag - Improvement for CNCWorks Cancel behavior. DCR 2341.

17) G Code -Added support for Block Skip Mode. DCR 2181.

18) Support 6 axis 3D printer plus three extruders. DCR 2113.

19) MachineStruct to GroupComm DLL - changed MachineData.Torque[] to report all axes torque including prime axes.
(Change MCS labeling.) DCR 2448.

20) StreamStatus to GCodeComm DLL - Added ToGoDistance fields to the StreamStatus structure for use by GUI applications.
DCR 2450. Requires GroupComm DLL version 1.0.3.1.

21) StreamStatus to GCodeComm DLL - Added G and M code Active code status for each G and M code as published in the CNC
Programmer Handbook.

22) GetTorques - New function block added to read the actual torque for all axes in a group including secondary axes.
DCR 2494.

Page 279 of 757


Changes

23) Pendant_Driver - MC_GroupSetOverride should only be effective in auto mode. DCR 2217.

24) Use MachineData.Prms.MaxDirectVelocity when G0 move specified. DCR 2225.

25) Read_GCode_Stream no longer sets the Error / ErrorID outputs for unrecognized commands, but still requires
'ClearBuffer' to acknowledge and reset. This improvement means the connection is no longer shut down for bad commands.
DCR 2934.

26) MachineStruct.Printer.Extruder[] - Changed MinTargetTemp to TempTolerance so M109 can support waiting for tem-
perature decrease.

Bug Fixes

27) Variable assignment to registers should be persistent for future blocks / Segments until a constant is given again. DCR
1469.

28) G10 should only update offsets in MachineStruct, G54 ~ 59 actually applies specified offsets. DCR 1604.

29) PlaneMeasurement/GridMeasurement: Checking for ToleranceTooWideError was broken since change of TouchDirection
definition. DCR 1835.

30) MC_MovePath - Reporting error 10623 incorrectly when OperationMode = GT_OperationMode#InfiniteRepeat. DCR 2066.

31) MC_MovePath - If VelocityScaler input = 0, first segment was still executed before Error output. DCR 2115.

32) MC_MovePath - StandStill segments are not counted in ExecutedTotal/ProcessedTotal. DCR 2117.

33) GroupReAlignPrimeAxes - Improved for multiple sets of prime axes in a group. DCR 2161.

34) MC_MovePath - Fix Rotational Move acc/decel limit to properly limit to MyMachine.Prms.MaxRotationalAcceleration. DCR
2162.

35) MC_MovePath - Improved update of ProcesedTotal and ExecutedTotal outputs for non motion segments. DCR 2183.

36) G Code Processing - Expression evaluator not accepting decimal point or the negative of another variable in a variable
assignment. DCR 2185.

37) GetDOFIndex - Rectify issue with GroupToHome / GetDOFIndex. (wrong implementation to find axes in AxesGroup.) DCR
2215.

38) Machine_Driver - Not propagating Errors to be caught by Pendant_Driver / GroupCommDLL. When invoked via
GroupComm DLL, GroupToHome could silently Error. DCR 2216.

39) G Code - Feedrate for Rotational moves must not have ScaleFactor applied. DCR 2223.

40) G Code - IF statements with equal to condition incorrectly sets variable equal to the value being checked. DCR 2224.

41) MC_MovePath - Limit check feedrate based on move type (linear, Rotary, direct) DCR 2226.

42) G Code - Add GCode ModalMode for motion type (G 0,1,2,3)

43) G Code - G4 with X parameter sets SegmentType 1 (linear move) instead of a dwell. DCR 2259.

44) G Code - Improve IF logic to throw error if jump-to line number not found. DCR 2272.

45) G Code - M109 is not updating specified minimum temperature. DCR 2291.

46) MachineData.Printer.ActiveExtruder did not indicate which extruder is running. DCR 2292.

47) MC_MovePath - Velocity limit checking must take into account the current MC_GroupSetOverride. DCR 2324.

48) G Code - Dont increment PathData.Buffer.StorePointer if there was an Error in the PathStruct Update code. DCR 2348.

49) G Code - CNCWorks MDI mode causes re execution of all segments in PathData each time MDI command is sent. DCR 2365.

50) MC_MovePath - Output labels / ExectutedTotals incorrect in SingleStep mode for non motion segments. DCR 2417.

51) GroupControl - Changed so GroupStatus output does not flicker. DCR 2077.

52) MC_MovePath - Force a delay when setting OutputFlags if SegmentType is a motion type but Group Prm 2201 reports 0.
Maybe motion not started yet, especially for MotoManSync groups. DCR 2080.

53) G Code Processor / Tool Compensation - code refactoring for the v340 release broke Tool Compensation. DCR 2118.

54) MC_Movepath - SetTangent SegmentType not setting Acceleration and Velocity.DCR 2126.

Page 280 of 757


55) Read_GCode_File - Did not properly shut down GCode_Processor if there was an error, next Execute falsely showed linger-
ing Error. DCR2182.

56) GroupCommManager / Pendant_Driver -Servo power could not be toggled in some cases after a communication loss and
recovery. DCR 2372.

57) MC_MovePath - In ExecutionMode=SingleStep, Output Labels / ExecutedTotals were not accurate for non motion seg-
ments. DCR 2417.

58) Read_GCode_File / Read_GCode_Stream - improved checking of string lengths to avoid causing "Error on String Con-
version" Error. DCR 2455

59) Pendant_Driver - change behavior so servos for Mechatrolink group disable if there is a Comm watchdog Error. DCR 2616.

2018-08-07 v350 released. fw 3.4.0 or higher required.

New Features, Improvements

1) GroupCommManager - New function block added to support GroupComm.DLL and CNCWorks PC application.

2) Merged Pendant Toolbox into Group Toolbox, first official release of Pendant features. DCR 1570.

3) 3D Printing - Added support for Extruder scaling. DCR 1497.

4) 3D Printing - Added support for multiple extruder temperatures. DCR 1508.

5) 3D Printing - Added support for M106 processing - FanSpeed. DCR 1538.

6) 3D Printing - Added support for multiple filament / pellet extruders. DCR 1704.

7) 3D Printing - Added support for M109: Set Extruder Temperature and Wait.

8) MC_PATH_DATA_REF - Added support for stream byte offset referencing. DCR 1299.

9) Read_GCode_Stream - Allow Errors to be reset without dropping socket connection. DCR 1464. DCR 2394.

10) G Code parsing - Added support for G93 - Inverse Time mode. DCR 1609.

11) Pendant Driver - Using Memory map version 3.5.0.7. DCR 1631 / 1953.

12) Pendant Driver - Added support for MC_GroupSetOverride. DCR 1429.

13) Pendant_Driver - 'TriggerReset' bit now clears controller, group, and axes alarms if present. DCR 1750.

14) Machine_Driver FB - Added support for Group_To_Home FB via Memory Map interface. DCR 1448.

15) GetGroupNames - New function blocked. DCR 1386.

16) GridMeasurement - New Function block added. DCR 1728.

17) GridLookup - New Function block added. DCR 1729.

18) WriteGridFile & ReadGridFile - New Function blocks added. DCR 1745.

19) MachineStruct - XYZ extruder offsets Added. DCR 1752.

20) Added support for G Codes G28, M82 and M84. DCR 1779.

21) Provide method to specify PrimeAllowance for the GroupReAlignPrimeAxes FB inside Pendant_Driver. DCR 1807.

22) GroupReAlignPrimeAxes - more efficient / faster, now uses previously populated JointMap as VAR_IN_OUT. DCR 1908.

Changes:

23) Repurposed *.JOB file output to *.TPL (Teach Point List) DCR 1419.

24) Pendant_Driver - Refactored VAR_IN_OUTs 4 separate structures into one structure (PendantData) DCR 1478.

25) Refactored DetectPrimeAxes FB -> GetPrimeAxesRef FB. DCR 1515.

26) PlaneMeassurement - Output changed to provide MC_CARTESIAN_REF for use with Y_GroupSetFrameOffset. DCR 1873.

27) GroupReAlignPrimesAxes and AlignPrimeAxes renamed to GroupReAlignPrimes etc. in prep for future function. DCR 2034
*)

Page 281 of 757


Bug Fixes

28) MC_MovePath - Improved JoinMode / PathMode determination for first segment. DCR 1205.

29) MC_MovePath - Improved determination of RotationalOnly Motion for specific CoordinateSystem. DCR 1273.

30) MC_MovePath - MC_MovePath.Abort was causing group to get stuck in Stopping state. DCR 1461.

31) Fixed G Code variable support for Feedrate to apply conversion from per/in to per/sec and scalefactor. DCR 1484.

32) G Code parsing - (CheckColinearity FB) - TangentAngle should never be negative. DCR 1485.

33) Improved CheckColinearity FB to also check for Rotational combinations that would cause blend Errors. DCR 1506.

34) G Code parsing - Fix reporting of FileByteOffset to support resuming jobs in progress. DCR 1545.

35) G Code parsing - G10 should only update offsets in MachineStruct, G54 ~ 59 should only apply specified offsets.

36) Pendant Driver - Fix reading of group name, use ChangeCase and GetGroupName. DCR 1727.

37) MC_MovePath - Rotational velocity was only taken from MachineStruct, ignoring Pathstruct.Segment.Feedrate. DCR 1770.

38) GroupReAlignPrimeAxes - Improved for groups with multiple sets of joints with prime servos. DCR 1793.

39) MC_MovePath - Improved synchronization of outputs to queued motion segments. DCR 1926.

2017-12-07 v340 released. firmware 3.4.0 or higher required.

New Features and Improvements:

1) AlignPrimeAxis - New function block added. DCR 1053.

2) PlaneMeasurement - New function block added. DCR 1103.

3) GroupToHome - New function block added. DCR 1234.

4) MachineStruct - Added .MachineType to select milling, lathe, printer modes.

5) GroupControl - Added ability to execute MC_Reset on all axes configured in Group. DCR 1080 / 1090.

6) MC_MovePath - Improved handling of non colinear segments to avoid ErorrID 9000,9001,9002,9003. DCR 1012

7) MC_MovePath - Improved Segment tracking so path outputs can be operated accurately. DCR 1083.

8) Read_GCode_File - Added Abort input to cancel reading a file. DCR 1093.

9) Support G Code variables - DCR 1095.

10) Read_GCode_File - Improve scan time stability. Improvements to minimize scan time spikes caused when the function pro-
cesses bytes into the PathStruct. DCR 1222.

11) MachineStruct.EmulationMode - Support for alternate way of setting vel and accel in units/sec.

12) MC_PATH_DATA_REF.StreamStatus - Added support for byte offset referencing for G Code so host can determine the live
motion segment. DCR 1224.

13) Read_GCode_Stream - Expose ErrorRow and ErrorString as VAR_OUTPUT. DCR 1208.

14) MachineStruct - Added MaxAcceleration and MaxDeceleration. DCR 1239.

15) G-Code - Added support for mathematical expressions and subprograms. DCR 1240.

Changes:

16) MC_MovePath - Some Outputs changed for clarity. Now label and segment are identified as 'Processed' and 'Executed'.
DCR 1092.

17) MC_MovePath - changed VAR_INPUT VelocityOverride to VelocityScaler to differentiate from new MC_GroupSetOverride
released in firmware v3.4.0. DCR 1238.

Bug Fixes:

Page 282 of 757


18) MC_MovePath - Fix bug with total motion block count. Sometimes the value would go negative. DCR 1094.

19) G-Code processing - Bug fix in ColinearityCheck for Line to Arc, Arc to Line cases. DCR 1283.

20) G-Code - Processing of I,J,K registers for circle definition was not being properly scaled if required. DCR 1305.

21 G-Code G04 was interpreting the P parameter in seconds but the G Code RS 274 specification indicates milliseconds. Now
the P parameter is milliseconds, and the X parameter can be used to specify seconds. DCR 1382.

2017-01-07 v330 released

This is the first release.

Page 283 of 757


Toolbox Help Documentation
Help version created 7/23/2021

G Code Support

G-Codes
Command Description Support Comment
G00 Rapid positioning. Yes G0 moves reference MachineData.Prms.MaxDirectVelocity,
MachineData.Prms.DirectAcceleration, and MachineData.Prm-
s.DirectDeceleration. If the F register is supplied on the same
line as the G0, F will be used instead of MaxDirectVelocity
unless it exceeds MaxDirectVelocity.
G01 Linear interpolation Yes G1 G2 G3 moves reference the F register for feedrate. If the F
register is zero, then MachineData.Prms.MaxVelocity is
applied. MachineData.Prms.Acceleration and MachineData.Prm-
s.Deceleration are also referenced.
G02 CW circular interpolation Yes Provide R for radius mode or I,J,K for circle center mode.
G03 CCW circular interpolation Yes Provide R for radius mode or I,J,K for circle center mode.
G04 Dwell Yes Provide the dwell time as milliseconds with the P parameter or
as seconds with X.
G05 High-precision contour con- No Uses a deep look-ahead buffer and simulation processing to
trol (HPCC). provide better axis movement acceleration and deceleration
during contour milling.
G06 Non uniform rational B No Uses a deep look-ahead buffer and simulation processing to
Spline machining. provide better axis movement acceleration and deceleration
during contour milling.
G07 Imaginary axis designation No Uses a deep look-ahead buffer and simulation processing to
provide better axis movement acceleration and deceleration
during contour milling.
G09 Exact Stop, non-modal. Yes Forces the move to come to a complete stop rather than blend-
ing with the next move if there is another motion command fol-
lowing. Modal version is G61.
G10 Select work coordinate and No Not supported.
tool offsets.

G11 Data write cancel No


G12 Full-circle clockwise inter- No
polation
G13 Full-circle counterclockwise No
interpolation
G17 XY Plane Selection No This is the default.
G18 ZX Plane Selection No
G19 YZ Plane Selection No

Page 284 of 757


Command Description Support Comment
G20 Programming in inches Yes The Group Toolbox G-Code feature will default to the user units
configured in the Hardware Configuration. If all G-Code files
will contain position data in the configured user units of the
machine, G20 / G21 are not required. If G-Code files may con-
tain different user units, the application program must read
G21 Programming in millimeters Yes parameter 1813 using the HC_ReadParameter function block to
obtain the configured user units. Copy this parameter value
into PathData.HC_UserUnits. This allows the G-Code parser to
convert positions in the G-Code file to the configured units of
the machine.
G28 Return to the Home Position Yes Return to the machine's reference or Origin position. Specify
this position in the MachineStruct.Origin[]. At least one of X, Y,
or Z axes must be specified with G28 to indicate a via point to
pass through before moving to the Origin.
G30 Return to the Secondary No Takes a P address specifying which machine zero point is
Home Position desired, if the machine has several secondary points (P1 to
P4).
G31 Skip Function No Used for probes and tool length measurement systems.
G32 Single-point threading, No Similar to G01 linear interpolation, except with automatic
longhand style spindle synchronization for single-point threading.
G33 Constant-pitch threading No
G34 Variable-pitch threading No
G40 Tool radius compensation off Yes Turns off cutter radius compensation. Cancels G41 or G42.
G41 Tool radius compensation Yes Creates a left tool compensation along the XY plane. Provide
left Tool Data via the ToolStruct connected to Read_GCode_File or
Read_GCode_Stream.
G42 Tool radius compensation Yes Creates a right tool compensation along the XY plane. Provide
right Tool Data via the ToolStruct connected to Read_GCode_File or
Read_GCode_Stream.
G43 Tool height offset com- Yes Uses the H or T register as the tool length offset. Provide Tool
pensation negative Data via the ToolStruct connected to Read_GCode_File or Read_
GCode_Stream. Only supported when using MachineData.Emu-
lation = GTB_Emulation#mode2.
G44 Tool height offset com- No
pensation positive
G45 Axis offset single increase No
G46 Axis offset single decrease No
G47 Axis offset double increase No
G48 Axis offset double decrease No
G49 Tool length offset com- Yes Only supported when using MachineData.Emulation = GTB_
pensation cancel Emulation#mode2.
G50 Define the maximum spindle No
speed/Scaling function can-
cel
G52 Local Coordinate System. No
This is an offset from the cur-
rent offset
G53 Machine coordinate system. Yes Make a move in the Machine Coordinate System (MCS.) NOTE:
Takes absolute coordinates Behavior changed for Group Toolbox v361 to comply with tra-
(X,Y,Z,A,B,C) with reference ditional (non modal) G-Code behavior. Prior to v361, executing
to machine zero. a G53 would not initiate any motion by itself.
G54 Work Coordinate System 1 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[1] to be used for moves such as G0, G1, G2, G3.
G55 Work Coordinate System 2 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[2] to be used for moves such as G0, G1, G2, G3.

Page 285 of 757


Command Description Support Comment
G56 Work Coordinate System 3 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[3] to be used for moves such as G0, G1, G2, G3.
G57 Work Coordinate System 4 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[4] to be used for moves such as G0, G1, G2, G3.
G58 Work Coordinate System 5 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[5] to be used for moves such as G0, G1, G2, G3.
G59 Work Coordinate System 6 Yes Selects the offsets in MachineStruct.CoordinateSystem.Offset
[6] to be used for moves such as G0, G1, G2, G3. G59.1
through G59.3 are also supported.
G61 Exact stop check, modal. Yes
Can be canceled with G64.
Non-modal version is G09.
G62 Automatic Corner Override No
G64 Default cutting mode. Yes
Cancels G61
G70 Fixed cycle, multiple repet- No
itive cycle, for finishing
(including contours)
G71 Fixed cycle, multiple repet- No
itive cycle, for roughing (Z-
axis emphasis)
G72 Fixed cycle, multiple repet- No
itive cycle, for roughing (X-
axis emphasis)
G73 Drilling Chip Break Cycle Yes In this cycle, the drill makes a rapid move to the retract pos-
ition above the piece (R), then moves into the piece an incre-
ment (Q) at the specified feedrate (F) until the final drill
position is reached (Z). At the end of each increment, the drill
will rapidly move up a fixed amount of 0.050" (1.27 mm) to
"break the chip", then proceed with the next peck. This macro
remains enabled until a G80 is executed.
Supported Parameters: G73 Xn Yn Zn Qn Rn Fn Pn where:
X = X position to drill
Y = Y position to drill
Z = Final drill depth position.
Q = Peck Depth - the amount to be added to the drilling depth
each peck cycle.
R = Retract position - initial position above material, safe for
moving among multiple holes.
F = Feedrate for drilling.
P = Dwell in mSec after each drill cycle.
G74 Tapping cycle for milling,left No
hand thread, M04 spindle
direction
G75 Peck grooving cycle for turn- No
ing
G76 Fine boring cycle for milling No
G78 Tangent Motion Enable Yes Synchronizes a theta axis (which is not part of the AxesGroup)
to the XY plane of a path. The external axis must be defined as
shown in the example for MC_MovePath. Requires firmware
3.3.0 or higher. This tangent command does not automatically
prepare the tangent angle nor automatically raise and lower the
Z axis. These activities must be included as commands in
the G-Code file. See Examples, and the alternate commands for

Page 286 of 757


Command Description Support Comment
Tangent Applications, L30 / L31.
G79 Tangent Motion Disable Yes
G80 Cancel Modal Command Yes Designates the end of a modal cycle operation such as G73.
G81 Drilling Cycle with Dwell No
G82 Spot Drilling cycle (full No
retraction from pecks)
G83 Deep Drilling Cycle Yes In this cycle, the drill makes a rapid move to the retract pos-
ition above the piece (R), then moves into the piece an incre-
ment (Q) at the specified feedrate (F) until the final drill
position is reached (Z). At the end of each increment, the drill
will rapidly return to the retract position, then proceed with the
next peck. This macro remains enabled until a G80 is executed.
Supported Parameters: G73 Xn Yn Zn Qn Rn Fn Pn where:
X = X position to drill.
Y = Y position to drill.
Z = Final drill depth position.
Q = Peck Depth - the amount to be added to the drilling depth
each peck cycle.
R = Retract position - initial position above material, safe for
moving among multiple holes.
F = Feedrate for drilling.
P = Dwell in mSec after each drill cycle.
G84 Tapping cycle, right hand No
thread, M03 spindle dir-
ection
G90 Absolute Positioning Yes
G90 Lathe: Straight Cutting Cycle Yes If MachineStruct.MachineType is set to Lathe, G90 commands
will use a Straight Cutting Cycle macro.
G91 Incremental Positioning Yes
G92 Set Position Yes Starting in v361, all axes are supported. G92 with no axes spe-
cified clears any existing offsets. These "LocalZeroOffsets" are
applied to all Work offsets G54 ~ G59 in addition to any offsets
established for G54 ~ G59 in MachineData.CoordinateSystem
[]. The redefined positions (stored in MachineData.LocalZer-
oOffsets[]) are temporary, meaning they are lost after power
cycle or PLC restart, unless the MachineData variable is set as
'retain' data in the MotionWorks IEC Global variables list.
G93 Inverse Time Mode Yes Support added for Group Toolbox v350 release.
G94 Units per Minute Feed Rate Yes This was always the default feedrate mode, but the G94 com-
Mode mand was officially recognized as of the v350 release.
G96 Constant surface speed No Varies spindle speed automatically to achieve a constant sur-
(CSS) face speed.
G97 Constant spindle speed Yes Takes an S address integer, which is interpreted as RPM. The
Group Toolbox does not have any built in support for spindles,
other than datatypes to hold information for operating a spindle
by customizing the main project using this toolbox. See
MachineStruct.Spindle[].
G98 Absolute Programming Yes Only valid if MachineStruct.Emulation:=GTB_Emu-
lation#Mode1
G99 Incremental Programming Yes Only valid if MachineStruct.Emulation:=GTB_Emu-
lation#Mode1

Page 287 of 757


M Codes
Command Description Support Comment
M00 Non-optional Stop. Machine always stops Yes Requires Group Toolbox v352 or higher.
here.
M01 Optional Stop. Only stops if Optional stop Yes Requires Group Toolbox v352 or higher.
flag is set. See MachineStruct.Com-
mand.ProgramStop
M02 End of Program Yes
M03 Spindle On (clockwise rotation) Yes Supported as MC_MovePath.OutputFlag.X3. The
Group Toolbox does not have any built in support
for spindles, other than datatypes to hold inform-
ation for operating a spindle by customizing the
main project using this toolbox. See
MachineStruct.Spindle[].
For multi spindle support, use commands M143,
M144, M145 and M153, M154, M155.
M04 Spindle On (counterclockwise rotation) Yes Supported as MC_MovePath.OutputFlag.X4
M05 Spindle Stop Yes Supported as MC_MovePath.OutputFlag.X3 and X4
M06 Automatic Tool Change No* Can be customized by the OEM.
M07 Coolant On (mist) Yes Supported as MC_MovePath.OutputFlag.X0
M08 Coolant On (Flood) Yes Supported as MC_MovePath.OutputFlag.X1
M09 Coolant Off Yes Supported as MC_MovePath.OutputFlag.X0 and X1
M10 Pallet Clamp On Yes Supported as MC_MovePath.OutputFlag.X2
M11 Pallet Clamp Off Yes Supported as MC_MovePath.OutputFlag.X2
M13 Spindle on (clockwise rotation) and Yes Supported as MC_MovePath.OutputFlags X1 and X3
coolant on (flood)
M19 Spindle Orientation No
M21 Mirror, X-Axis No
M22 Mirror, Y-Axis No
M23 Mirror Off No
M24 Thread gradual pullout off No
M26 Axis Clamping No
M27 Axis Clamping No
M30 End of program Yes
M41 Gear select 1 No
M42 Gear select 2 No
M43 Gear select 3 No
M44 Gear select 4 No
M48 Feedrate override allowed No
M49 Feedrate override NOT allowed No
M52 Unload last tool from spindle No
M62 Set Digital Output On Yes The P parameter specifies the digital output num-
ber 1-32 (Bit of MC_MovePath.OutputFlags)
M63 Set Digital Output Off Yes The P parameter specifies the digital output num-
ber 1-32 (Bit of MC_MovePath.OutputFlags)
M60 Automatic Pallet change (APC) No
M66 Wait for Input Yes Reference http://linux-
cnc.org/docs/html/gcode/m-code.htm-
l#mcode:m66.
P parameter: 0 ~ 31 is mapped to MC_MovePath.In-
putFlags. P1 is bit 0, P2 is bit 1, and so on.

Page 288 of 757


Command Description Support Comment
E parameter: Not supported.
L Parameter: Only Mode 4 is supported; MC_
MovePath simply holds up sequencing until the
required input conditions (bit flags) are met. If
other input states are desired, connect the neces-
sary logic to MC_MovePath.InputFlags.
Q parameter: timeout in seconds.
M80 Custom: Cancel BreakOut and Head. Yes Cancel BreakOut and Head.
M81 Custom: Set Head. Yes Set Head (Mapped to MC_MovePath.Out-
putFLags.X5)
M82 Custom: Set BreakOut. Yes Set BreakOut (Mapped to MC_MovePath.Out-
putFlags.X6)
M98 Subprogram call Yes 16 sub programs supported. Sub program must be
within the same file as the main program. (MPiec G-
Code feature only supports one file at a time.)
M99 Subprogram end Yes
M104 Set Extruder Temperature Yes http://reprap.org/wiki/G-code#M104:_Set_
Extruder_Temperature
M106 Set Fan On (and speed) Yes http://reprap.org/wiki/G-code#M106:_Fan_On
M107 Set Fan Off Yes http://reprap.org/wiki/G-code#M107:_Fan_Off
M109 Set Extruder Temperature and Wait Yes https://reprap.org/wiki/G-code#M109:_Set_
Extruder_Temperature_and_Wait
M140 Set Bed Temperature Yes https://reprap.org/wiki/G-code#M140:_Set_Bed_
Temperature_.28Fast.29
M190 Set Bed Temperature and Wait Yes https://reprap.org/wiki/G-code#M190:_Wait_for_
bed_temperature_to_reach_target_temp
M143 Spindle [1] On (clockwise rotation) Yes The Group Toolbox does not have any built in sup-
M144 Spindle [1] On (counterclockwise rota- Yes port for spindles, other than datatypes to hold
tion) information for operating a spindle by customizing
M145 Spindle [1] Stop Yes the main project using this toolbox. See
MachineStruct.Spindle[].
M153 Spindle [2] On (clockwise rotation) Yes
M154 Spindle [2] On (counterclockwise rota- Yes
tion)
M155 Spindle [2] Stop Yes
M207 Retract filament Yes http://reprap.org/wiki/G-code#M207:_Set_
retract_length

Parameters
Command Description Support Comment
A Absolute or incremental pos- No This is a Rotational position. (Rx) Actual implementation
ition of A axis (rotational axis handled in firmware based on Hardware Configuration sup-
around X axis) port for selected mechanisms, or must implement custom kin-
ematics in the application layer of the MotionWorks IEC
project.
B Absolute or incremental pos- No This is a Rotational position. (Ry) Actual implementation
ition of B axis (rotational axis handled in firmware based on Hardware Configuration sup-
around Y axis) port for selected mechanisms, or must implement custom kin-
ematics in the application layer of the MotionWorks IEC
project.
C Absolute or incremental pos- Yes This is a Rotational position. (Rz) Actual implementation
ition of C axis (rotational axis handled in firmware based on Hardware Configuration sup-

Page 289 of 757


Command Description Support Comment
around Z axis) port for selected mechanisms.
D Defines diameter or radial off- No
set used for cutter com-
pensation. D is used for
depth of cut on lathes.
E 3D Printer - Extruder position Yes MachineStruct.MachineType must be set to GTB_
MachineType#Printer.
Lathe mode not supported for precision feedrate for threading
E Mode1 emulation: Set accel- Yes If MachineStruct.Emulation:=GTB_Emulation#Mode1 then
eration in units/sec. the E register is used as acceleration in units/sec 2. This emu-
lation mode is mutually exclusive with MachineType GTB_
MachineType#Printer.
F Feed rate Yes Specify in units / minute. If MachineStruct.Emulation:=GTB_
Emulation#Mode1 then the F register is interpreted as
feedrate in units/sec.
H Tool length offset Yes Same as T register.
I Arc Center in X axis for G02 Yes This is the relative X distance to the center of the circle from
or G03 the beginning of the arc.
J Arc Center in Y axis for G02 Yes This is the relative Y distance to the center of the circle from
or G03 the beginning of the arc.
K Arc Center in Z axis for G02 Yes This is the relative Z distance to the center of the circle from
or G03 the beginning of the arc.
L Fixed cycle loop count Yes Use with M98.
N Line number (optional) Yes If provided, this information is copied to PathData.Segment
[].Label and is useful for troubleshooting.
O Program Name Yes Use with M98.
P Dwell time in milliseconds for Yes This parameter has multiple functions based on the G-Code.
G04, and parameter used by
some canned cycles, and for
jumps.
Q Peck increment in canned No
cycles (G73 and G83)
R Radius of an arc Yes For use with G02 and G03.
S Defines speed, either spindle Yes
RPM or surface speed depend-
ing on the mode. (G96 or
G97)
T Tool Selection Yes For 3P Printers, the single command on a line T0, T1, or T2
will switch the active Extruder. A G1 instruction is auto inser-
ted to move the selected Extruder head the offset specified in
MachineData.Printer.Extruder[].
U Incremental X axis (Ignores No
G90 and G91)
V Incremental Y axis (Ignores No
G90 and G91)
W Incremental W axis (Ignores No
G90 and G91)
X X axis position Yes This is a Cartesian position within the working space of the
mechanism. Actual implementation handled in firmware
based on Hardware Configuration support for selected mech-
anisms.
Y Y axis position Yes This is a Cartesian position within the working space of the
mechanism. Actual implementation handled in firmware
based on Hardware Configuration support for selected mech-
anisms.

Page 290 of 757


Command Description Support Comment
Z Z axis position Yes This is a Cartesian position within the working space of the
mechanism. Actual implementation handled in firmware
based on Hardware Configuration support for selected mech-
anisms.

Other Supported Commands


Variable and basic logical commands are supported with the following limitations:

l When using logical statements (M98 or IF command), the entire G-Code file contents must be loaded into MyPath.Seg-
ment[]. The MyPath.Buffer.Overwritten flag must not have been set TRUE by the G-Code Processor. This is because the
function blocks can only reference data already processed and in the PLC memory area; they cannot search for data in
the G-Code file on the controller flash file system, and if the file is being streamed, they have no way to randomly
access data which may already be overwritten by the circular buffer, or may not have been sent to the MPiec controller
yet.
l Only simple assignments are supported. No nested parenthesis or math equations involving more than one operator
are supported.
l Nested subroutines can be called with a maximum depth of 16, otherwise MC_MovePath will output the ErrorID 10626
- Stack Overflow.
l Up to 255 variables assignments or expressions can exist in one G-Code file.

Logic / Expression support


Operator Example Comment
IF IF [expression] 'N' line Must include square brackets, parenthesis not allowed. If the logical expression
number is true, then the line number specified by the N parameter will be executed next.
The G-Code file must contain N line numbers for the IF command to work.
LT or < Less than IF [#5 < #18] N32
LE or <= Less than or equal IF [#362 LE 27] N458
NE or <> Not equal IF [#1 <> #2] N3
EQ or = Equal IF [#1 = 0] N27
GT or > Greater than IF [#500 GT #501] N123
GE or >= Greater than or equal IF [#5 >= 18.5] N21

The keywords THEN ELSE END_IF and GOTO are not supported.

Other Keyword support


Character Example Comment
/ /G1 X6 Y17 This is an optional block skip command. Lines with a single leading '/' character will
be processed only if the MachineStruct.Control.BlockSkip flag is set. Set this flag by
customizing the MotionWorks IEC application or GUI software as necessary. Double
slashes are always recognized as the start of a comment.

Subroutine and Variable Example:


The following example shows how variables can be assigned and subroutines can be called. This program creates a clover pat-
tern, and repeats the shape in an 8 by 8 pattern by changing the Part Coordinate System using looping and variables.

Link to video

Page 291 of 757


Page 292 of 757
Toolbox Help Documentation
Help version created 7/23/2021

3D Printing

Some special configuration is required to enable 3D printing support.

A 3D Printer Template project and documentation is available on www.yaskawa.com. Search for '3D printer' or document num-
ber AN.MPIEC.27.

Configure the Group in Hardware Configuration


Starting with MotionWorks IEC 3.6, there are two methods available to configure extruders; either as rotational axes of an nD
gantry, or as additional axes. Configure either a 3D or nD gantry.

Extruder Configuration Required for MotionWorks IEC 3.5 and Older

Configure the extruder [E0] as the Rz axis. Also consider the FeedConstant value for the Extruder on the Configuration tab for
the Extruder axis. The user units for the Extruders must be the same as for the Cartesian (XYZ) axes. Two additional
Extruders can also be configured. See the Extruder Mapping Chart that follows.

Extruder Configuration for MotionWorks IEC 3.6 and Newer

Configure the Extruders as additional axes to a 3D or nD gantry. This is the preferred method, although the older method is
still supported and there is no need to change an existing configuration when upgrading. Extruders configured as additional
axes can be observed in AxesGroup.Machine[7] [8] and [9] or AxesGroup.Part[7] [8] and [9].

Page 293 of 757


Extruder Mapping
Extruder axes as configured in Hardware Configuration

MotionWorks IEC 3.5 and MotionWorks IEC 3.6 and


Older Newer

Tool Group Toolbox v350 and Group Toolbox v352 and


Description Reference
# Older Newer

Default Extruder E0 T0 Rz Rz or Add Axis

Additional
E1 T1 Ry Ry or Add Axis
Extruder

Additional
E2 T2 Rx Rx or Add Axis
Extruder

MachineStruct Configuration for a 3D Printer


The system must be configured so the function blocks can correctly interpret some special features unique to a 3D Printer.
Configure the following in the "Initialize" POU.

MyMachine.MachineType:=GTB_MachineType#Printer;

There are several other initializations which should be considered. See the Application Note AN.MPIEC.27.

Temperature & Fan Management


The functions in the group toolbox recognize G Codes that pertain to extruder, bed, enclosure temperature and fan speed and
copy data into the MachineData structure. There is no built in functionality for physically setting these features. The MPiec pro-
ject must be customized by connecting the data in the MachineData structure with the appropriate control devices configured
in the system.

Temperature related G Codes:

M104 Set Extruder Temperature

M109 Set Extruder Temperature and Wait

Page 294 of 757


M140 Set Bed Temperature

M141 Set Chamber Temperature

M190 Wait for bed temperature to reach target temp

M191 Wait for chamber temperature to reach target temp

Page 295 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Tangent Mode

As it applies to a G Code solution, Tangent mode operates a theta axis tangent to the path and can be activated / deactivated
using specially designated G codes G78 and G79, or if using Emulation Mode2, L30 and L31.

Configuring a System for Tangent Operation


Configure All Axes in the Hardware Configuration.

Important: Configure the Theta axis' LoadType as rotary (prm 1807 above) otherwise it will generate function block ErrorID
61713 when moved.

Configure the Group

Add secondary axes as necessary. The tangent axis is operated externally to the group; do not include it in the Group con-
figuration.

Page 296 of 757


Create an Initialization POU.

In the AxesGroup variable, determine the next available array index beyond the basic group axes and manually add Theta's
information. In this example, the GantryDemo group has 4 servos, so the fifth array index is populated with Thetas Axis_Ref.

Although the Theta axis is not officially part of the Group, by manually adding Theta's AXIS_REF to the AxesGroup.AxisRef
structure as shown below on line 5, the Y_GroupPower / GroupControl function blocks will also power on / off the Theta axis.
The functions that manage servo power iterate through the list until finding an invalid AXIS_REF (zero value).

About Positioning the Theta Axis

The absolute positions of the Theta are based on the 'unit circle' concept. When looking down at the workspace, with X positive
to the right, and Y positive upward, the positions around the unit circle start where 0 degrees = the 3 O’clock position, and
increase counterclockwise.

Page 297 of 757


When preparing Theta for tangent motion, its location on the unit circle is not the correct position! Consider the direction of
travel, and preset the position according to the tangent heading. Refer to the next graphic.

Example G Code file for tangent operation

Note: C = Rz = Tangent axis

Page 298 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Spindle Support

Up to three spindles can be operated via the standard commands M3, M4, M5 and the S register. There is minimal built-in sup-
port for spindles in the Group Toolbox. Support is limited to recognizing the spindle commands, and managing data in
MachineData.Spindle[] structure. The user must add the necessary PLC code to the project to operate spindles based on this
information.

Note: The system will wait for acknowledgment from the user indicating that it's OK to move on with G-Code execution after
executing M3, M4, M5 commands. See the structure element MachineData.Spindle[n].AtSpeed. This BOOL must be set high
after an M3 or M4 when it's OK to continue on with G-Code execution, and after an M5, it must be set low when it's OK to con-
tinue executing G-Codes. See an example for managing the AtSpeed status flag below.

Configuring a System for Spindle Operation


The spindle can be any practical mechanism such as a traditional high speed spindle drive, variable frequency drive, or servo.
Due to the various types of devices that can act as the spindle, configuration will vary based on the actual device and is not doc-
umented here.

Example
Managing the MachineData.Spindle[].AtSpeed status flag.

Page 299 of 757


Page 300 of 757
Group_DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: BufferStruct

This is a sub structure of MC_PATH_DATA_REF which contains data about the circular buffer of Segments. Most of this data is
managed for internal use by the blocks which load and consume Segment information (Read_GCode_File , Read_GCode_
Stream, MC_MovePath)

The G-Code function blocks manage and use this data without any intervention required by the application program, but this
information may be useful to view in the Watch Window when debugging. The ExecutedSegment variable listed below is par-
ticularly useful when creating an error recovery sequence because it indicates the last Segment Executed when an Error
occurred.

Data Type Declaration


* Element Data Description Usage
Type
MyPathStruct.Buffer. BufferStruct
C Size INT The Read_GCode_File or Read_GCode_Stream func- MyPathStruct.Buffer.Size
tion blocks will set this value on the rising edge of
operation by using the UPPER_BOUND and
LOWER_BOUND functions for MyPathStruct.Seg-
ment.
C Max INT The Read_GCode_File or Read_GCode_Stream func- MyPathStruct.Buffer.Max
tion blocks will set this value on the rising edge of
operation by using the UPPER_BOUND function for
MyPathStruct.Segment.
C Segments UDINT The total number of segments in the path. MyPathStruct.Buffer.Segments
C StorePointer INT Used by Read_GCode_File and Read_GCode_ MyPathStruct.Buffer.StorePointer
Stream to manage the next available location for seg-
ment data.
C UsePointer INT Used by MC_Move_Path to manage the next seg- MyPathStruct.Buffer.UsePointer
ment to execute.
C FillCount INT Reports the number of Segment between MyPathStruct.Buffer.FillCount
StorePointer and UsePointer.
U FillMaximum INT If the user leaves this value as zero, Read_GCode_ MyPathStruct.Buffer.FillMaximum
File and Read_GCode_Stream will set Fillmaximum
to PathData.Buffer.Max. The user can choose to set
FillMaximum to a value smaller than Path-
data.Buffer.Max, such as 50% of the max value for
cases where debugging the data in the circular buf-
fer is necessary. (When FillMaximum is reduced, old
Segment data will remain in the circular buffer for a
longer time period. )
U HasCapacity BOOL Flag which indicates that there is free space in the MyPathStruct.Buffer.HasCapacity
circular buffer for additional Segment information to
be loaded.
C FillPercent REAL Reports the percentage of MC_PATH_DATA_REF MyPathStruct.Buffer.FillPercent
that is filled and waiting to be processed.
C OverWritten BOOL Indicates that the Segment buffer has written to MyPathStruct.Buffer.Overwritten

Page 301 of 757


* Element Data Description Usage
Type
MyPathStruct.Buffer. BufferStruct
the end, and started writing over the segment data
at the beginning again. When this occurs, is not pos-
sible to re execute MC_MovePath to make another
move sequence. The path data must be re pro-
cessed, such as by Read_GCode_File or Read_
GCode_Stream. Small paths which do not exceed
the buffer size of MyPathStruct.Segment can be re
run without re processing the original data.
C MotionAvailable DINT Populated in MC_MovePath for the StreamStruct if MyPathStruct.Buffer.MotionAvailable
the Read_GCode_Stream function block is used.
This pertains to the firmware level motion buffer and
is identical to AxesGroup.Status.FreeMo-
tionSegments.
C MotionPercent REAL Percentage of the firmware motion buffer that is cur- MyPathStruct.Buffer.MotionPercent
rently used.
C ExecutedSegment INT This value indicates the array index of the MyPathStruct.Buffer.ExecutedSegment
PathData.Segment[] linked to the last motion seg-
ment providing motion. Because of the possibility of
executed motion segments physically causing
motion at some time later due to the firmware level
motion buffer, there may be situations when the ori-
ginal data in PathData.Segment[] has been over-
written by the time the motion buffer executes the
move. ExecutedSegment can be relied on for error
recovery situations for small paths which are less
than PathData.Buffer.Max and do not require over-
writing the Segment data. When streaming
PataData, ExecutedSegment is only useful if FillMax-
imum is manually decreased by the user. For
streaming situations when error recovery is
required, Yaskawa recommends handling path
recovery on the front end GUI side using GCodeCom-
m.DLL. Information is provided which links the last
instruction physically providing motion to the byte
offset of the G-Code data stream. Using this inform-
ation, the front end GUI can cancel a path, causing
all buffers to reset, and restart the data stream at
an appropriate byte offset to allow the machine to
resume.

Page 302 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: GCodeStruct

GCodeStruct contains internal working information used by the G Code Processor and is made available as a VAR_IN_OUT by
Read_GCode_File and Read_GCode_Stream mainly for debugging purposes. There are four main sub structures:

1. G-Code Modal Modes


2. Block Update Flags
3. Registers
4. Variables

If using G code data with variables, connect the same structure to MC_MovePath. For example MyGCodeStruct.Variables.

Data Type Declaration


Much of this data is internally managed exclusively by the Group Toolbox and not necessary to interface with directly, but doc-
umented for debugging purposes.

* Element Data Type Description Usage


MyGCodeData GCodeStruct
C ProcessingMode GCodeModalModes Various modes of operation, such as MyGCodeData.ProcessingMode.Tangent
ExactStopCheck, Tangent, Tool Compensation,
etc.
C BlockUpdate BlockUpdateFlags Flags to indicate that a certain operation must be MyGCodeData.BlockUpdate.PathStruct
performed.
C Register GCodeRegister All G Code registers A through Z. This information MyGCodeData.Register._G
contains the last received values from the G-Code
source. This register list is initialized upon rising
edge of either Read_GCode_File or Read_
GCode_Stream.
C ScaledRegister GCodeRegister For registers that require having scaling applied MyGCodeData.ScaledRegister._X
depending if a variable is provided.
C/U Variables VariableArray Only used if the G Code registers being processed MyGCodeData.Variables[300]
contain variables. In such applications, connect
GCodeData.Variables to MC_MovePath
C G_GroupStatus_1 DWORD Reports the active G Code based on pre defined cat- MyGCodeData.G_GroupStatus_1
egories.
C G_GroupStatus_2 DWORD Reports the active G Code based on pre defined cat- MyGCodeData.G_GroupStatus_2
egories.
C M_GroupStatus DWORD Reports the active M Code based on pre defined cat- MyGCodeData.M_GroupStatus
egories.

Page 303 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: GridResultStruct

For use with the GridMeasurement, WriteGridFile, ReadGridFile, and GridLookup function blocks. The data in this structure is
either copied from the GridSetupStruct or populated by the GridMeasurement function block.

Data Type Declaration


* Element Data Type Description Usage
GridResults GridResultsStruct
C Version DINT The structure version as a unique identifier so that the GridResults.Version
WriteGridFile and ReadGridFile functions can confirm the expec-
ted data format.
C Point Grid A two dimensional array of GridData. GridResults.Point[1]
[2].Measurement
C MinCorner YTB_LREAL2 The smallest coordinates of the grid to be measured. Typically X GridResults.MinCorner[0]
Y position data. This data is copied from the GridSetupStruct by
the GridMeasurement function block so it can be included in the
output file written by the WriteGridFile function block.
C MaxCorner YTB_LREAL2 The largest coordinates of the grid to be measured. Typically X Y GridResults.MaxCorner[0]
position data. This data is copied from the GridSetupStruct by
the GridMeasurement function block so it can be included in the
output file written by the WriteGridFile function block.
C GridResolution INT Number of measurement points along the side of the grid. This GridResults.GridResolution
data is copied from the GridSetupStruct by the GridMeas-
urement function block so it can be included in the output file
written by the WriteGridFile function block.

Grid sub structure


* Element Data Type Description Usage
GridResults.Point BufferStruct
C Grid ARRAY [1..20] Two dimensional array of GridData . GridResults.Point
OF GridPoint [1][2].Meas-
urement

GridData sub structure


* Element Data Description Usage
Type
GridResults.Point BufferStruct
C Measurement LREAL Recorded position when the measurement was taken. GridResults.Point
[1][2].Meas-
urement
C MeasuredOK BOOL Status flag to indicate that the measurement was recorded successfully GridResults.Point
at the coordinate location. This can be used for debugging if the meas- [1][2].Meas-
urements did not meet tolerance expectations, or other issues result urement
when using the GridMeasuremetn function block.

Page 304 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: GridSetupStruct

For use with the GridMeasurement function block.

Data Type Declaration


* Element Data Type Description Usage
GridSetup
U MeasureMethod GTB_Meas- Only Torque sensing is supported. In the GridSetup.MeasureMethod
urementType future, select torque, digital sensor, or
LVDT.
U MeasuredPlane YTB_STRING8 Provide the name as specified in the Hard- GridSetup.MeasuredPlane
ware Configuration -> Group -> Label
column for the plane to be measured.
U MinCorner YTB_LREAL2 The smallest coordinates of the grid to be GridResults.MinCorner[1]
measured. Typically X Y position data. This
data is copied from the GridSetupStruct by
the GridMeasurement function block so it
can be included in the output file written by
the WriteGridFile function block.
U MaxCorner YTB_LREAL2 The largest coordinates of the grid to be GridResults.MaxCorner[1]
measured. Typically X Y position data. This
data is copied from the GridSetupStruct by
the GridMeasurement function block so it
can be included in the output file written by
the WriteGridFile function block.
U Resolution INT Number of measurement points along the GridResults.Resolution
side of the grid. This data is copied from the
GridSetupStruct by the GridMeasurement
function block so it can be included in the out-
put file written by the WriteGridFile function
block.
U TransferVelocity LREAL Velocity used when moving between meas- GridResults.TransferVelocity
urement locations at the Transfer position.
U ApproachVelocity LREAL Velocity used when moving between the GridResults.ApproachVelocity
Transfer position and the Approach position.
U MeasurementVelocity LREAL Velocity used when moving between the GridResults.MeasurementVelocity
Approach position and the Measurement
position.
U Acceleration LREAL Acceleration used with all moves in the meas- GridResults.Acceleration
urement process.
U MaxDeviation LREAL For use as a monitoring check of all meas- GridResults.MaxDeviation
ured points. If MaxDeviation is non zero, the
GridMeasurement function block will set its
MaxDeviationWarning output after all meas-
urements have been taken and the range of
measurements exceeds MaxDeviation.
U TransferPosition LREAL The position away from the grid to be meas- GridResults.TransferPosition
ured at which the TCP moves to the various
measurement points.
U ApproachPosition LREAL The position away from the grid to be meas- GridResults.ApproachPosition
ured at which the velocity may be reduced
and the torque limited in the direction of

Page 305 of 757


* Element Data Type Description Usage
GridSetup
measurement to prepare for contact with
the surface.
U MeasurementPosition LREAL The average expected position where the GridResults.MeasurementPosition
grid will be measured.
U Tolerance LREAL Each measurement must be within the Tol- GridResults.Tolerance
erance of the expected Meas-
urementPosition, or an Error will be
generated. This is to ensure that valid meas-
urements are being recorded and the Meas-
urementTorqueLimit provided is
appropriate.
U MeasurementTorqueLimit DINT This value is written to ServoPack pn 402 or GridResults.MeasurementTorqueLimit
403 depending on the direction of the meas-
urements to be taken. Units are percentage
of rated torque. It is important to select
a torque limit which will not damage
the equipment, but allow accurate
position reading to be recorded.
Ideally, this value is just above the level of
torque required to move the axis under nor-
mal conditions at the MeasurementVelocity
by 1.5 or 2 times.
U ExternalPlane GTB_MotorArray If the group contains a virtual axis for the GridResults.ExternalPlane
joint required to measure the grid, the
GridMeasurement function block will search
the ExternalPlane structure to determine
the real servo(s) to set the torque limit and
read the position. If the group does not con-
tain a non servo axis on the joint in question,
this structure is not used.

Example Initialization

Page 306 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: GroupHomeStruct

GroupHomeStruct contains all the setup information required for the GroupToHome function block to move the group to a
home position in a specified sequence (if required.) This structure is also used with the GroupCommManager function block
because it can execute GroupToHome.

HomeOptionsStruct - Data Type Declaration


This top level structure is used by GroupCommManager to support configuration of multiple homing sequences. For example,
one sequence could home all axes, other sequences could home just a portion, sucha s X & Y, or simply individual axes.

* Element Data Type Description Usage


Sequence HomeSequenceArray
U Method HomeOptionsArray ARRAY [0..6] OF GroupHomeStruct
U LastMethod INT Specify the actual number of methods configured. MyHomeData.Sequence
[2].Acceleration

This is the main structure used with the GroupToHome function block.

GroupHomeStruct - Data Type Declaration


* Element Data Type Description Usage
MyHomeData GroupHomeStruct
U Sequence HomeSequenceArray Array of GroupHomeSeqData . This is an instruction list MyHomeData.Sequence
to specify the axes and the sequence in which they [2].DOF[1]
should home.
U DOF HomeStructArray ARRAY [1..6] OF GroupHomeData (for each degree of MyHomeData.DOF[d].Pos-
freedom). ition
U PrimeAllowance LREAL See Getting Started with Secondary Axes to learn MyHomeData.PrimeAllowance
when this parameter applies.
U LastSequence INT Identify the last Sequence. MyHomeData.LastSequence

Supporting structure

GroupHomeSeqData Data Type Declaration

* Element Data Type Description Usage

Page 307 of 757


Sequence HomeSequenceArray
U Velocity LREAL Velocity to be used during the home sequence. MyHomeData.Sequence
[2].Velocity
U Acceleration LREAL Acceleration to be used during the sequence. MyHomeData.Sequence
[2].Acceleration
U DOF DOFNames ARRAY[1..6] OF YTB_STRING32 MyHomeData.Sequence
[2].DOF[1]
U LastDOF INT Specify the last Degree of Freedom. MyHomeData.Sequence
[2].LastDOF

Supporting structure

GroupHomeData Data Type Declaration

* Element Data Type Description Usage


Sequence HomeSequenceArray
U Position LREAL Absolute position to move to as the home (Origin) position in the MyHomeData.DOF
CoordinateSystem specified to the GroupToHome function [d].Position
block.
U Direction INT Reserved for future use. MyHomeData.DOF
[d].Direction

Example Initialization of GroupHomeStruct

This example homes a three axis gantry by first raising the Z upward to 12mm , then moving the X & Y axes to their home pos-
itions.

MyMachine is a MachineStruct, shown here for the initialization of the Origin, used by the HomeData.

HomeData is a GroupHomeStruct.

Example Initialization of HomeOptionsStruct

In this example, MyMachine is a MachineStruct, it's values are not shown, but MyMachine.Origin[d] can be any valid positions.

Lines 81 through 84 serve as constants, indicating that there are four home methods configured.

The primary method is "HomeAll" as seen in lines 86 through 102. The sequence is the same as the example for
GroupHomeStruct.

The remainder of the initialization shows the specific variations required to create the other three methods, which are all based
on the HomeAll method. The following initialization makes it possible for homing all axes or individual axes.

Page 308 of 757


Page 309 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type:JointMap

The JointMap is populated by the ReadJointMap and DetectPrimeAxes function blocks. Other functions such as GroupReA-
lignPrimeAxes and GroupToHome require this data. JointMap provides a link between the Axis specific information such as
AXIS_REF and AxisName and Group specific information such as Joint and Label. Functions using JointMap are able to determ-
ine if a group has more than one axis operating a Joint, and find the AXIS_REF for an axis operating one of the Degrees of Free-
dom labeled as a STRING such as 'X'.

Data Type Declaration


JointMap is an ARRAY [1..32] OF JointMapDetails:

* Element Data Type Description Usage


JointMapDetails
C Label STRING The name (Label) of a degree of Freedom in World Space as lis- JointMap.Label
ted in the Hardware Configuration for the group.
C Joint INT The Index of the Joint that corresponds to the Label as listed in JointMap.Joint
the Hardware Configuration for the group.
C AxisName STRING The AxisName as listed in the Hardware Configuration for the JointMap.AxisName
Axis, also listed as parameter 1809.
C AxisRef UINT The AXIS_REF.AxisNum that corresponds to the AxisName. JointMap.AxisRef

Page 310 of 757


Example JointMap

Page 311 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: LogicStruct

A sub structure of MC_PATH_DATA_REF which contains data for managing paths with looping or jumping events.

Data Type Declaration


LogicStruct is managed exclusively by the Group Toolbox, but documented here for debugging purposes.

* Element Data Type Description Usage


MyPathPairs PathPairs
C Event LogicArray An array [1..256] OF of LogicData MyPath.Logic.Event
[1].ReturnSegment
C Stack StackArray An array of 16 INTs to manage nested MyPath.Logic.Event.Stack[3]
Logic Events
C Events INT To determine which LogicData in MyPath.Logic.Events
LogicArray have already been allocated.
C StackPointer INT Points to the next location in the stack MyPath.Logic.StackPointer
to hold the next event encountered.

Page 312 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MachineStruct

NOTE: Starting in Group Toolbox v361, the communication method in GroupComm DLL was changed to provide more flexibility
to avoid compatibility issues when features are changed or added. MachineStruct0120190110 was the final structure used
with the original communication protocol as supported by the components shown in the chart below. Group Toolbox v361 still
supports the previous communication method. The toolbox will convert the modern structure definition to the older version so
that the GroupComm DLLs shown below can still communicate.

MachineStruct contains important configuration and other application specific data used by MC_MovePath, Read_GCode_File,
Read_GCode_Stream. This structure is shared with a PC application such as CNCWorks or Compass via the GroupComm DLL.

Version information
Version information is relevant if using GroupCommManager and GroupComm.DLL to operate the machine via PC software.

Compatibility

Structure Ver- Group Tool-


Release Date GroupComm.DLL
sion box

July 2021 1.0.7.15 n/a v372

December 2020 1.0.6.7 n/a v371

April 2020 1.0.5.8 n/a v370

February 2019 1.0.3.1 0120190110 v352

August 2018 1.0.2.1 0120180810 v350

Data Type Declaration


Note: In the chart below 'C' means the data is populated by a toolbox function block and should not or cannot be changed by
the user. 'u' indicates that the User must in some way provide this information. In some cases the value can simply be ini-
tialized in a WARM_START POU, others can be updated via a PC GUI application software such as Compass.

* Element Data Type Description Usage


MyMachine
C Version UDINT Internal value which identifies the structure MyMachine.Version
format. GroupComm.DLL uses this value to
confirm the contents and manage the data
appropriately.
U MachineType GTB_MachineType Specify: MyMachine.MachineType
GTB_MachineType#Milling,
GTB_MachineType#Lathe, or
GTB_MachineType#Printer

Page 313 of 757


* Element Data Type Description Usage
MyMachine
to allow the G-Code processor to handle spe-
cific G-Codes appropriately based on the
Machine Type. Default is Milling.
U Variant GTB_Variant Specify a machine variant to customize the MyMachine.Variant
implementation. Only applicable if
MachineType=Printer. Supported Variants
include:
GTB_Variant#PrinterXD = 4 axis printer -
XYZ and rotating base as C axis.
GTB_Variant#PrinterRobot = 6 axis robot
arm printer
U Emulation GTB_Emulation Specify an emulation mode to be applied. See MyMachine.Emulation
the Emulation mode support information
for full details.
U Feature DWORD To specify special operations, such as con- MyMachine.Feature
stant acceleration feedrate override, or the
ability to set different jog speeds during incre-
mental jog. See the chart below.
U Control ControlData Structure of items intended for PC application MyMachine.Control.CycleStart
to control the machine via the GroupCom-
m.DLL interface
U Origin MC_CARTESIAN_REF The home position of the machine. Used in MyMachine.Origin[x]
conjunction with the GroupToHome function
block and G-Code 28.
U Home HomePresetStruct For with MyMachine.Emulation:=GTB_Emu- MyMachine.Home[1]
lation#mode2. The Home Presets are ref-
erenced with G-Code commands such as G1
H4, where the H4 indicates to move the
machine to Home Preset #4. Home Presets
can be entered from the Compass Software.
U LocalZeroOffset VECTOR Requires Mode2 Emulation mode. Stores MyMachine.CoordinateSystem.Offset[x]
additional offsets applied to
MachineData.CoordinateSystem[] Offsets.
LocalZeroOffsets are set via G92.
U CoordinateSystem OffsetStruct Holds up to 9 offsets, corresponding to G54 MyMachine.CoordinateSystem.Offset[x]
through G59.3. Important: If the offset val-
ues will be written to this structure from an
HMI or other method within the IEC applic-
ation program, they MUST be entered in the
user units of the machine as defined in the
Hardware Configuration, not the user units of
a G-Code file. If a G 10 Code is processed, the
G-Code processor will convert the offset val-
ues into the native units of the group when
storing to the MachineStruct.
U Prms MotionParameters User configurable parameters such as max MyMachine.Prms.MaxVelocity
velocity and max acceleration.
U Printer PrinterStruct Special data for operating a 3D Printer. This MyMachine.Printer.Extruder.Axis.AxisNum
data is typically collected from the G-Code
stream and populated here for access by the
IEC application program, which must be cus-
tomized as required for the application.
U ExternalTangent AXIS_REF AXIS_REF of axis configured for tangent MyMachine.ExternalTangent.AxisNum
motion. This axis is not part of the group con-
figuration.
U Spindle SpindleStruct Contains data specific to operation of a MyMachine.Spindle.RPM
Spindle axis which is externally operate (Not
part of the AxesGroup)
U UserStatus WORD Reserved. MyMachine.UserStatus
U/C ToolChanger ToolChangerStruct Contains data specific to the operation of a MyMachine.ToolChanger.RequestedTool
tool changer mechanism which is operated
externally to the MC_MovePath function
block. This data acts as in interface to the

Page 314 of 757


* Element Data Type Description Usage
MyMachine
application specific tool changer device, and
allows the tool changer and the machine to
synchronize their operations.

Example Initialization

Page 315 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MC_PATH_DATA_REF

Data structure used with the Read_GCode_File, Read_GCode_Stream, CP_PathGenerator, and MC_MovePath function blocks .  

Data Type Declaration


The column that indicates whether the 'U'ser OR the 'C'ontroller (or Toolbox function block) write the data can be misleading
for this data type, as there are function blocks available such as Read_GCode_File which act on behalf of the user to populate
many of these values. In all cases, 'C' indicates that the user should not write to the value, as the MC_MovePath function block
will update these elements. 'U' indicates that the User is in some way responsible for populating the data. This is especially
important when creating a custom function block to load Segment data.

* Element Data Type Description Usage


MyPath MC_PATH_DATA_
REF
C Buffer BufferStruct Sub structure containing information for managing the MyPath.Buffer.StorePointer
circular buffer of Segment data. SegmentArray is
defined as having 250 elements by default. Paths requir-
ing an infinite number of segments can be processed
due to the circular buffer technique. The core function
blocks Read_GCode_File, Read_GCode_Stream and
MC_MovePath manage the data is this sub structure. If
writing a custom path generator function, it must set
MyPathStruct.Buffer.StorePointer as it creates the
path.
U Segment SegmentArray Contains all details required for each of the Segments in MyPath.Segment[0].X
the path.
U Logic LogicStruct For support of SegmentType 'LoopDecision'. Up to 32 MyPath.Logic[n].DecisionIndex
loops or jumps can be configured in PathData. Lim-
itation: The entire path data must fit within the defined
size of SegmentArray[]. Circular buffering and LoopDe-
cision SegmentTypes can not be supported sim-
ultaneously. MC_MovePath monitors
MyPathStruct.Buffer.Overwritten and will generate an
error.
C SegmentMap SegmentMapStruct For internal use by MC_MovePath for tracking the rela- MyPath.SegmentMap.Map[0]
tionship between MyPathStruct.Segment[n] and the [12].PathIndex
unique motion segment ID assigned by the Motion
Engine. Group parameters 2201 and 2202 are ref-
erenced to manage this mapping. This data is managed
by MC_MovePath and the user does not need to ref-
erence it under normal circumstances.
C StreamStatus StreamStruct Populated by the Read_GCode_Stream and MC_ MyPath.StreamStatus.TCPPacketCount
MovePath function blocks. This structure supplies
information required by a source application such as
CNCWorks / GCodeComm.DLL which sends path data
via Ethernet socket. May also provide useful debugging
information when viewed in the MotionWorks IEC watch
window.

Page 316 of 757


* Element Data Type Description Usage
MyPath MC_PATH_DATA_
REF
U FinalSegment INT This value indicates the very last Segment in the path. MyPath.FinalSegment
For example, if the path is loaded 'by hand' in the Ini-
tialize POU, set this value. In this case, the StorePointer
and UsePointer are not necessary. When Read_GCode_
File encounters the end of file, it will set the value to the
proper Segment. When an M30 command is detected,
this value will be set to the proper Segment.
U FillMethod INT Specify whether the data comes from a File or a Stream. MyPath.FillMethod
This will affect how MC_MovePath determines when it
has reached the end of the data. If the data is being
hard coded withing the IEC application, this value must
be set to n/a or zero.
C InUse BOOL Written by MC_MovePath when the block is executing. MyPath.InUse
This flag is monitored by functions such as Read_
GCode_File to provide data integrity. Read_GCode_File
will generate and error if upon the rising edge it detects
that MC_MovePath is still using the data.
U HC_User- INT Stores the value /code of the user units set in the Hard- MyPath.HC_UserUnits
Units ware Configuration. See the Example MotionWorks
IEC code below for a solution to read the user units of
the X / Y axes of a gantry configuration.
0 = inches
1 = millimeters
2 = microns
If using another type of Group where it is not possible to
read the user unit configuration, simply hard code the
proper value into MyPath.HC_UserUnits. This is import-
ant if the machine will process G-Code files which con-
tain G20 or G21 commands.
U ScaleFactor LREAL If data may come from a source providing user unit pos- MyPath.ScaleFactor
itions that differ from that of the Hardware Con-
figuration, this ScaleFactor will convert the positions.
See the example below for reading the User Units set in
the Hardware Configuration. Read_GCode_File and
Read_GCode_Stream can automatically set this value
based on HC_UserUnits.

If ScaleFactor is zero when either of the G-Code pro-


cessing blocks are started, it will be initialized to 1.

This value can be preset to any ScaleFactor if necessary


as long as the G-Code data does not contain G20 or
G21.
U Colinearity LREAL Specify the angle between segments to invoke an MyPath.Colinearity
'ExactStopCheck'. For example, when shape cutting, if
multiple segments are nearly co linear (less than 5
degrees) and should be blended by inserting a small
corner radius, but large angles such as when the tool
moves vertically out of the material (90 degrees), a co lin-
earity value of say 65 degrees can be detected, causing
motion to stop before raising the tool.

Page 317 of 757


Watch Window Views

Example 1 - Determining Hardware Configuration User Units

Page 318 of 757


According to the Hardware Configuration and confirmed by the Watch Window, GantryDemo.AxisRef[2] will report the user
units of the Y axis. We assume the units for X and Z are the same.

HC_ReadParameter is located in the FileRW_Toolbox. It is important to set MyPath.HC_UserUnits so the function blocks can con-
vert G-Code position correctly if the units are not the same as the Group Configuration. Alternatively to using HC_ReadPara-
meter, simply write the proper value to MYPath.HC_UserUnits if it is certain that the Group configuration is always performed
the same way on all equipment.

Page 319 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MotionParameters

Sub struct of MachineStruct which holds configuration data used in MC_MovePath, Read_GCode_File, and Read_GCode_
Stream.

If the FeedRate is not specified for a PathData.Segment, the MC_MovePath function block will default to using the appropriate
maximum velocity from the MachineStruct.Prms.

Data Type Declaration


* Element Data Type Description Usage
MachineStruct.Prms MotionParameter
U MaxVelocity LREAL Max velocity in Cartesian units/sec for a lin- MachineStruct.Prms.MaxVelocity
ear (G1) / Cartesian move. If the feed rate
provided in the G Code data exceeds this
value, it will be limited to this value.
You must set this value to the max-
imum safe velocity that the mech-
anism can tolerate.
G Code users: Units are those of the
group as configured in the Hardware
Configuration!
MC_MovePath will never set a velocity higher
than this value, even if the MC_
MovePath.ScaleFactor input would result in
excessive velocity.
U MaxDirectVelocity LREAL Max velocity in Cartesian units/sec for a dir- MachineStruct.Prms.MaxDirectVelocity
ect (G0) / Cartesian move. If the feed rate
provided in the G Code data exceeds this
value, it will be limited to this value.
You must set this value to the max-
imum safe velocity that the mech-
anism can tolerate.
G Code users: Units are those of the
group as configured in the Hardware
Configuration!
MC_MovePath will never set a velocity higher
than this value, even if the MC_
MovePath.ScaleFactor input would result in
excessive velocity.
U MaxRotationalVelocity LREAL Max velocity in rotational units/sec when a MachineStruct.Prms.MaxRotationalVelocity
motion segment contains a rotational
change but no Cartesian motion.
You must set this value to the max-
imum safe velocity that the mech-
anism can tolerate.
G Code users: Units are those of the
group as configured in the Hardware
Configuration!
MC_MovePath will never set a velocity higher

Page 320 of 757


* Element Data Type Description Usage
MachineStruct.Prms MotionParameter
than this value, even if the MC_
MovePath.ScaleFactor input would result in
excessive velocity.
U MaxAcceleration LREAL Acceleration in Cartesian units/sec2 applied MachineStruct.Prms.Acceleration
to linear (G1) and direct Cartesian motion.
You must set this value to the max-
imum safe acceleration that the mech-
anism can tolerate.
G Code users: Units are those of the
group as configured in the Hardware
Configuration!
MC_MovePath will never set an acceleration
higher than this value, even if the MC_
MovePath.ScaleFactor input would result in
excessive acceleration.
U MaxDeceleration LREAL Deceleration in Cartesian units/sec2 applied MachineStruct.Prms.Deceleration
to linear (G1) and direct Cartesian motion.
You must set this value to the max-
imum safe acceleration that the mech-
anism can tolerate.
G Code users: Units are those of the
group as configured in the Hardware
Configuration!
MC_MovePath will never set an acceleration
higher than this value, even if the MC_
MovePath.ScaleFactor input would result in
excessive deceleration.
U Acceleration LREAL Acceleration in Cartesian units/sec2 applied MachineStruct.Prms.Acceleration
to linear (G1) and direct Cartesian motion.
Typically this can be set to the same value
as the MaxAcceleration, however, if MC_
MovePath.VelocityScaler is used, the accel-
eration is also scaled by the square of the
velocity, and could become limited to MaxAc-
celeration.
U Deceleration LREAL Deceleration in Cartesian units/sec2 applied MachineStruct.Prms.Deceleration
to linear (G1) and direct Cartesian motion.
Typically this can be set to the same value
as the MaxAcceleration, however, if MC_
MovePath.VelocityScaler is used, the decel-
eration is also scaled by the square of the
velocity, and could become limited to MaxDe-
celeration.
U Jerk LREAL Supported for remote groups only (MLX and
MotomanSync). (mm/sec3)
U DirectAcceleration LREAL Acceleration in Cartesian units/sec2 applied MachineStruct.Prms.DirectAcceleration
direct (G0) Cartesian motion. Typically this
can be set to the same value as the MaxAc-
celeration, however, if MC_MovePath.Ve-
locityScaler is used, the acceleration is also
scaled by the square of the velocity, and
could become limited to MaxAcceleration.
U DirectDeceleration LREAL Deceleration in Cartesian units/sec2 applied MachineStruct.Prms.DirectDeceleration
to direct (G0) Cartesian motion. Typically
this can be set to the same value as the
MaxAcceleration, however, if MC_
MovePath.VelocityScaler is used, the accel-
eration is also scaled by the square of the
velocity, and could become limited to MaxDe-
celeration.
U DirectJerk LREAL Not Supported.
U RotationalVelocity LREAL Velocity for purely rotational moves on Rx, MachineStruct.Prms.RotationalVelocity
Ry, or Rz, and when pre aligning a Tangent

Page 321 of 757


* Element Data Type Description Usage
MachineStruct.Prms MotionParameter
axis in the units configured for the external
tangent axis.
U RotationalAcceleration LREAL Acceleration used when pre aligning a Tan- MachineStruct.Prms.RotationalAcceleration
gent axis in the units configured for the
external tangent axis.
U MaxSegmentsPerScan INT The maximum number of motion functions MachineStruct.Prms.MaxSegmentsPerScan
that will be executed in the same scan. (Sim-
ilar means Linear, Circular, and Direct.) For
example, if MC_PATH_DATA_REF contains
100 linear motion segments with no other
command type in between, and MaxSeg-
mentsPerScan is set to 8, it would take 13
scans to load all the motion segments,
provided the motion queue can accom-
modate all the segments, or that they are
being consumed at a fast rate.

For applications with fewer, longer seg-


ments, setting MaxSegmentsPerScan to 1
is adequate. 3 is considered high. Setting
this value too high with MC_MovePath is a
very fast task may result in a PLC watchdog.

See the "Motion Queue Size" in the Hard-


ware Configuration under the Group item in
the configuration tree.
U TransitionMode INT This will be the default Transition mode MachineStruct.Prms.TransitionMode
used as the input to PLCopen Part 4 motion
blocks. See Transition Mode in the PLCopen
Motion Function Blocks help manual.
U TransitionParameter VECTOR This will be the default TransitionParameter MachineStruct.Prms.TransitionParameter
used as the input to PLCopen Part 4 motion
blocks. See Transition Mode in the PLCopen
Motion Function Blocks help manual.

Special Notes for G-Code Applications:


All data in the MachineStruct are in the user units of the configured group. For example, if the G Code data presented to the
MPiec is in inches, but the group mechanism is configured for millimeters, the Work Coordinate Offsets must always be
entered in millimeters.

Note that even if the same units are provided in the G Code data, (say millimeters) there is still a difference to be accounted
for. Native units on the MPiec controller are mm/sec for velocity, mm/sec 2 for acceleration. Native G Code convention specifies
feedrate in mm/minute. Take this difference into account when configuring the Maximums in the MachineStruct.

Example
This data is typically initialized in a Warm Start system task.

Page 322 of 757


Page 323 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: OffsetStruct

Sub structure of the MachineStruct which holds data related to the work coordinate offsets. When a G10 command is pro-
cessed, the Read_GCode_File or Read_GCode_Stream function block will populate the appropriate Offset with the data
received. Alternatively, Offset data can be loaded from any other source, such as a host PC or HMI. When a G Code G54
through G59.3 is received, the subsequent position commands will be offset accordingly.

Important: All data in the MachineStruct are in the user units of the configured group. For example, if the G Code data sent to
the MPiec is in inches (G20), but the group mechanism is configured for millimeters, the Work Coordinate Offsets MUST be
entered in millimeters. When G code G10 is received the G Code processor will convert the offset values to teh proper units for
the MachineStruct if necessary.

Data Type Declaration


* Element Data Type Description Usage
CoordinateSystem OffsetStruct
U Offset OffsetArray ARRAY[1..9] OF MC_ MyMachine.CoordinateSystem.Offset[2].Rx
CARTESIAN_REF.
U Selected INT The Coordinate System MyMachine.CoordinateSystem.Selected
Offset currently used.

Page 324 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PendantDataStruct

For use with the Pendant_Driver and GroupCommManager function blocks. The major structure 'PendantDataStruct' contains
two sub structures which each contain two sub structures to categorize the data:

1. From the Pendant or PC.


2. To the Pendant or PC.
3. Coils (BOOL)
4. Tags (Non BOOL) values.

Data Type Declaration


* Element Data Type Description Usage
PendantData PendantDataStruct
C From FromPendantStruct Data received from the pendant. PendantData.From.Coil.ConfirmHardwarePosition
C ToP ToPendantStruct Data transmitted to the PendantData.ToP.Tag.OperationMode
pendant.

Sub Data Type Declaration - FromPendantStruct

* Element Data Type Description Usage


PendantData.From
C Coil PendantCoilStruct BOOL data received PendantData.From.Coil.ConfirmHardwarePosition
from the pendant.
C Tag PendantHoldingRegisterStruct All other datatypes PendantData.From.Tag.OperationMode
received from the
pendant.

Sub Data Type Declaration - ToPendantStruct

* Element Data Type Description Usage


PendantData.ToP
C Coil PendantDiscreteInputStruct BOOL data transmitted to PendantData.ToP.Coil.ConfirmHardwarePosition
the pendant.
C Tag PendantInputRegisterStruct All other datatypes trans- PendantData.ToP.Tag.GroupErrorID
mitted to the pendant.

Sub Data Type Declaration - PendantCoilStruct (FROM Pendant TO MPiec)

* Element Data Byte Modbus Description


Type Offset Address
PendantCoilStruct
C ConfirmHardwarePosition BOOL 800 4X:7901.0 If power down position of the group is different from power up
position, user needs to verify position.

Page 325 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantCoilStruct
C RestartPLC BOOL 4X:7901.1 Not supported
C UserProgramStart BOOL 4X:7901.2 For use in Play Mode screen
C BrakeRelease BOOL 4X:7901.3 Not Supported
C calculateCurrentTCP BOOL 4X:7901.4 Not Supported
C CubicIZCopyTCPToCenterPoint BOOL 4X:7901.5 Not Supported
C CubicIZCopyTCPToCorner1 BOOL 4X:7901.6 Not Supported
C CubicIZCopyTCPToCorner2 BOOL 4X:7901.7 Not Supported
C CubicIZNameUpdate BOOL 4X:7901.8 Not Supported
C CubicIZNumberChanged BOOL 4X:7901.9 Not Supported
C CubicIZSaveCenterPointData BOOL 4X:7901.10 Not Supported
C CubicIZSaveTwoCornersData BOOL 4X:7901.11 Not Supported
C CubicIZSetCenterPoint BOOL 4X:7901.12 Not Supported
C CubicIZSetTwoCorners BOOL 4X:7901.13 Not Supported
C DecrementTeachPoint BOOL 4X:7901.14 Used to decrement the index of the teach position
C getQueuedError BOOL 4X:7901.15 Not supported
C HomeOffsetsGet BOOL 802 4X:7902.0 Add support for Y_GroupReadVectorParam[2500] for v350
C HomeOffsetsGetCurrent BOOL 4X:7902.1 Add support for Y_GroupReadVectorParam[2501] for v350
C HomeOffsetsSet BOOL 4X:7902.2 Add support for MC_GroupSetPosition for v350
C IncrementTeachPoint BOOL 4X:7902.3 Used to increment the index of the taught position
C JobNameUpdate BOOL 4X:7902.4 Not supported
C JobNumberChanged BOOL 4X:7902.5 Not supported
C JogFlags.Axis[1].Positive BOOL 4X:7902.6 Jog Joint 1 or TCP X in the positive direction
C JogFlags.Axis[1].Negative BOOL 4X:7902.7 Jog Joint 1 or TCP X in the negative direction
C JogFlags.Axis[2].Positive BOOL 4X:7902.8 Jog Joint 2 or TCP Y in the positive direction
C JogFlags.Axis[2].Negative BOOL 4X:7902.9 Jog Joint 2 or TCP Y in the negative direction
C JogFlags.Axis[3].Positive BOOL 4X:7902.10 Jog Joint 3 or TCP Z in the positive direction
C JogFlags.Axis[3].Negative BOOL 4X:7902.11 Jog Joint 3 or TCP Z in the negative direction
C JogFlags.Axis[4].Positive BOOL 4X:7902.12 Jog Joint 4 or TCP Rx in the positive direction
C JogFlags.Axis[4].Negative BOOL 4X:7902.13 Jog Joint 4 or TCP Rx in the negative direction
C JogFlags.Axis[5].Positive BOOL 4X:7902.14 Jog Joint 5 or TCP Ry in the positive direction
C JogFlags.Axis[5].Negative BOOL 4X:7902.15 Jog Joint 5 or TCP Ry in the negative direction

Page 326 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantCoilStruct
C JogFlags.Axis[6].Positive BOOL 804 4X:7903.0 Jog Joint 6 or TCP Rz in the positive direction
C JogFlags.Axis[6].Negative BOOL 4X:7903.1 Jog Joint 6 or TCP Rz in the negative direction
C JogFlags.Axis[7].Positive BOOL 4X:7903.2 Jog Joint 7 in the positive direction
C JogFlags.Axis[7].Negative BOOL 4X:7903.3 Jog Joint 7 in the negative direction
C JogToHome BOOL 4X:7903.4 Used to Jog to the robot's home position (Joint zeros)
C JogToPoint BOOL 4X:7903.5 Used to jog to the currently selected taught position
C JogToUFOrigin BOOL 4X:7903.6 Jog to Part frame origin
C JogToUFXX BOOL 4X:7903.7 Jog to part frame XX
C JogToUFXY BOOL 4X:7903.8 Jog to part frame XY
C ResetSafetyRelay BOOL 4X:7903.9 Not supported
C GroupNumberChanged BOOL 4X:7903.10 Not supported
C SendAbort BOOL 4X:7903.11 Not supported
C SetTeachPointToolAndPartFrame BOOL 4X:7903.12 Not supported
C TeachPointChanged BOOL 4X:7903.13 Not supported
C TeachPointNameEntered BOOL 4X:7903.14 Not supported
C ToolClear BOOL 4X:7903.15 Used to deactivate the current tool parameters
C ToolNameUpdate BOOL 806 4X:7904.0 Not supported
C ToolNumberChanged BOOL 4X:7904.1 Not supported
C ToolSave BOOL 4X:7904.2 Used to save the parameters of a tool to the UserApplicationData
structure
C ToolSet BOOL 4X:7904.3 Used to activate a tool
C triggerAbort BOOL 4X:7904.4 Used to abort group motion
C triggerPower BOOL 4X:7904.5 Used to power on the group
C triggerHold BOOL 4X:7904.6 MC_GroupInterrupt
C triggerReset BOOL 4X:7904.7 Used to reset group alarms. Buffered motions get cleared from
memory
C triggerResetAndHold BOOL 4X:7904.8 Not Supported
C triggerRestart BOOL 4X:7904.9 MC_GroupContinue
C UndoLastTeachPoint BOOL 4X:7904.10 Used to invalidate the last selected taught point
C UpdateSpeedScale BOOL 4X:7904.11 Not Supported
C UpdateTeachPointTCPData BOOL 4X:7904.12 Not Supported
C PartFrameClear BOOL 4X:7904.13 Used to deactivate the currently active part frame
C PartFrameCopyOrigin BOOL 4X:7904.14 Used to copy the current TCP to Part frame origin variable
C PartFrameCopyXX BOOL 4X:7904.15 Used to copy the current TCP to part frame XX variable

Page 327 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantCoilStruct
C PartFrameCopyXY BOOL 808 4X:7905.0 Used to copy the current TCP to part frame XY variable
C PartFrameNameUpdate BOOL 4X:7905.1 Not supported
C PartFrameNumberChanged BOOL 4X:7905.2 Not supported
C PartFrameSave BOOL 4X:7905.3 Used to write part frame data to the UserAplicationData
C PartFrameSet BOOL 4X:7905.4 Used to activate a part frame
C JoggingMode BOOL 4X:7905.5 Used to set the group in manual control mode when the group is
in simulation operation mode
C SignalsDisableLimits BOOL 4X:7905.6 Not supported
C queuedAlarmDisplayMode BOOL 4X:7905.7 Not supported
C R0BrakeReleaseBit0 BOOL 4X:7905.8 Used to release/engage break for joint 0
C R0BrakeReleaseBit1 BOOL 4X:7905.9 Used to release/engage break for joint 1
C R0BrakeReleaseBit2 BOOL 4X:7905.10 Used to release/engage break for joint 2
C R0BrakeReleaseBit3 BOOL 4X:7905.11 Used to release/engage break for joint 3
C R0BrakeReleaseBit4 BOOL 4X:7905.12 Used to release/engage break for joint 4
C R0BrakeReleaseBit5 BOOL 4X:7905.13 Used to release/engage break for joint 5
C R0BrakeReleaseBit6 BOOL 4X:7905.14 Used to release/engage break for joint 6
C R0BrakeReleaseBit7 BOOL 4X:7905.15 Used to release/engage break for joint 7
C R1BrakeReleaseBit0 BOOL 810 4X:7906.0 Not supported
C R1BrakeReleaseBit1 BOOL 4X:7906.1 Not supported
C R1BrakeReleaseBit2 BOOL 4X:7906.2 Not supported
C R1BrakeReleaseBit3 BOOL 4X:7906.3 Not supported
C R1BrakeReleaseBit4 BOOL 4X:7906.4 Not supported
C R1BrakeReleaseBit5 BOOL 4X:7906.5 Not supported
C R1BrakeReleaseBit6 BOOL 4X:7906.6 Not supported
C R1BrakeReleaseBit7 BOOL 4X:7906.7 Not supported
C R2BrakeReleaseBit0 BOOL 4X:7906.8 Not supported
C R2BrakeReleaseBit1 BOOL 4X:7906.9 Not supported
C R2BrakeReleaseBit2 BOOL 4X:7906.10 Not supported
C R2BrakeReleaseBit3 BOOL 4X:7906.11 Not supported
C R2BrakeReleaseBit4 BOOL 4X:7906.12 Not supported
C R2BrakeReleaseBit5 BOOL 4X:7906.13 Not supported
C R2BrakeReleaseBit6 BOOL 4X:7906.14 Not supported
C R2BrakeReleaseBit7 BOOL 4X:7906.15 Not supported

Page 328 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantCoilStruct
C R3BrakeReleaseBit0 BOOL 812 4X:7907.0 Not supported
C R3BrakeReleaseBit1 BOOL 4X:7907.1 Not supported
C R3BrakeReleaseBit2 BOOL 4X:7907.2 Not supported
C R3BrakeReleaseBit3 BOOL 4X:7907.3 Not supported
C R3BrakeReleaseBit4 BOOL 4X:7907.4 Not supported
C R3BrakeReleaseBit5 BOOL 4X:7907.5 Not supported
C R3BrakeReleaseBit6 BOOL 4X:7907.6 Not supported
C R3BrakeReleaseBit7 BOOL 4X:7907.7 Not supported
C StepContinuePressed BOOL 4X:7907.8 Not supported
C StepPausePressed BOOL 4X:7907.9 Not supported
C TeachPoint BOOL 4X:7907.10 Used to load a point into the UserApplicationData structure
C UndoVisible BOOL 4X:7907.11 Not supported
C InvalidatePartFrame BOOL 4X:7907.12 De-activate the current tool parameters
C InvalidateTool BOOL 4X:7907.13 De-activate the current part frame
C ReadJobFile BOOL 4X:7907.14 Read the defined job file from the Mpiec controller's flash memory
C WriteJobFile BOOL 4X:7907.15 Write the defined job file to the Mpiec controller's flash memory
C ReadPartFrameFile BOOL 814 4X:7908.0 Read the defined part frame file from the controller's memory
C WritePartFrameFile BOOL 4X:7908.1 Write the defined part frame file to the controller's memory
C ReadToolFile BOOL 4X:7908.2 Read the defined tool file from the controller's memory
C WriteToolFile BOOL 4X:7908.3 Write the defined tool file to the controller's memory
C AckDisconnect BOOL 4X:7908.4 Used to acknowledge that a disconnect between the pendant
and the Mpiec controller happened
C AckDisconnectRequired BOOL 4X:7908.5 Used to let the user know that a disconnect between the
pendant and the Mpiec controller happened. The user will have to
ackowledge for the pendant to restart communications.
C GroupEnable BOOL 4X:7908.6 Used to enable the group
C DisableControlModeInput BOOL 4X:7908.7 Not supported
C ResetFunctionError BOOL 4X:7908.8 Used to reset certain functionality errors in the pendant driver.
C GroupDisable BOOL 4X:7908.9 Used to disable the group
C ControlMode BOOL 4X:7908.10 For GUI to have complete control over Auto/Manual, for applic-
ations other than robots, which typically have a keyswitch for
this.
C 4X:7908.11
C 4X:7908.12
C 4X:7908.13
C 4X:7908.14
C 4X:7908.15

Page 329 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantCoilStruct
C Move To Origin Request BOOL 816 4X:7909.0 Execute GroupToHome FB.
C BOOL 4X:7909.1
C BOOL 4X:7909.2
C BOOL 4X:7909.3
C BOOL 4X:7909.4
C BOOL 4X:7909.5
C BOOL 4X:7909.6
C BOOL 4X:7909.7
C BOOL 4X:7909.8
C BOOL 4X:7909.9
C BOOL 4X:7909.10
C BOOL 4X:7909.11
C BOOL 4X:7909.12
C BOOL 4X:7909.13
C 4X:7909.14
C 4X:7909.15
C

Sub Data Type Declaration - PendantHoldingRegisterStruct FROM Pendant TO MPiec


(FC16)

* Element Data Byte Modbus Description


Type Offset Address
PendantDiscreteInputStruct
C TeachPoints DINT 0 DWS:7501 Number of supported TeachPoints
C PartFrames DINT 4 DWS:7503 Number of supported Part frames
C CubicIZDataCoordFrame DINT 8 DWS:7505 Not Supported
C CubicIZDataCubicIZType DINT 12 DWS:7507 Not Supported
C CubicIZDataZoneAction DINT 16 DWS:7509 Not Supported
C CubicIZNumber DINT 20 DWS:7511 Not Supported
C Reserved[0] REAL 24 DWS:7513 Not Supported
C Reserved[1] REAL 28 DWS:7515
C Reserved[2] REAL 32 DWS:7517
C Reserved[3] REAL 36 DWS:7519
C Reserved[4] REAL 40 DWS:7521
C Reserved[5] REAL 44 DWS:7523
C Reserved[6] REAL 48 DWS:7525
C JobNumber DINT 52 DWS:7527 Current Job index
C JoggingCoordinateMode DINT 56 DWS:7529 Currently selected coordinate frame
C JogSpeedIndex DINT 60 DWS:7531 Currently chosen Jog speed Index
C HomeMode DINT 64 DWS:7533 Mode of setting home in MC_GroupSetPosition (was group
number)
C TeachPointNumber DINT 68 DWS:7535 Current teach point index
C ToolNumber DINT 72 DWS:7537 Current tool index
C PartFrameOptionalParameters DINT 76 DWS:7539 Not Supported
C PartFrameNumber DINT 80 DWS:7541 Current Part frame index
C InternalData_Glob- REAL 84 FPS:7543 Not Supported

Page 330 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantDiscreteInputStruct
alSpeedScale
C CubicIZDataCenterPoint0 REAL 88 FPS:7545 Not Supported
C CubicIZDataCenterPoint1 REAL 92 FPS:7547 Not Supported
C CubicIZDataCenterPoint2 REAL 96 FPS:7549 Not Supported
C CubicIZDataCenterPoint3 REAL 100 FPS:7551 Not Supported
C CubicIZDataCenterPoint4 REAL 104 FPS:7553 Not Supported
C CubicIZDataCenterPoint5 REAL 108 FPS:7555 Not Supported
C CubicIZDataCorner1_0 REAL 112 FPS:7557 Not Supported
C CubicIZDataCorner1_1 REAL 116 FPS:7559 Not Supported
C CubicIZDataCorner1_2 REAL 120 FPS:7561 Not Supported
C CubicIZDataCorner2_0 REAL 124 FPS:7563 Not Supported
C CubicIZDataCorner2_1 REAL 128 FPS:7565 Not Supported
C CubicIZDataCorner2_2 REAL 132 FPS:7567 Not Supported
C CubicIZDataDimensions0 REAL 136 FPS:7569 Not Supported
C CubicIZDataDimensions1 REAL 140 FPS:7571 Not Supported
C CubicIZDataDimensions2 REAL 144 FPS:7573 Not Supported
C KeyswitchStatus UINT 148 FPS:7575 Added 4/3/18. keyswitch status if it is from modbus - 0 =
play, 1 = teach
C Reserved[0] INT 150 FPS:7576 Not Supported
C Reserved[0] REAL 152 FPS:7577 Not Supported
C Reserved[0] REAL 156 FPS:7579 Not Supported
C Reserved[0] REAL 160 FPS:7581 Not Supported
C Reserved[0] REAL 164 FPS:7583 Not Supported
C Reserved[0] REAL 168 FPS:7585 Not Supported
C JoggingSpeeds0 REAL 172 FPS:7587 Not Supported
C JoggingSpeeds1 REAL 176 FPS:7589 Not Supported
C JoggingSpeeds2 REAL 180 FPS:7591 Not Supported
C JoggingSpeeds3 REAL 184 FPS:7593 Not Supported
C BasePose[0] REAL 188 FPS:7595 Not Supported
C BasePose[0] REAL 192 FPS:7597 Not Supported
C BasePose[0] REAL 196 FPS:7599 Not Supported
C BasePose[0] REAL 200 FPS:7601 Not Supported
C BasePose[0] REAL 204 FPS:7603 Not Supported
C BasePose[0] REAL 208 FPS:7605 Not Supported
C Axes0_ConfigData_MaxLimit REAL 212 FPS:7607 Not Supported
C Axes0_ConfigData_MinLimit REAL 216 FPS:7609 Not Supported
C Axes1_ConfigData_MaxLimit REAL 220 FPS:7611 Not Supported
C Axes1_ConfigData_MinLimit REAL 224 FPS:7613 Not Supported
C Axes2_ConfigData_MaxLimit REAL 228 FPS:7615 Not Supported
C Axes2_ConfigData_MinLimit REAL 232 FPS:7617 Not Supported
C Axes3_ConfigData_MaxLimit REAL 236 FPS:7619 Not Supported
C Axes3_ConfigData_MinLimit REAL 240 FPS:7621 Not Supported
C Axes4_ConfigData_MaxLimit REAL 244 FPS:7623 Not Supported
C Axes4_ConfigData_MinLimit REAL 248 FPS:7625 Not Supported
C Axes5_ConfigData_MaxLimit REAL 252 FPS:7627 Not Supported
C Axes5_ConfigData_MinLimit REAL 256 FPS:7629 Not Supported
C Axes6_ConfigData_MaxLimit REAL 260 FPS:7631 Not Supported

Page 331 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantDiscreteInputStruct
C Axes6_ConfigData_MinLimit REAL 264 FPS:7633 Not Supported
C ToolDataCenterOfGravity_0 REAL 268 FPS:7635 Tool Center of gravity (Xg) mm
C ToolDataCenterOfGravity_1 REAL 272 FPS:7637 Tool Center of gravity (Yg) mm
C ToolDataCenterOfGravity_2 REAL 276 FPS:7639 Tool Center of gravity (Zg) mm
C ToolDataMass REAL 280 FPS:7641 Tool Mass kg
C ToolDataMomentOfInertia_0 REAL 284 FPS:7643 Tool moment of Inertia (Ix) kgm2
C ToolDataMomentOfInertia_1 REAL 288 FPS:7645 Tool moment of Inertia (Iy) kgm2
C ToolDataMomentOfInertia_2 REAL 292 FPS:7647 Tool moment of Inertia (Iz) kgm2
C ToolOffset[0] REAL 296 FPS:7649 Tool Offset in X direction
C ToolOffset[1] REAL 300 FPS:7651 Tool Offset in Y direction
C ToolOffset[2] REAL 304 FPS:7653 Tool Offset in Z direction
C ToolOffset[3] REAL 308 FPS:7655 Tool Offset in Rx direction
C ToolOffset[4] REAL 312 FPS:7657 Tool Offset in Ry direction
C ToolOffset[5] REAL 316 FPS:7659 Tool Offset in Rz direction
C PF_Origin0 REAL 320 FPS:7661 Part frame origin X Coordinate
C PF_Origin1 REAL 324 FPS:7663 Part frame origin Y Coordinate
C PF_Origin2 REAL 328 FPS:7665 Part frame origin Z Coordinate
C PF_XX0 REAL 332 FPS:7667 Part frame XX directional point's X Coordinate
C PF_XX1 REAL 336 FPS:7669 Part frame XX directional point's Y Coordinate
C PF_XX2 REAL 340 FPS:7671 Part frame XX directional point's Z Coordinate
C PF_XY0 REAL 344 FPS:7673 Part frame XY directional point's X Coordinate
C PF_XY1 REAL 348 FPS:7675 Part frame XY directional point's Y Coordinate
C PF_XY2 REAL 352 FPS:7677 Part frame XY directional point's Z Coordinate
C CubicIZ0_RobotActiveStatus0 DINT 356 DWS:7679 Not Supported
C CubicIZ0_RobotActiveStatus1 DINT 360 DWS:7681 Not Supported
C TeachPoint[0] REAL 364 FPS:7683 Taught Point's X Coordinate
C TeachPoint[0] REAL 368 FPS:7685 Taught Point's Y Coordinate
C TeachPoint[0] REAL 372 FPS:7687 Taught Point's Z Coordinate
C TeachPoint[0] REAL 376 FPS:7689 Taught Point's Rx Coordinate
C TeachPoint[0] REAL 380 FPS:7691 Taught Point's Ry Coordinate
C TeachPoint[0] REAL 384 FPS:7693 Taught Point's Rz Coordinate
C HomeSequence UINT 388 FPS:7695 Used with GroupToHome to select which homing sequence to
use.
C NameStringArray[1] STRING32 400 ST:7701:32 Group name
C NameStringArray[2] STRING32 432 ST:7717:32 Not Supported
C NameStringArray[3] STRING32 464 ST:7733:32 Job Name
C NameStringArray[4] STRING32 496 ST:7749:32 Teach Point Name
C NameStringArray[5] STRING32 528 ST:7765:32 Tool Name
C NameStringArray[6] STRING32 560 ST:7781:32 Part Frame Name
C NameStringArray[7] STRING32 592 ST:7797:32 Name of Part frame set ( used to read /write part frame file to
the controller's flash memory.
C NameStringArray[8] STRING32 624 ST:7813:32 Name of tool set ( used to read /write tool file to the controller's
flash memory.
C HeartBeat DINT 700 DWS:7851 Pendant heartbeat
C PendantType DINT 704 DWS:7853 Code to identify the Pendant type (0=default, unused,
1=GroupComm DLL, 2=indusoft, 3=global pendant, others?
C VelFactor REAL 708 DWS:7855 VelFactor for MC_GroupSetOverride 0.0 to 1.0
C HomeOffset[0] LREAL 712 DWS:7857 Add support Y_GroupSetPosition and Y_GroupReadVect-
orParameter. Use for remote groups

Page 332 of 757


* Element Data Byte Modbus Description
Type Offset Address
PendantDiscreteInputStruct
C HomeOffset[1] LREAL 720 DWS:7861
C HomeOffset[2] LREAL 728 DWS:7865
C HomeOffset[3] LREAL 736 DWS:7869
C HomeOffset[4] LREAL 744 DWS:7873
C HomeOffset[5] LREAL 752 DWS:7877
C HomeOffset[6] LREAL 760 DWS:7881

Sub Data Type Declaration - PendantDiscreteInputStruct (FROM MPiec TO Pendant)

* Element Data Byte Modbus Description


Type Offset Address
PendantDiscreteInputStruct
C IDEITriggerInstructionError BOOL 400 3X:7901.0 Not Supported
C ServoOnReadyStatus BOOL 3X:7901.1 Added 4/3/18. FALSE = not servo on ready, TRUE = servo on
ready
C SignalsAllDrivesPowered BOOL 3X:7901.2 TRUE if all drives in the group are energized
C SignalsDeadmanDisengaged BOOL 3X:7901.3 TRUE if the Deadman/Liveman switch on the pendant is pre-
venting the group from getting energized/moving
C SignalsEStop1Pressed BOOL 3X:7901.4 TRUE if an E-Stop is preventing the group from getting ener-
gized/moving
C SignalsInitializationComplete BOOL 3X:7901.5 Not Supported
C ManualMode BOOL 3X:7901.6 TRUE = manual, FALSE=auto control mode
C SignalsGroupActive BOOL 3X:7901.7 TRUE if the group is enabled ( Group.Status.Active = TRUE)
C PendantConnected BOOL 3X:7901.8 TRUE if the pendant heartbeat is healthy
C SignalsSafetyCircuitOK BOOL 3X:7901.9 TRUE if the Safety Circuit for the group is preventing the group
from getting energized /moving.
C UserProgramStepContinue BOOL 3X:7901.10 Not Supported
C AtHomePositionIndicator BOOL 3X:7901.11 Not Supported
C AtTaughtPositionIndicator BOOL 3X:7901.12 Not Supported
C DisplayStartButton BOOL 3X:7901.13 Not Supported
C RobotJogging BOOL 3X:7901.14 Not Supported
C TCPJogMode BOOL 3X:7901.15 Not Supported
C TeachPointValid BOOL 402 3X:7902.0 TRUE if the current teach point index in a job contains valid data
C PartFrameValid BOOL 3X:7902.1 TRUE if the current part frame index contains valid data
C ToolValid BOOL 3X:7902.2 TRUE if the current tool index contains valid data
C RemoteGroup BOOL 3X:7902.3 TRUE if the group is a remotely hosted group. Eg Groups con-
trolled by the MLX are considered remote groups.
C SignalsGuardCircuitOpen BOOL 3X:7902.4 TRUE if the guard circuit is preventing the group from getting
energized/moving
C ControlInputsValid BOOL 3X:7902.5 TRUE if the control inputs of the group are valid.
C GroupSelected BOOL 3X:7902.6 TRUE if the group name entered in the pendant is valid and
matches with the AXES_GROUP_REF on the PendantDriver func-
tion block.

Sub Data Type Declaration - PendantInputRegisterStruct (FROM MPiec TO Pendant)

* Element Data Type Byte Offset Modbus Description


Address
FromPendantStruct
C CubicIZs DINT 0 3X:7501 Number of cubiz
Interference Zones
supported
C TeachPoints DINT 4 3X:7503 Number of Teach
Points supported

Page 333 of 757


* Element Data Type Byte Offset Modbus Description
Address
FromPendantStruct
C Tools DINT 8 3X:7505 Number of Tools sup-
ported
C PLCControllerType INT 12 3X:7507 any controller = 0,
MPiec = 1, std = 02 /
reserved / reserved
/ reserved
C RemoteControllerType INT 14 3X:7508 local = 0, MLX = 1,
MotomanSync = 02
/ reserved /
reserved / reserved
C MemoryMapVersion DWORD 16 3X:7509 Each byte as HEX =
Major / Minor / Build
/ Build - example [03
05 00 01]
C PendantDriverVersion DWORD 20 3X:7511 Each byte as HEX =
Major / Minor / Build
/ Build - example [03
05 00 03]
C available DINT 24 3X:7513 available, unused
C NumberOfQueuedErrors DINT 28 3X:7515 Not Supported
C Robots DINT 32 3X:7517 Not Supported
C OperationMode DINT 36 3X:7519 Hardware mode if
OperationMode = 1.
Simulation Mode if
Operation Mode = 0
C ControllerAlarmID DINT 40 3X:7521 added 2/9/18
C AxisErrorClass UINT 44 3X:7523 added 2/9/18,
reduced to 16 bit
2/16/18
C AxisErrorID UINT 46 3X:7524 added 2/9/18,
reduced to 16 bit
2/16/18
C GroupErrorSubCode UDINT 48 3X:7525 ErrorSubCode from
remote groups
C FunctionErrorID UINT 52 3X:7527 Error from functions
like Jog, set part
frame, etc in the
pendant driver func-
tion block. 2/9/18
moved from
3X:7671.
C AxisWarningID UINT 54 3X:7528 added 2/9/18
C SystemErrorCode UINT 56 3X:7529 GroupErrorID
C GroupErrorClass UINT 58 3X:7530 GroupErrorClass
C SystemState DINT 60 3X:7531 Group's System
State
C SystemStatus DWORD 64 3X:7533 Reflection of MC_
GroupReadStatus
(bit coding reflects
VAR_OUTPUT
order) 0 =
GroupMoving 1 =
GroupHoming 2 =
GroupErrorStop 3 =
GroupStandby 4 =
GroupStopping 5 =
GroupDisabled 6 =
ConstantVelocity 7
= Accelerating 8 =
Decelerating 9 =

Page 334 of 757


* Element Data Type Byte Offset Modbus Description
Address
FromPendantStruct
InPosition 10 =
StandStill 11 = Inter-
rupted 12 = Syn-
chronizedMotion 13
= DiscreteMotion 14
= ContinuousMotion
C IZStatus DINT 68 3X:7535 Not Supported
C queuedErrorDetailerrorNumber DINT 72 3X:7537 Not Supported
C RobotNumberOfAxes DINT 76 3X:7539 added to pendant
driver 2/13/18
C Position[0] REAL 80 FP3:7541 Axis 0 Joint Position
C Position[1] REAL 84 FP3:7543 Axis 1 Joint Position
C Position[2] REAL 88 FP3:7545 Axis 2 Joint Position
C Position[3] REAL 92 FP3:7547 Axis 3 Joint Position
C Position[4] REAL 96 FP3:7549 Axis 4 Joint Position
C Position[5] REAL 100 FP3:7551 Axis 5 Joint Position
C Position[6] REAL 104 FP3:7553 Axis 6 Joint Position
C currentTCPInJF[0] REAL 108 FP3:7555 TCP X Coordinate in
currently selected
frame
C currentTCPInJF[1] REAL 112 FP3:7557 TCP Y Coordinate in
currently selected
frame
C currentTCPInJF[2] REAL 116 FP3:7559 TCP Z Coordinate in
currently selected
frame
C currentTCPInJF[3] REAL 120 FP3:7561 TCP Rx Coordinate in
currently selected
frame
C currentTCPInJF[4] REAL 124 FP3:7563 TCP Ry Coordinate in
currently selected
frame
C currentTCPInJF[5] REAL 128 FP3:7565 TCP Rz Coordinate in
currently selected
frame
C currentTCP[0] REAL 132 FP3:7567 Not Supported
C currentTCP[1] REAL 136 FP3:7569 Not Supported
C currentTCP[2] REAL 140 FP3:7571 Not Supported
C currentTCP[3] REAL 144 FP3:7573 Not Supported
C currentTCP[4] REAL 148 FP3:7575 Not Supported
C currentTCP[5] REAL 152 FP3:7577 Not Supported
C MaxAngularAccel REAL 156 FP3:7579 Group's Maximum
Angular Acceleration
read from the
AXES_GROUP_REF
structure
C MaxAngularJerk REAL 160 FP3:7581 Group's Maximum
Angular Jerk read
from the AXES_
GROUP_REF struc-
ture
C MaxAngularSpeed REAL 164 FP3:7583 Group's Maximum
Angular Speed read
from the AXES_
GROUP_REF struc-
ture
C MaxLinearAccel REAL 168 FP3:7585 Group's Maximum

Page 335 of 757


* Element Data Type Byte Offset Modbus Description
Address
FromPendantStruct
Linear Acceleration
read from the
AXES_GROUP_REF
structure
C MaxLinearJerk REAL 172 FP3:7587 Group's Maximum
Linear Jerk read
from the AXES_
GROUP_REF struc-
ture
C MaxLinearSpeed REAL 176 FP3:7589 Group's Maximum
Linear Speed read
from the AXES_
GROUP_REF struc-
ture
C ReservedTeachPoint[0] REAL 180 FP3:7591 Not Supported
C ReservedTeachPoint[1] REAL 184 FP3:7593 Not Supported
C ReservedTeachPoint[2] REAL 188 FP3:7595 Not Supported
C ReservedTeachPoint[3] REAL 192 FP3:7597 Not Supported
C ReservedTeachPoint[4] REAL 196 FP3:7599 Not Supported
C ReservedTeachPoint[5] REAL 200 FP3:7601 Not Supported
C ActiveTool INT 204 3X:7603 Currently active tool
index
C ActivePartFrame INT 206 3X:7604 Currently active part
frame index
C errorNumber INT 208 3X:7605 Not Supported
C queuedErrorNumber INT 210 3X:7606 Not Supported
C TeachPointTool INT 212 3X:7607 Tool Number cor-
responding to the
current taught
point
C TeachPointPF INT 214 3X:7608 Part frame cor-
responding to the
current taught
point
C CubicIZ1_GroupActiveStatus0 INT 216 3X:7609 Not Supported
C CubicIZ1_GroupActiveStatus1 INT 218 3X:7610 Not Supported
C CubicIZ2_GroupActiveStatus0 INT 220 3X:7611 Not Supported
C CubicIZ2_GroupActiveStatus1 INT 222 3X:7612 Not Supported
C CubicIZ3_GroupActiveStatus0 INT 224 3X:7613 Not Supported
C CubicIZ3_GroupActiveStatus1 INT 226 3X:7614 Not Supported
C CubicIZ4_GroupActiveStatus0 INT 228 3X:7615 Not Supported
C CubicIZ4_GroupActiveStatus1 INT 230 3X:7616 Not Supported
C CubicIZ5_GroupActiveStatus0 INT 232 3X:7617 Not Supported
C CubicIZ5_GroupActiveStatus1 INT 234 3X:7618 Not Supported
C CubicIZ6_GroupActiveStatus0 INT 236 3X:7619 Not Supported
C CubicIZ6_GroupActiveStatus1 INT 238 3X:7620 Not Supported
C CubicIZ7_GroupActiveStatus0 INT 240 3X:7621 Not Supported
C CubicIZ7_GroupActiveStatus1 INT 242 3X:7622 Not Supported
C CubicIZ8_GroupActiveStatus0 INT 244 3X:7623 Not Supported
C CubicIZ8_GroupActiveStatus1 INT 246 3X:7624 Not Supported
C CubicIZ9_GroupActiveStatus0 INT 248 3X:7625 Not Supported
C CubicIZ9_GroupActiveStatus1 INT 250 3X:7626 Not Supported

Page 336 of 757


* Element Data Type Byte Offset Modbus Description
Address
FromPendantStruct
C CubicIZ10_GroupActiveStatus0 INT 252 3X:7627 Not Supported
C CubicIZ10_GroupActiveStatus1 INT 254 3X:7628 Not Supported
C CubicIZ11_GroupActiveStatus0 INT 256 3X:7629 Not Supported
C CubicIZ11_GroupActiveStatus1 INT 258 3X:7630 Not Supported
C CubicIZ12_GroupActiveStatus0 INT 260 3X:7631 Not Supported
C CubicIZ12_GroupActiveStatus1 INT 262 3X:7632 Not Supported
C CubicIZ13_GroupActiveStatus0 INT 264 3X:7633 Not Supported
C CubicIZ13_GroupActiveStatus1 INT 266 3X:7634 Not Supported
C CubicIZ14_GroupActiveStatus0 INT 268 3X:7635 Not Supported
C CubicIZ14_GroupActiveStatus1 INT 270 3X:7636 Not Supported
C CubicIZ15_GroupActiveStatus0 INT 272 3X:7637 Not Supported
C CubicIZ15_GroupActiveStatus1 INT 274 3X:7638 Not Supported
C CubicIZ16_GroupActiveStatus0 INT 276 3X:7639 Not Supported
C CubicIZ16_GroupActiveStatus1 INT 278 3X:7640 Not Supported
C CubicIZ17_GroupActiveStatus0 INT 280 3X:7641 Not Supported
C CubicIZ17_GroupActiveStatus1 INT 282 3X:7642 Not Supported
C CubicIZ18_GroupActiveStatus0 INT 284 3X:7643 Not Supported
C CubicIZ18_GroupActiveStatus1 INT 286 3X:7644 Not Supported
C CubicIZ19_GroupActiveStatus0 INT 288 3X:7645 Not Supported
C CubicIZ19_GroupActiveStatus1 INT 290 3X:7646 Not Supported
C CubicIZ20_GroupActiveStatus0 INT 292 3X:7647 Not Supported
C CubicIZ20_GroupActiveStatus1 INT 294 3X:7648 Not Supported
C CubicIZ21_GroupActiveStatus0 INT 296 3X:7649 Not Supported
C CubicIZ21_GroupActiveStatus1 INT 298 3X:7650 Not Supported
C CubicIZ22_GroupActiveStatus0 INT 300 3X:7651 Not Supported
C CubicIZ22_GroupActiveStatus1 INT 302 3X:7652 Not Supported
C CubicIZ23_GroupActiveStatus0 INT 304 3X:7653 Not Supported
C CubicIZ23_GroupActiveStatus1 INT 306 3X:7654 Not Supported
C CubicIZ24_GroupActiveStatus0 INT 308 3X:7655 Not Supported
C CubicIZ24_GroupActiveStatus1 INT 310 3X:7656 Not Supported
C CubicIZ25_GroupActiveStatus0 INT 312 3X:7657 Not Supported
C CubicIZ25_GroupActiveStatus1 INT 314 3X:7658 Not Supported
C CubicIZ26_GroupActiveStatus0 INT 316 3X:7659 Not Supported
C CubicIZ26_GroupActiveStatus1 INT 318 3X:7660 Not Supported
C CubicIZ27_GroupActiveStatus0 INT 320 3X:7661 Not Supported
C CubicIZ27_GroupActiveStatus1 INT 322 3X:7662 Not Supported
C CubicIZ28_GroupActiveStatus0 INT 324 3X:7663 Not Supported
C CubicIZ28_GroupActiveStatus1 INT 326 3X:7664 Not Supported
C CubicIZ29_GroupActiveStatus0 INT 328 3X:7665 Not Supported
C CubicIZ29_GroupActiveStatus1 INT 330 3X:7666 Not Supported
C CubicIZ30_GroupActiveStatus0 INT 332 3X:7667 Not Supported
C CubicIZ30_GroupActiveStatus1 INT 334 3X:7668 Not Supported
C CubicIZ31_GroupActiveStatus0 INT 336 3X:7669 Not Supported
C CubicIZ31_GroupActiveStatus1 INT 338 3X:7670 Not Supported
C UserStatus WORD 340 3X:7671 User customizable
status bits to pass
from their IEC applic-
ation to a host App

Page 337 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PlaneResultStruct

For use with the PlaneMeasurement function block.

Data Type Declaration


* Element Data Type Description Usage
GridResults GridResultsStruct
C Offset MC_CARTESIAN_ Offset which can be used directly with Y_GroupSetFrameOffset. PlaneResults.Offset
REF
C Measurement PlaneResultArray ARRAY[0..2] OF MeasurementResultStruct PlaneResults.Measurement
[1].Position[1]

MeasurementResultStruct sub structure


* Element Data Description Usage
Type
GridResults.Point BufferStruct
C Position MC_ PlaneResults.Measurement.Position
CARTESIAN_
REF
C MeasuredOK BOOL Status flag which indicates if the measurement was PlaneResults.Measurement.MeasuredOK
successful.

Page 338 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PlaneSetupStruct

For use with the PlaneMeasurement function block.

Data Type Declaration


* Element Data Type Description Usage

Page 339 of 757


GridSetup
U MeasureMethod GTB_Meas- Only Torque sensing is supported. In the PlaneSetup.MeasureMethod
urementType future, select torque, digital sensor, or
LVDT.
U MeasuredPlane YTB_STRING8 Provide the name as specified in the Hard- PlaneSetup.MeasuredPlane
ware Configuration -> Group -> Label
column for the plane to be measured.
U Point TouchPointArray ARRAY [0..2] OF VECTOR. Specify the XY loc- PlaneResults.Point[1]
ations of the three locations on the plane to
be measured.
U TransferVelocity LREAL Velocity used when moving between meas- PlaneResults.TransferVelocity
urement locations at the Transfer position.
U ApproachVelocity LREAL Velocity used when moving between the PlaneResults.ApproachVelocity
Transfer position and the Approach pos-
ition.
U MeasurementVelocity LREAL Velocity used when moving between the PlaneResults.MeasurementVelocity
Approach position and the Measurement
position.
U Acceleration LREAL Acceleration used with all moves in the PlaneResults.Acceleration
measurement process.
U TransferPosition LREAL The position away from the grid to be meas- PlaneResults.TransferPosition
ured at which the TCP moves to the various
measurement points.
U ApproachPosition LREAL The position away from the grid to be meas- PlaneResults.ApproachPosition
ured at which the velocity may be reduced
and the torque limited in the direction of
measurement to prepare for contact with
the surface.
U Tolerance LREAL Each measurement must be within the Tol- PlaneResults.Tolerance
erance of the expected Meas-
urementPosition, or an Error will be
generated. This is to ensure that valid meas-
urements are being recorded and the Meas-
urementTorqueLimit provided is
appropriate.
U MeasurementTorqueLimit DINT This value is written to ServoPack pn 402 or PlaneResults.MeasurementTorqueLimit
403 depending on the direction of the meas-
urements to be taken. Units are percentage
of rated torque. It is important to select
a torque limit which will not damage
the equipment, but allow accurate
position reading to be
recorded.Ideally, this value is just above
the level of torque required to move the axis
under normal conditions at the Meas-
urementVelocity by 1.5 or 2 times.
U ExternalPlane GTB_MotorArray If the group contains a virtual axis for the PlaneResults.ExternalPlane
joint required to measure the grid, the
GridMeasurement function block will search
the ExternalPlane structure to determine
the real servo(s) to set the torque limit and
read the position. If the group does not con-
tain a non servo axis on the joint in question,
this structure is not used.

Page 340 of 757


Example Initialization

Page 341 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PrinterStruct

Contains information for 3D printing applications, including externally operated devices, such as heaters, and fans. The func-
tions in the Group Toolbox do not directly manage temperature and fan control features. Support for these features must be
added to the MotionWorks IEC application based on the machines specific hardware. The Read_GCode_File and Read_GCode_
Stream function block will recognize various M Codes for temperature and fan and copy the parameter values into the Print-
erStruct for the MotionWorks IEC project to reference.

Data Type Declaration (0120190110)


* Element Data Description Usage
Type
PrinterStruct
U BedTempActual YTB_RealAr- The user application can write the actual MyMachine.Printer.BedTempActual[x]
ray32 bed temperatures back to this structure if
desired, but they are not used by any func-
tion in the Group Toolbox. These values
along with the entire MachineStruct are
sent to the host application such as
CNCWorks once per second for display pur-
poses.
U BedTempSetting YTB_RealAr- When receiving an M140 command, bed MyMachine.Printer.BedTempSetting[x]
ray32 temperatures are stored in this structure
for use by the MotionWorks IEC application
program.
U BedTempTolerance REAL The PC software such as CNCWorks, the MyMachine.Printer.BedTempMinTarget
MotionWorks IEC Application Program, or
M190 code can set the minimum tem-
perature to wait for when using M190.
U EnclosureTempActual REAL The MotionWorks IEC project must be cus- MyMachine.Printer.EnclosureTempActual
tomized by connecting the actual tem-
perature of the Enclosure to this variable,
which will be communicated to the
GroupComm DLL and the PC software.
U EnclosureTempSetting REAL When receiving an M190 command, the S MyMachine.Printer.EnclosureTempSetting
register value will be stored in this variable.
The MotionWorks IEC project must be cus-
tomized to use this data to control the
Enclosure temperature.
U EnclosureTempTolerance REAL For future use. MyMachine.Printer.EnclosureTempMinTarget
U BedTempReady BOOL When receiving an M140 command, bed MyMachine.Printer.BedTempReady
temperatures are stored in this structure
for use by the MotionWorks IEC application
program.
U EnclosureTempReady BOOL When receiving an M140 command, bed MyMachine.Printer.EnclosureTempReady
temperatures are stored in this structure
for use by the MotionWorks IEC application
program.
U Fan BOOL Flag which can be used by the MyMachine.Printer.Fan
MotionWorks IEC application program to
control the Fan. This is set by M106 and
M107 commands.

Page 342 of 757


U FanSpeed BYTE The fan speed as received from an M106 MyMachine.Printer.FanSpeed
command.
U Extruder ExtruderArray Array of three ExtruderStruct containing MyMachine.Printer.Extruder[0].CmdPos
information for up to three extruders. (See
below.)
C ExtruderScalerEffective BOOL This variable is managed by MC_MovePath. MyMachine.Printer.ExtruderScalerEffective
The purpose is to allow the PC software
such as CNCWorks to report when a
change to the Extruder scaler is live on the
machine. When the scaler is changed, the
correction values are applied to new motion
segments, which get placed into a queue,
and may not actually cause motion for sev-
eral seconds. Each time the scaler is
changed, this flag is set FALSE and the
byte offset of the stream noted. When MC_
MovePath determines that the motion
instruction including the changed scaler is
live (causing motion), the variable is set
back to TRUE.
C ExtruderOffsetValid BOOL For internal use by MC_MovePath. The MyMachine.Printer.ExtruderOffsetValid
extruder offset must be valid before a G1
command can command the extuder.
When extruders are changed via the T0 ~
T2 command, the G92 command typically
defines the start point for the extruder.
C ActiveExtruder INT Reports the Active Extruder for systems MyMachine.Printer.ActiveExtruder
which are configured to operate more than
one device. Extruders are switched using
the T0 ~ T2 command.

ExtruderData

Starting in v350, there is an array of ExtruderData to support machines with multiple extruder heads.

In the following chart, the left column indicating 'U'ser or 'C'ontroller - Controller indicates that the MC_MovePath function
block manages the value.

* Element Data Type Description Usage


ExtruderData
U Axis AXIS_REF Reserved for future use. MyMachine.Printer.Extruder
[0].Axis.AxisNum
U XOffset LREAL If the machine is equipped with multiple extruders, MyMachine.Printer.Extruder
these offsets define the physical relationship between [0].XOffset
the primary and secondary extruders. Can also be used
to adjust the general X offset of any extruder.
U YOffset LREAL If the machine is equipped with multiple extruders, MyMachine.Printer.Extruder
these offsets define the physical relationship between [0].YOffset
the primary and secondary extruders. Can also be used
to adjust the general X offset of any extruder.
U ZOffset LREAL If the machine is equipped with multiple extruders, MyMachine.Printer.Extruder
these offsets define the physical relationship between [0].ZOffset
the primary and secondary extruders. Can also be used
to adjust the general X offset of any extruder.
C EOffset LREAL For internal use by MC_MovePath. MyMachine.Printer.Extruder
[0].EOffset
U ScaleFactor REAL The G Code data specified for the extruder position can MyMachine.Printer.Extruder
be overridden by this factor. The allowable range is lim- [0].ScaleFactor
ited between 05. to 1.5.
C CmdPos LREAL For internal use by MC_MovePath. MyMachine.Printer.Extruder
[0]CmdPos
C CmdVel REAL For internal use by MC_MovePath. MyMachine.Printer.Extruder
[0].CmdVel
U TempSetting YTB_RealArray4 An array of extruder temperature settings which can be MyMachine.Printer.Extruder

Page 343 of 757


populated by M104 or M109 commands. [0].TempSetting
U MinWarmTemp YTB_RealArray4 This value can be customized based on application MyMachine.Printer.Extruder
needs. For example, set the value to a temperature that [0].MinWarmTemp
is too hot to touch without burning the skin, such as 45
C. If using CNCWorks, the background color of the
Extruder setting area will be blue if TempActual is less
than MinWarmTemp and Orange if TempActual is
greater than MinWarmTemp but not within the
required tolerance.
U TempTolerance YTB_RealArray4 Enter a tolerance as required before the M109 com- MyMachine.Printer.Extruder
mand will pass program flow to the next command. This [0].TempTolerance
applies for either heating to a specified temperature, or
cooling to the new desired temperature.
U TempActual YTB_RealArray4 Connect the value from the real world temperate sensor MyMachine.Printer.Extruder
in the units of your choice. [0].TempActual
U TempOffset REAL Enter a value as required to override the temperature MyMachine.Printer.Extruder
settings specified in the G ode file. [0].TempOffset
U RetractLength LREAL Reserved for future use. MyMachine.Printer.Extruder
[0].RetractLength
U UnRetractLength LREAL Reserved for future use. MyMachine.Printer.Extruder
[0].UnRetractLength
U RetractFeedRate LREAL Reserved for future use. MyMachine.Printer.Extruder
[0].RetractFeedRate
U ZLift LREAL Reserved for future use. MyMachine.Printer.Extruder
[0].ZLift
U AirPressure BOOL User customizable to report to the PC software. Not MyMachine.Printer.Extruder
used by any Toolbox function block. [0].AirPressure
U VacuumPressure BOOL User customizable to report to the PC software. Not MyMachine.Printer.Extruder
used by any Toolbox function block. [0].VacuumPressure
U LowTorque BOOL User customizable to report to the PC software. Not MyMachine.Printer.Extruder
used by any Toolbox function block. [0].LowTorque
U HighTorque BOOL User customizable to report to the PC software. Not MyMachine.Printer.Extruder
used by any Toolbox function block. [0].HighTorque
U TempReady BOOL User customizable to report to the PC software. Not MyMachine.Printer.Extruder
used by any Toolbox function block. [0].TempReady

Page 344 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SegmentDetails

A supporting structure for MC_PATH_DATA_REF. This is an array of SegmentDetails, each of which contains the necessary
information for the Segment based on the SegmentType. This list of elements in this structure is comprehensive; note that ele-
ments are only used for specific SegmentTypes as detailed below.

Data Type Declaration


* Element Data Type Description Usage
MyPathStruct MC_PATH_
DATA_REF
Segment SegmentDetails Data structure used with the MC_MovePath function
block.
U SegmentType INT See GTB_SegmentType . MyPathStruct.Segment
[n].SegmentType
C Index INT Identifier of the Segment Index of this item within MC_PATH_ MyPathStruct.Segment
DATA_REF. For use by functions such as CheckColinearity and [n].Index
ToolComp. Typically function blocks which parse source data and
load the MC_PATH_DATA_REF will populate this with data from
the source for debugging purposes. For example, if a G Code file
contains lines numbers with the code N344, the value 344 will be
copied to this element.
U LineNumberRef DINT Typically function blocks which parse source data and load the MyPathStruct.Segment
MC_PATH_DATA_REF will populate this with data from the [n].LineNumberRef
source for debugging purposes. For example, if a G Code file con-
tains lines numbers with the code N344, the value 344 will be
copied to this element.
U Label YTB_STRING16 For debugging purposes, short descriptive labels can be added. MyPathStruct.Segment
When MC_MovePath is executing, it will display the value as a [n].Label
STRING(16) at the VAR_OUTPUT 'SegmentLabel.'
U X LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].X
of the X axis within the CoordSystem specified. For moves in ACS,
this value corresponds to Joint #1. For other SegmentTypes, this
data is ignored.
U Y LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].Y
of the Y axis within the CoordSystem specified. For moves in ACS,
this value corresponds to Joint #2. For other SegmentTypes, this
data is ignored.
U Z LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].Z
of the Z axis within the CoordSystem specified. For moves in ACS,
this value corresponds to Joint #3. For other SegmentTypes, this
data is ignored.
U Rx LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].Rx
of the Rx axis within the CoordSystem specified. For moves in
ACS, this value corresponds to Joint #4. For other Seg-
mentTypes, this data is ignored.

Page 345 of 757


* Element Data Type Description Usage
MyPathStruct MC_PATH_
DATA_REF
Segment SegmentDetails Data structure used with the MC_MovePath function
block.
U Ry LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].Ry
of the Ry axis within the CoordSystem specified. For moves in
ACS, this value corresponds to Joint #5. For other Seg-
mentTypes, this data is ignored.
U Rz LREAL If SegmentType is StraightLine, Arc, or Direct, this is the abso- MyPathStruct.Segment
lute or relative coordinate [based on the AbsoluteMode element] [n].Rz
of the Rz axis within the CoordSystem specified. For moves in
ACS, this value corresponds to Joint #6. For other Seg-
mentTypes, this data is ignored.
U E LREAL For 3D printing applications. The MachineStruct must be con- MyPathStruct.Segment
figured with an Extruder axis. See these instructions for Con- [n].E
figuring an Extruder axis.
U AxesFlags DWORD These flags identify the axes for which the position data is spe- MyPathStruct.Segment
cifically set for in this segment.This is required for some G Code [n].AxesFlags
commands which behave differently depending on whether a
value has been supplied or not. If manually entering Seg-
mentDetails or creating a custom path generator, you must set
the appropriate flags or no motion will occur. X=bit 0, Y=bit 1, Z =
bit 2, Rx = bit 3, Ry = bit 4, Rz = bit 5.
U VarFlags DWORD For use with G Code applications. Each bit in the DWORD cor- MyPathStruct.Segment
responds to a register letter, bit 0 for A, bit 1 for B, etc. . For [n].VarFlags
example, if the data is specified as G1 X#3 Y#4, the values in
MyPath.Segment[n].X and MyPath.Segment[n].Y are not the
actual position to be used, but are pointers to variables. The val-
ues point to the position values to be referenced from the
VarData struct connected to MC_MovePath.
U AbsoluteMode BOOL If SegmentType is StraightLine, Arc, or Direct, this specifies MyPathStruct.Segment
whether the coordinates in this Segment are Absolute or Relative [n].AbsoluteMode
within the specified CoordSystem. For other SegmentTypes, this
data is ignored.
U CoordSystem MC_Coordin- If SegmentType is Linear, Direct, or Circular, this specifies the MyPathStruct.Segment
ateSystem Coordinate System and will be copied to the corresponding [n].CoordSystem
PLCopen Part 4 function block. For other SegmentTypes, this
data is ignored.
U FeedRate REAL If SegmentType is StraightLine, Arc, or Direct, this value is scaled MyPathStruct.Segment
by the VelocityOverride input to MC_MovePath and copied to the [n].FeedRate
Input of the corresponding PLCopen Part 4 function block. For
other SegmentTypes, this data is ignored.
U ExactStopCheck BOOL If SegmentType is Linear, Direct, or Circular and there are several MyPathStruct.Segment
contiguous motion Segments, ExactStopCheck will cause MC_ [n].ExactStopCheck
MovePath to wait for motion to come to a stop when reaching the
position specified in this Segment before executing additional
motion segments.
U TransitionMode INT If SegmentType is StraightLine, Arc, or Direct, this value is MyPathStruct.Segment
mapped to motion blocks 'TransitionMode' VAR_INPUT. For other [n].TransitionMode
SegmentTypes, this data is ignored.
U TransitionPrm REAL If SegmentType is Linear, Direct, or Circular, this value is mapped MyPathStruct.Segment
to motion blocks 'TransitionParameter' VAR_INPUT. For other [n].TransitionPrm
SegmentTypes, this data is ignored.
U Radius LREAL If SegmentType is Arc, this value may be used by Path gen- MyPathStruct.Segment
erating function blocks such as Read_GCode_File or Read_ [n].Radius
GCode_Stream to convert the necessary circle information for
use the MC_MoveCircularAbsolute.
C StartAngle LREAL If SegmentType is Arc, this value is updated by Path generating MyPathStruct.Segment
function blocks such as Read_GCode_File or Read_GCode_ [n].StartAngle
Stream. For debugging purposes only.
C TraversedAngle REAL If SegmentType is Arc, this value is updated by Path generating MyPathStruct.Segment
function blocks such as Read_GCode_File or Read_GCode_ [n].TraversedAngle
Stream. For debugging purposes only.

Page 346 of 757


* Element Data Type Description Usage
MyPathStruct MC_PATH_
DATA_REF
Segment SegmentDetails Data structure used with the MC_MovePath function
block.
U PathChoice INT If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'PathChoice' VAR_INPUT. [n].PathChoice
U CircleMode INT If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'CircMode' VAR_INPUT. [n].CircleMode
U CenterXCoord LREAL If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint' VAR_INPUT and used based on [n].CenterXCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U CenterYCoord LREAL If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint' VAR_INPUT and used based on [n].CenterYCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U CenterZCoord LREAL If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint' VAR_INPUT and used based on [n].CenterZCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U AuxXCoord LREAL If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint2' VAR_INPUT and used based on [n].AuxXCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U AuxYCoord LREAL If SegmentType is Arc, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint2' VAR_INPUT and used based on [n].AuxYCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U AuxZCoord LREAL If SegmentType is Circular, this value is mapped to MC_MoveCir- MyPathStruct.Segment
cularAbsolute's 'AuxPoint2' VAR_INPUT and used based on [n].AuxZCoord
PathChoice and CircleMode. For other SegmentTypes, this data is
ignored.
U GenericLREAL GenericLREALArray Used for 3D printer extruder positions, and can also be used by MyPathStruct.Segment
custom segment for hold any register/parameter data neces- [n].GenericLREAL[2]
sary. Three LREALs are available.
U InputConditions DWORD Used only if SegmentType is 'WaitForInputs', 'LoopDecision', MyPathStruct.Segment
'BranchDecision', 'NonBlockingInputCheck', 'NonB- [n].InputConditions
lockingLoopDecision', or 'NonBlockingBranchDecision'. Set the
InputConditions required to advance to the next Segment. Only
the bits in InputConditionw which are set HIGH are used to
determine which bits of MC_MovePath.InputFlags must be set
high to continue operation. (Bits set low indicate that the bit is
not checked as part of this segments requirement for advancing,
it does not mean that the corresponding InputFlags' bit must be
low.
U InputTimeout TIME Used only if the SegmentType is 'WaitForInputs'. This is the MyPathStruct.Segment
TIME that MC_MovePath will wait for (InputConditions = [n].InputTimeout
InputFlags). If the machine must wait forever when the
InputConditions are unsatisfied, then use 0 TIME. If the
InputTimeout value is non zero, MC_MovePath will advance to
the next Segment after the InputTimeout. Typically the next
Segment would be 'LoopDecision' or 'BranchDecision' with the
same InputConditions to permit the desired behavior in the
event that the InputConditions have not been met. Specify TIME
in standard IEC61131 syntax.
U StandStillDuration TIME Used only if the SegmentType is 'StandStill'. This is the TIME that MyPathStruct.Segment
MC_MovePath will do nothing during this segment. Specify TIME [n].StandStillDuration
in standard IEC61131 syntax.
U TangentActive BOOL This flag designates segments for which an axis operating tan- MyPathStruct.Segment
gent to the vector path must be synced. MC_MovePath will [n].TangentActive
execute the functions Y_SyncTangentAxisToGroup and MC_
Stop using the AXIS_REF supplied in the MachineStruct.

The MachineStruct must be configured to operate a tangent axis

Page 347 of 757


* Element Data Type Description Usage
MyPathStruct MC_PATH_
DATA_REF
Segment SegmentDetails Data structure used with the MC_MovePath function
block.
outside of the group configuration. If the tangent axis is not
aligned with the upcoming vector path, the PathData can option-
ally pre align the tangent axis using the Rz value with the proper
pre alignment angle. The MC_MovePath can determine that Rz
values are for the external tangent by referencing the
MachineStruct information and use the MC_MoveAbsolute func-
tion block to pre align the tangent axis using rotational velocity
and acceleration as specified in the MachineStruct.
U OutputFlags DWORD The MC_MovePath function block's VAR_OUTPUT 'OutputFlags' MyPathStruct.Segment
will be set to this value when this Segment is active. If motion is [n].OutputFlags
ongoing, the OutputFlags corresponding to this segment is veri-
fied by using Group Parameters 2201 and 2202 to account for
the processing of buffered motion segments. When there is no
motion, such as during SegmentType 'StandStill' or 'WaitForIn-
puts', the OutputFlags are set immediately.
U LogicEvent INT Used only if the SegmentType is 'LoopDecision.' This is a pointer MyPathStruct.Segment
(array index) in the LogicArray information corresponding to this [n].LogicIndex
Segment.
U SelectedTool INT If MachineStruct.MachineType = GTB_Machine#TypeMilling, MyPathStruct.Segment
this indicates the required Tool from the ToolStruct. [n].SelectedTool
If MachineStruct.MachineType = GTB_MachineType#Printer,
this indicates the extruder to be used as set by T0 ~ T2..
C G_GroupStatus1 DWORD Holds the G Code group status information relevant to this seg- MyPathStruct.Segment
ment. The data is reported to StreamStatus for GCodeCom- [n].G_GroupStatus1
m.DLL to provide the information to a PC application.
C G_GroupStatus2 DWORD Holds the G Code group status information relevant to this seg- MyPathStruct.Segment
ment. The data is reported to StreamStatus for GCodeCom- [n].G_GroupStatus2
m.DLL to provide the information to a PC application.
C M_GroupStatus DWORD Holds the M Code group status information relevant to this seg- MyPathStruct.Segment
ment. The data is reported to StreamStatus for GCodeCom- [n].M_GroupStatus
m.DLL to provide the information to a PC application.

Not all elements are used for each SegmentType. The SegmentType element dictates the data which will be referenced for a
given Segment[]. The following chart outlines the relationship between SegmentType and its relevant information.

Example 1
If designing a custom path generating algorithm, if is useful to know which elements of the PathData.Segment[] are applicable
based on the SegmentType specified. Refer to the following chart for usage by MC_MovePath.

Page 348 of 757


Page 349 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SegmentMapStruct

This structure is used by MC_MovePath to track buffered motion segments. It is necessary to control the OutputFlags in syn-
chronization with the motion specified. Motion Segments may be executed some time before they are actually causing motion
based on the number of motion blocks buffered.

Data Type Declaration


* Element Data Type Description Usage
MySegmentMap SegmentMapStruct
C Map MapArray Stores the relationship between a PachStruct.Seg- MySegmentMap.Map[0]
ment and the ID of the motion function executed / [134].PathIndex
queued by the motion engine.
C Buffer SegmentBuffer AXIS_REF of axis to be used for tangent motion. MySegmentMap.Buffer
[1].StorePointer
C ActiveStoreMap INT Flag [0 or 1] which indicates the MapArray to which MySegmentMap.ActiveStoreMap
data is being stored.
C ActiveUseMap INT Flag [0 or 1] which indicates the MapArray from MySegmentMap.ActiveUseMap
which data is being read.

Page 350 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: StreamStruct

This is a substructure within MC_PATH_DATA_REF. It holds data for reporting to a host application via Ethernet. A DLL is avail-
able which will connect to the MPiec controller running the Read_GCode_Stream function block and receive this StreamStatus
information. Search for AN.MPIEC.24 on www.yaskawa.com.

The first four bytes of the structure always contains the version number of the structure.

Version information

Compatibility

Group
Release Date GCodeComm.DLL UDP Packet
Toolbox

January 2020 3.4.2.0 20190127 v361

February 2019 3.4.2.0 20190127 v352

November 2018 1.0.1.1


v350
August 2018 20180103
3.4.1.0
January 2018 v340

Data Type Declaration (20190127)


* Element Data Type Description Usage

Page 351 of 757


MyPath.StreamStatus StreamStruct

Page 352 of 757


C Version UDINT Identifier for packet struc- MyPath.StreamStatus.Version
ture content. The
GCodeComm DLL uses this
information to confirm the
data contents.
C TCPPacketCount UDINT Total packets received MyPath.StreamStatus.TCPPacketCount
since a connection was
made to the Read_GCode_
Stream function block.
C MCSPosition MC_CARTESIAN_REF Array of 6 world space pos- MyPath.StreamStatus.MCSPosition[3]
itions in User Units as
declared in the Hardware
Configuration.
C PCSPosition MC_CARTESIAN_REF Array of 6 world space pos- MyPath.StreamStatus.PCSPosition[3]
itions in User Units as
declared in the Hardware
Configuration.
C AuxPosition YTB_LrealArray8 Array of 8 positions for any MyPath.StreamStatus.AuxPosition[2]
auxiliary axes added to the
group in Hardware Con-
figuration.
C ToGoDistance MC_CARTESIAN_REF The remaining distance for MyPath.StreamStatus.ToGoDistance
each axis in the active [3]
coordinate system until it
achieves the position of the
most immediate move
instruction. If many
instructions are queued,
ToGoDistance only reflects
the live motion instruction,
but will continue to update
as each new instruction
becomes live.
C TCPVelocity REAL Velocity of the TCP in User MyPath.StreamStatus.TCPVelocity
Units as declared in the
Hardware Configuration.
C Velocity LREALArray6 Array of 6 world space velo- MyPath.StreamStatus.Velocity[1]
cities in User Units as
declared in the Hardware
Configuration.
C Torque YTB_LrealArray16 Contains the joint torques MyPath.StreamStatus.Torque[6]
for each motor configured
in the group, which
includes prime axes and
auxiliary axes.
C Path PathStatusStruct Data pertaining to the path See below
such as segments pro-
cessed, current path seg-
ment.
C Buffer BufferStatusStruct Data pertaining to the See below
three buffers involved with
processing data:
ByteBuffer, PathBuffer, and
MotionBufer.
C FB FBStatusStruct Provides the Read_ See below
GCode_Stream and MC_
MovePat h function block
outputs to a host applic-
ation.
C G_GroupStatus1 DWORD Reports the active G-Code PathData.StreamStatus.G_
for each of the predefined GroupStatus1
G-Code groups. The
GCodeComm DLL can inter-
pret the raw bit data in the
DWORD and report mean-
ingful information.

Page 353 of 757


C G_GroupStatus2 DWORD Reports the active G-Code PathData.StreamStatus.G_
for each of the predefined GroupStatus1
G-Code groups. The
GCodeComm DLL can inter-
pret the raw bit data in the
DWORD and report mean-
ingful information.
C M_GroupStatus DWORD Reports the active G-Code PathData.StreamStatus.M_
for each of the predefined GroupStatus
G-Code groups. The
GCodeComm DLL can inter-
pret the raw bit data in the
DWORD and report mean-
ingful information.

PathStatusStruct
* Element Data Type Description Usage

Page 354 of 757


MyPath.StreamStatus.Path PathStatusStruct
C InUse BOOL Set TRUE by the MC_ MyPath.StreamStatus.Path.InUse
MovePath function
block any time it is
Busy. This prevents a
function that loads
data into MC_PATH_
DATA_REF from ini-
tializing the data
while it is being
accessed to provide
motion.
C ByteOffset UDINT Provides a way to link MyPath.StreamStatus.Path.ByteOffset
back to the source
data. ByteOffset
refers to the first
character of the G-
Code which is cur-
rently providing
motion (or live exe-
cution, such as M3).
This can be used by
PC software systems
to provide motion
recovery and resume
a path already in pro-
gress.
C ProcessingByteOffset UDINT Provides a way to link MyPath.StreamStatus.Path.ProcessingByteOffset
back to the source
data. Pro-
cessingByteOffset
refers to the first
character of the G-
Code which is cur-
rently being con-
verted from the data
stream into MPiec
data. This can be
used by PC software
applications to show
the line which may
have resulted in an
error condition, such
as an unsupported
command or bad syn-
tax.
C ExecutingByteOffset UDINT Provides a way to link MyPath.StreamStatus.Path.ExecutingByteOffset
back to the source
data. Execut-
ingByteOffset refers
to the first character
of the G-Code which
is currently being
sent to the firmware
layer. The firmware
may reject a motion
command if for
example circle para-
meters do not rep-
resent a valid arc.
This can be used by
PC software applic-
ations to show the
line which may have
resulted in an error
condition.

Page 355 of 757


BufferStatusStruct
* Element Data Type Description Usage
MyPath.StreamStatus.Bu- Buffer-
ffer StatusStruct
C BytePercent REAL Indicates the percentage (0.0 to MyPath.StreamStatus.Buffer.BytePercent
100.0%) of the CircularByteBuffer that is
filled with data. This information cab be
used by a host application such as
GCodeComm.DLL to throttle the data
being streamed to the Read_GCode_
Stream function block.
C BytesAvailable DINT Number of bytes available to be filled in MyPath.StreamStatus.Buffer-
the CircularByteBuffer (typically for .BytesAvailable
streaming applications.)
C BytesUtilization REAL Not used. MyPath.StreamStatus.Buffer-
.BytesUtilization
C PathPercent REAL Indicates the percentage (0.0 to MyPath.StreamStatus.Buffer.PathPercent
100.0%) of the PathData.Segment[]
array that is filled with data. Filled means
new data has been written, but the MC_
MovePath function block has not
accessed it yet.This can be useful for
debugging and performance analysis.
C PathAvailable DINT Number of Segments in MC_PATH_ MyPath.StreamStatus.Buffer.PathAvailable
DATA_REF that are available to be filled.
C UnderRunWarning BOOL This bit will be set if (Motion has started) MyPath.StreamStatus.Buffer-
AND (PathData.FinalSegment= .UnderRunWarning
Undetermined) AND (PatahData.Buffer-
.StorePointer = PathData.Buffer-
.UsePointer) AND 
(AxesGroup.Status.NumMo-
tionSegments=0) This situation should
never occur, and means the system is
starved for data, or the end of a G-Code
file was not properly specified with an
M30 command.
C MotionPercent REAL Indicates the percentage (0.0 to MyPath.StreamStatus.Buffer-
100.0%) of the firmware layer motion .MotionPercent
queue that has a function block waiting
to provide motion.
C MotionAvailable DINT Availability in the firmware layer motion MyPath.StreamStatus.Buffer-
queue. This is AxesGroup.Status.FreeMo- .MotionAvailable
tionSegments.

FBStatusStruct
* Element Data Type Description Usage
MyPath.StreamStatus.FB.ReadStre- ReadGCodeStreamStat-
am us
C ErrorID UINT The ErrorID repor- MyPath.StreamStatus.FB.ErrorID
ted by the Read_
GCode_Stream
function block.
C ErrorRow UDINT If applicable, the MyPath.StreamStatus.FB.ErrorRow
line number from
the G-Code data
which cor-

Page 356 of 757


responds to the
ErrorID.
C ErrorString YTB_STRING16 If applicable, the MyPath.StreamStatus.FB.ErrorString
string value of the
command in the
G-Code data
which caused the
processing error.
In some cases
when there is
more than one
command per
line, this string
may be inac-
curate.
C InstructionsProcessed UDINT The total number MyPath.StreamStatus.FB.In-
of instructions structionsProcessed
processed since
processing
began.

Page 357 of 757


MyPath.StreamStatus.FBMovePath MovePathStatusStruct
C InputFlagsRequired DWORD Reports the input MyPath.StreamStatus.FB.InputFlagsRequired
conditions that
MC_MovePath is
checking to
advance to the
next segment
C OutputFlags DWORD Reports the out- MyPath.StreamStatus.FB.OutputFlags
puts that are
being set based
on the currently
executing seg-
ment.
C ErrorID UINT The ErrorID repor- MyPath.StreamStatus.FB.ErrorID
ted by the MC_
Movepath func-
tion block.
C ProcessedLabel YTB_STRING16 If populated, MyPath.StreamStatus.FB.ProcessedLabel
reports
PathData.Seg-
ment[p].Label,
where [p] points
to the segment
information that
is being ref-
erenced in order
to execute a
motion or other
sequence related
instruction.
C ExecutedLabel YTB_STRING16 If populated, MyPath.StreamStatus.FB.ExecutedLabel
reports
PathData.Seg-
ment[e].Label,
where [e] points
to the segment
that is currently
providing motion
or other sequence
related instruc-
tion.
C ProcessedTotal UDINT The total number MyPath.StreamStatus.FB.ProcessedTotal
of segments eval-
uated and pro-
cessed.
C ExecutedTotal UDINT The total number MyPath.StreamStatus.FB.ExecutedTotal
of segments com-
pleted (motion
was satisfied or
other sequence
related activity
was successful.)

Page 358 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: ToolDataStruct

Contains Tool information used in Read_GCode_File and Read_GCode_Stream.

ToolData is typically populated by the application program via an HMI or other source. Holds tool data
for use with any compensation (G41, G42, G43, G44) G Code commands. ToolDataStruct contains an array of 21 Tools. There
is support for G Code data to be provided in alternate user units (G20 = inches, G21 = mm) - the ToolDataStruct values will be
converted to the user unit configuration of the group before Tool Compensation is applied.

Data Type Declaration


* Element Data Type Description Usage
MyTools ToolDataStruct
U Version UDINT A unique code for verifying the structure content when transmitting MyTools.Version
to GroupComm.DLL.
U Tool ToolDataArray ARRAY [0.20] OF Tools. MyTools.Tool
[1].Radius

Tools Sub Struct


* Element Data Type Description Usage
ToolS
U Radius LREAL Radius of a tool in the groups Cartesian user units from the Hardware Con- MyTools
figuration. [2].Radius
U Length LREAL Length of a tool in the groups Cartesian user units from the Hardware Con- MyTools
figuration. [4].Length

Page 359 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: UserApplicationData

Contains information for use with robot and pendant applications.

Data Type Declaration


* Element Data Type Description Usage
UserApplicationData
U Config ConfigStruct Contains user settable configuration items for the MyData.Config.JogSpeed.Linear
application, such as JogSpeeds. [3]
U PointList TeachPointArray MyData.PointLost[4].Re-
cordedPoint[2].TCPCoordinate[5]
U Tool ToolStruct
U ToolValid BOOL_ARRAY_64
U PartFrame PartFrameArray
U CubicIZ CubicIZArray
U MaxPointLists DINT MyData.MaxPointLists
U MaxTools DINT MyData.MaxTools
U MaxPartFrames DINT MyData.MaxPartFrames
U MaxCubicIZs DINT MyData.MaxCubicIZs
U MaxTeachPoints DINT MyData.MaxTeachPoints
U PrimeAlignment AlignPrimePrms Only necessary if the group contains more than MyData.PrimeAlignment.Allowance
one servo operating an joint. See the Getting
Started with Secondary Axes section.

ConfigStruct

* Element Data Type Description Usage


ExtruderData
U JogSpeed JogSpeedStruct Contains 4 settable jog speeds for Joint, Linear, and ori- MyData.Config.JogSpeed.Linear
entation motion. [3]

JogSpeedStruct

* Element Data Type Description Usage


ExtruderData
U Joint GTB_LREALArray4 4 speeds for Joint jogs (ACS) MyData.Config.JogSpeed.Joint[1]
U Linear GTB_LREALArray4 4 speeds for linear moves (MCS) MyData.Config.JogSpeed.Linear[3]
U Orientation GTB_LREALArray4 4 speeds for Rx, Ry, Rz moves (MCS) MyData.Config.JogSpeed.Orientation
[0]

Page 360 of 757


Example Configuration

Page 361 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types for Group Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

Page 362 of 757


Enumerated Types Declaration

Page 363 of 757


Enumerated #INT Enum Value Description
Type Value
GTB_Seg- ENUM for SegmentType
mentType

Page 364 of 757


Enumerated #INT Enum Value Description
Type Value
0 n/a Not a valid SegmentType.

Page 365 of 757


Enumerated #INT Enum Value Description
Type Value
1 StraightLine Straight line motion between two coordinate locations.

Page 366 of 757


Enumerated #INT Enum Value Description
Type Value
2 Arc Arc or circular path.

Page 367 of 757


Enumerated #INT Enum Value Description
Type Value
3 StandStill Pause between segments for a specified delay time.

Page 368 of 757


Enumerated #INT Enum Value Description
Type Value
4 WaitForInputs Path processing will wait until the specified input conditions are met. MC_
MovePath will compare this segments InputConditions to the MC_Move-
path.InputFlags.
5 SetTangent Preparation move for a tangent axis to track a tangent path relative to the XY vec-
tor path.
6 Direct Non linear motion between two coordinate locations.
7 JumpDecision Jump to another non sequential Segment (either forward or backward) based
on InputConditions.
8 BranchDecision End the path early based on InputConditions. MC_MovePath.Done will come on,
the application can check MC_MovePath.ProcessedLabel to determine if the
path completed prematurely.
9 NonBlockingInputCheck Don’t wait to process future Segments if the input conditions are already met.
For example, consider Segment types (1,1,1,1,1,9,1,1,1,1,1.) StraightLine seg-
ments will be executed / buffered to the motion queue until a non motion seg-
ment type is encountered. When segment type 9 is encountered, the
Segments InputConditions are compared to MC_MovePath.InputFlags. As soon
as they are satisfied, processing of the segments after type 9 resumes. This dif-
fers from Segment type 4 because if the path sequence contains Seg-
mentTypes (1,1,1,1,1,4,1,1,1,1,1) the inputs specified are not evaluated until
after the first series of linear motions has been executed and the motion com-
pleted.
10 InputLookAhead Reserved for future use.
11 MoveToOrgin Reserved for future use.
12 SetPosition Set the position of an extruder axis. (3D Printing support)
13 NonBlockingJumpDecision Similar to SegmentType 7, but processing does not wait until any previously buf-
fered motion has completed.
14 NonBlockingBranchDecision Similar to SegmentType 8, but processing does not wait until previously buf-
fered motion has completed.
15 SubCall Designed for use by G Code "IF" and "M98" commands, this segment can
switch program flow to a non sequential segment. A companion sub structure
PathData.Logic.Event, linked via PathData.Segment[p].LogicEvent, must be
loaded with the proper data to satisfy the required logical operation of the Sub
call .
16 SubReturn MC_MovePath refers to PathData.Logic.Event[p].ReturnSegment to set the
next segment to run after the sub call is complete.
17 SetFrameOffset MC_MovePath executes Y_GroupSetFrameOffset to set the PCS relationship to
the MCS. If ThisSegment.AxesFlags <> DWORD#0, then the Segment
X,Y,Z,Rx,Ry,Rz values are used, otherwise, the offsets are references from
MachineData.CoordinateSystem.Offset. Use ThisSegment.CircleMode to act as
the index pointer to the coordinate system.
18 Expression Designed for use by G Code "IF" and variable assignments such as #3=100.
19 SetOutput Designed for use by G Code G62 and G63 commands. If outputs must be set in
between motion commands, this special Segment Type can be used. Normally,
outputs are set to coincide with a motion segment, or remain in a certain state
for other segments. If a G63 command exists on a line by itself (single instruc-
tion block) then no other segment type will be associated with the output set-
ting. In these cases, the G Code processor will automatically set this segment
type, forcing the output to be set.
20 SetFanSpeed For 3D printing applications. Activated by the M106 command.
21 SetExtruder For 3D printing applications. Activated by the M104 command.
22 SetExtruderWait For 3D printing applications. Activated by the M109 command.
23 SetWorkOffset Changes the work coordinate system offset, typically from a G10 command.
This only changes the offset stored in MachineStruct.CoordinateSystem[]. It
does not change the offset in use by the machine. (Reference G54 ~ G59.)
24 FinalSegment Indicates the final segment of the path. If multiple M2 or M30 comnands are
present due to logical sequences, the first 'FinalSegment' encountered will end
path execution.
25 OptionalStop From M0 and M1 commands which act as breakpoints requiring MC_
MovePath.Execute to be triggered again to resume.
26 SubCallHeader Placeholder segment to indicate the start of a subroutine. Represents the loc-
ation of the Oxxx sub program label.
27 SetBed Write the temperature data from M140 H & S resisters to MachineStruct.Print-

Page 369 of 757


Enumerated #INT Enum Value Description
Type Value
er.BedTempSetting[]
28 Spindle Writes the spindle data provided by G96 / G97 /M3 / M4 / M5 and the S register
to MachineStruct.Spindle[].
29 SetBedWait Write the temperature data from M140 H & S resisters to MachineStruct.Print-
er.BedTempSetting[] and wait.
30 ShareToolInfo Provides MC_MovePath with the Tool Length Offset when a T or G43 or G49 com-
mand is executed.

Page 370 of 757


Group_FBs

Toolbox Help Documentation


Help version created 7/23/2021

Custom_Code_Execute

This is a special function block which must be copied and pasted from the Group Toolbox to the Logical POU tree of the main
project for customization. Its purpose is to execute custom G or M code actions required by the user application that are not
supported by the Group Toolbox. Do not include this function in any main project POU. It will automatically be called by MC_
MovePath as necessary when unsupported commands are encountered.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V MachineData MachineStruct Contains parameters such as maximum velocities and accelerations,
and support for 3D printers and tangent axes if required. Also
included are Origin (Home) and Part Coordinate System offsets.
V ThisSegment SegmentDetails Structure of data that holds information for an individual Segment
of information along the path.
V VarData VariableArray An array of LREAL data which can be used with G Code applications
where registers contain variable data. The variable ThisSegment
contains an element named VarFlags. VarFlags is a DWORD where
each bit indicates if a variable was provided for a specific G Code
register. A=bit 0, B=bit 1, C=bit 2, etc. If the application will not
require the use of variables, it is not important that this variable be

Page 371 of 757


Global, or linked with any other data or function blocks, but it must
be connected to satisfy the compiler.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V InputFlags DWORD The custom G Code can optionally reference the bits of DWORD#0
this DWORD. The data is connected to the VAR_INPUT
of MC_MovePath.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V OKToIncrement BOOL The customized code sets this to TRUE by default. Under each CASE
statement, customize the code if required to conditionally inform
MC_MovePath if the activity taking place in the custom G or M code
event has passed the conditions required to advance along in the
path. See examples below.
V InputFlagsRequired DWORD For debugging purposes. If a custom G or M code requires waiting
for one of the 32 bits connected to MC_MovePath.InputFlags, Cus-
tom_Code_Execute can report the bits required to continue along
the path. This is useful for debugging purposes. When reported at
the output of MC_MovePath, this information is also sent to a PC
application via the GCodeComm DLL.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Notes
l See the recommended procedures and example in the help for Custom_Code_Processor.

Adding an Application Specific Data Structure


In the examples shown, notice the variable "MyAppData" in several locations. Most applications will require a structure to hold
the data required for access by the custom codes.

Procedure

1) Create a User Defined Data Type in the main project. This structure design is based completely on the needs and complexity
required of the application.

2) Create a Global variable of this new User Defined Type. The variable can have any name desired.

3) Right click on the variables grid of Custom_Code_Execute and add this variable as VAR_EXTERNAL. This data structure is
not required by Custom_Code_Processor.

It is now possible to transfer data to/from the G and M Codes to the Application specific data structure, where they can be fur-
ther processed.

Error Description
See the Function Block ErrorID list.

Page 372 of 757


Examples
All examples for this function are listed in Custom_Code_Processor because the two blocks are related and customization must
be performed together.

Page 373 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Custom_Code_Processor

This is a special function block which must be copied and pasted from the Group Toolbox to the Logical POU tree of the main
project for customization. Its purpose is to process overrides or custom G or M codes required by the user application that are
not supported by the Group Toolbox. It must have the exact name as shown: "Custom_Code_Processor."

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V GCodeData GCodeStruct Working data set used by the G Code Processor. It is made available
as a VAR_IN_OUT mainly for debugging purposes. For applications
using variables for register values, this GCodeData.Variables sub
structure must be connected to the VAR_IN_OUT "VarData" of MC_
MovePath.
V ThisSegment SegmentDetails Structure of data that holds information for an individual Segment of
information along the path. A sub structure within PathData.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Page 374 of 757


Procedure
1. Open the main project in MotionWorks IEC.
2. Open a second copy of MotionWorks IEC, and open the Group Toolbox, typically from the "C:\User-
s\Public\Documents\MotionWorks IEC 3 Pro\Libraries" folder. It is also possible to locate the Group Toolbox ref-
erenced in your project by right clicking on the Group Toolbox / User Library and viewing its Properties.
3. In the Project Tree Window of the restricted version of MotionWorks IEC, locate the functions Custom_Code_
Execute and Custom_Code_Processor.
4. Copy these functions by multi selecting and Copy. In the main project, right click on the Logical POUs section of
the Project Tree Window and Paste.
5. Important - Even though this function is called internally by the G-Code processor, it is necessary to add it to a
POU in the main project so the compiler knows which instance to reference. Attach appropriate VAR_IN_OUT
variables to satisfy the compiler requirement. It is not necessary to populate relevant data in the connected vari-
ables as they will not be used.
6. The function blocks serve as templates for customization. Within the overall code architecture of the functions,
add custom codes to the G or M code section of the CASE statements.

Motion Flow Considerations


Motion flow can be configured by using the custom segments "ExactStopCheck" BOOL flag as shown in the examples below.

Setting ExactStopcheck = FALSE (Default)

Any motion commands surrounding the custom code will be not be stopped. For example, an analog or digital output must be
synchronized with motion. The custom code will be placed in a monitoring queue to be executed when the motion path (which
is likely buffered) actually crosses the preceding coordinate position. In this scenario, Custom_Code_Execute (for the custom
code in question) cannot be configured with OKToIncrement logic to control program flow. OkToIncrement will be ignored
when ExactStopCheck=FALSE.

Up to 30 custom codes can be deferred for later execution.

Setting ExactStopcheck = TRUE

The custom code will wait for any preceding Motion commands to stop before executing. In this scenario, Custom_Code_
Execute can be customized to allow the program flow (and motion) to continue only after any required conditions have been
met. For example, if a heater or pressure reading must be within a required value to proceed. See the OKToIncrement cus-
tomization below in Example #1, line 10.

Error Description
See the Function Block ErrorID list.

Examples
#1 - Setting a BOOL value to the MPiec Controller

Assume a custom M code command "M742" is required to set a BOOL value, and M743 to clear the same BOOL.

Custom_Code_Processor function block

Simply add the custom codes to the CASE statement as shown on line 28. This identifies the codes as recognized by system,
and prevents the CASE ELSE condition from setting the "UnsupportedMCode" Error condition.

Page 375 of 757


Custom_Code_Execute function block

Simply add the code as shown on lines 21 and 22. The variable CustomMCode will have the value of 742 or 743 when the CASE
statement is executed, and can be used in the logic as shown to set or clear a BOOL variable in a user defined structure ref-
erenced in this function as VAR EXTERNAL.

Additionally, choose a program location in the project to link MyAppData.MyBOOL to the relevant device. Consider other logic
which may be required to safely operate the device under all machine conditions. Yaskawa recommends adding only the min-
imum code to link custom Codes to User structures within the Custom_Code_Execute function and adding additional interlock
logic externally.

#2 - Write an analog or multiple analog values to a custom user structure on the MPiec
Controller.

Assume a custom G code command "G392" is required to set several values, specified in the H, I, J, and Q registers.

G392 H12.5 I550.0 J-0.5 Q11.12

The variable 'ThisSegment' is one of the SegmentDetails in an array of SegmentDetails in the PathData structure. 'ThisSeg-
ment' is exclusive to this custom code, so any data element in 'ThisSegment' can be used without interfering with other pro-
cessing in the Group Toolbox. This example shows usage of the Generic LREAL elements provided, and the FeedRate variable,
even though the value transferred here may have nothing to do with FeedRate. When implementing custom codes, its only
important to link the same data in both function blocks, and consider the datatype.

Custom_Code_Processor function block

Add 392 to the CASE statement as shown on lines 15 through 19.

Page 376 of 757


Custom_Code_Execute function block

Add 392 to the CASE statement as shown on lines 9 through 13.

Once the parameter values are loaded into the MyAppData, use the information in other parts of the project to write the values
to the Widget as necessary. Yaskawa recommends keeping the customization code in this block to a minimum, and adding any
other necessary logic externally.

#3 - Wait for an analog value to be greater than or equal to another value.

Assume that custom G code command M406 indicates the machine must wait until a temperature has reached or exceeded a
set point before continuing. In this example, assume MyAppData.TempSetting has been previously set using another custom
code or other method.

Custom_Code_Processor function block

Simply add the custom code to the CASE statement as shown on line 34. This identifies the codes as recognized by system,
and prevents the CASE ELSE condition from setting the "UnsupportedMCode" Error condition. Three is nothing else to do in the
Custom_Code_Processor function. Optionally, the set point could be sent with the custom G Code as a parameter. In that case,
copy the TempSetting into ThisSegment.GenericLREAL[0] similar to the example shown on line 16.

Custom_Code_Execute function block

Add the code as shown in lines 27 and 28. Use the OKToIncrement BOOL variable which is returned to MC_MovePath. Setting
this variable according to the comparison of the two values allows MC_MovePath to know when it's OK to proceed.

Page 377 of 757


#5 Overrides

The ID assigned in the OverrideList function block is added to the base SegmentType of 3000 indicating an override. The ori-
ginal ID can be obtained by subtracting 3000 for the ease of programming (See line 45.) Very little code is required in Cus-
tom_Code_Procesor, sometimes no code other than to list the ID in the CASE statement to prevent the ELSE condition from
returning an Error.

Page 378 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DetectPrimeAxes

This function block searches the AxesGroup structure and the JointMap to determine if any joints are configured with addi-
tional axes. It is useful for operating other functions in Group Toolbox such as GroupToHome and GroupReAlignPrimeAxes.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V JointMap JointMap Structure of data that holds information for Joint Index, Label,
AxisName and AXIS_REF.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Page 379 of 757


V HasPrime BOOL Set TRUE if the Group contains at least one joint configured with more
than one servo.

Notes
l This block only supports Mechatrolink groups, not remote hosted robots via MotomanSync.

Error Description
This function block will not generate any errors, even if the AxesGroup is invalid.

Example
This example shows how GetPrimeAxes is used inside the Pendant_Driver function block.

Page 380 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GridLookup

For a 3D motion space with an uneven plane, this function block provides the offset required given the current Coordinate over
the plane. Its Offset output is intended to be used with Y_DirectControl and other logic to account for the uneven surface.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V GridResults GridResultsStruct Structure previously populated by the GridMeasurement function
block containing the offsets and other grid measurement information.
V Coordinate VECTOR The current location of the other two axes in the group where the off-
set is required. Typically AxesGroup.Machine.ActualPos can be con-
nected to this input, but only of X & Y are the intended input
coordinates, and Z requires an Offset. Otherwise, supply Coordinate
[1] and [2] positions that correspond to the axes which moved over
the plane requiring Offset correction.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.

Page 381 of 757


B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V Offset LREAL The offset to be applied to the required plane based on the current
Coordinate provided.

Notes
l This block will generate an error if the initial Coordinate provided is not within the region specified in GridResults, but if
the Coordinate goes out of bounds afterward, the Offset will remain frozen until the Coordinate becomes in bounds
again.
l This function uses bilinear interpolation to calculate the Offset.
l Execute this function in a task at the same update interval as the Mechatrolink network. Check the Group configuration.
Confirm that the IO variable for the AxesGroup is updated at a same interval as the Mechatrolink network.

Error Description
See the Function Block ErrorID list.

Example

Page 382 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GridMeasurement

This function block moves a group to measure a grid / plane surface by touching the grid surface at an array of locations. The
recorded GridResults can then be written to a file using WriteGridFile / ReadGridFile, and ultimately used to provide on the fly
offset compensation using GridLookup in conjunction with Y_DirectControl.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V GridSetup GridSetupStruct Structure of data that provides information for measuring the spe-
cified plane.
V GridResults GridResultsStruct Contains the measurement information which can be written to a
file and referenced with the GridLookup function block.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs FALSE
are read and the function is initiated. To modify an
input, change the value and re-trigger the execute
input.

Page 383 of 757


VAR_OUTPUT
B Done BOOL Indicates that the function is operating normally and the outputs
of the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset
when Done, CommandAborted, or Error is true. In the case of a
function block with an Enable input, a Busy output indicates the
function is operating, but not ready to provide Valid information.
(No Error)
E CommandAborted BOOL Set high if motion is aborted by another motion command or MC_
Stop. This output is cleared with the same behavior as the Done
output.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.
V MaxDeviationWarning BOOL Reports if any of the measured points deviate from another by
more than GridSetup.MaxDeviation. Can be used as a test for meas-
urement validity.
V ErrorState INT If an Error is reported, this is the code from the internal state
machine which may be helpful when debugging.

Notes
l This block will detect if joint has a secondary servo(s), and monitor the torque of all servos configured when moving
the joint to the touch positions. The first motor to indicate a torque limit will cause motion to stop and the measurement
to be taken. A maximum of three servos operating the joint (as secondary axes) are supported.
l The only mode supported is "measurement by torque limited contact with the surface." The other modes are reserved
for future enhancement.
l See related function blocks: WriteGridFile, ReadGridFile, GridLookup.

Error Description
See the Function Block ErrorID list.

Example
Initialization:

Page 384 of 757


Page 385 of 757
Toolbox Help Documentation
Help version created 7/23/2021

GroupReAlignPrimeAxes

This function block searches the AxesGroup structure to determine if any joints are configured with additional prime axes. If
all the motors operating a joint are already within the PrimeAllowance, the prime motors are moved to the same commanded
position as the main motor. It is useful to prepare a group for MC_GroupEnable and prevent that function from generating the
ErrorID 8966.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V JointMap JointMap Structure of data that holds information for Joint Index, Label,
AxisName and AXIS_REF.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
B Velocity LREAL Absolute value of the velocity in user units/second. LREAL#0.0

B Acceleration LREAL Value of the acceleration in user units/second^2 (accel- LREAL#0.0


eration is applicable with same sign of torque and velo-
city)
V PrimeAllowance LREAL Specify the maximum amount of difference between the LREAL#0.0
main and prime servo commanded positions to permit

Page 386 of 757


safe alignment. See the Getting Started with Secondary
Axes section.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
E CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop.
This output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l This block only supports Mechatrolink groups, not remote hosted robots via MotomanSync.
l The Group's servo power must be applied before executing this block. (Y_GroupPower, or GroupControl.EnablePower)
l PrimeAllowance must not be set to a large value, which could cause damage to the machine! It is assumed that the
motors were previously aligned and positions were set properly. This function block is only to be used to perform minor
realignment motion such that all motors on each joint are at the exact same commanded position in preparation for exe-
cution of MC_GroupEnable.

Error Description
See the Function Block ErrorID list.

Example #1

Page 387 of 757


Example #2
This example is taken from the Pendant_Driver function block. It's part of a CASE statement which enables the servos and
enables the group. The CASE statement operates as follows:

1) MC_GroupDisable

2) Y_GroupPower

3) GroupReAlignPrimeAxes (HasPrime BOOL was set by executing DetectPrimeAxes. See its example.

4) MC_GroupEnable (Should now be successful because all secondary axes have same commanded position as main.)

Page 388 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GroupCommManager

This function block provides a communication interface to GroupComm.DLL to provide support for group operations to PC soft-
ware such as CNCWorks. It contains the Pendant_Driver function block, and supports data transfer of other structures such
as MachineStruct and GCodeRegisters.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains
several additional substructures pertaining to the
group.
V HostData PendantDataStruct Contains the data which is shared with the host via
GroupComm.DLL.
V MachineData MachineStruct Contains parameters such as maximum velocities and
accelerations, and support for 3D printers and tan-
gent axes if required. Also included are Origin

Page 389 of 757


(Home) and Part Coordinate System offsets.
V UserApplicationData UserApplicationData Structure which contains configuration, teach point
and tool data.
V GCodeRegisters GCodeRegister Structure containing the last value provided by the
host (file or stream) for each register (letter of the
alphabet.)
V HomeOptions HomeOptionsStruct Data structure containing information for various
homing methods and sequences.
V ToolData ToolDataStruct Contains radius and length data for tools that may be
selected.
VAR_INPUT Default
B Enable BOOL The function will continue to execute FALSE
every scan while Enable is held high and
there are no errors.
V CommConfig CommStruct Structure which configures this function All zeros
block to communicate with the GCodeCom- in struc-
m.DLL on a PC. ture
V TimeOut TIME Reserved for future use. T#0s
(No
Timeout)
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and
the outputs of the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input,
and reset when Done, CommandAborted, or Error is
true. In the case of a function block with an Enable
input, a Busy output indicates the function is oper-
ating, but not ready to provide Valid information. (No
Error)
V HostConnected BOOL Confirms that a host has successfully initiated a con-
nection.
B Error BOOL Set high if an error has occurred during the exe-
cution of the function block. This output is cleared
when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID.
This output is reset when 'Execute' or 'Enable' goes
low.
V PacketCount UDINT Reports the number of packets received on port
V HostIPAddress STRING The IP address of the device which initiated the con-
nection request to the MPiec controller.

Notes
l This block was designed for use with a PC software interface such as CNCWorks using GroupComm.DLL.
l Yaskawa recommends executing this function block in a 50 mSec task. This has been determined as an ideal update
interval for adequate response to jog button presses, and other user controls.
l See the Getting Started with Secondary Axes section.

Page 390 of 757


l This is how GroupCommManager fits into a complete solution:

Error Description
See the Function Block ErrorID list.

Example
Refer to the document AN.MPIEC.27 on www.yaskawa.com for an Application Note and template project describing how this
function block is used in the context of a 3D printing solution.

Page 391 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GroupStatus

This function block monitors all alarms from various areas of the system which could affect group operation. It is used within
the GroupControl function block.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of

Page 392 of 757


the function are valid.
V ControllerAlarm BOOL Indicates a controller side axis alarm.
V ControllerAlarmID BOOL Indicates the controller alarm ID number, such as 3302 0018.
(shown in hex.) Refer to the Controller AlarmID list in the
PLCopenPlus manual for troubleshooting.
V GroupError BOOL Indicates a group alarm.
V GroupErrorClass BOOL The error class indicates the source of the error. For more inform-
ation, refer to the Controller Alarm ID List.
V GroupErrorID BOOL Indicates the group alarm ID number.
V GroupErrorSubCode UDINT If using a remote hosted Robot Controller via MotomanSync, this
output reports additional error detail.
V AxisErrorClass BOOL Indicates an axis alarm.
V AxisErrorID BOOL Indicates an axis warning.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Notes:
l If ErrorClass = 16#3504 (13572 decimal ) then the source of the error is the MLX200. Refer to the MLX AlarmID List
for MLX200 GroupErrorIDs.
l If ErrorClass = 16#3302, 16#3303, 16#4302, or 16#4403, then the source of the error (alarm) is the ServoPack.
Sigma alarms are documented in the Sigma Series user manuals. Please refer to the following manuals for details
regarding servo amplifier errors to look up the alarm code shown at AxisErrorID output:
l Sigma-7 Mechatrolink-III: SIEPS8000128, see Section 12.2
l Sigma-5 Mechatrolink-III with rotary motor: SIEPS8000064, see Section 9.1
l Sigma-5 Mechatrolink-III with linear motor: SIEPS8000065, see Section 8.1
l Sigma-5 Mechatrolink-II with rotary motor: SIEPS8000046, see Section 9.1
l Sigma-5 Mechatrolink-II with linear motor: SIEPS8000048, see Section 8.1
l If ErrorClass is some value other than 16#3302, 16#3303, 16#3504, 16#4302, or 16#4403, the source of the error
is on the MPiec controller side. Refer to the Controller Alarm ID List.
l There is no distinction between Alarms and Errors; they have the same meaning.

Error Description
See the Function Block ErrorID list.

Page 393 of 757


Toolbox Help Documentation
Help version created 7/23/2021

GroupControl

This function block operates and monitors several PLCopen Part 4 group related functions including MC_GroupEnable, MC_
GroupDisable, MC_GroupReadError, MC_GroupReset, Y_GroupPower and other functions such as Y_ReadAlarms, Y_
ClearAlarm.

Library
Group Toolbox

Page 394 of 757


Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V EnableGroup BOOL If TRUE, the MC_GroupEnable function block will be FALSE
executed. If FALSE, the MC_GroupDisable function block
will be executed.
V EnablePower BOOL If TRUE, all the axes belonging to the AxesGroup will be FALSE
powered. All axes are first checked for alarms, and if any
alarms are present, no axes are powered. If FALSE, all of
the axes belonging to the group will be powered down
(servo off).

NOTE: This level sensitive input will retry to achieve the


requested condition every 2 seconds if there is an error
preventing its success.
V AlarmClear BOOL Executes MC_GroupReset, MC_Reset, and Y_ClearAlarms FALSE
based on the current alarms related to the AxesGroup.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
V GroupStatus BOOL Indicates if the group is enabled.
V PowerStatus BOOL Indicates that all axis in the group are powered.
V ControllerAlarm BOOL Indicates a controller side axis alarm.
V ControllerAlarmID UDINT Indicates the controller alarm ID number, such as 3302 0018.
(shown in hex.) Refer to the Controller AlarmID list in the
PLCopenPlus manual for troubleshooting.
V GroupError BOOL Indicates a group alarm.
V GroupErrorClass UINT The error class indicates the source of the error. For more inform-
ation, refer to the Controller Alarm ID List.
V GroupErrorID UINT Indicates the group alarm ID number. Refer to the Controller Alarm
ID list.
V GroupErrorSubCode UDINT If using a remote hosted Robot Controller via MotomanSync, this out-
put reports additional error detail.
V AxisAlarms BOOL Indicates an axis alarm.
V AxisErrorClass UINT Indicates the axis alarm ID number. See notes for more information.
V AxisErrorID UINT Indicates the axis alarm ID number. See MC_ReadAxisError in the
PLCopenPlus help manual for more information.
V AxisWarnings BOOL Indicates an axis warning.
V AxisWarningID UINT Indicates the axis warning ID number. See notes for more inform-
ation.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Page 395 of 757


Notes:
l If ErrorClass = 16#3504 (13572 decimal ) then the source of the error is the MLX200. Refer to the MLX AlarmID List
for MLX200 GroupErrorIDs.
l If ErrorClass = 16#3302, 16#3303, 16#4302, or 16#4403, then the source of the error (alarm) is the ServoPack.
Sigma alarms are documented in the Sigma Series user manuals. Please refer to the following manuals for details
regarding servo amplifier errors to look up the alarm code shown at AxisErrorID output:
l Sigma-7 Mechatrolink-III: SIEPS8000128, see Section 12.2
l Sigma-5 Mechatrolink-III with rotary motor: SIEPS8000064, see Section 9.1
l Sigma-5 Mechatrolink-III with linear motor: SIEPS8000065, see Section 8.1
l Sigma-5 Mechatrolink-II with rotary motor: SIEPS8000046, see Section 9.1
l Sigma-5 Mechatrolink-II with linear motor: SIEPS8000048, see Section 8.1
l If ErrorClass is some value other than 16#3302, 16#3303, 16#3504, 16#4302, or 16#4403, the source of the error
is on the MPiec controller side. Refer to the Controller Alarm ID List.
l There is no distinction between Alarms and Errors; they have the same meaning.

Error Description
See the Function Block ErrorID list.

Example
This example shows an error condition when the group has two axes which operate the same joint (Y axis) on a gantry. The
commanded position of both axes must be identical before the group can be enabled, otherwise, the alarm condition shown
below will result.

Page 396 of 757


Page 397 of 757
Toolbox Help Documentation
Help version created 7/23/2021

GroupToHome

This function block moves a group to its home location in the Coordinate system specified in a sequence specified in
GroupHomeData. Prepare GroupHomeData to indicate the required sequence of operation for safe motion to the home position
to avoid obstacles, if required, as well as the home position. This function does not locate home switches or overtravels, it
assumes that the system has been previously calibrated or homed, and returns to the positions configured in GroupHomeData.
It is intended for use with Absolute Encoders. It can also be used with systems that home to sensors, but that operation is not
included here, and must be previously executed before GroupToHome can be used.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several additional
substructures pertaining to the group.
V GroupHomeData GroupHomeStruct Structure of data that holds information for how the group will be
moved to its home (Origin).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated.
To modify an input, change the value and re-
trigger the execute input.
E CoordSystem MC_Coordin- Enumeration with the following values: 0 = MC_Coordin-
ateSystem ACS, 1 = MCS, 2 = PCS, 3 = TCS, 4 = WCS, 5 ateSystem#ACS
= TPCS.
MC_CoordinateSystem#ACS

Page 398 of 757


MC_CoordinateSystem#MCS
MC_CoordinateSystem#PCS
MC_CoordinateSystem#TCS
MC_CoordinateSystem#WCS
MC_CoordinateSystem#TPCS
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done out-
put will not be set. This output is reset when Execute goes low.
C Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is oper-
ating, but not ready to provide Valid information. (No Error)
C CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop.
This output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l This block will detect joints that have secondary (prime) servos, and will pre align the servos sharing a load prior to
starting the home sequence. If pre alignment must be performed, this block will execute MC_GroupDisable, GroupReA-
lignPrimeAxes, and MC_GroupEnable prior to starting the home sequence.
l See the Getting Started with Secondary Axes section.
l There will be a slight delay until motion starts after executing this function as it determines if there are any joints with
prime axes to realign prior to Executing MC_GroupEnable.

Error Description
See the Function Block ErrorID list.

Example
This example homes a three axis gantry by first raising the Z upward to 12mm , then moving the X & Y axes to their home pos-
itions.

Page 399 of 757


Example logic to start the home process.

Page 400 of 757


Toolbox Help Documentation
Help version created 7/23/2021

MC_MovePath

This function block reads the information in the PathData struct and performs the required actions such as interpolated
motion, waiting for inputs, setting outputs, etc. The PathData struct is typically populated by various sources, such as Read_
GCode_File and Read_GCode_Stream, although it is not required that G Code be used to populate MC_PATH_DATA_REF. Cus-
tom path generators can also be created.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several additional
substructures pertaining to the group.
V MachineData MachineStruct Contains parameters such as maximum velocities and accelerations, and
support for 3D printers and tangent axes if required. Also included are
Origin (Home) and Part Coordinate System offsets.

Page 401 of 757


V PathData MC_PATH_DATA_ Structure of data that contains the details for executing a path sequence.
REF Typically PathData is populated by a source function such as Read_
GCode_File, Read_GCode_Stream, but simple sequences could also be
populated as a static script in ST code.
V VarData VariableArray An array of LREAL data which is only used with G Code applications where
registers contain variable data. For such applications, connect
GCodeData.Variables from the Read_GCode_File function block to this
VAR_IN_OUT. If this data is not applicable to the application, connect a
dummy variable to satisfy the compiler.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
V OperationMode INT Enumeration with the following meanings: GT_Oper-
GTB_OperationMode#Forward ationMode#Forward
GTB_OperationMode#SingleStepFwd
GTB_OperationMode#Neutral
GTB_OperationMode#SingleStepRev (Future
support)
GTB_OperationMode#Reverse (Future sup-
port)
GTB_OperationMode#InfiniteRepeat

See Notes below for details.


V SingleStep BOOL When OperationMode is set for SingleStepFwd, FALSE
the function will execute one Segment from the
PathData at each rising edge of SingleStep.
V VelocityScaler REAL The 'FeedRate' element of each Segment is mul- REAL#100.0
tiplied by the VelocityScaler Input. Changes
only affect new motion segments executed
after a change to VelocityScaler, previous seg-
ments already in the motion buffer will be
executed at the Feedrate and VelocityScaler
specified at the time they were processed. To
change the velocity of the path segments
already in the motion buffer at the firmware
layer, use the MC_GroupSetOverride function
block.
V StartSegment INT The first Segment of the PathData to use upon INT#0
the rising edge of the Execute input. For fault
recovery, set this to a non zero value to
resume a path that was interrupted. Refer to
PathData.Buffer.ExecutedSegment. Capture
this value in the event of an Error or other
interruption of the path and set it as the
StartSegment to recover a path in progress.
V InputFlags DWORD Specify up to 32 digital inputs which can be DWORD#0
used to control path operations in conjunction
with the following SegmentTypes:
GTB_SegmentType#WaitForInputs
GTB_SegmentType#LoopDecision
GTB_SegmentType#BranchDesicion
GTB_SegmentType#NonBlockingInputCheck

Page 402 of 757


See Examples below.
V Abort BOOL Stops executing Segments and uses MC_ FALSE
GroupStop to stop any ongoing motion. The
CommandAborted Output will be set and
motion cannot be started again until the
Execute Input is toggled.
V Pause BOOL This input puts MC_MovePath into an idle state FALSE
where it will no longer process new segments,
but segments already executed and in the
motion buffer will be unaffected and continue
until the buffer is empty. This may result in a
delay from the time Pause is set high until the
group physically stops.
To Pause or "Interrupt" the group immediately,
use the MC_GroupInterrupt function block sep-
arately in the MotionWorks IEC project.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done out-
put will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
E CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop.
This output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V InputFlagsRequired DWORD For use as a debugging tool. This Output reports the InputConditions of
the current Segment. For example, if the machine appears to be stuck, it
is possible that the active Segment is waiting for a specific set of
InputFlags to match before proceeding.
V OutputFlags DWORD PathData.Segment[].OutputFlags are copied to the OutputFlags Output
based on the following conditions:
1) If motion is active, the OutputFlags associated with the Segment
responsible for ongoing motion is applied. This technique relies on Group
Parameters 2201 and 2202.
2) When there is no ongoing motion, the OutputFlags of the Segment
being processed are applied.
V ProcessedLabel YTB_STRING16 If PathData.Segment[].Label was populated by the source, this Output
reports a descriptive name of the Segment being processed. If this is a
motion segment, the motion instruction is executed, but it does not mean
that it is physically causing motion. It may be buffered behind many other
motion instructions based on the path data.
V ExecutedLabel YTB_STRING16 If PathData.Segment[].Label was populated by the source, this Output
reports a descriptive name of the Segment actually causing motion. In the
case of other non motion Segment Types, ProcessedLabel and ExecutedLa-
bel are likely equal to each other.
V ProcessedTotal UDINT Running count of the number of PathData.Segments[] processed since
the rising edge of the Execute input. This value will likely be ahead of
ExecutedTotal based on the path characteristics, and the size of the
Group motion queue as configured in the Hardware Configuration.
V ExecutedTotal UDINT Running count of the number of PathData.Segments[] executed since the
rising edge of Execute. The difference between the ProcessedTotal and
ExecutedTotal is the number of motion blocks still in the motion buffer.

Page 403 of 757


Notes
l Yaskawa recommends executing this function block in a fast task such as 4 or 8 mSec. Factors to consider when
determining the ideal task interval include any InputFlag / OutputFlag usage, and the motion segment density relative
to required velocity.
l This function block references information in AxesGroup.Status, which is updated by the firmware at the task interval
configured in the Hardware Configuration. The IO task assignment must be set to the same or faster task interval as
where the MC_MovePath function is executing, or errors such as 4369 may occur.

Additional information about OperationMode:

l It is possible to change ControlMode on the fly.


l When using GT_OperationMode#SingleStepFwd, if the SingleStep input is pulsed before a motion Segment has com-
pleted, the request is not buffered and will be ignored.
l GT_OperationMode#InfiniteRepeat will permit MC_MovePath to remain Busy indefinitely (Done will not occur.) When
the function reaches the last Segment as identified by comparing (PathData.Buffer.UsePointer = PathData.Fin-
alSegment) it will immediately continue at the beginning of the PathData again. The advantage of this feature is to
provide continuous motion for cyclic operations and improve overall cycle time (OEE). This mode is only available when
the PathData has not been loaded via Ethernet stream. The total Path must be contained within the PataData structure
without being overwritten, otherwise an Error will be generated.

G Code Support:

l Work Coordinate Offsets G54 through G59.3 are stored in the MachineStruct.CoordinateSystem.Offset. The offsets can
be updated by the application program via an HMI or PC, or from the G Code data itself via the G10 command.
l Tool Compensation: T0 ~ T20, G40, G41, G42. Tool data must be loaded in the ToolStruct before executing Read_
GCode_File or Read_GCode_Stream. Select a tool using the T command.

Error Description
See the Function Block ErrorID list.

Example1 - Minimum setup required to get started


To learn how to configure the data to operate this block, this example includes hard coded initialization of the related data
structures.

NOTE! If hard coding a sequence, starting in v350, the AxesFlags DWORD must be set to indicate the coordinates that are
being specified for each segment.

Page 404 of 757


For example: MyPath.Segment[x].AxesFlags:=DWORD#3; (* Bit codes represent Axes as Rx Ry Rz Z Y X = bits 5 4 3 2 1 0 *)
(Not shown in the examples below.) If these are not set, no motion will occur.

Page 405 of 757


Example 2
This example shows a typical method to map physical inputs and outputs to the data used with the function block. See InFlags
and OutFlags usage.

Page 406 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Pendant_Driver

The Pendant_Driver function block provides a communication link to a pendant (or PC application via GroupComm.DLL) to per-
form group related operations. The Pendant_Driver supports operations such as jogging, teaching, part frame definition, tool
data definition, saving and recalling taught data, etc. Feedback and status data are sent to a pendant via the InputRegisterData
structure. Teach point data and part frames are accessible via the UserApplicationData structure.

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V PendantData PendantDataStruct Structure that holds taught data like job points, part frame
coordinates, tool data, interference zone definitions etc. This data
is shared between the Pendant and the IEC Application program.
V UserApplicationData UserApplicationData Structure that holds taught data like job points, part frame
coordinates, tool data, interference zone definitions etc. This data
is shared between the Pendant and the IEC Application program.
V HoldingRegisterData HoldingRegisters_ Structure of read/write data which primarily contains commands
ByteArray sent from a pendant to the MPiec controller. The elements of this
structure are used to perform group tasks like jogging, teaching
etc.
V InputRegisterData InputRegisters_ Structure of read data which contains feedback and status inform-
ByteArray ation about the group.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs

Page 407 of 757


of the function are valid.
V GroupSelected BOOL Indicates that the group name entered on the pendant matches
the name configured for the AxesGroup.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset
when Done, CommandAborted, or Error is true. In the case of a
function block with an Enable input, a Busy output indicates the
function is operating, but not ready to provide Valid information.
(No Error)
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Notes
l This function block generates two types of Errors. Logical errors (such as wrong control mode or group not enabled)
are displayed on the pendant or host and are not reported at the VAR_OUTPUT of this function block. Other errors,
such as a loss of communication are output as a traditional PLCopen function block Error.

Error Description
See the Function Block ErrorID list.

Example

Page 408 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PlaneMeasurement

This function block moves a Group to find a plane by measuring three user specified locations. The recorded results are avail-
able for use with other functions, such as Y_GroupSetFrameOffset.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V PlaneSetup PlaneSetupStruct Structure of data that provides information for measuring the spe-
cified plane.
V PlaneResults PlaneResultsStruct Contains the measurement positions and the Offset which can be
used with Y_GroupSetFrameOFfset.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs FALSE
are read and the function is initiated. To modify an
input, change the value and re-trigger the execute
input.
VAR_OUTPUT
B Done BOOL Indicates that the function is operating normally and the outputs of

Page 409 of 757


the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_
Stop. This output is cleared with the same behavior as the Done out-
put.
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.
V ErrorState INT If an Error is reported, this is the code from the internal state
machine which may be helpful when debugging.

Notes
l This block will detect if joint has a prime axis, and will monitor the torque of all axes involved when moving the joint to
the touch positions. The first motor to indicate a torque limit will cause motion to stop and the measurement to be
taken. A total of three servos operating a single joint is supported.
l Only Measurement by torque limited contact with the surface is supported as of v350.

Error Description
See the Function Block ErrorID list.

Example

Page 410 of 757


After setting the offset via Y_GroupSetFrameOffset, perform all motion on the plane using CoordinateSystem:=MC_Coordin-
ateSystem#PCS.

Page 411 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Read_GCode_File

This function block reads a file containing G Codes from the MPiec controller's flash or ramdisk file system and writes to the
PathData for use with the MC_MovePath function block. Refer to the list of supported G & M Codes.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V MachineData MachineStruct Contains parameters such as maximum velocities and
accelerations, and support for 3D printers and tangent
axes if required. Also included are Origin (Home) and Part
Coordinate System offsets.
V ToolData ToolDataStruct Structure holding ToolData structures. If this data is not
applicable to the application, connect a dummy variable to
satisfy the compiler.

Page 412 of 757


V GCodeData GCodeStruct Working data set used by the G Code Processor. It is
made available as a VAR_IN_OUT mainly for debugging
purposes. For applications using variables for register val-
ues, this GCodeData.Variables sub structure must be con-
nected to the VAR_IN_OUT "VarData" of MC_MovePath.
V PathData MC_PATH_DATA_REF Data structure containing the details parsed from the G
Code source and used by the MC_MovePath function
block.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is
initiated. To modify an input, change the
value and re-trigger the execute input.
V FileName STRING Name of file to be read or written. STRING#'''
Example: STRING#'/-
flash/user/data/myFile.csv' FileName
can include any extension. Max char-
acters for the total FileName is 24. The
directory path is not included in this
maximum.
V FileBufferSize UDINT The number of bytes to read from the UDINT#2048
file 'per cycle' or in one CYCLIC task in
which the function block is executing.
The maximum is 16384. See notes
below for more details.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed suc-
cessfully. If another block takes control before the action
is completed, the Done output will not be set. This output
is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and
reset when Done, CommandAborted, or Error is true. In
the case of a function block with an Enable input, a Busy
output indicates the function is operating, but not ready
to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of
the function block. This output is cleared when 'Execute'
or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This out-
put is reset when 'Execute' or 'Enable' goes low.
V ErrorRow UINT The row in the file which caused the error. If the file con-
tains Nxxx line number codes, then the line number from
the N code is reported. If no N codes are included, then
the RowCount is from the very first line of the file starting
at 1. If N codes are given on some lines but not all lines,
ErrorRow may be inaccurate - it will report the last line
which included an N code which may not be the one that
caused an error.
V ErrorString STRING The G Code instruction which caused the error.

V InstructionsProcessed UDINT The number of individual G Code instructions processed


since this function block was executed. Nxxx line number
codes excluded from the count. For example, the com-
mand G1 X10 Y30 Z4 counts as four instructions, but
only one Segment in PathData.Segment[].
V PathBufferLevel REAL Percentage of the PathData.Segment[] which contains
data waiting to be processed by MC_MovePath. The

Page 413 of 757


default PathData.Segment[] is declared with size = 250.
If 200 instructions have been processed by this function
block, but MC_MovePath and the physical machine have
only processed 25, the PathBufferLevel would be (200-
25)/250 * 100 = 70%. This function will automatically
wait until MC_MovePath has processed segments and con-
tinue filling the PathData structure with new data until the
entire file has been read.

Notes
Processing is divided into two parts; Read_GCode_File and MC_MovePath. These blocks may be put into separate tasks. Typ-
ically MC_MovePath is placed in a faster task, especially if InputFlags and OutputFlags are used. Read_GCode_File should be
executed in a slower task, or even the DEFAULT task, which is recommended. It will parse the number of bytes as specified by
FileBufferSize per cycle. A cycle is six scans. For example, if FileBufferSize is set to 10000, and Read_GCode_File is executed
in a Cyclic task running every 50 mSec, a cycle is 300 mSec (50 * 6 = 300). Given these settings, the controller will process a
maximum of 33,000 bytes/second, but may be less, based space available in the motion buffer. The datatype definitions of
MC_PATH_DATA_REF.Segments and the number of characters in the ByteBufferStruct specified by FileBufferSize is con-
figurable if necessary. Consult Yaskawa for details.

Error Description
See the Function Block ErrorID list.

Example
This example shows the HC_ReadParameter function block from the File_RW_Toolbox. It reads parameter 1813 to obtain the
code for the user units selected for one of the Cartesian axes of the mechanism, which is copied into MyPath.HC_UserUnits.
This allows the Read_GCode_File function block to compare the machine configuration to the G20 / G21 setting within data
files and convert the position data as necessary.

This example also demonstrates that the InstructionsProcessed Output can be used to start motion. When the block is Busy
and at least 6 datapoints have been processed, a BOOL variable is set which can be used to initiate motion using MC_MovePath.

Page 414 of 757


Page 415 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Read_GCode_Stream

This function block reads and parses a G Code stream from the configured communication device and writes to the PathData,
which can be used by MC_MovePath.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V MachineData MachineStruct Contains parameters such as maximum velocities and
accelerations, and support for 3D printers and tan-
gent axes if required. Also included are Origin (Home)
and Part Coordinate System offsets.
V ToolData ToolStruct Contains radius and length data for tools that may be
selected.
V GCodeData GCodeStruct Working data set used by the G Code Processor. It is
made available as a VAR_IN_OUT mainly for debug-

Page 416 of 757


ging purposes. For applications using variables for
register values, this GCodeData.Variables sub struc-
ture must be connected to the VAR_IN_OUT "VarData"
of MC_MovePath.
V PathData MC_PATH_DATA_REF Data structure containing the details parsed from the
G Code source and used by the MC_MovePath function
block.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
V CommConfig CommStruct Structure which configures this function All zeros
block to communicate with the GCodeCom- in struc-
m.DLL on a PC. ture
V TimeOut TIME Set this value if the controller should close T#0s (No
the connection and stop waiting for com- Timeout)
mands. Normally this value should be set
to zero.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and
the outputs of the function are valid.
V HostConnected BOOL Confirms that a host has successfully initiated a con-
nection.
B Error BOOL Set high if an error has occurred during the execution
of the function block. This output is cleared when
'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This
output is reset when 'Execute' or 'Enable' goes low.
V ErrorString STRING For some errors, this string is the command which
caused the error.
V InstructionsProcessed UDINT The number of individual G Code instructions pro-
cessed since this function block was enabled. Nxxx
line number codes are excluded from the count. For
example, the command G1 X10 Y30 Z4 counts as four
instructions, but only one Segment in PathData.Seg-
ment[].
V StreamBufferLevel REAL Percentage of the PathData.Segment[] which contains
data waiting to be processed by MC_MovePath. The
default PathData.Segment[] is declared with size =
500. If 200 instructions have been processed by this
function block, but MC_MovePath and the physical
machine have only processed 25, the StreamBuffer-
Level would be 25/500 * 100 = 5%.
V HostIPAddress STRING The IP address of the device which initiated a con-
nection request to the MPiec controller for G Code
streaming.

Notes
l The host application must read the StreamStatus to determine the number of bytes available in the bytebuffer. The
host application and the Read_GCode_Stream function block will work together to transmit / receive the byte stream of
G Code information.
l Yaskawa recommends executing this function block in the DEFAULT task with the watchdog disabled.

Page 417 of 757


Basic Flowchart of Host PC application

Error Description
See the Function Block ErrorID list.

Example
The following structured text shows the initialization of CommCfg.

l The LocalIPAddress is that of the MPiec controller. This is necessary because the controller may have more than one IP
address and more than one network. It allows the function to listen for G Code data on the correct network. This inform-
ation can be automatically obtained by referencing the ControllerInfo structure and converting the IP address as a byte
array into a string using BYTE_TO_STRING. See the DataTypes section in the PLCopenPlus help manual for more inform-
ation.
l Local Port can be nearly any convenient port number that you choose. The host application must open a connection to
the port specified here.
l TimeOut is not supported and must be set to T#0s.

Page 418 of 757


l CommType is typically Ethernet, but if the MPiec controller has a 218IF-Y1 option card, serial data is possible.
l CommandType must be set to Command_Type#Variable. This is because G Code commands have a varying number of
characters separated by delimiters as opposed to fixed sized packets.
l BufferSize is not used in Variable command length mode.

User Units

You can optionally use the HC_ReadParameter from the File Read Write Toolbox, which will read the Hardware Configuration
setting for the axis selected. (Choose one of the axes that makes Cartesian movement.) Alternatively, if you know the user units
of the group's MCS, load MyPath.HCUserUnits directly. 0=Inches, 1=millimeters, 2=microns. This setting allows the G Code
processing functions to convert values to the correct units for the machine if the G Code data specifies different user units
(Refer to G20 / G21).

In the example above, a minimum number of points must be loaded into MC_PATH_DATA_REF.Segment[] before the
StreamReady flag is set. This flag is referenced in another task which executes the MC_MovePath function block. This allows
paths with many small segments to be buffered and sent to the motion engine more quickly to avoid data starvation when
motions starts.

The example below shows the MC_MovePath function including StreamReady logic.

Page 419 of 757


Page 420 of 757
Toolbox Help Documentation
Help version created 7/23/2021

ReadAxisOffsetFile

This function block reads absolute encoder offset information from a file written by WriteAxisOffsetFile. It restores the absolute
encoder offsets retained in the MPiec controllers battery backed memory for all axes in an AxesGroup. Restoring encoder off-
sets is necessary in the event of an MPiec controller replacement or MPiec SRAM battery failure.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
VAR_INPUT Default
B Execute BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V FileName STRING The file name as listed in the /Flash/Local directory on the STRING#''
controller. The extension is not required and will be auto-
matically appended.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)

Page 421 of 757


B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes:
l Firmware version 3.3.0 is required to use this function. It relies on MC_ReadParameter 1838, which was added for ver-
sion 3.3.0.
l The Flash/Local directory was also added for firmware 3.3.0. This folder is not deleted when a project archive is
deleted or the controller is restored to factory defaults.
l Once the file is created using WriteAxisOffsetFile, it is highly recommended to save a backup copy of the file to another
location other than the MPiec controller. This file can be replaced manually via the web UI in the event that a new MPiec
controller is connected to the existing mechanical equipment.
l The offsets contained in this file are only valid in the following situations:
l MPiec controller replacement .
l MPiec SRAM battery failure.
l The offsets contained in this file become invalid in the following situations:
l Absolute encoder battery failure or disconnection. (ServoPack has A.810 alarm)
l Motor replacement.
l Any mechanical alteration to the drive train, including belts, gearboxes, couplings, etc.

Error Description
See the Function Block ErrorID list.

Example

Page 422 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadGridFile

This function block reads a GMD file from the /Flash/Local folder previously written by WriteGridFile.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V GridResults GridResultsStruct Contains the measurement information populated by the GridMeas-
urement function block.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V FileName STRING Enter only the file name without path or extension. The STRING#''
file will be read from the /Flash/Local folder. This folder
is never deleted even if the MPiec is restored to factory
defaults or an archive is added or deleted. The extension
.GMD will automatically be appended.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If

Page 423 of 757


another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V ErrorRow INT If applicable, indicates the row in the file which generated the error.

V ErrorCol INT If applicable, indicates the column in the file which generated the
error.

Notes
l Yaskawa recommends executing this function block in a slow (100mSec) or Default task.
l See related function blocks: GridMeasurement, WriteGridFile, GridLookup.

Error Description
See the Function Block ErrorID list.

Example

Page 424 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadJointMap

This function block will populate the JointMap with data linking Axis_Ref, Joint, and Joint Label. It can be useful when creating
applications which must programmatically act upon specifically named joints or axes rather than predetermined AXIS_REF
numbers for a specific machine.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V JointMap JointMap Structure containing group information populated by this function
block.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function

Page 425 of 757


block with an Enable input, a Busy output indicates the function is oper-
ating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes

Error Description
See the Function Block ErrorID list.

Example
With a group configured as shown, the ReadJointMap function block will populate the JointMap as viewed in the Watch Win-
dow.

The configuration shown is a 3D gantry with a theta axis operated externally to the group using Y_SyncTangentAxisToGroup.
The application uses a special configuration which inserts the theta axis into the AxesGroup structure, therefore axis 5 in the
Jointmap shows an ExternalTanget as Axis_Ref 7.

Page 426 of 757


Page 427 of 757
Toolbox Help Documentation
Help version created 7/23/2021

ReAlignPrimeAxes

Designed for Groups configured with more than one servo operating a single joint, this function block will move the secondary
motor(s) to the commanded position of the main servo if they are already within the PrimeAllowance provided. Joints with mul-
tiple servos must have the same commanded position prior to executing MC_GroupEnable, otherwise the ErrorID 8966 will
occur.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
V JointMap JointMap Structure of data that holds information for Joint Index, Label,
AxisName and AXIS_REF.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V Label STRING Specify the Joint to be aligned. Use the 'Label' name as STRING#''
shown in the Hardware Configuration for the group.
B Velocity LREAL Absolute value of the velocity in user units/second. LREAL#0.0

B Acceleration LREAL Value of the acceleration in user units/second^2 (accel- LREAL#0.0


eration is applicable with same sign of torque and velo-
city)

Page 428 of 757


V PrimeAllowance LREAL Specify the maximum amount of difference between the LREAL#0.0
main and prime servo commanded positions to permit
safe alignment. See the Getting Started with Secondary
Axes section.
VAR_OUTPUT
B Done BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
E CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop.
This output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l This block only supports Mechatrolink gantry groups, not remote hosted robots via MotomanSync.
l See GroupReAlignPrimeAxes, which will iterate through all joints and calls this block as many times as necessary to
align all joints.
l The File R/W Toolbox and the PROCONOS firmware library are required when using this function block.

Error Description
See the Function Block ErrorID list.

Example
This example shows how the function is used within GroupToHome. A CASE statement sequences through the joints and
executes ReAlignPrimeAxes for all the joints configured with secondary axes.

Page 429 of 757


Toolbox Help Documentation
Help version created 7/23/2021

WriteAxisOffsetFile

This function block writes absolute encoder offset information to a file which can later be read by ReadAxisOffsetFile. It records
the absolute encoder offsets retained in the MPiec controllers battery backed memory for all axes in an AxesGroup. These off-
sets can be restored in the event of an MPiec controller replacement or SRAM battery failure.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B AxesGroup AXES_GROUP_REF A logical reference to a group of axes, which contains several addi-
tional substructures pertaining to the group.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V ControllerInfo CONTROLLER_INFO Place this variable of type CONTROLLER_INFO at All zeros
address %MD3.66560. This is required to include other in struc-
data in the file such as the controller firmware version. ture
V FileName STRING The file name without an extension, which will be auto- STRING#''
matically appended. Do not include the directory
folders, they are also automatically added. See the
example below.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If
another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.

Page 430 of 757


B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the func-
tion block. This output is cleared when 'Execute' or 'Enable' goes
low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is
reset when 'Execute' or 'Enable' goes low.

Notes:
l Firmware version 3.3.0 is required to use this function. It relies on MC_ReadParameter 1838, which was added for ver-
sion 3.3.0.
l The Flash/Local directory was also added for firmware 3.3.0. It is not deleted when a project archive is deleted or the
controller is restored to factory defaults.
l It is highly recommended to save a backup copy of the file to another location other than the MPiec controller. This file
can be downloaded / uploaded from the MPiec web UI in the event that a new MPiec controller is connected to the exist-
ing mechanical equipment.
l The offsets contained in this file are only valid in the following situations:
l MPiec controller replacement
l MPiec SRAM battery failure.
l The offsets contained in this file become invalid in the following situations:
l Absolute encoder battery failure or disconnection. (ServoPack has A.810 alarm)
l Motor replacement
l Any mechanical alteration to the drive train, including belts, gearboxes, couplings, etc.

Error Description
See the Function Block ErrorID list.

Example

Page 431 of 757


Toolbox Help Documentation
Help version created 7/23/2021

WriteGridFile

This function block writes the GridResults structure that was populated by the GridMeasurement function block. The FileName
will be appended with a GMD extension in the /Flash/Local folder on the MPiec controller.

Library
Group Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V GridResults GridResultsStruct Contains the measurement information populated by the GridMeas-
urement function block.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are FALSE
read and the function is initiated. To modify an input,
change the value and re-trigger the execute input.
V FileName STRING Enter only the file name without path or extension. The STRING#''
file will be written to the /Flash/Local folder. This folder
is never deleted even if the MPiec is restored to factory
defaults or an archive is added or deleted. The extension
.GMD will automatically be appended.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If

Page 432 of 757


another block takes control before the action is completed, the Done
output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.
V ErrorRow INT If applicable, indicates the row in the file which generated the error.

V ErrorCol INT If applicable, indicates the column in the file which generated the
error.

Notes
l Yaskawa recommends executing this function block in a slow (100mSec) or Default task.
l See related function blocks: GridMeasurement, ReadGridFile, GridLookup.

Error Description
See the Function Block ErrorID list.

Example

Page 433 of 757


Math Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Math Revision History

Current Version:
2021-04-09 v372 released with MotionWorks IEC 3.7.2

No changes, identical to v371.

Previous Versions:
2020-11-02 v371 released with MotionWorks IEC 3.7.1

Calc3DCenter - Improved FB to be PLCopen compliant, protect against divide by zero. DCR 4787.

2020-02-06 v370 released with MotionWorks IEC 3.7.0

Internal changes for code reduction, use single instance of ATAN2. SCR 12546.

ATAN2_F - Function equivalent of ATAN2 as function block, saves on compiled code instance memory. SCR 13009.

2018-5-14 v350 released with MotionWorks IEC 3.5.0

No changes.

2017-8-14 v340 released with MotionWorks IEC 3.4.0

CalcFrameOffset - New FB added.

CrossProduct - New FB added.

FrameTypeTransformation - New FB added.

2017-01-15 v331 released with Toolbox Installer - Jan 2017 Collection

RECT_TO_POLAR - New FB added. Support for Tool Compensation in Group Toolbox.

2016-10-31 v330 released with MotionWorks IEC 3.3.0

CrossProduct - New FB added.

Multiply4x4 - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

Page 434 of 757


InvertFrameMatrix - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

DecompFrameMatrix - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

ConstructFrameMatrix - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

Removed all Boolean logic and simple math functions. Use IEC-61131 functions instead .

CalcRadius - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

CalcCenter - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

CalcEndAngle - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

CalcStartAngle - New FB Added. Support tools for MC_MoveCircular* in PLCopen Part 4.

CalcEndAngle - New FB added. Support tools for MC_MoveCircular* in PLCopen Part 4.

POLAR_TO_RECT - New FB added. Support tools for MC_MoveCircular* in PLCopen Part 4.

2015-01-31 v300 created

Identical to v202, but recompiled specifically for MotionWorks IEC v3.x.

2012-10-22 v202 released

1) Added functionality to the ATAN2 function block. New ENUM type as VAR_INPUT was added to configure it to operate in 0 to
2 pi radians or 0 to 360 degree in addition to -pi to pi radians. The default behavior (-pi to pi) is the same as previous versions.

2) New MathDataTypes file added. This contains enum types for ATAN2 input options.

2012-01-23 v201 released

Made change in REM function to prevent a negative result. Added TRUNC_DINT to the code in REM

Refer SCR 1241 on LREAL_TO_DINT fixed in FW 2.0.0.255

2011-07-29 v200 released

Upgraded to version 2.0 Project for MotionWorks IEC. Built from Math Toolbox v004beta .

Page 435 of 757


Enumerated Types

Toolbox Help Documentation


Help version created 7/23/2021

Enumerated Types for Math Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

Enumerated Type #INT Value Enum Value Description


TB_ATAN2_OutputType
0 NegPi_Pi Output angle is defined from -Pi to Pi.
1 Zero_TwoPi Output angle is defined from 0 to 2Pi.
2 ThreeSixty Output angle is defined from 0 to 360.

Page 436 of 757


Function Blocks

Toolbox Help Documentation


Help version created 7/23/2021

ATAN2

The ATAN2 function is useful in many applications involving vectors, such as finding the direction from one point to another.
This two argument function is a variation of the ATAN function. For any LREAL arguments x and y,atan2(y, x) is the angle
between the positive x-axis of a plane and the point given by the coordinates (x, y) on it.

Library
Math Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B EN BOOL This function will continue to calculate the ATAN2 result while EN is FALSE
held high.
V X LREAL X coordinate LREAL#0.0
V Y LREAL Y coordinate LREAL#0.0
V Output_ INT Format of the output value. INT#0
Format 0: radians (-pi, pi]
1: radians [0, 2*pi)
2: degrees [0°, 360°)

VAR_OUTPUT
B ENO BOOL High if the function is executing normally.

V Angle LREAL The result of the ATAN2 calculation.

Page 437 of 757


Notes
This is a function, not a function block and only provides one output. If ENO is not high when EN is high, this function cannot
calculate the Angle.

Example
ATAN2 used with various output formats:

Page 438 of 757


Toolbox Help Documentation
Help version created 7/23/2021

REM

This function block returns the modulo division result of two LREAL inputs. It is useful for determining the position within a
MachineCycle.

Library
Math Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B EN BOOL This function will continue to calculate the remainder while EN his held high. FALSE

V Numerator LREAL The numerator for division, such as the free running motor position, which LREAL#0.0
may be outside a desired range of values, such as 0 to 360.0
V Denominator LREAL The denominator for division, which is the desired max value for the Numer- LREAL#0.0
ator input, such as 360.0
VAR_OUTPUT
B ENO BOOL High if the function is executing normally.

V REM BOOL This output contains the calculated remainder

Error Description
This is a function, not a function block and only provides one output. If ENO is not high when EN is high, this function cannot
calculate the remainder. Verify that the Denominator is not zero.

Page 439 of 757


Example 1 - Structured Text
IF InternalMode=INT#1 THEN

(* These calculations are designed for a rotary knife, rotary placer, one way cam, etc. *)

     Correction:=REM((-RegistrationData.BufferNonCyclic[TempUsePointer] - RegistrationData.SensorOffset), CamMasterCycle)


+ ((ControlData.EndSyncPosition - ControlData.StartSyncPosition) / LREAL#2.0);

     Duration:=RegistrationData.SensorDistance - ((ControlData.EndSyncPosition - ControlData.StartSyncPosition) /


LREAL#2.0) - (ActualPositionNonCyclic - RegistrationData.BufferNonCyclic[TempUsePointer]);

ELSE

(* These calculations are designed for reciprocating cam profiles (Slave net change = zero each cycle, Out and Back *)

     Correction:= - REM( (REM(RegistrationData.BufferCyclic[TempUsePointer], CamMasterCycle) + (Regis-


trationData.SensorDistance - ControlData.StartSyncPosition - ((ControlData.EndSyncPosition - ControlData.StartSyncPosition)
/ LREAL#2.0))), CamMasterCycle);

     Duration:=RegistrationData.SensorDistance - ControlData.StartSyncPosition - ((ControlData.EndSyncPosition - Con-


trolData.StartSyncPosition) / LREAL#2.0);

END_IF;

Example 2 - Function Block

Page 440 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CalcCircCenter

CalcCircCenter can be used whenever two points on the circle, the radius of the circle, the direction of the path (coun-
terclockwise or clockwise), and the length of the path (shortest or longest) is given.

Library
Math Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V X1 LREAL X coordinate of starting point. LREAL#0.0
V Y1 LREAL Y coordinate of starting point. LREAL#0.0
V X1 LREAL X coordinate of ending point. LREAL#0.0
V Y1 LREAL Y coordinate of ending point. LREAL#0.0
V Radius LREAL Radius of the circle. LREAL#0.0
V PathChoice MC_CirclePathChoice If the path length is larger than 180 degrees, MC_CirclePathChoice#C-
use MC_CirclePathChoice#Longest. If the path lockWise

Page 441 of 757


length is 180 degrees or less, use MC_
CirclePathChoice#Shortest.
V Direction MC_CirclePathChoice If the circle path travels clockwise use MC_ MC_CirclePathChoice#C-
CirclePathChoice#Clockwise. Otherwise if the lockWise
circle path travels counterclockwise use MC_
CirclePathChoice#CounterClockWise.

VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V CenterX LREAL X coordinate of the center of the circle

V CenterY LREAL Y coordinate of the center of the circle

Notes

Whenever given two points and a radius, it is possible to create two circles that pass through both points with the same
radius, and different center coordinates. In order to know which center coordinates we need we can either use a unique third
point or the Direction (Clockwise vs CounterClockWise) and the PathChoice (Shortest or Longest). Currently support is only
available for choosing the Direction and PathChoice method.

Page 442 of 757


Example

Page 443 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CalcFrameOffset

This function block calculates an output frame by offsetting the input frame.

Library
Math Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
V InputFrame VECTOR An array of values. The specific meaning of each value depends upon the Coordinate Sys-
tem specified and the mechanism, and the context. For example, the values could be world
space positions or velocities.
V Offset VECTOR An array of values. The specific meaning of each value depends upon the Coordinate Sys-
tem specified and the mechanism, and the context. For example, the values could be world
space positions or velocities.
V OutputFrame VECTOR An array of values. The specific meaning of each value depends upon the Coordinate Sys-
tem specified and the mechanism, and the context. For example, the values could be world
space positions or velocities.
VAR_INPUT Default
B EN BOOL Enables the function. FALSE
VAR_OUTPUT
B ENO BOOL High if the function is executing normally.

Example

Page 444 of 757


Page 445 of 757
PackML Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with PackML Toolbox

Requirements for v350


To use the PackML Toolbox, your project must also contain the following:

Firmware libraries:

l PROCONOS

User libraries:

The following User Libraries must be listed above the PackML Toolbox and in the following order:

l Yaskawa_Toolbox (v300 or higher)

Using the PackML Toolbox


See Yaskawa's Understanding PackML Webinar for an in depth look at this toolbox.

Page 446 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PackML Revision History

Current Version:
2018-01-23: v340 Released

1) Altered the CM_Event and UN_Event FBs to pass the cfg_Event as an IN-OUT variable of EventCfgArray datatype.

Previous Versions:
2016-10-19: v302 Released

1) Altered the CM_Event and UN_Event FBs to pass the cfg_Event as an IN-OUT variable of EventCfgArray datatype.

2) Added EventNumber[int] as an input to the CM_Event and UN_Event FBs.

3) Removed the Prefix input from the CM_Event block.

4) Removed the entire EM event level. This level is deemed unnecessary.

5) Removed StS_Latched output of CM_Event block.

6) Many changes to the event handling. The goal of this revision was to move away from the fixed event handling method of
built-in Servopack, Motion and Controller events in favor of User-defined events that could include messages looked up from
the other built-in lists.

7) Added "UnitMachine.EM[EM_Index].ModuleActive AND" to CM_ControlInputs function in combination with the CM Mask to


determine if the CM ModuleActive bit should be ON. This is so Events can be suppressed if the module is deactivated. Also
made the same change in EM_ModuleSummation except commented out the rewrite of the CM_ModuleActive bit.

8) Added EventBoxNumber to EventStructs.

9) Removed the ResetFirstOut Input from the UN_EventSummation block. It was redundant since we could not think of a case
where we would reset all active events but leave the FirstOut event still showing.

2016-07-06: v301 Released

1) Reconciled to the latest specification for PackML according to ISA-TR88 00 02 Edition 2. Rev 3D, 11/2014.

- Automatic Mode renamed to Production Mode.

- Added Unit Machine Layer to the PackTags. This is PackMLv30 datatype and contains PMLs, PMLc and PMLa.

- Edited PackML datatypes to conform as closely as possible to v3.0 spec for Minimum Supported Set of PackTags.

- Renamed Datatypes file and POUs to aad the Prefix "PML_". This helps avoid superfluous warnings in the user's project.

2) Inputs for remote control have been removed from the PackML_State_Diagram function block.

3) Event categories was changed from a DWORD datatype to a DINT datatype. Most users set a category number for severity
with lower numbers being higher severity (i.e. cat 1 = safety-type fault.)

Page 447 of 757


4) Moved the Revision History from a POU into the comment section of the PML_FB_Palette POU to avoid nuisance Empty Work-
sheet Warnings.

5) renamed to v301beta.

6) Added AlarmHistory to the UN.admin datatypes.

7) Added UN_Event function block, similar to CM_Event, to capture events that are part of the general machine and not part of
any particular Control Module.

8) Removed the Internal R_TRIGs of the State Diagram.

2015-01-31 v300 released

1) Identical to v202, but recompiled specifically for MotionWorks IEC v3.x.

2012-03-28: v202 Released


1) Modified CM_Control_Inputs Function Block to turn off all CM commands if the EM is not active. Previously

commands would still be sent unless the particular CM was deactivated.

2012-02-26: v201 released


1) First official release

2) Updated Math Toolbox link

3) Improved interlocking in the PackML_State_Diagram for Stop and Abort. There were instances on the beta applications

    where the control could get stuck in a particular state.

Page 448 of 757


PackML DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: ControlModule_Array

Supporting array used to pass commands and machine status to individual Control Modules. The toolbox supports up to 16
Control Modules numbered 0 to 15.

Data Type Declaration


ControlModule_ARRAY : ARRAY[0..15] of PackML_Module_Commands_STRUCT;

Page 449 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: EquipmentModule_Array

Supporting Array used to pass commands and machine status to individual Equipment Modules. Up to 16 Equipment Modules
are supported, numbered 0 to 15.

Data Type Declaration


EquipmentModule_ARRAY : ARRAY[0..15] of EquipmentModule_STRUCT;

Page 450 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: EquipmentModule_STRUCT

Supporting data type used by EquipmentModule_ARRAY.

Data Type Declaration


* Element Data Type Description Usage
MyEquipmentModule_ EquipmentModule_STRUCT
STRUCT
U EnabledCMs WORD Number of enabled Control Modules contained in MyEquipmentModule_
the Equipment Module STRUCT.EnabledCMs
U CMs_Active WORD Every bit in this word indicates if a control module MyEquipmentModule_
is active STRUCT.CMs_Active
U CMs_NotDone WORD Every bit in this word indicates if a control module MyEquipmentModule_
is done STRUCT.CMs_NotDone
U CM_InactiveMask WORD Every bit in this word indicates if a control module MyEquipmentModule_
is Inactive STRUCT.CM_Inact-
iveMask
U CM ControlModule_ARRAY [0..15] Array containing the Commands, Status and Act- MyEquipmentModule_
OF PackML_Module_Com- ive bits for the 16 Control Modules contained in STRUCT.CM[0]...
mands_STRUCT the Equipment module
U Cmd_Reset BOOL Command to Reset the machine MyEquipmentModule_
STRUCT.Cmd_Reset
U Sts_Resetting_SC BOOL When set, the machine is in the resetting state MyEquipmentModule_
STRUCT.Sts_Reset-
ting_SC
U Cmd_Start BOOL Command to Start the machine MyEquipmentModule_
STRUCT.Cmd_Start
U Sts_Starting_SC BOOL When set, the machine is in the Starting state MyEquipmentModule_
STRUCT.Sts_Starting_
SC
U Cmd_Stop BOOL Command to Stop the machine MyEquipmentModule_
STRUCT.Cmd_Stop
U Sts_Stopping_SC BOOL When set, the machine is in the Stopping state MyEquipmentModule_
STRUCT.Sts_Stopping_
SC
U Cmd_Hold BOOL Command to Hold the machine MyEquipmentModule_
STRUCT.Cmd_Hold
U Sts_Holding_SC BOOL When set, the machine is in the Holding state MyEquipmentModule_
STRUCT.Sts_Holding_
SC
U Cmd_UnHold BOOL Command to Unhold the machine MyEquipmentModule_
STRUCT.Cmd_UnHold
U Sts_UnHolding_SC BOOL When set, the machine is in the UnHolding state MyEquipmentModule_
STRUCT.Sts_UnHold-
ing_SC
U Cmd_Suspend BOOL Command to Suspend the machine MyEquipmentModule_
STRUCT.Cmd_Suspend
U Sts_Suspending_SC BOOL When set, the machine is in the Suspending MyEquipmentModule_
state STRUCT.Sts_Sus-
pending_SC
U Cmd_UnSuspend BOOL Command to UnSuspend the machine MyEquipmentModule_

Page 451 of 757


STRUCT.Cmd_UnSus-
pend
U Sts_UnSuspending_SC BOOL When set, the machine is in the UnSuspending MyEquipmentModule_
state STRUCT.Sts_UnSus-
pending_SC
U Cmd_Abort BOOL Command to Abort the machine MyEquipmentModule_
STRUCT.Cmd_Abort
U Sts_Aborting_SC BOOL When set, the machine is in the Aborting state MyEquipmentModule_
STRUCT.Sts_Aborting_
SC
U Cmd_Clear BOOL Command to Clear the machine MyEquipmentModule_
STRUCT.Cmd_Clear
U Sts_Clearing_SC BOOL When set, the machine is in the Clearing state MyEquipmentModule_
STRUCT.Sts_Clearing_
SC
U Sts_Executing_SC BOOL When set, the machine is in the Executing state MyEquipmentModule_
STRUCT.Sts_Execut-
ing_SC
U Cmd_StateComplete BOOL Command to enter the Completing State MyEquipmentModule_
STRUCT.Cmd_
StateComplete
U Sts_Completing_SC BOOL When set, the machine is in the Completing state MyEquipmentModule_
STRUCT.Sts_Com-
pleting_SC
U ModuleActive BOOL Indicates if the module is active to receive com- MyEquipmentModule_
mands STRUCT.ModuleActive

Page 452 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Ingredient_ARRAY

An array that contains all the parameters for an ingredient

Data Type Declaration


Ingredient_ARRAY : ARRAY[0..31] OF Ingredient_STRUCT;

Page 453 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Ingredient_STRUCT

A structure of parameters containing information for a specific ingredient. Support structure for Ingredient_ARRAY.

Data Type Declaration


* Element Data Type Description Usage
MyIngredient_ Ingredient_STRUCT
STRUCT
U ID INT ID value assigned to the ingredient MyIngredient_STRUCT.ID
U Parameter Parameter_ARRAY [0..9] OF Para- An array of parameters used for the spe- MyIngredient_STRUCT.Para-
meter_STRUCT cified Ingredient meter[0]...

Page 454 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Limit_ARRAY

An array containing user defined machine limits.

Data Type Declaration


Limit_ARRAY : ARRAY[0..9] OF Limit_STRUCT;

Page 455 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Limit_STRUCT

Supporting structure for Limit_ARRAY.

Data Type Declaration


Element Data Type Description Usage
*
MyLimit_STRUCT Limit_STRUCT
U ID INT User defined ID for the limit, 0000 reserved for no limit assigned MyLimit_STRUCT.ID
U Name STRING Literal name for the limit MyLimit_STRUCT.Name
U Unit STRING Unit of the limit value MyLimit_STRUCT.Unit
U Value REAL Value assigned to the limit MyLimit_STRUCT.Value

Page 456 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Node_ARRAY

Array that contains information used to coordinating machine nodes in a cell of multiple units. The array can be expanded as
needed.

Data Type Declaration


Node_ARRAY : ARRAY[0..7] OF Node_STRUCT;

Page 457 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Node_STRUCT

Supporting structure for Node_ARRAY.

Data Type Declaration


Element Data Type Description Usage
*
MyNode_STRUCT Node_STRUCT
U Number INT A chosen unique number of the Upstream/Down- MyNode_STRUCT.Number
stream PackML machine
U ControlCmdNumber INT User defined command to be sent from one node on the MyNode_STRUCT.Con-
network to another trolCmdNumber
U CmdValue INT A value to be associated with the ControlCmdNumber MyNode_STRUCT.CmdValue
such as speed, or the mode requested to change to
U Parameter Parameter_ARRAY [0..9] An array of parameter names, values, and units of the MyNode_STRUCT.Parameter
OF Parameter_STRUCT parameter [0]...

Page 458 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackML_Commands_STRUCT

Supporting structure for PackTags_Commands_STRUCT

Data Type Declaration


Element Data Description Usage
* Type
MyPackML_ PackML_
Commands_ Commands_
STRUCT STRUCT
U Mode DINT Mode command, Mode’s can be customized according to the PackML MyPackML_Commands_
standard or for the user’s needs. See template documentation for more on STRUCT.Mode
mode customization
U Reset BOOL Command to Reset the Machine MyPackML_Commands_
STRUCT.Reset
U Start BOOL Command to Start the Machine MyPackML_Commands_
STRUCT.Start
U Stop BOOL Command to Stop the Machine MyPackML_Commands_
STRUCT.Stop
U Hold BOOL Command to Hold the Machine MyPackML_Commands_
STRUCT.Hold
U UnHold BOOL Command to UnHold the Machine MyPackML_Commands_
STRUCT.UnHold
U Suspend BOOL Command to Suspend the Machine MyPackML_Commands_
STRUCT.Suspend
U UnSuspend BOOL Command to UnSuspend the Machine MyPackML_Commands_
STRUCT.UnSuspend
U Abort BOOL Command to Abort the Machine MyPackML_Commands_
STRUCT.Abort
U Clear BOOL Command to Clear the Machine MyPackML_Commands_
STRUCT.Clear
U StateComplete BOOL Command to enter the Completing State MyPackML_Commands_
STRUCT.StateComplete

Page 459 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackML_Module_Commands_STRUCT

Supporting data type used by ControlModule_ARRAY.

Data Type Declaration


* Element Data Type Description Usage
MyPackML_Mod- PackML_Mod-
ule_Commands_ ule_Com-
STRUCT mands_STRUCT
U Cmd_Reset BOOL Command to Reset the machine by moving from the Stopped MyPackML_Module_Com-
state to the Resetting state. mands_STRUCT.Cmd_Reset
U Sts_Resetting_SC BOOL When set, the machine is in the resetting state. MyPackML_Module_Com-
mands_STRUCT.Sts_Reset-
ting_SC
U Cmd_Start BOOL Command to Start the machine by moving from the Idle state MyPackML_Module_Com-
to the Execute state. mands_STRUCT.Cmd_Start
U Sts_Starting_SC BOOL When set, the machine is in the Starting state. MyPackML_Module_Com-
mands_STRUCT.Sts_Start-
ing_SC
U Cmd_Stop BOOL Command to Stop the machine by moving from any state MyPackML_Module_Com-
other than Aborting, Aborted or Clearing to the Stopping mands_STRUCT.Cmd_Stop
state.
U Sts_Stopping_SC BOOL When set, the machine is in the Stopping state. MyPackML_Module_Com-
mands_STRUCT.Sts_Stop-
ping_SC
U Cmd_Hold BOOL Command to Hold the machine by moving from the Execute MyPackML_Module_Com-
state to the Holding state. mands_STRUCT.Cmd_Hold
U Sts_Holding_SC BOOL When set, the machine is in the Holding state. MyPackML_Module_Com-
mands_STRUCT.Sts_Hold-
ing_SC
U Cmd_UnHold BOOL Command to Unhold the machine by moving from the Held MyPackML_Module_Com-
state to the UnHolding state. mands_STRUCT.Cmd_
UnHold
U Sts_UnHolding_SC BOOL When set, the machine is in the UnHolding state. MyPackML_Module_Com-
mands_STRUCT.Sts_UnHold-
ing_SC
U Cmd_Suspend BOOL Command to Suspend the machine by moving from the MyPackML_Module_Com-
Execute state to the Suspending state. mands_STRUCT.Cmd_Sus-
pend
U Sts_Suspending_ BOOL When set, the machine is in the Suspending state. MyPackML_Module_Com-
SC mands_STRUCT.Sts_Sus-
pending_SC
U Cmd_UnSuspend BOOL Command to UnSuspend the machine by moving from the MyPackML_Module_Com-
Suspended state to the UnSuspending state. mands_STRUCT.Cmd_
UnSuspend
U Sts_UnSus- BOOL When set, the machine is in the UnSuspending state. MyPackML_Module_Com-
pending_SC mands_STRUCT.Sts_UnSus-
pending_SC
U Cmd_Abort BOOL Command to Abort the machine by moving from any state MyPackML_Module_Com-
except Aborting or Aborted to the Aborting state. mands_STRUCT.Cmd_Abort

Page 460 of 757


U Sts_Aborting_SC BOOL When set, the machine is in the Aborting state. MyPackML_Module_Com-
mands_STRUCT.Sts_Abort-
ing_SC
U Cmd_Clear BOOL Command to Clear the machine by moving from the Aborted MyPackML_Module_Com-
state to the Clearing state. mands_STRUCT.Cmd_Clear
U Sts_Clearing_SC BOOL When set, the machine is in the Clearing state. MyPackML_Module_Com-
mands_STRUCT.Sts_Clear-
ing_SC
U Sts_Executing_SC BOOL When set, the machine is in the Executing state. MyPackML_Module_Com-
mands_STRUCT.Sts_Execut-
ing_SC
U Cmd_StateCom- BOOL Command to enter the Completing State from the Execute MyPackML_Module_Com-
plete state. mands_STRUCT.Cmd_
StateComplete
U Sts_Completing_ BOOL When set, the machine is in the Completing state. MyPackML_Module_Com-
SC mands_STRUCT.Sts_Com-
pleting_SC
U ModuleActive BOOL Indicates if the Control Module is active and able to receive MyPackML_Module_Com-
commands. Can also be used to enable the detection of Events mands_STRUCT.Mod-
for the Control Module uleActive

Page 461 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackML_States_STRUCT

Supporting structure for PackTags_Status_STRUCT.

Data Type Declaration


* Element Data Type Description Usage
MyPackML_States_ PackML_States_
STRUCT STRUCT
U Clearing BOOL Indicates the machine is in the Clearing MyPackML_States_STRUCT.Clearing
State.
U Stopped BOOL Indicates the machine is in the Stopped MyPackML_States_STRUCT.Stopped
State.
U Starting BOOL Indicates the machine is in the Starting MyPackML_States_STRUCT.Starting
State.
U Idle BOOL Indicates the machine is in the Idle State. MyPackML_States_STRUCT.Idle
U Suspended BOOL Indicates the machine is in the Suspended MyPackML_States_STRUCT.Sus-
State. pended
U Execute BOOL Indicates the machine is in the Execute MyPackML_States_STRUCT.Execute
State.
U Stopping BOOL Indicates the machine is in the Stopping MyPackML_States_STRUCT.Stop-
State. ping
U Aborting BOOL Indicates the machine is in the Aborting MyPackML_States_STRUCT.Abort-
State. ing
U Aborted BOOL Indicates the machine is in the Aborted MyPackML_States_STRUCT.Aborted
State.
U Holding BOOL Indicates the machine is in the Holding MyPackML_States_STRUCT.Holding
State.
U Held BOOL Indicates the machine is in the Held State. MyPackML_States_STRUCT.Held
U UnHolding BOOL Indicates the machine is in the Unholding MyPackML_States_STRUCT.UnHold-
State. ing
U Suspending BOOL Indicates the machine is in the Suspending MyPackML_States_STRUCT.Sus-
State. pending
U UnSuspending BOOL Indicates the machine is in the Unsus- MyPackML_States_STRUCT.UnSus-
pending State. pending
U Resetting BOOL Indicates the machine is in the Resetting MyPackML_States_STRUCT.Re-
State. setting
U Completing BOOL Indicates the machine is in the Completing MyPackML_States_STRUCT.Com-
State. pleting
U Complete BOOL Indicates the machine is in the Complete MyPackML_States_STRUCT.Com-
State. plete

Page 462 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackTags_Admin_STRUCT

Data Type Declaration


* Element Data Type Description Usage
MyPackTags_Admin_ PackTags_Admin_
STRUCT STRUCT
U Alarm EventHistoryArray Array of Event information. MyPackTags_Admin_STRUCT.Alarm
[0]...
U StateCurrentTime DINT Amount of time spent in the current state MyPackTags_Admin_
STRUCT.StateCurrentTime
U StateCumulativeTime StateCumulativeArray Array containing all the times spent in the MyPackTags_Admin_
different states STRUCT.StateCumulativeTime[0]...
U ModeCurrentTime DINT Amount of time spent in the current MyPackTags_Admin_
mode. STRUCT.ModeCurrentTime
U ModeCumulativeTime DINT_Array32 Array containing all the times spent in the MyPackTags_Admin_
different modes. STRUCT.ModeCumulativeTime[0]
U AccumTimeSinceReset DINT Time since the cumulative and current MyPackTags_Admin_STRUCT.Ac-
times have been reset. cumTimeSinceReset
U ResetAllTimes BOOL Command to reset all timers. MyPackTags_Admin_STRUCT.Re-
setAllTimes
U ResetCurrentModeTimes BOOL Command to reset all Current Times MyPackTags_Admin_STRUCT.Re-
being tracked. setCurrentModeTimes
U TimeRollover BOOL Warning when the timer is approaching a MyPackTags_Admin_
roll over. STRUCT.TimeRollover
U ProdProcessed DINT Cumulative number of primary packages MyPackTags_Admin_
processed since the machine’s counters STRUCT.ProdProcessed
and timers were reset.
U DefectiveProd DINT Cumulative number of defective packages MyPackTags_Admin_STRUCT.De-
processed since the machine’s counters fectiveProd
and timers were reset.
U ReWorkProd DINT Cumulative number of re-workable MyPackTags_Admin_
primary packages processed. STRUCT.ReWorkProd
U UpstreamMessage DINT MyPackTags_Admin_STRUCT.Up-
streamMessage
U DownstreamMessage DINT MyPackTags_Admin_STRUCT.Down-
streamMessage
U CurrentUpstreamNodeID DINT MyPackTags_Admin_STRUCT.Cur-
rentUpstreamNodeID
U CurrentDownstreamNodeID DINT MyPackTags_Admin_STRUCT.Cur-
rentDownstreamNodeID

Page 463 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackTags_Commands_STRUCT

Data Type Declaration


* Element Data Type Description Usage
MyPackTags_Commands_ PackTags_
STRUCT Commands_
STRUCT
U UnitMode DINT Unit Mode Commanded MyPackTags_Commands_STRUCT.Un-
itMode
U UnitModeChangeRequest BOOL 1 = Change Machine Mode to MyPackTags_Commands_STRUCT.Un-
Commanded Value itModeChangeRequest
U ProcMode DINT Procedure Mode Commanded MyPackTags_Commands_
STRUCT.ProcMode
U ProcModeChangeRequest BOOL 1 = Change Procedure Mode MyPackTags_Commands_
to Commanded Value STRUCT.ProcModeChangeRequest
U CurMachSpeed DINT Machine Speed - In Primary MyPackTags_Commands_
Line Packages STRUCT.CurMachSpeed
U MatReady DWORD Material Interlocks MyPackTags_Commands_
STRUCT.MatReady
U MatLow DWORD Material Interlocks MyPackTags_Commands_STRUCT.MatLow
U ResetPackMLTimes BOOL 1 = Reset PackML Current MyPackTags_Commands_STRUCT.Re-
Mode and State Cur- setPackMLTimes
rent/Cumulative Times
U CntrlCmd DINT Provides an alternate method MyPackTags_Commands_STRUCT.Cn-
of moving through the state trlCmd
diagram
U StateCmd PackML_Com- A structure for Coordinating MyPackTags_Commands_
mands_STRUCT machine nodes STRUCT.StateCmd

U StateChangeRequest BOOL Indicates the state machine MyPackTags_Commands_


should proceed to the target STRUCT.StateChangeRequest
state
U CfgRemoteCmdEnable BOOL MyPackTags_Commands_STRUCT.CfgRe-
moteCmdEnable
U RemoteModeCmd DINT MyPackTags_Commands_STRUCT.Re-
moteModeCmd
U RemoteModeCmdChgReq BOOL MyPackTags_Commands_STRUCT.Re-
moteModeCmdChgReq
U RemoteStateCmd DINT MyPackTags_Commands_STRUCT.Re-
moteStateCmd
U RemoteStateCmdChgReq BOOL MyPackTags_Commands_STRUCT.Re-
moteStateCmdChgReq
U TargetDownstreamNodeID DINT MyPackTags_Commands_STRUCT.Tar-
getDownstreamNodeID
U TargetUpstreamNodeID DINT MyPackTags_Commands_STRUCT.Tar-
getUpstreamNodeID
U ChangeNodeServicedUpstream DINT MyPackTags_Commands_
STRUCT.ChangeNodeServicedUpstream
U ChangeNodeServicedDownstream DINT MyPackTags_Commands_
STRUCT.ChangeNodeServicedDownstream

Page 464 of 757


THE FOLLOWING FIELDS ARE INITIALLY COMMENTED OUT TO SAVE MEMORY WHEN NOT REQUIRED
U Node Node_ARRAY Node (machine) interface & MyPackTags_Commands_STRUCT.Node
ID structure [0]...
U ProcessVariables ProcessVariable_ Machine Engineering Para- MyPackTags_Commands_STRUCT.Pro-
ARRAY meters cessVariables[0]...
U Product Product_ARRAY Machine Product/Recipe Para- MyPackTags_Commands_
meters STRUCT.Product[0]...
U Limits Limit_ARRAY Machine Parameter Prograble MyPackTags_Commands_STRUCT.Limits
Limits [0]...

Page 465 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PackTags_Status_STRUCT

Data Type Declaration


* Element Data Type Description Usage
MyPackTags_Status_STRUCT PackTags_
Status_
STRUCT
U CommandRejected BOOL If an invalid request is given MyPackTags_Status_STRUCT.Com-
and rejected, this bit will be set mandRejected
U UnitModeCurrent DINT Current Machine Mode MyPackTags_Status_STRUCT.Un-
itModeCurrent
U UnitModeCurBit DWORD Current Machine Mode Bit MyPackTags_Status_STRUCT.Un-
itModeCurBit
U UnitModeCurrentName STRING Current Machine Mode Name MyPackTags_Status_STRUCT.Un-
itModeCurrentName
U UnitModeRequested BOOL [1 = Acknowledges that a unit MyPackTags_Status_STRUCT.Un-
mode change has been reques- itModeRequested
ted]
U UnitModeChangeInProcess BOOL [1 = Requested unit mode MyPackTags_Status_STRUCT.Un-
change in process] itModeChangeInProcess
U ProcModeCurrent DINT Current Procedure Mode MyPackTags_Status_
STRUCT.ProcModeCurrent
U ProcModeRequested BOOL [1 = Acknowledges that a pro- MyPackTags_Status_
cedure mode change has been STRUCT.ProcModeRequested
requested]
U ProcModeChangeInProcess BOOL [1 = Requested procedure MyPackTags_Status_
mode change in process] STRUCT.ProcModeChangeInProcess
U StateCurrent DINT Current Machine State MyPackTags_Status_STRUCT.StateCur-
rent
U StateCurBit DWORD MyPackTags_Status_STRUCT.StateCurBit
U StateCurrentName STRING Current Machine State Name MyPackTags_Status_STRUCT.StateCur-
rentName
U StateRequested BOOL [1 = Acknowledges that a state MyPackTags_Status_STRUCT.StateReques-
change has been requested] ted
U StateChangeInProcess BOOL [1 = Requested state change MyPackTags_Status_
in process] STRUCT.StateChangeInProcess
U StateChangeProgress DINT Percent Complete of current MyPackTags_Status_
state STRUCT.StateChangeProgress
U StateLastCompleted DINT Machine state last completed MyPackTags_Status_
STRUCT.StateLastCompleted
U SeqNumber DINT MyPackTags_Status_STRUCT.SeqNumber
U CurMachSpd DINT Current Machine Speed In MyPackTags_Status_STRUCT.CurMachSpd
Primary Line Packages Per
Minute
U MatReady DWORD Material Interlocks MyPackTags_Status_STRUCT.MatReady
U MatLow DWORD Material Interlocks MyPackTags_Status_STRUCT.MatLow
U MachDesignSpeed REAL Speed the machine is designed MyPackTags_Status_
to operate at in it’s installed STRUCT.MachDesignSpeed
environment
U State PackML_States_ MyPackTags_Status_STRUCT.State

Page 466 of 757


STRUCT
U ModeChangeNotAllowed BOOL This bit is set if an invalid mode MyPackTags_Status_
change is requested and STRUCT.ModeChangeNotAllowed
ignored
U MachCycle DINT Indicates the number of com- MyPackTags_Status_STRUCT.MachCycle
pleted machine cycles with or
without product
U ProdRatio DINT Quantity of primary packages MyPackTags_Status_STRUCT.ProdRatio
per current package being pro-
duced
U Dirty BOOL Set when the machine MyPackTags_Status_STRUCT.Dirty
becomes dirty and machine
must run through a cleaning
cycle before production con-
tinues
U Clean BOOL Bit is set after a cleaning cycle MyPackTags_Status_STRUCT.Clean
and reset once production
begins again
U TimeToDirty DINT Time remaining until machine MyPackTags_Status_STRUCT.TimeToDirty
becomes dirty again
U EquipmentAllocatedToUnitModeID DINT Allocating a machine to oper- MyPackTags_Status_STRUCT.Equip-
ating a different mode than mentAllocatedToUnitModeID
another duplicate machine
U MachineReusableForUnitModeID DINT Indicates machine does not MyPackTags_Status_
require immediate cleaning STRUCT.MachineReusableForUnitModeID
and can resume production in
a specific time window
U MachineReusableTimeLeft DINT Amount of time left for a sys- MyPackTags_Status_
tem to be reusable for a specific STRUCT.MachineReusableTimeLeft
Unit mode
U MachineStoringProductID DINT For machines that have a stor- MyPackTags_Status_STRUCT.MachineSt-
ing capability oringProductID
U MachineTransferringProductID DINT For machines used in con- MyPackTags_Status_
veying, compacting and/or sep- STRUCT.MachineTransferringProductID
arating product and
transferring it to other
machinery
THE FOLLOWING FIELDS COME INITIALLY COMMENTED OUT TO SAVE MEMORY WHEN NOT USED
U Node Node_ARRAY Node (machine) interface & ID MyPackTags_Status_STRUCT.Node[0]...
structure
U ProcessVariables ProcessVariable_ Machine Engineering Para- MyPackTags_Status_STRUCT.Pro-
ARRAY meters cessVariables[0]...
U Product Product_ARRAY Machine Product/Recipe Para- MyPackTags_Status_STRUCT.Product[0]...
meters
U Limits Limit_ARRAY Machine Parameter Pro- MyPackTags_Status_STRUCT.Limits[0]...
grammable Limits

Page 467 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Parameter_ARRAY

An array containing the names, units and values of a given parameter

Data Type Declaration


Parameter_ARRAY : ARRAY[0..9] OF Parameter_STRUCT;

Page 468 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Parameter_STRUCT

Supporting Structure for Parameter_ARRAY

Data Type Declaration


* Element Data Type Description Usage
MyParameter_STRUCT Parameter_STRUCT
U ID DINT ID value assigned to the parameter MyParameter_STRUCT.ID
U Name STRING Literal description of the parameter MyParameter_STRUCT.Name
U Unit STRING Unit associated with the given parameter MyParameter_STRUCT.Unit
U Value REAL Numeric value associated with the given parameter MyParameter_STRUCT.Value

Page 469 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: ProcessVariable_ARRAY

An array containing the names, units and values of a given parameter that are used across multiple machines and can be dis-
played on an HMI screen.

Data Type Declaration


ProcessVariable_ARRAY : ARRAY[0..9] OF ProcessVariable_STRUCT;

Page 470 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: ProcessVariable_STRUCT

Supporting structure for ProcessVariable_ARRAY.

Data Type Declaration


* Element Data Type Description Usage
MyProcessVariable_ ProcessVariable_
STRUCT STRUCT
U ID DINT ID value assigned to the parameter MyProcessVariable_
STRUCT.ID
U Name STRING Literal description of the parameter. MyProcessVariable_
Can also be displayed on an HMI screen. STRUCT.Name
U Unit STRING_5 Unit associated with the given parameter. MyProcessVariable_
Can also be displayed on an HMI screen. STRUCT.Unit
U Value REAL Numeric value associated with the given para- MyProcessVariable_
meter. STRUCT.Value
Can also be displayed on an HMI screen.

Page 471 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Product_ARRAY

An array containing product information

Data Type Declaration


Product_ARRAY : ARRAY[0..9] OF Product_STRUCT;

Page 472 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: Product_STRUCT

A structure containing product information

Data Type Declaration


* Element Data Type Description Usage
MyProduct_ Product_
STRUCT STRUCT
U ProductID INT Used to indicate to the machine what product it is producing, also MyProduct_STRUCT.Pro-
displayed on all HMI screens ductID
U ProcessVariables ProcessVariable_ Array of information containing parameters for multiple machines MyProduct_STRUCT.Pro-
ARRAY cessVariables
U Ingredients Ingredient_ An array containing all information regarding an ingredient MyProduct_STRUCT.In-
ARRAY gredients

Page 473 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: UNitMachine_STRUCT

Contains all the information about the machine’s current state for each EM and CM.

Data Type Declaration


* Element Data Type Description Usage
MyUNitmachine_ UNitmachine_
STRUCT STRUCT
U PackML_StateCon- BOOL Indicates when the PackML_State_Diagram function MyUNitmachine_
trolReady block is ready to control the machine STRUCT.PackML_StateCon-
trolReady
U EnabledEMs INT Number of enabled equipment modules in the machine MyUNitmachine_STRUCT.En-
abledEMs
U EMs_Active WORD Every bit in this word indicates which equipment mod- MyUNitmachine_STRUCT.EMs_
ules are Active Active
U EMs_NotDone WORD Every bit in this word indicates which equipment mod- MyUNitmachine_STRUCT.EMs_
ules are Not Done NotDone
U EM_InactiveMask WORD Every bit in this word indicates which equipment mod- MyUNitmachine_STRUCT.EM_
ules are Inactive InactiveMask
U EM EquipmentModule_ ARRAY[0..15] of EquipmentModule_STRUCT MyUNitmachine_STRUCT.EM
ARRAY
U Sts_Resetting_SC BOOL When set, the machine is in the resetting state MyUNitmachine_STRUCT.Sts_
Resetting_SC
U Sts_Starting_SC WORD When set, the machine is in the Starting state MyUNitmachine_STRUCT.Sts_
Starting_SC
U Sts_Stopping_SC WORD When set, the machine is in the Stopping state MyUNitmachine_STRUCT.Sts_
Stopping_SC
U Sts_Holding_SC WORD When set, the machine is in the Holding state MyUNitmachine_STRUCT.Sts_
Holding_SC
U Sts_UnHolding_SC WORD When set, the machine is in the UnHolding state MyUNitmachine_STRUCT.Sts_
UnHolding_SC
U Sts_Suspending_ BOOL When set, the machine is in the Suspending state MyUNitmachine_STRUCT.Sts_
SC Suspending_SC
U Sts_UnSus- BOOL When set, the machine is in the UnSuspending state MyUNitmachine_STRUCT.Sts_
pending_SC UnSuspending_SC
U Sts_Aborting_SC BOOL When set, the machine is in the Aborting state MyUNitmachine_STRUCT.Sts_
Aborting_SC
U Sts_Clearing_SC BOOL When set, the machine is in the Clearing state MyUNitmachine_STRUCT.Sts_
Clearing_SC
U Sts_Executing_SC BOOL When set, the machine is in the Executing state MyUNitmachine_STRUCT.Sts_
Executing_SC
U Sts_Completing_ BOOL When set, the machine is in the Completing state MyUNitmachine_STRUCT.Sts_
SC Completing_SC

Page 474 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types for PackML Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

Enumerated Types Declaration


Enumerated Type #INT Value Enum Value Description
PackMLState ENUM Type for indicating the PackML state.
0 Undefined
1 Clearing
2 Stopped
3 Starting
4 Idle
5 Suspended
6 Execute
7 Stopping
8 Aborting
9 Aborted
10 Holding
11 Held
12 UnHolding
13 Suspending
14 UnSuspending
15 Resetting
16 Completing
17 Complete

Page 475 of 757


PackML FBs

Toolbox Help Documentation


Help version created 7/23/2021

CM_Control_Inputs

The CM_Control_Inputs function block passes the high level commands from the PackML_StateControl into each of the
enabled and active Control Modules.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V PML_Cmds PackML_Com- Structure that contains the current Unit mode of operation and the commands sent by
mands_ PackML_StateMachine.
STRUCT
V PML_States PackML_ Structure containing information about the current state of the machine.
States_
STRUCT
V UnitMachine Structure containing all the information about the machines current state and mode of
UNitMachine_ operation for all EMs and CMs.
STRUCT
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V EM_Number The EM number corresponding to the EM in which this FB is loc- INT#0
INT ated.

Page 476 of 757


V CM_Mask Mask to deactivate CMs. When a CM is deactivated, commands WORD#16#0000
WORD will not be sent down to the CM, for testing purposes. Each bit
corresponds to the same number CM to deactivate. (Example: to
deactivate CM_3, set CM_Mask.X3.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
• See the PackML template documentation for further details on recommended usage.

Error Description
See the Function Block ErrorID list.

Page 477 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CM_Control_Outputs

The CM_Control_Outputs function block sets the State Complete bits for the control module to be passed up and assembled
into the Equipment Module status in the EM00_ModuleControl worksheet.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V PML_States PackML_ Structure containing information about the current state of the machine.
States_
STRUCT
V UnitMachine Structure containing all the information about the machines current state and
UNitMachine_ mode of operation for all EMs and CMs.
STRUCT

Page 478 of 757


VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.

V EM_Number INT The EM number corresponding to the EM in INT#0


which this FB is located.
V CM_Number WORD The CM number corresponding to the CM in WORD#0
which this FB is located.
V Aborting_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Aborting’ and is ready to move to the next
state.
V Stopping_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Stopping’ and is ready to move to the next
state.
V Clearing_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Clearing’ and is ready to move to the next
state.
V Resetting_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Resetting’ and is ready to move to the next
state.
V Starting_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Starting’ and is ready to move to the next
state.
V Holding_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Holding’ and is ready to move to the next
state.
V UnHolding_ BOOL Setting this bit indicates that the current CM is FALSE
Done done ‘UnHolding’ and is ready to move to the next
state.
V Suspending_ BOOL Setting this bit indicates that the current CM is FALSE
Done done ‘Suspending’ and is ready to move to the
next state.
V UnSuspending_ BOOL Setting this bit indicates that the current CM is FALSE
Done done ‘UnSuspending’ and is ready to move to the
next state.
V Execute_Done BOOL Setting this bit indicates that the current CM is FALSE
done ‘Executing’ and is ready to move to the next
state.
V Completing_ BOOL Setting this bit indicates that the current CM is FALSE
Done done ‘Completing’ and is ready to move to the
next.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
• See template documentation for further details on recommended usage.

Error Description
See the Function Block ErrorID list.

Page 479 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PackML_State_Diagram

The PackML_State_Diagram function block handles the operation of the state machine, including mode and state transitions,
as defined in the OMAC PackML specification. This function block, when enabled, initializes the machine to be in mode 3
(Manual Mode) and in the Stopped state.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT

Page 480 of 757


V Cfg_ModeNames STRING_ An array of strings containing the names of the different Unit modes
Array32 of operation.
V Cfg_ModeTransitions DINT_ An array of acceptable mode transition states. Mode changes into the
Array32 NEW MODE can only be performed at the chosen states. Each element
in the array represents a mode, and each bit in the array element rep-
resents a state. (Ex. To allow Mode Transitions for Mode 1 at Aborted
(bit 9), Stopped (bit 2), and Idle (bit 4) states 0000 0000 0000 0000
0000 0010 0001 0100 = 16#0000_0214 = DINT#532 = Cfg_
ModeTransitions[1] )
V Cfg_StateNames STRING_ An array of strings containing the names of all the PackML states.
Array18
V Cfg_DisableStates DINT_ An array representing each mode and their states. Each mode can dis-
Array32 able certain states.(Ex In Manual Mode (Mode 3) disable Holding(10),
Held(11), UnHolding(12), Suspended(5), Suspending(13), UnSus-
pending(14),Completing(16), Complete(17) = 0000 0000 0000 0011
0111 1100 0010 0000 = 16#0003_7C20
= DINT#228384 = Cfg_DisableStates[3])
V UnitMachine UNitMachine_ Structure containing all the information about the machines current
STRUCT state and mode of operation for all EMs and CMs.
VAR_INPUT Default
B EnableIn BOOL The function will continue to FALSE
execute while the enable is held
high
V Cmd_Mode DINT The value of the new mode the DINT#0
machine will transition to if pos-
sible. If the input remains
unchanged, the machine will stay
in the same mode of operation
V Cmd_Reset BOOL Setting this bit sends the ‘Restart’ FALSE
command to all enabled and active
EMs if it is a legal transition from
V Cmd_Start BOOL Setting this bit sends the ‘Start’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_Stop BOOL Setting this bit sends the ‘Stop’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_Hold BOOL Setting this bit sends the ‘Hold’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_UnHold BOOL Setting this bit sends the ‘UnHold’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_Suspend BOOL Setting this bit sends the ‘Sus- FALSE
pend’ command to all enabled and

Page 481 of 757


active EMs if it is a legal transition
from the current machine state,
otherwise the command will be
ignored
V Cmd_UnSuspend BOOL Setting this bit sends the ‘UnSus- FALSE
pend’ command to all enabled and
active EMs if it is a legal transition
from the current machine state,
otherwise the command will be
ignored
V Cmd_Abort BOOL Setting this bit sends the ‘Abort’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_Clear BOOL Setting this bit sends the ‘Clear’ FALSE
command to all enabled and active
EMs if it is a legal transition from
the current machine state, oth-
erwise the command will be
ignored
V Cmd_Complete BOOL Setting this bit sends the ‘Com- FALSE
plete’ command to all enabled and
active EMs if it is a legal transition
from the current machine state,
otherwise the command will be
ignored
V Cfg_RemoteModeCmd DINT The remotely requested mode to 0
transition to
V Inp_RemoteModeCm- BOOL When this input is set, the FALSE
dChangeReq machine will transition to the
mode set by Cfg_
RemoteModeCmd if it is a legal
transition from the current state
of the machine
V Inp_RemoteStateCmd DINT The remotely requested state to 0
transition to
V Inp_RemoteStateCm- BOOL When this input is set, the FALSE
dChangeReq machine will transition to the state
set by Cfg_RemoteStateCmd if it is
a legal transition from the current
state of the machine
VAR_OUTPUT
B EnableOut BOOL Indicates that the outputs of the function are valid

V Clearing BOOL When this bit is set, the machine is in the ‘Clearing’ state

V Stopped BOOL When this bit is set, the machine is in the ‘Stopped’ state

V Starting BOOL When this bit is set, the machine is in the ‘Starting’ state

V Idle BOOL When this bit is set, the machine is in the ‘Idle’ state

V Suspended BOOL When this bit is set, the machine is in the ‘Suspended’ state

V Execute BOOL When this bit is set, the machine is in the ‘Execute’ state

Page 482 of 757


V Stopping BOOL When this bit is set, the machine is in the ‘Stopping’ state

V Aborting BOOL When this bit is set, the machine is in the ‘Aborting’ state

V Aborted BOOL When this bit is set, the machine is in the ‘Aborted’ state

V Holding BOOL When this bit is set, the machine is in the ‘Holding’ state

V Held BOOL When this bit is set, the machine is in the ‘Held’ state

V UnHolding BOOL When this bit is set, the machine is in the ‘UnHolding’ state

V Suspending BOOL When this bit is set, the machine is in the ‘Suspending’ state

V UnSuspending BOOL When this bit is set, the machine is in the ‘UnSuspending’ state

V Resetting BOOL When this bit is set, the machine is in the ‘Resetting’ state

V Completing BOOL When this bit is set, the machine is in the ‘Completing’ state

V Complete BOOL When this bit is set, the machine is in the ‘Complete’ state

V ModeChangeNotAllowed BOOL When this bit is set, the requested Mode change isn’t allowed and the
machine will remain in the current mode and state.
V Sts_StateCurrent DINT Number in decimal corresponding to the current state the machine is
in
V Sts_StateCurrentName STRING The name of the current state the machine is in
V Sts_StateCurrentBits DINT DWORD indicating the current state the machine is in (Ex. If Sts_
StateCurrentBits[x] = 1, then the machine is in State x)
V Sts_ModeCurrent DINT Number in decimal corresponding to the current mode the machine is
in
V Sts_ModeCurrentName STRING The name of the current mode the machine is in
V StsModeCurrentBits DWORD DWORD indicating the current mode the machine is in (Ex. If Sts_
ModeCurrentBits[x] = 1, then the machine is in State x)

 Notes
• Should always be enabled when program is running to ensure proper operation of the state machine.

• See template documentation for further details on recommended usage.

Page 483 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PackMLCommands_Init

The PackMLCommands_Init function block clears all commands and sets the machine to be in the stopped state.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V INP_Pack- PackML_Module_Commands_ Structure containing the current state and commanded
MLCommands STRUCT actions
VAR_INPUT Default
B EN BOOL Enables the function. FALSE

VAR_OUTPUT
B ENO BOOL High if the function is executing normally.

 Notes
• Intended to be executed when initially entering the stopped state to clear all previous commands.

Page 484 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PackMLModeStateTimes

The PackMLModeStateTimes function block keeps track of the times spent in each mode and state of operation for the machine.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V AdminTags PackTags_Admin_ Structure containing alarm data from the machine.
STRUCT
V UnitMachine UNitMachine_ Structure containing all the information about the machines current
STRUCT state and mode of operation for all EMs and CMs.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there
are no errors.
B Cmd_ResetCur- BOOL When set, all time counting will be stalled FALSE
rModeTimes and all of the times being counted for the
Sts_ModeCurrent will be cleared.
B Cmd_ResetAllTimes BOOL When set, all times being monitored will be FALSE
reset to zero. Time counting will also be
stalled while this input is held high.
V Sts_ModeCurrent DINT The current mode in which the machine is DINT#0
operating.
V Sts_StateCurrent DINT The current state in which the machine is DINT#0
operating.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of

Page 485 of 757


the function are valid.
V TimeRollOverWarning BOOL A warning is sent when any of the time accumulators is approaching
rolling over.
V Sts_StateCurrentSec DINT Time (in seconds) spent in the current state.
V Sts_StateCu- StateCumulativeArray An array containing the times spent operating in different modes and
mulativeSec states.
V Sts_ModeCurrentSec DINT Time (in seconds) spent in the current mode.
V Sts_ModeCu- DINT_Array32 An array of times spent in each mode.
mulativeSec
V Sts_AccTimeSinceRe- DINT Accumulated time since Cmd_ResetAllTimes went high or the pro-
set gram was stopped for any reason.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

 Notes
• See the PackML template documentation for further details on recommended usage.

Error Description
See the Function Block ErrorID list.

Page 486 of 757


Toolbox Help Documentation
Help version created 7/23/2021

UN_ModuleSummation

The UN_ModuleSummation function block rolls up all the Equipment Module State Complete bits for active, enabled EMs. The
result is an overall PMLs State Complete bit that is transferred to the PackML_StateControl function.

Library
Pack ML Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V UnitMachine UNitMachine_ Structure containing all the information about the machines current state and mode of
STRUCT operation for all EMs and CMs
V PML_Cmds PackML_Com- Structure that contains the current Unit mode of operation and the commands sent by
mands_ PackML_StateMachine
STRUCT
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V EM_Mask WORD Mask to deactivate EMs. When an EM is deactivated, commands WORD#16#0000
will not be sent down to the EM, for testing purposes. Each bit cor-
responds to the same number EM to deactivate. (Example: to
deactivate EM_3, set EM_Mask.X3 =TRUE)
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V EMs_Active WORD The list of active EMs. Same bit scheme as EM_Mask. (Example: if EMs_Active.X4 =

Page 487 of 757


TRUE then EM_4 is active)
V EMs_ WORD A compilation of which Equipment Modules have not completed the transition task.
NotDone
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Error Description
See the Function Block ErrorID list.

Page 488 of 757


PLCopen Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with PLCopen Toolbox

Requirements for v372


To use the PLCopen Toolbox, the project must also contain the following:

Firmware libraries:

l YMotion
- Only required if using the ReadAxisParameters function block.

User libraries:

The following User Libraries must be listed above the PLCopen Toolbox and in the following order:

l DataTypes_Toolbox (v371 or higher)


l Math_Toolbox (v371 or higher)
- Only required if using the Jog_To_Position or ProductBuffer function block.
l Yaskawa Toolbox (v371 or higher)
- Only required if using the Full_Closed_Control function block.

Data Types
For versions prior to v205, this toolbox already includes the PLCTaskInfoTypes and MotionBlockTypes DataTypes files typically
included when starting a new project, so delete them from your project to avoid compile errors that indicate duplicate
DataType definitions. Starting in v205, the data type files that are included in the new project templates were added to a new
User Library called DataTypes toolbox. You must include the DataTypes Toolbox in your project as mentioned above, and
delete standard data type files form the main project to avoid compile errors that indicate duplicate DataType definitions. Start-
ing with MotionWorks IEC v3.x, the new project templates will include the PLCopen and DataTypes Toolboxes, and the data
types files will be excluded to save many steps during new project creation.

See the PLCopen_Toolbox eLearning Modules on Yaskawa's YouTube channel for video tutorials and examples.

Page 489 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PLCopen Revision History

Current Version:
2021-04-09 v372 released

1) AxisStatus FB - Added alarm code recognition for SGS7S. DCR 5104.

Previous Versions:
2020-11-04 v371 released

1) AbsolutePositionManager - Improve to use Flash file for retain data. This version fixes bugs introduced in 370 when the pro-
cess was changed to use flash file instead of battery backed RAM. DCR 1784.

2020-02-06 v370 released

1) PLCopen Toolbox Datatype "Dependant" misspelling/wrong word. DCR 1117.

2) Cannot stop motor with Jog_To_Position function block (with specific vel and accel values). DCR 2638.

3) PLCopen_Toolbox_v350 Full_Closed_Control FB causes divide by zero error. DCR 2657.

4) Improve Feed_To_Length to account for additional marks in unexpected regions. DCR 2759.

5) Jog_To_Position giving an incorrect velocity graph for some profiles. DCR 2802.

6) AbsolutePositionManager has the wrong constant for a ControllerAlarm variable compare. DCR 2824.

7) Fix code change for Home_LS blocks to add FinishHoming (Done does not stay on). DCR 2873.

8) Home_* function blocks should not output Done if Error or CommandAborted. DCR 2975.

9) AbsolutePositionManager FB - Improve to use a Flash file for retain data (for Sigma7-Siec support.) DCR 1784.

2019-02-11 v352 released

1) SetAccDecPns - Function block use by the Home_LS* functions had issues fixed with writing Pn 305, pn 306. DCR 1405.

2) Home_LS* blocks - Fixed to set MotionState back to "StandStill" by executing MC_FinishHoming. DCR 1530.

3) HighSpeedOutput - Fixed double counting of the output setting. (Status output.) DCR 1963.

2018-03-08 v350 released

1) Jog - Added direction change detection. DCR 1483 *)

2) ProductBuffer - Fixed new ErrorID added in v340 which detects a duplicate latch caused by a fw bug which was fixed in fw
3.4.0. ProductBuffer was errantly indicating that condition on first latch if less then Lockout distance. DCR 1449.

3) SetAccDecLimits - Fixed bug related to negative deceleration settings. DCR 1569.

Page 490 of 757


4) HighSpeedOutput - v351 in Toolbox Installer from August 2018 includes this bug fix. The OutputCount could increment
twice for each time the output was set.

2017-11-22 v341 released (Filename is still 340, using new project version
control)
This version is included in the MotionWorks IEC 3.4.0.233a

1) AxisControl - Reverted change to only show outputs when Enable is High in v340. The v340 behavior was not ideal. DCR
918.

2) SetAccDecPns - This was a new block added for v340 to enhance the capabilities of Home_LS_Pulse and Home_LS, but
there was a compile error due to an incorrectly declared variable, now fixed. DCR 1318.

2017-08-14 v340 released


1) Home_LS_Pulse, Home_LS - Improved homing FBs by calculating required Pn305 / 306 / 80E for acc dec while in velocity
mode. DCR 490.

2) Home_TouchProbe - HomeData.HomeDirection input was ignored. DCR 826.

3) AxisControl - Changed to only show outputs when Enable is High. DCR 918.

4) AbsolutePositionManager - Improved PositionValid output for the case when the user resets the Absolute Encoder even if
there is not an alarm. DCR 949.

5) Y_DigitalCamSwitch - Upgraded functionality to support FT62 ServoPacks. DCR 1035.

6) Full_Closed_Loop - Fixed calculation for MaxCorrectionPerScan. DCR 1050.

7) UpdateUsePointer - updated to also update MultiUsePointer. DCR 1105.

8) Feed_To_Length - Improved operation so LatchPosition does not toggle to zero between moves. DCR 1167.

9) FeedRegistrationCheck - Added ErrorID to if negative latch distance is reported. DCR 1175.

10) Feed_To_Length - Improved operation in cases where latch comes very late in the move and the tuning is soft. DCR 1183.

11) ProductBuffer - Added ErrorID to catch firmware bug (SCR 10736) if previous latch is reported.DCR 1185.

12) HomeTouchProbe - Now executes MC_AbortTrigger if there is an Error. DCR 1187.

2016-10-31 v330 released


1) ReadMotorSpeed - New FB added. - Known issue: This function block only works for Sigma 5 motors.

2016-06-21 v302 released


1) Feed_To_Length - Added Active Output. DCR 695.

2) AbsoluteEncoderManager - Added Busy Output. DCR 830.

3) ProductBuffer - Added new check and ErrorID 10099 if the Axis type is not a servo or external encoder, and TestMode is not
set TRUE. (This combination is not supported. Also suppressed an Error generated by internal function MC_AbortTrigger
when an unsupported axis is selected while in TestMode. DCR 903.

Page 491 of 757


4) Full_Closed_Control - New Function block added for applications that require full closed control but cannot use the Full
Closed option card on the ServoPack, either because its an MP2600iec or because the safety option card is installed. DCR 930.

2015-08-19 v301 created


1) ProductBuffer - Updated to support M-III simultaneous latch (Two instances of ProductBuffer FB for the same axis. This
function now uses new parameter 1034 to obtain the unmodularized latch for TRIGGER_REF.ID=1. Compatibility with older
firmware on MPiec controllers using ID=1 for the first is maintained.

2015-01-31 v300 created


1) Identical to v207, but recompiled specifically for MotionWorks IEC v3.x.

2014-12-11 v207 released - developed using firmware 2.7.0)


1) Toolbox_DataTypes - Added new data types under ProductBufferStruct to support multiple latch patterns.

2) ProductBuffer - Added code to support multiple latch patterns, such as rising edge and falling edge .

3) ProductBuffer - Added code to automatically detect External Encoder type, even on MP3000iec series .

4) AxisInterLock - Replaced prm 1005 (actual position cyclic) with 1006 (actual position non cyclic.)

5) ReadMotorSpeed - New function block to read peak and rated speeds of connected rotary servos .

6) FeedToLength - Improved output logic - NOT Done added to RETURN rung. Enable added to Done rung.

7) ReadMotorSpeed - New function added to read the Motor part number string to report the Rated and Maximum speeds.

2014-03-03 v206 released - developed using firmware 2.5.0


1) UpdateUsePointer - New function block. This code can be used to update the ProductBufferStruct's UsePointer which is
used in the ProductBuffer function block.

2) ProductBuffer - Added a Busy output because it takes 3 scans after Enable goes FALSE before iActive goes FALSE. Pro-
ductBuffer.Busy can be used as an interlock if the ProductBuffer FB is used within other user function blocks to prevent the
code from going dormant before the block is finished.

3) HomeTouchProbe - New function block. Homes an axis based on a sensor wired to the high speed latch input on the Ser-
voPack.

4) VelocityLimits - Fixed cut & paste typos in code.

5) MA_2Stage_Calc - New supporting function block used by MoveAbsolute_2Stage.

6) MoveAbsolute_2Stage - New function block. Provides two acceleration and two deceleration values switchable at a specified
speed.

7) Jog_To_Position - Fixed typo with Accel variable causing complete inoperability in v205.

8) MoveRelative_ByTime - Added Acceleration and Deceleration inputs.

9) GetActionPointers - New function block. For use with user functions that use the ProductBuffer for multi operation support.

10) ProductBufferStruct - Multiple pointers for several actions are now supported.

11) Jog - Improved logic to account for continuously changing inputs without getting stuck.

12) Home_LS - Added NC contact LimitError to workaround issue described in SCR 8025.

13) Home_LS - Added NC contact LimitError to workaround issue described in SCR 8025.

14) HighSpeedOutput - Added iActive contact to various rungs to clear outputs from previous execution.

Page 492 of 757


15) HighSpeedOutput - Changed the DIV order in rung 4. Converted DINT_TO_LREAL so that the variable factor can take a non
integer value. This correction allows HighSpeedOutput FB functionality with the MinTime input.

2013-09-01 v205 released - developed using firmware 2.5.0


1) Removed references to Math Toolbox functions where possible. Only the ProductBuffer function block still requires the
Math Toolbox.

2) Because of the reintroduction of functions with EN/ENO, the MP2600 requires firmware 2.1.

3) Moved all datatype definitions for firmware libraries to a new DataTypes Toolbox. Upgrading to PLCopen v205 will require
deleting any Yaskawa firmware datatypes files and adding the DataTypes Toolbox.

4) JogToPosition - Fixed method in which a change of speed is detected to refire MC_MoveVelocity.

2013-03-15 v204 released - developed using firmware 2.4.0


1) ProductBuffer - Swapped position of RegistrationData and ProductAxis to conform to VAR_IN_OUT convention.

2) AccDecLimits - Fixed several copy / paste errors and variable naming confusion.

3) AbsoluteEncoderManager - Verified operation using Signa-II 2 digit alarm formats.

2012-10-29 v203 released - developed using firmware 2.4.0


1) AbsoluteEncoderManager - Removed the 'Active' contact from rung 5 to clear alarms that have been reset.

2) ReadAxisParameters - Added 14 parameters. (Mainly limit parameters)

3) Jog_To_Position - Improved deceleration ramp.

4) Feed_To_Length - Added. This function will index a default amount, and update the final target based on a registration
input.

2012-06-29 v202 released - developed using firmware 2.2.1


1) ReadAxisParameters - Added the following parameters FilterCmdVelocity 1021, CmdAcceleration 1022, and postFil-
terCmdTorque 1024.

2) PLCTaskInfoTypes - Added DataTypes to mirror the 2.0 additions for high resolution task timing.

3) AbsolutePositionManager - Added additional alarm detection to catch A830, A840, and ACC0 alarms. Also added code to
clear EncoderAlarmID and ControllerAlarmID when the block goes inactive.

4) Jog_To_Position - Added. For rotary applications that must stop at a specific location.

5) HighSpeedOutput - Fixed issue with MinTime. Was not working correctly if Min Time not zero. (YEU)

2011-12-08 v201 released - developed using firmware 2.0.0


1) ProductBuffer - Added two optional inputs to allow FB to operate in a test or simulation mode.

2) ReadAxisParameters - Disabled reading parameter 1311 because it causes an error on MP2600iec. This parameter is sched-
uled to return a zero instead of an ErrorID in firmware 2.2.

3) ReadAxisParameters - Fixed two swapped values CamOffset and CamScale were swapped in v200.

Page 493 of 757


2011-07-29 v200 released - developed using firmware 2.0.0
Built from v022beta

ReadAxisParameters - Upgraded to use the new Y_ReadMultipleParameters firmware function block.

2011-02-24 v022beta created - developed using firmware 2.0.0


1) Home_Init - Added for users who prefer to avoid structured text POU for initializing the HomeStruct

2) Math Toolbox - Upgraded to v004 with Enable / Valid as function block I/O for compatibility with FW 2.1*)

3) Changed AxisControl to allow clearing a drive warning while the servo is enabled.

2011-01-24 v021 released - developed using firmware 1.2.3


1) HighSpeedOutput - Added. For simplified operation with the external encoder high speed output.

2) Home_LS_Pulse - Added a MC_MoveRelative between searching for the limit switch and C channel to prevent ErrorID 4397
from occurring: "Over travel limit still ON after attempting to move away from it."

3) Axes_Interlock - Enhanced to work with axes configured for rotary mode.

2010-10-04 v020 released. developed using firmware 1.2.2.9


1) Jog - Rewrote function to follow the 'Enable' template standard created for ST functions.

2) ProductBuffer - Improved lockout operation when a manual offset was applied. See ProductBuffer FB comments for more
details.

3) Jog - Improved Done output (It will only pulse; this block is a special case of Enable type

4) AxisParams Struct - Added CamTableCumulativeOutput

5) Home_LS - Fixed rung 6 (incorrect execute bit), duplicated StartOffset from rung 5.

6) DigitalCamSwitch - Added. See the initialize POU for example data setup.

7) ReadAxisParameters - Added LoadType and MachineCycle parameters.

8) AbsolutePositionManager - Added. For confirmation that the absolute position was set and valid

9) Moved Math functions to Math Toolbox

2010-02-03 v019 released


1) CamGenerator - Added.

2) CamSlaveFeedToLength - Removed MC_AbortTrigger.

3) Fixed Missed Latch counter (not initialized properly)

4) Added CamMaster_Lookup, and SlaveIndex_Lookup

5) Added MissedLatch and LatchPosition outputs to CamSlave_FeedToLength

6) Improved ProductBuffer FB to account for external encoder master (prm 1016 / 1006 switch

7) Added CamBlend function block

8) Added WindowCheck function block

9) CamGenerator formula type 4 (Cycloidal) changed to 3 (Simple harmonic). It was incorrectly identified.*)

10) Added ParamTypes input to ReadAxisParameters to increase efficiency of the function (Provides

Page 494 of 757


    selective parameter reads by group.)

11) MOVED ALL CAMMING SUPPORT FUNCTIONS TO CAM TOOLBOX - FOR PRO VERSION ONLY.

12) The "PLCTaskInfoTypes" DataType file was removed from this Toolbox. If you need to replace it in

    your project, open a second copy of MotionWorks IEC, and open a project that already has the

    PLCTaskInfoTypes DataType file, then copy & paste it into your project explorer.

2009-10-27 v018 released ****************************)


1) Added SensorWindow input to CamSlave FeedToLength

2) Added PositionLimits, VelocityLimits, and AccDecLimits function blocks

3) Removed Enable Servo FB, use AxisControl FB

4) Removed the variable Speed from HomeStruct, it was not used for anything.

5) Converted Home blocks removed all Set or RESET coils.

6) Added MOVE_UNIT & MOVE_LREAL function block to provide compatibility with MP2600iec.

7) AxesInterlock does not support rotary mode axes.

8) ReadAxisParameters changed to increase efficiency.

9) Added some outputs such as 'Valid' to some blocks for increased consistency with PLCopen.

10) First version formalized with help documentation.

2009-07-15 v017 released


1) Created Home_Pulse, Homes to C Channel, performs moves offset and defines position.

2) Removed R_TRIGs from the ErrorID portion of Home_LS, Home_LS_Pulse, and Home_Pulse because it was preventing the
blocks from showing errors.

3) Updated ProductBuffer function block for both modularized and non modularized latch data.

4) Updated ReadAxisParameters to include VAR_IN_OUT (for speed) and additional input parameter to specify axis type. Also
reduced parameter set to eliminate those that typically do not change.

5) Added MC_Status data.

6) Improved interlock logic in Home_LS_Pulse, Home_LS, Home_Pulse functions, added CommandAborted as output, and
fixed a typo in all three blocks where the variable attached to the Busy output of one of the internal blocks was referencing an
error bit.

2009-05-28 v016 released


1) Y_AdjustMode in the DataTypes file was incorrectly named Y_AdjustMethod.

2) Added NOT(Busy) to the Execute of MC_TouchProbe in CamSlave_FeedToLength. New Error code in

    firmware 1.1.2.5 caused new problem if the block was executed when already executing. This may occur if there

    is bounce on the input sensor.

3) Fixed MoveRelative_ByTime - calculations would cause error if negative distance. Also added checks for

    negative time (causes error) and zero distance (No Error)

2009-05-07 v015 released

Page 495 of 757


1) Added interlock to Jog's MC_MoveVelocity to prevent rising edge of exe if Stop is busy to prevent ErrorID 4370 from appear-
ing.

2) Added Axes_Interlock function.

2009-04-16 v014 released


(* Fixed AxisControl and Enable Servo to allow a re attempt to enable servo if MC_Power has Error. *)

(* Previously they had a normally closed contact from the MC_Power FB preventing the block from enabling *)

(* again. Also changed these two blocks to reset Error & ErrorID outptus when Enable=FALSE *)

(* Changed the Jog Block Error and ErrorID outputs to only come on if JogFwd or JogRev is On *)

(* Added CommandAborted to the Busy interlock circuits of Home_LS_Pulse and Home_LS. *)

2009-03-30 v013 released


Released version of v012.

1) Explicitly set some parameters in ReadAxisParameters to LREAL#0.0 and documented as being unavailable.

     because they were causing Access Violation Errors when viewed in the Watch Window.

2009-01-27 v012 created


1) This version was released to a few people as a work in progress.

2) PLCopenPlus-v_2_2 firmware library used and included with this version.

3) Added LatchPositionNonCyclic to the AxisParameterStruct structure for ReadAxisParameters FB.

4) Corrected naming of Cam parameters 1500, 1501, 1502.

5) Corrected AxisStatus FB, Drive Warnings and Errors were backwards.

6) Changed AxisControl.ControlAlarmID And AxisStaus.ControlAlarmID to a 32 bit UDINT output.

7) Jog converted to PLCopen convention (outputs) and code converted to ST.

8) Added CamSlave_FeedToLength, which uses MC_TouchProbe, SlaveRegistrationCheck, and Y_SlaveOffset.

2009-01-27 v011 released


1) PLCopenPlus-v_2_2 firmware library used and included with this version.

2) Added AxisStruct STRUCT

(* Fixes *)

3) Simplified MoveRelativeByTime function, removed additional interlocks, and just copied MC_MoveRelative

    outputs to MoveRelativeByTime outputs. *)

4) Made corrections to the AxisParameterArray, added cam parameters. NOTE: will require controller firmware

    1.1.0.4 or greater to read some of the cam parameters. Set the READ flag for those parameters to FALSE

    if you are using older firmware.

2009-01-12 v010 released


1) PLCopenPlus-v_2_1 firmware library used and included with this version.

Page 496 of 757


2) Changed interface of homing blocks to use HomeStruct. Makes FB smaller and quicker to enter home data.

3) Added example initialization code as a Program POU to enable cut & paste to speed development.

4) Open the Toolbox as a project in a second copy of MotionWorks IEC as a project to see the Initialization POU.

5) Added 'ControllerAlarm' function block to provide BOOL output when there is a controller alarm.

(Uses Y_ReadAlarm and compares the AlarmID for non zero.

6) Added Homed BOOL to HomeStruct.

2008-11-05 v009 released


1) Completed and tested the MoveRelative_ByTime function.

2) Previous versions would not allow the block to run more than once.

2008-10-17 v008 released


1) In Home_LS_Pulse and Home_LS, added Reset Coil for Homing Done at the last rung.

2008-10-10 v007 released


1) Added BOOL outputs to AxisControl (DriveAlarm, DriveWarning)

2) Fixed DriveWarningID and DriveAlarmID, they were backwards.

2008-10-02 v005 released


Added Functions:

1) AxisControl

2) AxisStatus

Fixes:

3) Changed errant F_TRIG functions used in Home_LS_Pulse for ErrorID to R_TRIG.

2008-09-22 v004 released


Changes:

1) EnableServo, upgraded to include ErrorClass output from MC_ReadAxisError from PLCopen.

2) FIRMWARE library 1.0.4.5 and PLCopenPlus-v_2_1

3) Includes structures for axis parameters and homing functions

Not complete:

4) MoveRelative_ByTime

2008-08-29 v003 released


Added Functions:

1) Home_LS_Pulse

Page 497 of 757


2) Home_LS

3) ReadAxisParameters

Not complete:

4) MoveRelative_ByTime

5) NOTE: v0035 supplied with the MP2300Siec_Sales_Demo_v001

2008-05-20 v002 released


Includes:

1) EnableServo

2) Jog

Not complete:

3) MoveRelative_ByTime

Page 498 of 757


PLCopen DataTypes
Data Type: AXIS_REF

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: AxisParamData

Supporting structure for AxisPrmArray. Used by the ReadAxisParameters function block.

Data Type Declaration


TYPE

AxisParamData:ARRAY[0..60] OF IndividualParamDetails;
END_TYPE

Page 499 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: AxisParameterStruct

For use with the CamSlave_FeedToLength and CamSlave_WindowCheck function blocks.

Data Type Declaration


* Element Data Type Description Usage
MyAxisParameterStruct AxisParameterStruct
C ActualPosition LREAL 1000 MyAxisParameterStruct.ActualPosition
C ActualPositionCyclic LREAL 1005 MyAxisParameterStruct.ActualPositionCyclic
C ActualPositionNonCyclic LREAL 1006 MyAxisParameterStruct.ActualPositionNonCyclic
C ActualTorque LREAL 1004 MyAxisParameterStruct.ActualTorque
C ActualVelocity LREAL 1001 MyAxisParameterStruct.ActualVelocity
C AtVelocity BOOL 1141 MyAxisParameterStruct.AtVelocity
C BufferedMotionBlocks LREAL 1600 MyAxisParameterStruct.BufferedMotionBlocks
C CamMasterCycle LREAL 1512 MyAxisParameterStruct.CamMasterCycle
C CamMasterPosition LREAL 1500 MyAxisParameterStruct.CamMasterPosition
C CamMasterShiftedCyclic LREAL 1502 MyAxisParameterStruct.CamMasterShiftedCyclic
C CamMasterShiftedPosition LREAL 1501 MyAxisParameterStruct.CamMasterShiftedPosition
C CamMasterScale LREAL 1510 MyAxisParameterStruct.CamMasterScale
C CamMasterShift LREAL 1511 MyAxisParameterStruct.CamMasterShift
C CamOffset LREAL 1531 MyAxisParameterStruct.CamOffset
C CamScale LREAL 1530 MyAxisParameterStruct.CamScale
C CamShiftRemaining LREAL 1513 MyAxisParameterStruct.CamShiftRemaining
C CamState LREAL 1540 MyAxisParameterStruct.CamState
C CamTableIDEngaged LREAL 1541 MyAxisParameterStruct.CamTableIDEngaged
C CamTableOutput LREAL 1520 MyAxisParameterStruct.CamTableOutput
C CommandedAcceleration LREAL 1012 MyAxisParameterStruct.CommandedAcceleration
C CommandedPosition LREAL 1010 MyAxisParameterStruct.CommandedPosition
C CommandedPositionCyclic LREAL 1015 MyAxisParameterStruct.CommandedPositionCyclic
C CommandedPositionNonCyclic LREAL 1016 MyAxisParameterStruct.CommandedPositionNonCyclic
C CommandedTorque LREAL 1014 MyAxisParameterStruct.CommandedTorque
C CommandedVelocity LREAL 1011 MyAxisParameterStruct.CommandedVelocity
C InPosition BOOL 1140 MyAxisParameterStruct.InPosition
C LatchPositionNonCyclic LREAL 1031 MyAxisParameterStruct.LatchPositionNonCyclic
C PositionError LREAL 1130 MyAxisParameterStruct.PositionError
C PositionWindow LREAL 1120 MyAxisParameterStruct.PositionWindow

Page 500 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: AxisPrmArray

Used by the ReadAxisParameters function block.

Data Type Declaration


TYPE

AxisPrmArray: STRUCT

Param:AxisParamData;

END_STRUCT;
END_TYPE

Page 501 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: AxisStruct

For use as a container for all axis related data. (Customizable)

Data Type Declaration


* Element Data Type Description Usage
MyAxisStruct AxisStruct
U Ref AXIS_REF Used with the Axis VAR_IN_OUT of PLCopen function blocks. MyAxisStruct.Ref
U JogSpeed LREAL In user units/sec as defined in the Hardware Configuration. MyAxisStruct.JogSpeed
U RunSpeed LREAL In user units/sec as defined in the Hardware Configuration. MyAxisStruct.RunSpeed
U Position LREAL In user units as defined in the Hardware Configuration. MyAxisStruct.Position
U Acceleration LREAL In user units/sec2 as defined in the Hardware Configuration. MyAxisStruct.Acceleration
U Deceleration LREAL In user units/sec2 as defined in the Hardware Configuration. MyAxisStruct.Deceleration
U Jerk LREAL In user units/sec3 as defined in the Hardware Configuration. MyAxisStruct.Jerk
U Status BOOL To indicate if the axis is enabled. MyAxisStruct.Status
U Warning BOOL Indicates if the axis has a warning, typically an alarm code MyAxisStruct.Warning
beginning with 9 such as A.910 on Sigma series ServoPacks.
U Alarm BOOL Indicates if the axis has an alarm, which may originate in either MyAxisStruct.Alarm
the controller or the drive.
U DriveAlarmID UINT Indicates the drives alarm ID, typically equivalent to the alarm MyAxisStruct.DriveAlarmID
displayed on the front display of the drive if viewed in hex.
U DriveWarningID UINT Indicates the drives warning ID, typically equivalent to the MyAxisStruct.DriveWarningID
alarm displayed on the front display of the drive if viewed in
hex.
U ControlAlarmID UDINT Indicates the controllers alarm ID, equivalent to the alarm dis- MyAxisStruct.ControlAlarmID
played in the web server if viewed in hex.
U Prm AxisParameterStruct MyAxisStruct.Prm
U Home HomeStruct MyAxisStruct.Home
U Latch RegistrationStruct MyAxisStruct.Latch
U Cam CamStruct MyAxisStruct.Cam

Page 502 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: BufferPatternArray

Supporting structure for ProductBufferStruct. Used by the ProductBuffer function block.

Data Type Declaration


TYPE

BufferPatternArray: ARRAY[0..9] OF TRIGGER_REF;


END_TYPE

Page 503 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CAMSWITCH_ARRAY

Supporting structure for CAMSWITCH_REF. Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


TYPE

CAMSWITCH_ARRAY: ARRAY[0..255] OF CAMSWITCH_STRUCT;

END_TYPE

Page 504 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CAMSWITCH_REF

Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


* Element Data Type Description Usage
MyCAMSWITCH_ CAMSWITCH_
REF REF
U MasterType INT 0 = Infinite/Rotary, 1 = Finite/Linear MyCAMSWITCH_
REF.MasterType
U MachineCycle LREAL This number should match the setting in the Hardware Con- MyCAMSWITCH_
figuration. Valid for Type = 0. REF.MachineCycle
U LastSwitch INT To limit the evaluation of the array MyCAMSWITCH_
REF.LastSwitch
U Switch CAMSWITCH_ MyCAMSWITCH_
ARRAY REF.Switch[0]...

Page 505 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: CAMSWITCH_STRUCT

Supporting structure for CAMSWITCH_ARRAY. Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


* Element Data Type Description Usage
MyCAMSWITCH_ CAMSWITCH_
STRUCT STRUCT
U TrackNumber INT A reference to the track number to which this switch is to be applied. MyCAMSWITCH_
The PLS block will support up to 32 tracks. There is no limit to how STRUCT.TrackNumber
many switches can be assigned to a single track except for the max-
imum of 256 switches.
U FirstOnPosition LREAL Lower boundary where the switch is ON. MyCAMSWITCH_
STRUCT.FirstOnPosition
U LastOnPosition LREAL Upper boundary where the switch is ON. If LastOnPosition < MyCAMSWITCH_
FirstOnPosition, then the switch should be OFF between the positions STRUCT.LastOnPosition
(inverse cam switch)

U AxisDirection INT The direction of the master for which this switch applies. 0 = Both Pos MyCAMSWITCH_
and Neg; 1 = Positive Only (future); 2 = Negative Only (future). ONLY STRUCT.AxisDirection
0 should be implemented at this time.

U CamSwitchMode INT Position vs Time-Based output. 0 = Position. 1 = Time. MyCAMSWITCH_


STRUCT.CamSwitchMode
U Duration DINT The duration of the switch. If CamSwitchMode = 0 (Position) AND MyCAMSWITCH_
Duration <> 0.0, this Duration will serve as a Maximum ON time for STRUCT.Duration
the switch. A setting of 0.0 means infinite time. If CamSwitchMode =
1 (Time), this duration will serve as the ON time of the switch once
FirstOnPosition has been reached. A setting of 0.0 will result in a block
error.

Page 506 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: HomeStruct

For use with all HOME_*** function blocks.

Data Type Declaration


* Element Data Description Usage
Type
MyHomeStruct HomeStruct
U Direction INT Specified the initial direction of homing. Refer to MC_ MyHomeStruct.Direction
Direction enumerated types. Note: For the Home_
TouchProbe function block, this element is not used.
Set a positive or negative ApproachDistanceLimit.
U SwitchMode INT Configuration for action of the home sensor. [See MyHomeStruct.SwitchMode
MC_SwitchMode ]
U TorqueLimit LREAL Default if zero or unconnected is 100.00% of rated MyHomeStruct.TorqueLimit
torque.
U ApproachVelocity LREAL Velocity at which the axis will travel in search of the MyHomeStruct.ApproachVelocity
first switch, usually a limit switch.
U ApproachTimeLimit LREAL In seconds. MyHomeStruct.ApproachTimeLimit
U ApproachDistanceLimit LREAL The maximum distance the axis will travel in search of MyHomeStruct.ApproachDistanceLimit
the first switch (typically limit switch) before aborting
the homing operation and issuing an error.
U AccDec LREAL The acceleration and deceleration which will be applied MyHomeStruct.AccDec
to all homing moves.
U CreepVelocity LREAL MyHomeStruct.CreepVelocity
Velocity at which the axis will travel in
search of the C channel on the encoder.
U CreepTimeLimit LREAL In seconds. MyHomeStruct.CreepTimeLimit
U CreepDistanceLimit LREAL MyHomeStruct.CreepDistanceLimit
The maximum distance the axis will
travel in search of the C channel before
aborting the homing operation and issu-
ing an error.
U Offset LREAL Position offset to MOVE after finding the last input MyHomeStruct.Offset
device (switch or C channel, based on the function
block being used.)

U OffsetVelocity LREAL MyHomeStruct.OffsetVelocity


Velocity at which the axis will travel dur-
ing the home offset move.
U Position LREAL This is the position that will be defined when all hom- MyHomeStruct.Position
ing actions are complete, including the offset move.
U Homed BOOL Flag to indicate that the axis was successfully homed. MyHomeStruct.Homed
Not used by the homing function blocks, reserved for
use by the application.

Page 507 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: LatchBufferArray

Supporting structure for ProductBufferStruct Used by the ReadAxisParameters function block.

Data Type Declaration


TYPE

LatchBufferArray: ARRAY[0..100] OF LREAL;


END_TYPE

Page 508 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MoveStruct

For use with MC_MoveAbsolute, MC_MoveRelative, and MC_MoveVelocity.

Data Type Declaration


* Element Data Type Description Usage
MyMoveStruct MoveStruct
U Position LREAL In user units as defined in the Hardware Configuration. MyMoveStruct.Position
U Velocity LREAL In user units/sec as defined in the Hardware Configuration. MyMoveStruct.Velocity
U Acceleration LREAL In user units/sec2 as defined in the Hardware Configuration. MyMoveStruct.Acceleration
U Deceleration LREAL In user units/sec2 as defined in the Hardware Configuration. MyMoveStruct.Deceleration
U Jerk LREAL In user units/sec3 as defined in the Hardware Configuration. MyMoveStruct.Jerk

Page 509 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MultiUseData

Supporting structure for ProductBufferStruct. Used by the ProductBuffer function block.

Data Type Declaration


TYPE

MultiUseData:ARRAY[0..9] OF MultiUsePointers;
END_TYPE

Page 510 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: MultiUsePointers

Supporting structure for ProductBufferStruct. Used by the ProductBuffer function block.

Data Type Declaration


* Element Data Description Usage
Type
MyAxisStruct AxisStruct
U UsePointer INT For applications that require several operations to be performed is MyProductBufferStruct.Multi
sequence based on the same registration mark. This feature could be [x].UsePointer
used when position data captured on the master axis must be shared by
multiple axes or multiple actions on one axis.
U DependentAction INT Specify the previous action that, when complete, thenext action can be MyProductBufferStruct.Multi
processed. [x].DependentAction

Page 511 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PatternAwayDistanceArray

Supporting structure for ProductBufferStruct. Used by the ProductBuffer function block.

Data Type Declaration


TYPE

PatternAwayDistanceArray: ARRAY[0..9] OF LREAL;


END_TYPE

Page 512 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: PatternPointerArray

Supporting structure for ProductBufferStruct. Used by the ProductBuffer function block.

Data Type Declaration


TYPE

PatternPointerArray: ARRAY[0..100] OF UINT;


END_TYPE

Page 513 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: ProductBufferStruct

For use with the ProductBuffer function block.

Data Type Declaration


* Element Data Type Description Usage

Page 514 of 757


MyProductBufferStruct ProductBufferStruct

Page 515 of 757


U BufferSize INT Maximum number of MyProductBufferStruct.BufferSize
registration marks to
be tracked. (Circular
buffer size). Allow
enough extra capacity
in the circular buffer.
A larger size does not
impact performance.
C BufferNonCyclic LatchBufferArray Array (circular buffer) MyProductBufferStruct.BufferNonCyclic[x]
of all recorded regis-
tration marks
(unmodularized latch
values).
C BufferCyclic LatchBufferArray Array (circular buffer) MyProductBufferStruct.BufferCyclic[x]
of all recorded regis-
tration marks (mod-
ularized latch values).
U Sensor TRIGGER_REF TRIGGER_REF for the MyProductBufferStruct.Sensor.Bit
axis which regis-
tration marks are to
be detected. See
TRIGGER_REF data
type description in
the PLCopen help.
U SensorDistance LREAL Distance in units of MyProductBufferStruct.SensorDistance
the master axis from
the registration
sensor to the required
synchronization point
with a slave axis.
U SensorOffset LREAL If the sensor is an MyProductBufferStruct.SensorOffset
exact multiple of
machine cycles from
cut position, this num-
ber would be zero. If
for example the
sensor was 3.5
machine cycles away
from the syn-
chronization point,
then this value would
be 1/2 of the machine
cycle.
U ManualOffset LREAL Amount to adjust the MyProductBufferStruct.ManualOffset
synchronization
point, typically comes
from an HMI.
U LockoutDistance LREAL Distance after record- MyProductBufferStruct.LockoutDistance
ing a latch that
another latch must be
ignored.
U ProductAwayDistance LREAL The distance the MyProductBufferStruct.ProductAwayDistance
product travels from
its initial detection
until it is safely past
the slave operation to
slave processing the
next product.
C StorePointer INT Array index of the MyProductBufferStruct.StorePointer
latch data that was
last stored by MC_
TouchProbe.
U UsePointer INT Array index of the MyProductBufferStruct.UsePointer
latch data to be used
by the process.
U PrevUsePointer INT Array Index of the pre- MyProductBufferStruct.PrevUsePointer
viously used latch

Page 516 of 757


data.
U Multi MultiUseData Array of pointers for MyProductBufferStruct.Multi[x].UsePointer
applications which
process multiple oper-
ations based on a
single registration
mark. Examples of
such applications are
pick and place, score
and punch etc.
U LastAction INT Total number of MyProductBufferStruct.LastAction
actions to be per-
formed based on a
single registration
mark. If the default
value of zero is used,
non "Multi" operation
is performed using
the basic StorePointer
and UsePointer
method.
U BufferPatternSize INT Size of the repeating MyPro-
pattern of TRIGGER_
ductBufferStruct.BufferPatternSize
REFs. This value is
only required if a pat-
tern of latches must
be captured. For
example, if ServoPack
signals EXT1 and
EXT2 capture a
products leading and
trailing edge in a
repeating sequence,
set Buffer-
PatternSize:=2. Set
to default Buffer-
PatternSize:=0 if only
one TRIGGER_REF is
required for the applic-
ation.
U BufferPattern BufferPatternArray Array of TRIGGER_ MyProductBufferStruct.BufferPattern[x].Bit
REFs to be specified
by the user. This
provides support for
capturing a rising and
falling edge of the
same sensor, such as
for product length
measurement.
U PatternAwayDistance PatternAwayDistanceArray Array of product away MyProductBufferStruct.PatternAwayDistance[x]
distances cor-
responding to each
TRIGGER_REF.
C BufferedPattern PatternPointerArray Array of TRIGGER_ MyProductBufferStruct.BufferedPattern[x]
REFs corresponding
to recorded regis-
tration latches. This
reports the type of sig-
nal that was captured
(as configured by
BufferPattern) for
each corresponding
element in the
LatchBufferArrays.

Page 517 of 757


Notes:
The following structure values are not used by the ProductBuffer function block, but are included because typical applications
that can benefit from this function require this data for successful operation:

l SensorDistance
l SensorOffset
l ProductAwayDistance

Example 1:
Example of ProductBufferStruct being initialized for a linear flying shear application

(*Data for Registration based Linear Flying Shear*)

(*ProductBufferStruct for Registration Data *)

(*==========================================*)

Products.BufferSize := INT#20; (* Maximum size of buffer*)

Products.LockoutDistance := LREAL#9.0; (* Looks for a new part only after conveyor has traveled LockOutDistance after pre-
vious part*)

Products.SensorDistance := LREAL#14.075; (* Distance from sensor to start of slave 1 home position (beginning of cam pro-
file) *)

Products.ProductAwayDistance := LREAL#20.075; (* Distance from sensor to end of sync position in the cam table.

This is used to update the use pointer. Cam disengages only when use pointer = store pointer *)

Products.Sensor.Bit:=UINT#1; (* Equates to EXT1 on a Sigma-5 amplifier, see MC_TouchProbe help for details *)

Page 518 of 757


Example 2:
Example of ProductBufferStruct being initialized for a linear flying shear application where rising and falling edges of a
product are being captured.

(*ProductBufferStruct for Registration Data *)

(*==========================================*)

Products.BufferSize :=INT#20; (* Maximum size of Buffer*)

Products.LockoutDistance := LREAL#90.0; (* Looks for a new part only after conveyor has traveled LockOutDistance after
previous part*)

Products.SensorDistance := LREAL#1580.0; (* Distance from sensor to start of slave 1 home position (beginning of cam pro-
file) *)

Products.BufferPattern[0].Bit :=UINT#1; (* PART SENSOR Signal - RISING EDGE connected to Latch DI_01*)

Products.BufferPattern[1].Bit :=UINT#0; (* PART SENSOR Signal - FALLING EDGE Connected to PCL5 External Encoder
Sensor...*)

Products.BufferPatternSize :=INT#2;

Products.PatternAwayDistance[0] :=LREAL#1730.0; (*Distance from Sensor*)

Products.PatternAwayDistance[1] :=LREAL#1930.0; (*Distance from Sensor + Minimum Part Length =200mm*)

Page 519 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: SWERROR_STRUCT

Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


* Element Data Description Usage
Type
MySWERROR_ SWERROR_
STRUCT STRUCT
U TrackNumber INT The last switch number where an invalid setting for TrackNumber MySWERROR_STRUCT.Track-
occurred. Number
U FirstOnPosition INT The last switch number where an invalid setting for FirstOnPos- MySWERROR_
ition occurred. STRUCT.FirstOnPosition
U LastOnPosition INT The last switch number where an invalid setting for LastOnPos- MySWERROR_
ition occurred. STRUCT.LastOnPosition
U AxisDirection INT The last switch number where an invalid setting for AxisDirection MySWERROR_STRUCT.Ax-
occurred. isDirection
U CamSwitchMode INT The last switch number where an invalid setting for MySWERROR_
CamSwitchMode occurred. STRUCT.CamSwitchMode
U Duration INT The last switch number where an invalid setting for Duration MySWERROR_STRUCT.Dur-
occurred. ation
U ImproperOnPosition INT The last switch number where an improper relationship between MySWERROR_STRUCT.Im-
FirstOnPosition and LastOnPosition occurred. properOnPosition
U OnOffPositionError INT The last switch number where the OnCompensationScaler and/or MySWERROR_
OffCompensationScaler resulted in an improper relationship STRUCT.OnOffPositionError
between
the modified FirstOn and LastOn positions.

Page 520 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: TRACK_ARRAY

Supporting structure for TRACK_REF. Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


TYPE

TRACK_ARRAY: ARRAY[0..31] OF TRACK_STRUCT;

END_TYPE

Page 521 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: TRACK_REF

Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


TYPE

TRACK_REF:STRUCT

Track:TRACK_ARRAY;

END_STRUCT;

END_TYPE

Page 522 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Data Type: TRACK_STRUCT

Supporting structure for TRACK_ARRAY. Used by the Y_DigitalCamSwitch function block.

Data Type Declaration


* Element Data Description Usage
Type
MyTRACK_STRUCT TRACK_
STRUCT
U OnCompensationScaler LREAL Compensation for the FirstOnPosition of each MyTRACK_STRUCT.OnCom-
switch on the track. Positive values advance, pensationScaler
negative values retard.
U OffCompensationScaler LREAL SpeedCompensation for the LastOnPosition of MyTRACK_STRUCT.OffCom-
each switch on the track. pensationScaler
U Value BOOL The resulting status of the track after eval- MyTRACK_STRUCT.Value
uating and combining all switches that affect
the track.

Page 523 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enumerated Types for PLCopen Toolbox

Some blocks accept an enumerated type (ENUM), which is a keyword (or constant) representing a value which will configure
the operation of the function block. Enumerated types are equivalent to zero-based integers (INT). Therefore, the first value
equates to zero, the second to 1, etc. The format for enumerated types is as follows: ENUM:(0, 1, 2...) as displayed in the
example below (MC_BufferMode#Aborting).

Enumerated Types Declaration


Enumerated #INT Enum Description
Type Value Value
TB_AxisType Indicates the axis type for the ReadAxisParameters function block.
0 Servo
1 VFD
2 Stepper
3 Virtual
4 External
MC_Direction
0 Positive_ In a rotary application, forces the axis to move in a positive direction.
Direction
1 Shortest_ For use in applications where the Load Type is configured as a rotary or modularized axis.
Way
2 Negative_ In a rotary application, forces the axis to move in a negative direction.
Direction
3 Current_ For use in applications where the Load Type is configured as a rotary or modularized axis.
Direction Only applies if an existing move is in progress and another function block such as MC_MoveAb-
solute or MC_MoveRelative is executed. Once the axis is at StandStill, using MC_Direction_Cur-
rentDirection will default to the positive direction

Page 524 of 757


PLCopen FBs

Toolbox Help Documentation


Help version created 7/23/2021

AbsolutePositionManager

This function monitors for any controller or servo alarm related to the absolute encoder or battery backed encoder offset data
stored in the controller. It can serve as the single point of monitoring, clearing, and defining the position of an absolute
encoder. This function includes a retained Boolean output variable that once set, requires that the alarm be cleared through
this function, and that the position of the encoder is redefined. The intention is to prevent the machine from operating until the
position of the absolute encoder has been calibrated to the machine coordinates.

This function includes the following PLCopen function blocks: MC_ReadAxisError, MC_ReadAlarm MC_ResetAbsoluteEncoder,
Y_ClearAlarm and MC_SetPosition.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.

Page 525 of 757


V SetPosition BOOL Value of the axis position to be set when homing is FALSE
Done.
V Position LREAL A positive or negative value within the coordinate LREAL#0.0
system in user units.
V ResetEncoder BOOL Initiates the Y_ResetAbsoluteEncoder function to LREAL#0.0
clear any absolute encoder related SERVOPACK
alarm, including A.810 and A.CC0.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V SetPositionDone BOOL Indicates that MC_SetPosition has successfully completed.

V PositionValid BOOL Indicates that the absolute encoder has no alarms, and the MC_SetPosition has been
used at some point in the past to align the encoder with the mechanical system.
V ResetDone BOOL Indicates that the ResetEncoder request has completed successfully.

V EncoderAlarmID UINT ServoPack alarm related to the absolute encoder.

V ControllerAlarmID UDINT Controller alarm related to the SRAM or battery, which stores the absolute encoder off-
set.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
l This function block is not supported on the Sigma7-Siec because there is a Retain variable in the code which is not sup-
ported due to hardware limitations; there is no SRAM memory on the Sigma7-Siec.

l To clear the absolute encoder alarm from a ServoPack, the user must use the 'ResetEncoder' input, then reset the Ser-
voPack by either cycling power the ServoPack or using the Y_ResetMechatrolink function block.

l Check the Hardware Configuration to ensure that the alarm format for Sigma III and higher drives is set for 3 digit
alarm mode.

l See the AbsolutePositionManager eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 526 of 757


Toolbox Help Documentation
Help version created 7/23/2021

AccDecLimits

This function block manages the parameters associated with enabling/disabling the acceleration and deceleration limits. The
limits can be enabled or disabled and the values of the limits can be input and verified at the output. The outputs are provided
as an echo from the motion engine. This function allows for streaming of variable limits.

Library
PLCopen Toolbox

Parameters
Parameter Data Description
*
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the
REF Hardware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are no
errors.
V LimitAccDecEnable BOOL Enables or Disables the Limit Accel Decel func- FALSE
tion. Parameter 1222 and 1232 are combined
V LimitAccelPositive LREAL Parameter 1221 LREAL#0.0
V LimitAccelNegative LREAL Parameter 1220 LREAL#0.0
V LimitDecelPositive LREAL Parameter 1231 LREAL#0.0
V LimitDecelNegative LREAL Parameter 1230 LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function

Page 527 of 757


are valid.
V LimitAccDecEnableEcho BOOL Echo of Parameter 1222 ANDed with 1232

V LimitAccelPositiveEcho LREAL Echo of parameter 1221 echoed from motion engine


V LimitAccelNegativeEcho LREAL Echo of parameter 1220 echoed from motion engine
V LimitDecelPositiveEcho LREAL Echo of parameter 1231 echoed from motion engine
V LimitDecelNegativeEcho LREAL Echo of parameter 1230 echoed from motion engine
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
The function block uses MC_ReadBoolParameter, MC_WriteBoolParameter, MC_ReadParameter, and MC_WriteParameter.

Accel / Decel Limits

• The software acceleration & deceleration limits are managed in the MPiec controller.

• When an acceleration or deceleration limit is exceeded, a controller alarm will be generated, obtainable via the MC_ReadAx-
isError function block, or the web server.

Page 528 of 757


• The controller alarm will be 16#3202 0005 if the positive position limit is exceeded and 16#3202 0006 if the negative pos-
ition limit is exceeded.

Acceleration Limits

• Acceleration is defined as increasing velocity away from zero.

• The parameters are called LimitAccelPositive and LimitAccelNegative, with values of UINT#1221 and UINT#1220 respect-
ively. Use the MC_WriteParameter function block for these and all controller side parameters. Acceleration limit parameters
are in user units / sec2.

• To disable the acceleration limit, set LimitAccelEnable, parameter 1222 to zero.

Deceleration Limits

• Deceleration is defined by decreasing velocity towards zero.

• The parameters are called LimitDecelPositive and LimitDecelNegative, with values of UINT#1231 and UINT#1230 respect-
ively. Use the MC_WriteParameter function block for these and all controller side parameters. Deceleration limit parameters
are in user units / sec2.

• To disable the deceleration limit, set LimitDecelEnable, parameter 1232 to zero.

Error Description
See the Function Block ErrorID list.

Page 529 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Axes_Interlock

This function block checks MC_ReadAxisError and the actual position of both axes to verify that they are both free of alarms
and within the position tolerance specified. It is intended for use with axes that operate on the same mechanical load and must
remain within tolerance to avoid equipment damage, such as an X, X Prime gantry system. The Locked output will be high to
indicate that the axes are synchronized and free of errors.

Support for axes configured in rotary mode requires controller firmware 1.2.3 and PLCopen Toolbox v021.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis1 AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hardware
REF Configuration (logical axis number).
B Axis2 AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hardware
REF Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute while enable is FALSE
held high.

Page 530 of 757


V Tolerance LREAL The allowable position difference between the two LREAL#0.0
axes in user units.
V Offset LREAL Offset between the two axes. This value will be con- LREAL#0.0
sidered when comparing the positions
VAR_OUTPUT
B Valid BOOL Indicates that the outputs of the function are valid.

V Locked BOOL Indicates TRUE if neither axis has an alarm and the position deviation is less than the spe-
cified tolerance.
V Deviation BOOL The amount of positional difference between the two axes.

B Error BOOL Set high if error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes
l It is assumed that the axes have the same user units because they are operating the same load.
l See the AxesInterlock eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 531 of 757


Toolbox Help Documentation
Help version created 7/23/2021

AxisControl

This function block combines MC_Power, MC_ReadAxisError, and MC_Reset and provides separate outputs for controller and
drive alarms and warnings.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
E EnablePositive BOOL Not Supported FALSE

E EnableNegative BOOL Not Supported FALSE

V AlarmClear BOOL Clears axis related alarms using MC_Reset. FALSE

Page 532 of 757


VAR_OUTPUT
B Status BOOL TRUE if the drive is enabled. This output is derived from the Status output of MC_
Power.
V AxisAlarm BOOL Indicates if there is an axis specific alarm on either the controller or drive.

V DriveWarning BOOL Indicates a warning on the drive, such as any A.9x display on a ServoPack.

V DriveWarningID UINT Indicates the drive warning number, such as 95 (overload warning). Refer to the drive
manual for troubleshooting.
V DriveAlarmID UINT Indicates the drive alarm number, such as C9 (encoder disconnected). Refer to the
drive manual for troubleshooting.
V ControllerAlarmID UDINT Indicates the controller alarm ID number, such as 3302 0018. (shown in hex.) Refer
to the Controller AlarmID list in the PLCopenPlus manual for troubleshooting.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
l When attempting to clear an alarm, the enable input must be FALSE or the alarm reset function will be blocked from
executing.
l We recommend viewing the alarm and warning output ID’s in Hex, because all Yaskawa ServoPack documentation lists
the amplifier alarm codes in Hex. This simplifies alarm identification. Note that MotionWorks IEC may show the value
at the output in decimal. For example, a DriveAlarmID 0f 2064 converted to hex is 810, which is the ServoPack alarm
for the absolute encoder. "A81" will be displayed on the front of the ServoPack.
l This function only reports axis specific alarms and warnings. For general system alarms, use the Y_ReadAlarms func-
tion block from the PLCopenPlus firmware library.

Error Description
See the Function Block ErrorID list.

Page 533 of 757


Toolbox Help Documentation
Help version created 7/23/2021

AxisStatus

This function block uses MC_ReadAxisError to provide further breakdown of the ErrorClass and AxisErrorID by providing BOOL
and UINT outputs for the drive faults, and a DINT value for the controller alarm which is consistent with the 32 bit controller
alarm reporting in the web server. This function was created for use inside the AxisControl function block in the PLCopen Tool-
box. This function's outputs are available at the output of the AxisControl function block.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE

Page 534 of 757


scan while Enable is held high and there are
no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V DriveWarning BOOL Indicates a warning on the drive, such as any A.9x display on a ServoPack.
V DriveAlarm BOOL Indicates an alarm on the drive, such as A.71, overload. Refer to the appropriate drive
manual for troubleshooting.
V ControllerAlarm BOOL Indicates a controller side axis alarm.
V DriveWarningID UINT Indicates the drive warning number, such as 95 (overload warning). Refer to the drive
manual for troubleshooting.
V DriveAlarmID UINT Indicates the drive alarm number, such as C9 (encoder disconnected). Refer to the
drive manual for troubleshooting.
V ControllerAlarmID UDINT Indicates the controller alarm ID number, such as 3302 0018. (shown in hex.) Refer
to the Controller AlarmID list in the PLCopenPlus manual for troubleshooting.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
To simplify alarm identification, Yaskawa recommends viewing the alarm and warning output ID’s in Hex, because all Yaskawa
ServoPack documentation lists the amplifier alarm codes in Hex. Use the Debug Dialog menu in MotionWorks IEC to change the
debug value display type. The controller alarm list in the webserver and in the PLCopenPlus help manual show the controller
alarms in hex also.

Error Description
See the Function Block ErrorID list.

Page 535 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ControllerAlarm

This function block provides a BOOL output to indicate if there is a controller alarm not related to an axis. It uses the Y_
ReadAlarm function block and determines if the AlarmID output is non-zero. This function is useful because the PLCopenPlus
function Y_ReadAlarm does not have a Boolean output, just the AlarmID.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are read FALSE
and the function is initiated. To modify an input, change the
value and re-trigger the execute input.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.

V Alarm BOOL Indicates if the controller has a non-axis related alarm.

V AlarmID UDINT This output provides the Controller Alarm ID. This output is reset when execute goes low.

B Error BOOL Set high if an error has occurred during the execution of the function block. This output is

Page 536 of 757


cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes
It is best to view the AlarmID in hex because the Controller AlarmID list in the PLCopenPlus manual displays all alarm codes in
hex. This simplifies alarm category identification.

Error Description
See the Function Block ErrorID list.

Page 537 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Feed_To_Length

FeedToLength was designed for use with applications that index forward in one direction, and require on the fly adjustments
of the actual index length based on a sensor input that occurs while the axis is moving. This block is a hybrid function block,
meaning it use both types of PLCopen behaviors: Enable and Execute. The reason for this is so the function can monitor for
consecutive latches and flag an Error for that condition. The Enable input allows this feature to operate. The Execute input ini-
tiates each move.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
V TriggerData TRIGGER_ Reference to the trigger signal source.
REF
VAR_INPUT Default

Page 538 of 757


B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
B Execute BOOL Upon the rising edge, all other function block inputs FALSE
are read and the function is initiated. To modify an
input, change the value and re-trigger the execute
input.
V DefaultDistance LREAL The default product length. This is the distance the LREAL#0.0
axis will travel if a registration mark is not detected.
V DistanceAfterLatch LREAL The desired additional travel distance after the regis- LREAL#0.0
tration mark is detected
B Velocity LREAL Absolute value of the velocity in user units/second. LREAL#0.0
B Acceleration LREAL Value of the acceleration in user units/second^2 LREAL#0.0
(acceleration is applicable with same sign of torque
and velocity)
B Deceleration LREAL Value of the deceleration in user units/second^2 LREAL#0.0
(deceleration is applicable with opposite signs of
torque and velocity.)
E Jerk LREAL Not supported; reserved for future use. Value of the LREAL#0.0
jerk in [user units / second^3].
V MaxCorrection LREAL Limits the amount of correction that can be applied. LREAL#0.0
This prevents the machine from trying to make cor-
rection that is too large to occur and still make a good
product. This is the most amount of change to the
DefaultDistance that will be made to any one product
index.
V SensorMinimum LREAL The earliest slave position where a sensor position is LREAL#0.0
valid for correction.
V SensorMaximum LREAL The latest slave position where a sensor position is LREAL#0.0
valid for correction.
V MissedLatchLimit UINT The number of consecutive DefaultDistances allowed UINT#0
to occur without seeing a registration mark in the win-
dow, and not cause an Error. Valid registration marks
will reset the internal counter.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This
output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
V ActualSize LREAL The actual indexed distance.
V LatchPosition LREAL The slave's position in the CamTable when the latch occurred.
V LimitedCorrection BOOL Indicates that the MaxCorrection is limiting the required correction.
V MissedLatch BOOL Flag which indicates that the controller did not find a valid registration mark within
the SensorMinimum and SensorMaximum positions.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Page 539 of 757


Notes
l This function block is designed to use a high speed registration sensor wired into the ServoPack's latch input hard-
ware. Use the TRIGGER_REF input to specify the input on the amplifier where the sensor is wired (EXT1, EXT2, or
EXT3.) The sensor must be wired to one of these inputs for this function block.

Error Description
See the Function Block ErrorID list.

Example
Consider a case where the default distance between successive products is 6.2832 units. Let the distance between the sensor
(wired to the high speed registration input) and the target position where the product will be processed be 3.1416 units.
DistanceAfterLatch = 3.1416.

MaxCorrection limits the correction if an erroneous registration mark is captured and the calculation results in a large cor-
rection distance.

SensorMinimum and SensorMaximum provide window in which a registration mark must be detected to be considered a valid
registration mark. In this example, the mark is expected around 3.1416 units, and only marks detected between 2.0 to 4.5 are
accepted. Set the window as small as appropriate for the application.

Page 540 of 757


The Feed_To_Length function block will position the axis exactly 3.1416 units (DistanceAfterLatch) after the registration mark
was detected.

The Feed_To_Length function block will position the axis exactly 3.1416 units (DistanceAfterLatch) after the registration mark
is detected for varying product lengths.

Page 541 of 757


Page 542 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Full_Closed_Control

This function block uses an external encoder position to provide improved positioning for machines that have loose mechanics
or applications that must account for material slippage. This function block is very useful for MP2600iec applications which
cannot take advantage of the FC100 option card. Other features include the ability to switch from full closed to normal motor
encoder feedback, which is useful for applications where the external encoder is tracking a product which may not be present
at all times.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
V Virtual AXIS_ Logical axis reference. This value can be located on the Configuration tab in
REF the Hardware Configuration (logical axis number).
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in
REF the Hardware Configuration (logical axis number).
V Encoder AXIS_ Logical axis reference. This value can be located on the Configuration tab in
REF the Hardware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V Mode BOOL This turns on and off full closed loop operation. Set FALSE

Page 543 of 757


FALSE to select Full closed operation, set TRUE to dis-
able Full Closed operation.
V MaxCorrectionSpeed LREAL Limit the Maximum correction applied to prevent over- LREAL#0.0
shoot and instability. Set this value in user units/sec.
It applies only to the correction portion of the com-
mand. For example, if the virtual axis is commanded to
operate at a velocity of 2000 user units/sec and the
MaximumCorrectionSpeed is set to 250 user units/sec,
the axis may achieve a velocity of 2250 user units /
sec.
V MaxDeviation LREAL If the absolute difference between the axis position LREAL#0.0
and the full closed encoder position exceeds MaxDe-
viation, the function block will report Error and stop
operating the axis. Set this value in user units.
V DeadBand LREAL When the absolute difference between the axis and the LREAL#0.0
full closed encoder is less than this amount, no cor-
rection will be applied. Set this value in user units.
V Clear BOOL Resets the internal measurement of the difference FALSE
between the motor encoder and the full closed
encoder.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
B Active BOOL For buffered modes, this output is set high at the moment the block takes
control of the axis. For non buffered modes, the outputs Busy and Active
have the same value.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l The Yaskawa Toolbox v300 or higher is required when using the Full_Closed_Control function block. The Yaskawa Tool-
box must be included and placed above PLCopen Toolbox in the Libraries folder of your MotionWorks IEC project.
l For the best performance, this function block must be executed in a task running at the same interval as the
Mechatrolink (or MP2600iec DP ram) update rate. Ideally, the function is executed in a task at 4 mSec or faster.
l The user application must pre-set the position of the Virtual axis and the Encoder axis before enabling this function.
The two positions must be less than MaxDeviation, or an Error will be generated immediately.
l For applications where the full closed encoder is in contact with product fed into the machine and may experience slip
due to feed roll pressure, etc. the Clear input can be used in conjunction with the cycle of the machine, or each index
motion. For example, if up to 1 mm of slip is known to occur normally while indexing 25 cm, set the MaxDeviation input
to 2 or 3 mm, and trigger the Clear input after each index is finished. This will allow the function to monitor for excess-
ive slippage and generate an error only if it exceeds 2 mm during a single index, but will allow for much more deviation
to accumulate over long periods of operation.
l Mode can be set TRUE for situations when the material monitored by the full closed encoder is not in contact with the
full closed encoder. This may be when the machine is being set up, or a jam is being cleared. The Full_Closed_Control
function block can operate the motor using the motor encoder alone. If during the time that Mode=TRUE the MaxDe-
viation is exceeded, it will not cause an Error, however, when Mode is again set to FALSE, the difference between the
Virtual axis and the Encoder must be within MaxDeviation, or an Error will be generated. The application program must
set the two positions accordingly. It may be necessary to disable this function block and re-Enable it after using the
Mode which doesn’t close the position around the Encoder.

Page 544 of 757


Error Description
See the Function Block ErrorID list.

Example 1
In this example, the Logic Analyzer is showing when positive slip happens, correction is added to the Axis and how the moving
average slip changes during the correction.

Example 2
In this example, the Logic Analyzer shows negative slip, and the correction added to Axis.

Page 545 of 757


Example 3
In this example, the Logic Analyzer shows both positive and negative slip.

Example 4
When Mode is ON, full closed loop function is disabled.

Page 546 of 757


When Mode is OFF, full closed loop function operates.

Page 547 of 757


Toolbox Help Documentation
Help version created 7/23/2021

HighSpeedOutput

This function block combines several of the parameters for use with the High Speed Output function available on the LIO-01,
LIO-02, LIO-06, and MP2600iec. It allows changing the "OnPosition" value on the fly. While the "OnPosition" will be triggered
at the hardware level with a response time of 13us, the output will be turned off when either the MinDistance has been trav-
elled or the MinTime has elapsed, which will be based on the application scan in which this function is operating.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hardware
REF Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V OnPosition LREAL Position at which output must turn on. LREAL#0.0
V MinDistance LREAL Minimum distance that must occur before the output LREAL#0.0
turns off.
V MinTime TIME Minimum time that must elapse before the output T#0s
must turn off.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V Status BOOL Indicates the status of the hardware.

Page 548 of 757


V OutputCount UDINT Indicates the number of times the output turned on.

B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes
High Speed Output Quick Reference

Device Output Number Pin Number Software Default Name


LIO-01 DO-00 B14 Mpp_DO_00
LIO-02 DO-00 B14 Mpp_DO_00
LIO-06 DO-07 49 Mpp_DO_07
MP2600 DO-07 44, 49 MO1_DO_01

l See the HighSpeedOutput eLearning Module on Yaskawa's YouTube channel.


l The Global variable mapped to the physical output will not report the state of the output; this variable only reflects the
application programs control of the output when not using the high speed output in hardware mode.. Refer to the func-
tion block's VAR_OUTPUT for the status of the high speed output

Error Description
See the Function Block ErrorID list.

Page 549 of 757


Timing Diagram

Page 550 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Home_Init

This function block provides a method to initialize the HomeStruct data for use with all HOME_** function blocks. It is useful
for programmers who prefer to avoid structured text for initializing HomeStruct values.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V HomeData HomeStruct Logical axis reference. This value can be located on the Configuration tab in
the Hardware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL Upon the rising edge, all other function block inputs FALSE
are read and the function is initiated. To modify an
input, change the value and re-trigger the execute

Page 551 of 757


input.
B Direction MC_Dir- Direction of travel for homing.
ection
B SwitchMode MC_ Edge On is the only mode supported.
SwitchMode
B TorqueLimit LREAL Torque limit while attempting homing. In percentage LREAL#0.0
of rated torque of the servo.
V ApproachVelocity LREAL Velocity used to approach limit switch or c channel. LREAL#0.0
V ApproachTimeLimit LREAL Time limit for the homing attempt in seconds . LREAL#0.0
V ApproachDistanceLimit LREAL Distance limit for the homing attempt. LREAL#0.0

V AccDec LREAL Acceleration/deceleration for offset moves. LREAL#0.0


V LimitBackOffDistance LREAL Distance limit for back off move after a limit switch is LREAL#0.0
encountered.
V CreepVelocity LREAL Velocity to creep to theC channel. LREAL#0.0
V CreepTimeLimit LREAL Time limit for the creep attempt in seconds . LREAL#0.0
V CreepDistanceLimit LREAL Distance limit for the creep attempt LREAL#0.0
V Offset LREAL Offset distance to move after the limit switch or C LREAL#0.0
channel.
V OffsetVelocity LREAL Velocity of the offset move after the limit switch or C LREAL#0.0
channel.
B Position LREAL Position to be defined as the home position. LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Error Description
No Errors will be generated.

Page 552 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Home_LS

This function block combines the PLCopen function blocks MC_StepLimitSwitch, MC_MoveRelative, and MC_SetPosition to make
a sequence that detects the limit switch, performs an offset move away from the limit, and sets a home position.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V HomeData HomeStruct User defined Data Type in the PLCopen Tool- All zeros in structure
box, contains all related homing para-
meters.
VAR_OUTPUT
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This

Page 553 of 757


output is reset when Execute goes low.
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l This function is intended to operate only with a ServoPack's POT or NOT signal detection. HomeData.SwitchMode only
supports "EdgeOn." Configure the ServoPack Pn 50A and 50B appropriately.

Error Description
See the Function Block ErrorID list.

Example
Use a ST POU to initialize the data required for HomeData. To save time, copy & paste the example initialization into your pro-
ject.

(** Copy & Paste, then search & replace the headings in the following section to speed the initialization of the homing data.
**)

HomeStruct_ReplaceMe.AccDec:=LREAL#500.0; (* In User units /sec2 as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.ApproachDistanceLimit:=LREAL#500.0; (* In User units as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.ApproachTimeLimit:=LREAL#500.0; (* In seconds *)

HomeStruct_ReplaceMe.ApproachVelocity:=LREAL#500.0; (* In User units / sec as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.CreepDistanceLimit:=LREAL#500.0; (* In User units as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.CreepTimeLimit:=LREAL#500.0; (* In seconds *)

HomeStruct_ReplaceMe.CreepVelocity:=LREAL#500.0; (* In User units / sec as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.Direction:=INT#0; (* MC_Direction#Positive_Direction; *)

HomeStruct_ReplaceMe.Offset:=LREAL#500.0; (* In User units as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.OffsetVelocity:=LREAL#500.0; (* In User units / sec as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.Position:=LREAL#500.0; (* In User units as set in the Hardware Configuration *)

HomeStruct_ReplaceMe.SwitchMode:=INT#2; (* MC_SwitchMode#EdgeOn; *)

HomeStruct_ReplaceMe.TorqueLimit:=LREAL#500.0; (* In percentage of rated torque of the servo *)

Page 554 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Home_LS_Pulse

This function block combines the PLCopen function blocks MC_StepLimitSwitch, MC_StepRefPulse, MC_MoveRelative, and MC_
SetPosition to make a sequence that detects the limit switch, reverses to the C channel, performs and offset move away from
the limit, and sets a home position.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V HomeData HomeStruct User defined Data Type in the PLCopen Tool- All zeros in structure
box, contains all related homing para-
meters.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This
output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid

Page 555 of 757


information. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l This function is intended to operate only with a ServoPack's POT or NOT signal detection. HomeData.SwitchMode only
supports "EdgeOn." Configure the ServoPack Pn 50A and 50B appropriately.
l See the Home_LS_Pulse eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 556 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Home_Pulse

This function block combines the PLCopen function blocks MC_StepRefPulse, MC_MoveRelative, and MC_SetPosition to make a
sequence that detects the limit switch, reverses to the C channel, performs and offset move away from the limit, and sets a
home position.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V HomeData HomeStruct User defined Data Type in the PLCopen Tool- All zeros in structure
box, contains all related homing para-
meters.
VAR_OUTPUT
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
B Done BOOL Set high when the commanded action has completed successfully. If another block

Page 557 of 757


takes control before the action is completed, the Done output will not be set. This
output is reset when Execute goes low.
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Error Description
See the Function Block ErrorID list.

Page 558 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Home_TouchProbe

This function block combines the PLCopen function blocks MC_MoveRelative, MC_TouchProbe, MC_MoveAbsolute and MC_
SetPosition to make a sequence that initiates motion on the axis until a signal is detected on the sensor connected to the high
speed latch input of the servo. The axis then performs an offset move from the latched position, and sets a home position.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
V TriggerData TRIGGER_ Reference to the trigger signal source.
REF
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V HomeData HomeStruct User defined Data Type in the PLCopen Tool- All zeros in structure
box, contains all related homing para-
meters.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This

Page 559 of 757


output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input,
a Busy output indicates the function is operating, but not ready to provide Valid
information. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
Use HomeData.ApproachDistanceLimit to set the maximum travel distance while waiting for the TouchProbe function to detect
the sensor. Enter a positive or negative value, this function block does not use HomeData.Direction.

Error Description
See the Function Block ErrorID list.

Example
The example below illustrates how the Home_TouchProbe function block homes an axis based on the latch detected on one of
the three EXT channels on the servo. Plots of the commanded speed and positions are shown to describe a negative home off-
set of 360 units after the latch is detected.

Page 560 of 757


Page 561 of 757
Toolbox Help Documentation
Help version created 7/23/2021

Jog

This function block combines the PLCopen functions MC_MoveVelocity and MC_Stop to provide a jogging feature only while the
Forward or Reverse inputs are TRUE. The function will default to stopping the axis when neither (or both) are high.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hardware
REF Configuration (logical axis number).
VAR_INPUT Default
V Forward BOOL Runs the axis in a forward direction when FALSE
TRUE.
V Reverse BOOL Runs the axis in a Reverse direction when FALSE
TRUE.
B Velocity LREAL Absolute value of the velocity in user unit- LREAL#0.0
s/second.
B Acceleration LREAL Value of the acceleration in user unit- LREAL#0.0
s/second^2 (acceleration is applicable with
same sign of torque and velocity)
B Deceleration LREAL Value of the deceleration in user unit- LREAL#0.0

Page 562 of 757


s/second^2 (deceleration is applicable with
opposite signs of torque and velocity.)
E Jerk LREAL Not supported; reserved for future use. LREAL#0.0
Value of the jerk in [user units / second^3].
VAR_OUTPUT
B InVelocity BOOL Set high when the axis first reaches the specified velocity (function is complete). If the func-
tion is re executed with a new velocity, the output will remain high. It will go low when an
MC_Stop block is executed. If using the Jog function block from the PLCopen Toolbox, this
output will go low when both the Forward and Reverse inputs are low.
B Done BOOL Turns on for one scan when the axis comes to a stop after both Forward and Reverse inputs
go FALSE.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted,
or Error is true. In the case of a function block with an Enable input, a Busy output indicates
the function is operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes
l The velocity can be changed on the fly without toggling the Forward or Reverse input. The code inside this function
block will detect if the velocity has changed, and automatically re trigger the MC_MoveVelocity function block inside.
Starting in PLCopen Toolbox v202, changes in Acceleration and Deceleration are detected and can be changed on the
fly.
l See the Jog eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 563 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Jog_To_Position

This function block combines the PLCopen functions MC_MoveVelocity and MC_MoveAbsolute to provide a jogging feature spe-
cifically for rotary axes that must stop at a specific position after an indefinite period of motion.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
V Forward BOOL Runs the axis in a forward direction when FALSE
TRUE.
V Reverse BOOL Runs the axis in a Reverse direction when FALSE
TRUE.
B Velocity LREAL Absolute value of the velocity in user unit- LREAL#0.0
s/second.
B Acceleration LREAL Value of the acceleration in user unit- LREAL#0.0
s/second^2 (acceleration is applicable
with same sign of torque and velocity)
B Deceleration LREAL Value of the deceleration in user unit- LREAL#0.0

Page 564 of 757


s/second^2 (deceleration is applicable
with opposite signs of torque and velo-
city.)
E Jerk LREAL Not supported; reserved for future use. LREAL#0.0
Value of the jerk in [user units /
second^3].
V StopPosition LREAL Once the Forward and Reverse inputs are LREAL#0.0
false, the axis will decelerate to a stop at
the specified StopPosition using the spe-
cified deceleration rate
VAR_OUTPUT
B InVelocity BOOL Set high when the axis first reaches the specified velocity (function is complete). If the
function is re executed with a new velocity, the output will remain high. It will go low
when an MC_Stop block is executed. If using the Jog function block from the PLCopen
Toolbox, this output will go low when both the Forward and Reverse inputs are low.
B Done BOOL Turns on for one scan when the axis comes to a stop after both Forward and Reverse
inputs go FALSE.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
l When using this function block, the Math Toolbox is also required because JogToPosition references the REM function.
l The velocity, acceleration, and deceleration can be changed on the fly without toggling the Forward or Reverse input.
The code inside this function block will detect if the input values have changed, and automatically re trigger the MC_
MoveVelocity function block inside. Starting in PLCopen Toolbox v202, changes in Acceleration and Deceleration are
detected and can be changed on the fly.
l This block references the REM function from the Math Toolbox, so it must be included in the project tree.

Page 565 of 757


Error Description
See the Function Block ErrorID list.

Example 1
In the first example the speed is low enough and the deceleration high enough that the axis can stop within one revolution.
This is the easiest condition.

Example 2
In this example, the axis requires about 13 revolutions to come to a stop at the specified velocity and deceleration. The data
"SlowNow" in green is an internal monitoring bit which results from a calculation made to determine a position that will allow
the motion profile to follow the deceleration rate to the specified StopPosition. Notice there is a very brief delay between the
time the Forward jog request is removed and the axis starts decelerating. This allow the axis to decelerate smoothly to the
StopPositiion. The pink data indicates when the MC_MoveAbsolute is active.

Page 566 of 757


Example 3
The third example shows a deceleration to stop at 52 degrees.

Page 567 of 757


Page 568 of 757
Toolbox Help Documentation
Help version created 7/23/2021

MoveAbsolute_2Stage

This function block commands a move to an absolute position using a two staged acceleration and deceleration.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trigger
the execute input.
B Position LREAL A positive or negative value within the coordinate LREAL#0.0
system in user units.
B Velocity LREAL LREAL#0.0

Absolute value of the velocity in user unit-


s/second.

Page 569 of 757


B Acceleration LREAL Value of the acceleration in user units/second^2 LREAL#0.0
(acceleration is applicable with same sign of
torque and velocity) This acceleration will be
applied when Velocity is less than AccChangeVe-
locity.
B Acceleration2 LREAL Value of the acceleration in user units/second^2 LREAL#0.0
(acceleration is applicable with same sign of
torque and velocity) This acceleration will be
applied when Velocity is greater than
AccChangeVelocity.
V AccChangeVelocity LREAL Velocity at which motion will transition from using LREAL#0.0
Acceleration to Acceleration2.
B Deceleration LREAL Value of the deceleration in user units/second^2 LREAL#0.0
(deceleration is applicable with opposite signs of
torque and velocity.) This deceleration will be
used when Velocity is less than the DecChangeVe-
locity.
B Deceleration2 LREAL Value of the deceleration in user units/second^2 LREAL#0.0
(deceleration is applicable with opposite signs of
torque and velocity.) This deceleration will be
used when Velocity is greater than the
DecChangeVelocity.
V DecChangeVelocity LREAL Velocity at which motion will transition from using LREAL#0.0
Deceleration to Deceleration2.
E Jerk LREAL Not supported; reserved for future use. Value of LREAL#0.0
the jerk in [user units / second^3].
B Direction MC_Dir- Specifies the direction of motion. Allowable modes MC_Direction#Positive_Dir-
ection are positive_direction, shortest_way, negative_ ection
direction, current_direction.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Active BOOL For buffered modes, this output is set high at the moment the block takes control of
the axis. For non buffered modes, the outputs Busy and Active have the same value.
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes

Error Description
See the Function Block ErrorID list.

Page 570 of 757


Example

Page 571 of 757


Toolbox Help Documentation
Help version created 7/23/2021

MoveRelative_ByTime

This function block converts the MoveTime input into acceleration, velocity, and deceleration for a 1/3, 1/3, 1/3 trapezoidal
move profile which will complete in the MoveTime specified. It uses the MC_MoveRelative function block.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hard-
REF ware Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated.
To modify an input, change the value and re-
trigger the execute input.
V Distance LREAL A relative positive or negative value within the LREAL#0.0
coordinate system in user units
V MoveTime LREAL The time required (in seconds) for the move to LREAL#0.0
complete.
V VelocityLimit LREAL LREAL#0.0

Maximum velocity used when moving. If left


unconnected, no velocity limit will be applied
during move.
V AccelerationLimit LREAL Maximum acceleration used when moving. If LREAL#0.0
left unconnected, no acceleration limit will be

Page 572 of 757


applied during move.
V DecelerationLimit LREAL Maximum deceleration used when moving. If LREAL#0.0
left unconnected, no deceleration limit will be
applied during move.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Active BOOL For buffered modes, this output is set high at the moment the block takes control of the
axis. For non buffered modes, the outputs Busy and Active have the same value.
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Notes
l Prior to v207, this function creates a 1/3, 1/3, 1/3 trapezoidal move, it may not be appropriate for very long moves,
because the calculated commanded speed may be too high. New functionality was added for v207 which allows the
function to calculate the move parameters to stay within the restraints of the new VAR_INPUTS VelocityLimit, Accel-
erationLimit, and DecelerationLimit.
l See the MoveRelative_ByTime eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 573 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PositionLimits

This function block enables or disables the position limit function. It also allows continuous streaming of new position limits.
This block uses MC_WriteBoolParameter, MC_ReadBoolParameter, MC_WriteParameter, and MC_ReadParameter.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in
REF the Hardware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V LimitPositionEnable BOOL Enables / Disables the position limit function FALSE
in the motion engine.
V LimitPositionPositive LREAL The maximum commanded position allowed LREAL#0.0
V LimitPositionNegative LREAL The minimum commanded position allowed LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
V LimitPositionEnableEcho BOOL Status of the Position Limit function from the motion engine.
V LimitPositionPositiveEcho LREAL Value used by the motion engine for the maximum allowed commanded pos-
ition.
V LimitPositionNegativeEcho LREAL Value used by the motion engine for the minimum allowed commanded pos-
ition.
B Error BOOL Set high if an error has occurred during the execution of the function block.

Page 574 of 757


This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
The function block uses MC_ReadBoolParameter, MC_WriteBoolParameter, MC_ReadParameter, and MC_WriteParameter.

l The software position limits are managed by the MPiec controller. The parameters are called LimitPositionPositive and
LimitPositionNegative, with values of UINT#1201 and UINT#1200 respectively. Use the MC_WriteParameter function
block for these and all controller side parameters. Position limit parameters are in user units.
l When a position limit is exceeded, a controller alarm will be generated, obtainable via the MC_ReadAxisError function
block, or the web server.
l The controller alarm will be 16#3202 0001 if the positive position limit is exceeded and 16#3202 0002 if the negative
position limit is exceeded.
l To disable the position limits, set LimitPositionEnable, parameter 1202 to zero.
l LimitPositionPositive must be greater than LimitPositionNegative.
l LimitPositionNegative must be lower than LimitPositionPositive.
l See the PositionLimits eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 575 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ProductBuffer

This function block uses MC_TouchProbe and provides a circular buffer of recorded latch positions for the axis specified. It is
tailored for use specifically for applications that process random incoming products such as rotary knifes or linear flying
shear. Together, the application programmer and the ProductBuffer function block manage the RegistrationData structure
which contains information pertaining to the product positions and other mechanical dimensions related to the application.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V ProductAxis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in
the Hardware Configuration (logical axis number).
V RegistrationData ProductBufferStruct Structure containing all information for the circular buffer to operate.

VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V TestMode BOOL If TRUE, then the internal MC_TouchProbe is aborted, FALSE
and the function block can be used to "dry cycle" the
machine by simulating products using the TestTrig-
ger input.
V TestTrigger BOOL If TestMode is TRUE, then on the rising edge of FALSE
TestTrigger, the actual position of the ProductAxis
will be stored into the RegistrationData STRUCT.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.

Page 576 of 757


V BufferLevel INT Indicates the number of products in the buffer by subtracting UsePointer
from StorePointer.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
l The Math Toolbox v202 or higher is required when using the ProductBuffer. The Math Toolbox must be included and
placed above the PLCopen Toolbox in the Libraries folder of your MotionWorks IEC project.
l The ProductBuffer function block manages only the storing activity and only updates the StorePointer. Another part of
your application must update the UsePointer after the products have been processed. If the UsePointer is not updated,
this function block will eventually generate the ErrorID 10022, buffer overrun.
l The StorePointer and UsePointer are the 'Head' and the 'Tail' of the circular buffer. If more than one 'Use' of the latch
data is required, use the expanded sub structure added for v206 which supports a series of Use pointer activities.
l The cyclic (modularized) and non cyclic (unmodularized) latch position are stored into the RegistrationData sim-
ultaneously.
l TestMode can be toggled on the fly without re Enabling the function block. TestMode was added in v201.
l See the ProductBuffer eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Example 1:
Consider a rotary knife application as shown below.

Page 577 of 757


(*Initialization of the ProductBufferStruct in an initialize program*)

Conveyor.Products.BufferSize:=INT#20;

Conveyor.Products.LockoutDistance:=LREAL#3.25; (* inches *)

Conveyor.Products.ManualOffset:=LREAL#0.0;

Conveyor.Products.ProductAwayDistance:=LREAL#23.75;

Conveyor.Products.Sensor.Bit:=UINT#1; (* Equates to input1 on 2600 I/O, see MC_TouchProbe help for details *)

Conveyor.Products.SensorDistance:=LREAL#23.25; (* If product leads slave, increase this value *)

Conveyor.Products.SensorOffset:=REM(Conveyor.Products.SensorDistance, Conveyor.MachineCycle);

Page 578 of 757


Example 2:
The configuration shown below is for a system which is used to detect rising and falling edge triggers for a product moving
along a conveyor driven by a servo. the rising edge detection signal is wired to the EXT1 terminal of the ServoPack. The falling
edge signal is wired to the EXT2 terminal of the ServoPack.

Page 579 of 757


Products.BufferedPattern shows the trigger sequence in which latched data was captured.

Page 580 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ReadAxisParameters

This function block reads all axis parameters into the AxisParameterStruct. The Y_Motion firmware library must be included in
a project that uses ReadAxisParameters.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description

VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the
Hardware Configuration (logical axis number).
V AxisParams AxisParameterStruct User Defined DataType declared in the PLCopen Toolbox.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
Inputs will be read only on the rising edge of
enable.
V AxisType TB_AxisType Indicates axis type: INT#0 (TB_
TB_AxisType#Servo AxisType#Servo)
TB_AxisType#VFD
TB_AxisType#Stepper
TB_AxisType#Virtual
TB_AxisType#External
V ParamTypes WORD Used to include additional parameter sets, such as WORD#0

Page 581 of 757


camming.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.
V ErrorPrm UINT If there was an error while attempting to read one of the parameters listed in
the ParamStruct, this output will contain the offending parameter number.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
Only AxisType#Servo, AxisType#External, AxisType#Virtual are supported.

By default, the function will update all parameter types in the AxisParamStruct. For efficiency, parameters are grouped into
types. Basic, Status, and Cam. For axes that are not cam slaves, there is no need to read the cam parameters. To cause the
function to skip the update of a parameter group, set the corresponding bit high. For example, the following function block
will not read the cam parameters:

Parameters categorized as BasicMotion are always read.

ParamType ParameterName Parameter #


BasicMotion ActualPosition 1000
BasicMotion ActualPositionCyclic 1005
BasicMotion ActualPositionNonCyclic 1006
BasicMotion ActualTorque 1004
BasicMotion ActualVelocity 1001
BasicMotion AtVelocity 1141
BasicMotion CommandedPosition 1010
BasicMotion CommandedPositionCyclic 1015
BasicMotion CommandedPositionNonCyclic 1016
BasicMotion CommandedTorque 1014
BasicMotion CommandedVelocity 1011
BasicMotion InPosition 1140
BasicMotion LatchPositionNonCyclic 1031
BasicMotion PositionError 1130
Cam CamMasterCycle 1512

Page 582 of 757


Cam CamMasterPosition 1500
Cam CamMasterScale 1510
Cam CamMasterShift 1511
Cam CamMasterShiftedCyclic 1502
Cam CamMasterShiftedPosition 1501
Cam CamOffset 1531
Cam CamScale 1530
Cam CamShiftRemaining 1513
Cam CamState 1540
Cam CamTableIDEngaged 1541
Cam CamTableOutput 1520
Status BufferedMotionBlocks 1600
Status CommandedAcceleration 1012
Status PositionWindow 1120

l See the ReadAxisParameters eLearning Module on Yaskawa's YouTube channel.

Error Description
See the Function Block ErrorID list.

Page 583 of 757


Example

Page 584 of 757


Page 585 of 757
Toolbox Help Documentation
Help version created 7/23/2021

ReadMotorSpeed

This function block reads the rated and peak speeds of a Sigma-5 motor connected to the controller.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in the Hardware
REF Configuration (logical axis number).
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trigger
the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes con-
trol before the action is completed, the Done output will not be set. This output is reset when
Execute goes low.

Page 586 of 757


B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted,
or Error is true. In the case of a function block with an Enable input, a Busy output indicates
the function is operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
E MaxRPM LREAL Peak speed of the motor
E RatedRPM LREAL Rated speed of the motor

Error Description
See the Function Block ErrorID list.

Example
The example below shows the ReadMotorSpeed function block reading the rated and peak speeds of an SGMAV motor.

Page 587 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Reverse_MC_Direction

This function block was designed for use with the Home_LS_Pulse function block in the PLCopen Toolbox. It changes the enu-
merated type MC_Direction#positive_direction to MC_Direction#negative_direction or vice versa so that the function can move
the motor one direction into a limit switch with MC_StepRefLimit, and the other direction when searching for the Index Pulse
with MC_StepRefPulse.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B EN BOOL Enables the function. FALSE
V LimitDirection INT INT / ENUM MC_Direction#positive_direction or MC_Dir-
ection#negative_direction
V BackOffDistance LREAL INT#0
VAR_OUTPUT
B ENO BOOL High if the function is executing normally.
V PulseDirection INT INT / ENUM MC_Direction#positive_direction or MC_Direction#negative_direction
V BackOffDirection LREAL

Error Description
No Errors will result, but if there is a problem with the ENum input for MC_Direction, then ENO will be FALSE.

Page 588 of 757


Example

Page 589 of 757


Toolbox Help Documentation
Help version created 7/23/2021

VelocityLimits

This function block enables or disables the velocity limit function. It also allows continuous streaming of new velocity limits.
This block uses MC_WriteBoolParameter, MC_ReadBoolParameter, MC_WriteParameter, and MC_ReadParameter.

Library
PLCopen Toolbox

Parameters
* Parameter Data Description
Type
VAR_IN_OUT
B Axis AXIS_ Logical axis reference. This value can be located on the Configuration tab in
REF the Hardware Configuration (logical axis number).
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V LimitVelocityEnable BOOL Enables / Disables the velocity limit function FALSE
in the motion engine.
V LimitVelocityPositive LREAL The maximum commanded velocity allowed LREAL#0.0
V LimitVelocityNegative LREAL The minimum commanded velocity allowed LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid.
V LimitPositionEnableEcho BOOL Status of the Velocity Limit function from the motion engine.

V LimitPositionPositiveEcho LREAL Value used by the motion engine for the maximum allowed commanded velo-
city.
V LimitPositionNegativeEcho LREAL Value used by the motion engine for the minimum allowed commanded velo-

Page 590 of 757


city.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes
The function block uses MC_ReadBoolParameter, MC_WriteBoolParameter, MC_ReadParameter, and MC_WriteParameter.

• The software velocity limits are managed by the MPieciec controller. The parameters are called LimitVelocityPositive and Lim-
itVelocityNegative, with values of UINT#1211 and UINT#1210 respectively. Use the MC_WriteParameter function block for
these and all controller side parameters. Velocity limit parameters are in user units / sec.

• When a velocity limit is exceeded, a controller alarm will be generated, obtainable via the MC_ReadAxisError function block,
or the web server.

• The controller alarm will be 16#3202 0003 if the positive velocity limit is exceeded and 16#3202 0004 if the negative velo-
city limit is exceeded.

• To disable the velocity limits, set LimitVelocityEnable, parameter 1212 to zero.

• LimitVelocityPositive must be zero or greater.

• LimitVelocityNegative must be zero or lower.

Page 591 of 757


Error Description
See the Function Block ErrorID list.

Page 592 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Y_DigitalCamSwitch

This function block commands a group of discrete output bits analogous to a set of mechanical cam controlled switches driven
by a rotating shaft. Forward and backward movements are allowed. A maximum of 32 outputs and 256 switches are sup-
ported. Starting in v340, support was added to include the FT62, a specialized high speed output capability of the Sigma 7 Ser-
voPack.

Library
PLCopen Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the Hard-
ware Configuration (logical axis number).
B Switches CAMSWITCH_ Reference to the switching actions. 256 maximum switches.
REF
E TrackOptions TRACK_REF Reference to the track related properties. 32 maximum tracks.

VAR_INPUT Default
B Enable BOOL The function will continue to execute while enable is FALSE
held high.

Page 593 of 757


E EnableMask DWORD Individually enables the tracks [0..31] per the bit pat- DWORD#0
tern. Value of 1 means Enabled, 0 means disabled.
Least significant bit corresponds to Track [0]. Default if
not connected is All Tracks Enabled.
VAR_OUTPUT
B InOperation BOOL Function Block Enable is ON and at least 1 track is enabled (EnableMask is <> 0).
B Busy BOOL Function Block Enable is ON but no tracks are enabled (EnableMask = 0).
E Warning BOOL Signals that a non-critical error has occurred within the function block. In this case,
the block will continue to function.
E SWErrorCode SWERROR_ Switch Error Code Structure that identifies particular warnings with switch settings.
STRUCT The user can monitor this ErrorCode if Warning output comes on.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.
E Output DWORD Resulting CamSwitch output for each track per the bit pattern. Least significant bit
corresponds to Track [0]. This Output will need to be tied to physical outputs outside
of the DigitalCamSwitch FB.

Notes
• This functionality is sometimes called PLS – Phase or Position or Programmable Limit Switch.

• Switches will be evaluated for both forward and reverse travel of the axis.

• OnCompensation and OffCompensation will only be applied when the axis is moving in the Positive Direction.

• Track Hysteresis is not supported.

• When change tracknumber and reverse signal of any switch, Sigma7_FT62 feature requires controller reboot.

• The function block 'Output' is not supported by Sigma7_FT62 and not output bit can be observed for this feature.

• More information about Sigma7_FT62 will be covered in the Application Note.

Restrictions

If the output specified in the PLS is also controlled somewhere else in the project then the last instruction wins. This would
also be the case when a single output is used in two PLS blocks.

The PLS block will support a maximum of 256 switches and 32 outputs. This means that the block will react to a maximum of
512 positions (two for each switch).

If the cam-like lobes of multiple switches intersect with each other for a single track the net effect would be an OR-ing of the
switches.

Example1 SW1: on at 10, off at 50, SW2: on at 20, off at 30; net effect on at 10 off at 50.

Example2 SW1: on at 10, off at 50, SW2: on at 40, off at 60; net effect on at 10 off at 60.

Operation

On the rising edge of Enable, the input data will be checked against restrictions. The busy output will remain on until at least 1
track is enabled and the FB is controlling the outputs, then the InOperation bit will be set and the busy bit reset.

While the Enable is on, the EnableMask value will be read each scan and effect the output control.

On the falling edge of Enable, all outputs will be reset (turn off), and the InOperation, Busy, and Error bits will be reset.
ErrorID output will be set to 0.

Input Data that is read only on rising edge of Enable:

CAMSWITCH_STRUCT[].TrackNumber

Page 594 of 757


CAMSWITCH_STRUCT[].AxisDirection

CAMSWITCH_STRUCT[].CamSwitchMode

AXIS_REF

CAMSWITCH_REF.MasterType

CAMSWITCH_REF.MachineCycle

CAMSWITCH_REF.LastSwitch

Input Data that is read continuously while Enabled:

CAMSWITCH_STRUCT[].FirstOnPosition

CAMSWITCH_STRUCT[].LastOnPosition

CAMSWITCH_STRUCT[].Duration

CAMSWITCH_STRUCT[].FirstOnPosition

TRACK_STRUCT[].OnCompensationScaler

TRACK_STRUCT[].OffCompensationScaler

Enable

EnableMask

Output Bits: Boolean Outputs are exclusive

AxisDirection must be 0, any other number will default to 0. (values 1 and 2 not supported.)

CamSwitchMode must be 0 or 1, any other number will default to 0.

Error Description
See the Function Block ErrorID list.

Example 1:
Consider the PLS requirement shown in the figure below. There are 4 tracks (0, 1, 2, 3) in the set up and a total of 5 switches
(0, 1, 2, 3, 4).

Track 0 has 2 switches associated with it.

Switch 0: On Position : 2 degrees

Off Position : 10 degrees

Switch 1: On Position : 200 degrees

Off Position : 210 degrees

Track 1 has 1 switch associated with it

Switch 2: On Position : 20 degrees

Off Position : 30 degrees

Track 2 has 1 switch associated with it

Switch 3: On Position : 50 degrees

Off Position : 60 degrees

Track 3 has 1 switch associated with it

Switch 4: On Position : 100 degrees

Off Position : 200 degrees

Page 595 of 757


The switches can be defined and initialized as follows:

Page 596 of 757


Page 597 of 757
Once the Y_DgitalCamSwitch is enabled and is in operation, the track output states will be as shown in the logic analyzer plot
given below. Note that the outputs will correspond to the position of the axis.

Example 2:
If speed compensation needs to be applied to individual tracks, it can be accomplished by specifying either OnCom-
pensationScaler or OffCompensationScaler in the TRACK_REF data type (TrackOptions in Y_DigitalCamSwitch). An example of
applying a -0.06 OffCompensation on track 1 and 0.05 OnCompensation on track 3 is shown below.

Page 598 of 757


Page 599 of 757
Page 600 of 757
Example 3(Sigma7_FT62):
Relationships between Y_DigitalCamSwith and Sigma7-FT62 required variables:

Y_DigitalCamSwitch Sigma7_FT62

PLS_Switches.LastSwitch N/A

PLS_Switches.MachineCycle N/A

PLS_Switches.MasterType N/A

PLS_Switches.Switch[0].TrackNumber OutputFunction

PLS_Switches.Switch[0].AxisDirection OutputFunction

Page 601 of 757


PLS_Switches.Switch[0].CamSwitchMode Pn660

PLS_Switches.Switch[0].Duration OutputTime

PLS_Switches.Switch[0].FirstOnPosition OutputPosition

PLS_Switches.Switch[0].LastOnPosition OutputPosition/OutputDistance

PLS_TrackOptions.Track[0].OnCompensationScaler OutputPositionCompensation

PLS_TrackOptions.Track[0].OffCompensationScaler N/A

PLS_TrackOptions.Track[0].Value N/A

Page 602 of 757


Other POUs

Toolbox Help Documentation


Help version created 7/23/2021

PTB_Initialize

This is not a function block but a Program POU in the PLCopen Toolbox. Its purpose is to reduce the time required to enter ini-
tialization code into your project. If you use the provided datatypes, time can be saved by copying and pasting structured text
code from this POU into your Initialization POU, then replacing the string “Replace_Me" with another name meaningful to the
application.

This POU is not intended to be selected for execution in a task in your application program.

Page 603 of 757


Winding Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with Winding Toolbox

Requirements for v352


To use the Winding Toolbox, your project must also contain the following:

Firmware libraries:

l YMotion

User libraries:

The following User Libraries must be listed above the Winding Toolbox and in the following order:

l DataTypes_Toolbox (v300 or higher)


l Yaskawa_Toolbox (v352 or higher)

Block Diagram
This diagram shows how a complete system can be controlled using the various functions contained in the winding toolbox.

Page 604 of 757


Winding Revision History
Winding FBs

Toolbox Help Documentation


Help version created 7/23/2021

DiameterCalculation

The DiameterCalculation function block provides a diameter for a winding roll by calculating the diameter from a line pulse and
the winder pulse. It updates based on the revolutions incurred at the winding or unwinding roll. As the diameter increases,
the speed of the motor decreases to maintain a constant web speed across the system. Likewise as the diameter decreases,
the motor speed increases to maintain a constant web speed.

Library
Winding Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V DiameterSet BOOL The function will be on when current diameter is set. FALSE

V LinePulse LREAL Set position feedback from encoder on the line. LREAL#0.0

V WinderPulse LREAL Feedback from winder axis. LREAL#0.0

Page 605 of 757


V Parameters DiameterStruct Structure containing all the information for Diameter Cal- All zeros in
culation function block to operate. structure
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
V Diameter LREAL The diameter that the DiameterCalculation FB is calculating.
V AtMaxLimit BOOL High if the maximum limit is met.
V AtMinLimit BOOL High if the minimum limit is met.

B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes

Error Description
See the Function Block ErrorID list.

Example

Set the initial value of the diameter before executing DiameterCalculation. An initial diameter is maintained until three rotata-
tions after an operation start, then the diameter is updated every three rotations.

Page 606 of 757


Page 607 of 757
Toolbox Help Documentation
Help version created 7/23/2021

DrawRoll

The DrawRoll function block provides the velocity for a draw roll with draw ratio. This method stabilizes a moving web by con-
trolling tension. Based off of a ratio to the line master, the DrawRoll optimizes the web that is fed into a cut roll.

Library
Winding Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V BaseSpeed LREAL The BaseSpeed input is a base speed. LREAL#0.0

V DrawRatio LREAL The ratio for the BaseSpeed. For example 0.01 is 101% & - LREAL#0.0
0.01 is 99% of base speed.
V Rate LREAL Acceleration/Deceleration per scan. The time required for LREAL#0.0
the SpeedRef to become the DrawSpeed value profile
depends on the Rate Input and the interval (Application task
rate) at which the DrawRoll function block is being run.
(User Unit/sec )
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V AtDrawSpeed BOOL The AtDrawSpeed output will be high once the BaseSpeed is met.
V SpeedRef BOOL This output provides the real time speed that the DrawRoll FB is moving.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.

Page 608 of 757


E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l The DrawRoll speed is calculated by multiplying the base speed by the draw ratio speed. This helps to provide a con-
stant tension along the entire web.

Error Description
See the Function Block ErrorID list.

Example

A BaseSpeed is converted to a SpeedRef that is multiplied the DrawRatio. The rate of 1 unit specifies that the output value is
expected to increase at the rate of 1 unit per application scan.

Page 609 of 757


Page 610 of 757
Toolbox Help Documentation
Help version created 7/23/2021

LineMaster

The LineMaster function block provides the velocity for a line master with S curve acceleration and deceleration.

Library
Winding Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V E_Stop LREAL From the safety circuit of the machine. LREAL#0.0

V TargetSpeed LREAL Commanded speed of the Line Master in user units. LREAL#0.0

V Parameters LineMasterStruct The LineMasterStruct parameters are used for ini- All zeros in
tialization of the LineMaster FB. structure
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of
the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when
Done, CommandAborted, or Error is true. In the case of a function
block with an Enable input, a Busy output indicates the function is
operating, but not ready to provide Valid information. (No Error)
V SpeedRef LREAL This is the actual speed of the Line Master.
V AtTargetSpeed BOOL This output turns on once the Line Master has reached the Tar-

Page 611 of 757


getSpeed input.
V ZeroSpeed BOOL This output is used for starting up the machine.

B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l The line master speed becomes a standard speed of the entire line. The speed reference for all axes are based on the
line master speed.

l An SLAU function block from the Yaskawa Toolbox is used in the LineMaster function block. See the SLAU function block
help for how to set Normal_Rate and Shape_Time.

Error Description
See the Function Block ErrorID list.

Example

Page 612 of 757


Page 613 of 757
Toolbox Help Documentation
Help version created 7/23/2021

ProcessRoll

The ProcessRoll function block provides the velocity for a tension cut roll with PI control.

Library
Winding Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V Inverse BOOL This input is dependent upon the PI output of the feed- FALSE
back device.
V BaseSpeed LREAL The BaseSpeed input is the Line Master Speed after cal- LREAL#0.0
culating the control gains.
V PI_SetPoint LREAL Defines the process support module baseline value. LREAL#0.0
V PI_FeedBack LREAL Scaled input from the process support module, usually a LREAL#0.0
dancer or loadcell.>
V PI_Parameters PI_Struct Proportional and Integral gain parameters used for the All zeros
roll. in Structure
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V PI_AtLimit BOOL Indicates that the axis has reached the designated PI Limit.
V SpeedRef LREAL Real time speed that the process roll is moving.
V PI_Value LREAL Provides the PI value from the support module, usually a dancer or load-

Page 614 of 757


cell.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset
when 'Execute' or 'Enable' goes low.

Notes
l The dancer roll is used to adjust the speed reference used by the Tension cut roll. In this manner, the LineMaster
speed remains constant, while the Dancer roll accumulates any slack and adjusts the Tension cut roll speed. This Pro-
cessRoll function block can also be used for a load cell feedback.

Error Description
See the Function Block ErrorID list.

Example

Page 615 of 757


Page 616 of 757
Yaskawa Toolbox

Toolbox Help Documentation


Help version created 7/23/2021

Getting Started with Yaskawa Toolbox

Requirements for v371


To use the Yaskawa Toolbox, the project must also contain the following:

Firmware libraries:

l YDeviceComm
l PROCONOS

User libraries:

l None

Page 617 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Yaskawa Revision History

Current Version:
2021-04-09 v372 released

1) DataSort FB - Fixed Watchdog caused when X variables are equal to each other. DCR 5175.

Previous Versions:
2020-11-02 v371 released

1) No changes, same as v370.

2020-02-06 v370 released

1) TemperatureControl FB - Should not output a control value when not Enabled. DCR 2533.

2) TemperatureControl FB - Fixed possible stuck in Autotuning condition after 1st cycle in oven application. DCR 2675.

3) CTU Counter Enchancement - Added CTU_Retained, CTD_Retained, and CTUD_Retained to Yaskawa toolbox. DCR 2838.

4) RangeCheck - Input "maximim" spelling error was corrected. DCR 2882.

5) IsNumeric - Updated FB to handle exponents and commas. DCR 2987.

6) TemperatureControl / CalculateGains - CycleError occurs with Un-initialized TempControl_Prms. DCR 3005.

7) SLAU - Improved to work in both positive and negative direction. DCR 3054.

8) TemperatureControl FB - CONCAT internal FB did not work on MP2300. DCR 3065.

9) TemperatureControl FB - Improve validation of User Inputs. DCR 3079.

10) TemperatureControl FB - Description for AutoTuning and Busy outputs were incorrect. DCR 3082.

11) TemperatureControl FB - FileRemove error results if multiple FB instances are using the same DeviceName. DCR 3085.

12) TemperatureControl FB - Report an error condition if it doesn't detect change in feedback when applying a control output.
DCR 3111.

13) IsNumeric / IsInteger FBs were not returning correct value if InputString was zero length. DCR 3643

14) IsNumeric / IsInteger FBs were not reporting string like "5." correctly. DCR 3684

2019-02-11 v352 released

1) Temperature Control - New function block added. DCR 1934.

2) IsNumeric - New FB added. DCR 2242.

3) IsInteger - New FB added. DCR 2356.

4) GetTaskInterval - Changed from Enable style behavior to Execute. DCR 2357.

5) PWM - New function block added. DCR 2579.

Page 618 of 757


2018-03-08 v350 released

1) ChangeCase - New FB added. DCR 1348.

2) SLAU - Added Start Value input. DCR 892

2017-12-08 v341 released (filename is still 340, using new project version control numbering)

1) StripSpaces - New FB added. DCR 1304.

2017-08-14 v340 released

1) STRING_TO_BOOL - New FB added. DCR 1068. converts false, FALSE, true, TRUE, 0, 1, BOOL#1, BOOL#0 to BOOL datatype

2) GetTaskInterval - New FB added. DCR 1196.

3) Blink - DCR 1221. Add handling for Rollover of uSec DINT value from +2147483647 to -2147483648. At 2msec MLink,
rollover occurs every approx 70 minutes. Without this fix, the output freezes.

2016-06-21 v301 released

1) Blink - Support Mechatrolink rates less than one millesecond. DCR 825.

2) PLCuSec - New function block to provide a microsecond counter.

2015-01-31 v300 released

1) Identical to v205, but recompiled specifically for MotionWorks IEC v3.x.

2014-11-17: v205 released. Requires firmware 2.1.0 or higher


1) DEC_TO_HEX and HEX_TO_DEC - Added new function blocks.

2) CheckSumCalculate and CheckSumValidate - Updated to include a new method for two's compliment in hexadecimal.

3) XYLookup - Added support for decreasing X values.

4) YaskawaDatatypes - Added YTB_DINT32 as an Array of 32 DINT.

2013-09-01: v204 released. Requires firmware 2.1.0


1) More string and byte array datatypes added to be used across the Toolbox family

2) LAU - new function block added. Creates a linear profile from current value to target value based on rate/scan input

3) SLAU - new function block added. Creates an s-curve (moving average profile) from a current value to target value.

4) PIControl - new function block added. Subset of PID block

5) Removed references to the Math Toolbox to simplify usage. NOTE: This change makes version 204 and higher incom-
patible with MP2600iec firmware versions 2.0, 2.1, and 2.2!

6) RateCalculator - new function block added.

Page 619 of 757


2012-08-16: v203 released. Requires firmware 2.1.0
1) CheckSumValidate_BYTE - Removed the Result output sad added the Method input to select a calculation method to use.
There will now be a function block error if the checksum is not valid.

2) CheckSumCalculate_BYTE - Added the Method input.

2012-06-19: v202 released. Requires firmware 2.1.0


1) Sweep function improved by adding Trigger and Stream inputs.

2) Explicit_Message - new function block added. Y_DeviceComm firmware library added

3) CheckSumCalculate_BYTE - new function block added.

4) CheckSumValidate_BYTE - new function block added.

4) Blink function - resolution improved.

2011-11-16: v201 released


1) Reduced the size of the DataType definition for MovingAverageArray back down to 1000 as it was in v008. 30000 is too
large, and causing "Data Area Exceeded" error for some users.

2011-07-29: v200 released


1) Built from v010beta for MotionWorks IEC 2.0.

2) Upgraded to Math Toolbox v200

3) Changed Scaler FB to allow negative slope

4) Fixed bug in XY Lookup (Min and Max were not getting reset for each scan.)

2011-04-27: v010 beta created


1) Updated to Math_Toolbox_v004

2) Removed spaces in filename and replaced with underscores

3) Changed MovingAverage to always divide by the number of samples specified by the user. Old methods divided by the
number of actual samples until the entire buffer had been filled.

4) Changed the Blink functions frequency input to REAL datatype and the value now accepts a frequency. (Before it was TIME
datatype)

5) Added RTCString as output of RealTimeClock FB

6) Added error checking to WindowCheck FB to ensure Window value is greater than zero.

2011-03-25: v009 released


1) Added Error logic to PIDControl

2) Improved MovingAverage to not require a FOR LOOP to initialize the buffer at rising edge of ENABLE

3) Moved Math Functions to Math Toolboox

4) Included ProConOS firmware library to use the Real Time Clock function, provided FB to convert RTC from STRING TO
STRUCT

Page 620 of 757


5) Added DateCompare FB, STILL UNDER TEST in v009.

6) Moved REM function to the Math Toolbox v002.

7) Added XYLookup, which is equivalent to the FGN function in the standard MP series

8) Added DataSort, to arrange the data for use with XYLookup if it has been collected out of order.

9) Added DataRecord to capture XY data by either streaming or when the Trigger input goes high.

10) Fixed MovingAverage - it was not properly subtracting old and adding new values.

2010-02-03: v008 released


Added REM function to return the remainder of LREAL division.

Added Pack & Unpack of Byte and Word.

Added RangeCheck function block.

Added WindowCheck function.

Added Sweep function, useful for testing a range of values.

2009-10-29: v007 released


Added ErrorID and outputs to MovingAverage.

Removed ErrorWatchDog functions.

Improved templates with new, reduced logic that does not use SET or RESET coils.

Added template functions for Enable in ST and LD.

Changed functions for MP2600 compatibility by removing EN / ENO and adding MOVE_UINT.

Added Valid output to PID function.

2009-04-03: v006 released


Added CommHeartbeat Function

2009-03-27: v005 released


Added MovingAverage Function

2009-02-06: v004 released


Added the Blink function for toggling an output at a TIME interval.

Added FB_Error_Capture, FB_Error_WatchDog, FB_Error_Clear for trapping function block errors

Corrected and improved PIDControl FB based on Eric Kelley's modifications

Under Construction! - FBError trapping functions blocks, Timestamp not implemented.

2008-10-17: v002 released


Added PIDControl Function Block and associated DataType structure

Page 621 of 757


2008-09-26 v001 released
Execute_FB_Template:

Shell code with all logic to replicate the behavior of PLCopen FB with Execute, Busy, Done, Error, & ErrorID outputs

Behavior and variables match the ST version.

Execute_ST_Template:

Shell code with all logic to replicate the behavior of PLCopen FB with Execute, Busy, Done, Error, & ErrorID outputs

Behavior and variables match the FB version.

Action:

Dummy FB to show simulation of the template function blocks.

Toolbox Help Documentation


Help version created 7/23/2021

Action

This function block is only for demonstration purposes. It is applied in the Enable_F_
Template, Enable_ST_Template, Execute_FB_Template, and Execute_ST_Template
function blocks to show how the inputs and outputs of nested functions can be inter-
locked to apply the PLCopen standards for I/O behavior.

Library

Yaskawa Toolbox

Page 622 of 757


Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are read and the func- FALSE
tion is initiated. To modify an input, change the value and re-trigger the
execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is
reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Error Description

This function provides no Errors.

Example

See the Enable_F_Template, Enable_ST_Template, Execute_FB_Template, and


Execute_ST_Template function blocks.

Page 623 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Action

This function block is only for demonstration purposes. It is applied in the Enable_F_
Template, Enable_ST_Template, Execute_FB_Template, and Execute_ST_Template
function blocks to show how the inputs and outputs of nested functions can be inter-
locked to apply the PLCopen standards for I/O behavior.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are read and the func- FALSE
tion is initiated. To modify an input, change the value and re-trigger the
execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is
reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is

Page 624 of 757


* Parameter Data Description
Type
cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Error Description

This function provides no Errors.

Example

See the Enable_F_Template, Enable_ST_Template, Execute_FB_Template, and


Execute_ST_Template function blocks.

Page 625 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Blink

This function block will toggle the Output at the frequency specified at the input. If Fre-
quency is set to 1.0, then the output will be on for 500 mSec and off for 500 mSec.
Note that the actual frequency may be affected by the application scan rate in which
this function block is placed.

Library

Yaskawa Toolbox

Parameters
Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held high and FALSE
there are no errors.
V Frequency REAL The cycle rate in Hertz. REAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates if the function is operating.
V Output BOOL Toggled at the specified frequency when the function is enabled.

Error Description

The valid output will be high if the function is operating. If Enable is held high and the
Frequency is not greater than zero, the valid output will be low.

Page 626 of 757


Example

Blink_1 was placed in a 10 mSec task so the expected output is 50 mSec on and 50
mSec off which corresponds to 10 cycles.

Logic Analyzer output:

Page 627 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ByteSwap

This function block swaps the upper and lower byte of a word.

Library

Yaskawa Toolbox

Parameters
Parameter Data Type Description

VAR_INPUT Default
V WordIn WORD Input word WORD#0
VAR_OUTPUT
V WordOut WORD Output word

Error Description

This block will not produce any errors.

Example:

Page 628 of 757


Toolbox Help Documentation
Help version created 7/23/2021

CommWatchDog

This function block allows the application program to monitor data being transmitted
from a master device. If the data does not change within the TimeOut period, then
the OK output goes off to indicate that the communications is not being updated by
the master.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V HeartBeat DINT Value that the master changes and sends to the MPiec controller. DINT#0
V WatchDog DINT The HeartBeat input must change value within the WatchDog DINT#0
period for communications to be considered OK.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V OK BOOL Indicates if the HeartBeat input has changed within the TimeOut period.

Page 629 of 757


Error Description

The Valid Output will be high when the function is executing. If the WatchDog value is
not greater than zero, the function will not operate.

Example

Page 630 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DataRecord

This function block will record Data into the array. Data can be stored continuously or
intermittently. The default datatype for Data to be recorded can be customized by
the user to satisfy other recording needs.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V Data XYDataStruct Structure where recorded data is stored.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V DataSize INT The maximum amount of data to be stored, which INT#0
must be less than or equal to the datatype definition
for Data.
V NewData XYData Structure containing a single pair of X and Y data to n/a
be added to the XYDataStruct.
V Stream BOOL If TRUE, the function will store NewData every applic- FALSE

Page 631 of 757


* Parameter Data Type Description
ation scan.
V Trigger BOOL If Stream is FALSE, then the function will store new FALSE
Data only upon the rising edge of Trigger.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V Index INT Indicates the last array index recorded.
V DataFilled BOOL Indicates when the Data recording has reached the DataSize.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Error Description

See the Function Block ErrorID list.

Example

Page 632 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DataSort

This function block will sort data from the lowest to highest value of X data. This gen-
eric function can be customized for other sorting needs.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V Data XYDataStruct Structure where recorded data is stored.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block
takes control before the action is completed, the Done output will not be set. This out-
put is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-

Page 633 of 757


* Parameter Data Type Description
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes

This function is designed to sort by the X data in ascending order only.

Error Description

The default version of this block produces no errors (customizing this block may add
errors depending on what functions are used internally).

Page 634 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DateCompare

This function block will calculate the difference between two real time clock values
and provide the difference as a real time clock value. The clock values may be
obtained using the RealTimeClock function block.

Library

Yaskawa Toolbox

Parameters
Parameter Data Type Description
*
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held FALSE
high and there are no errors.
V Clock1 RTCStruct The more recent real time clock value. All zeros
in struc-
ture
V Clock2 RTCStruct The older real time clock value. All zeros
in struc-
ture
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when

Page 635 of 757


Parameter Data Type Description
*
'Execute' or 'Enable' goes low.
V ClockDiff RTCStruct Outputs the time difference between Clock1 - Clock2.

Error Description

There will be no Errors reported.

Page 636 of 757


Toolbox Help Documentation
Help version created 7/23/2021

DEC_TO_HEX

This function block converts DINT numeric input into a hexadecimal STRING output.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V DecimalNum DINT Input value to be converted. DINT#0
V UpperCase BOOL If True, the output string will contain upper case ASCII FALSE
characters. If False, the output string will contain lower
case ASCII characters.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V HexString STRING String containing the hexadecimal representation of DecimalNum.
V OutputByteArray YTB_ Byte array containing the same ASCII values as in the OutputString.
ByteArray8
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Page 637 of 757


Notes

Error Description

This function block may output ErrroIDs from the BUF_TO_STRING function used
internally.

Page 638 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enable_FB_Template

This function block is a template which can be used when developing functions which
adhere to the PLCopen output behavior.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Error Description

This is an example function block template with no specific errors of its own.

Page 639 of 757


Example

For full documentation about how to create PLCopen compliant function blocks, see
this application note (AN.MWIEC.01) on www.yaskawa.com.

Page 640 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Enable_ST_Template

This function block is a template which can be used when developing functions which
adhere to the PLCopen output behavior.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Error Description

This is an example function block template with no specific errors of its own.

Page 641 of 757


Example

For full documentation about how to create PLCopen compliant function blocks, see
this application note (AN.MWIEC.01) on www.yaskawa.com.

Page 642 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Execute_FB_Template

This function block is a template which can be used when developing functions which
adhere to the PLCopen output behavior.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block inputs are read and the FALSE
function is initiated. To modify an input, change the value and re-trig-
ger the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another
block takes control before the action is completed, the Done output will not be set.
This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to provide
Valid information. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output
is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.

Page 643 of 757


* Parameter Data Type Description

B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes

Depending on the exact usage, there may be outputs in the template that will not
apply, such as CommandAborted. Determine what outputs are necessary for your
situation and make modifications accordingly.

Error Description

This is an example function block template with no specific errors of its own.

Example

For full documentation about how to create PLCopen compliant function blocks, see
this application note (AN.MWIEC.01) on www.yaskawa.com.

Page 644 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Execute_ST_Template

This function block is a template which can be used when developing functions which
adhere to the PLCopen output behavior.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function block FALSE
inputs are read and the function is initiated. To
modify an input, change the value and re-trig-
ger the execute input.
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes
control before the action is completed, the Done output will not be set. This output is
reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable input, a
Busy output indicates the function is operating, but not ready to provide Valid inform-
ation. (No Error)
B CommandAborted BOOL Set high if motion is aborted by another motion command or MC_Stop. This output is
cleared with the same behavior as the Done output.

Page 645 of 757


* Parameter Data Description
Type
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes

This template contains supporting code for:

l Initialization

l Main code body

l Output status updates

Depending on the exact usage, there may be outputs in the template that will not
apply, such as CommandAborted. Determine what outputs are necessary for your
situation and make modifications accordingly.

Error Description

This is an example function block template with no specific errors of its own.

Example

For full documentation about how to create PLCopen compliant function blocks, see
this application note (AN.MWIEC.01) on www.yaskawa.com.

Page 646 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Explicit_Message

This function block will write/read a block of data to/from an Ethernet/IP Target
(Adapter) device via Explicit Messaging. Unlike Implicit Messaging (a built in feature
of the MPiec Series Controllers) which uses the UDP protocol, Explicit Messaging uses
TCP/IP.

This function block emulates the MSG function block in the AB RSLogix platform. The
Explicit_Message function block is best suited when an application requires unsched-
uled and less frequent updates like recipe transfer, cam table transfer, job transfer
etc. Explicit Messaging makes use of a request/response format for communication.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_IN_OUT
V SourceElement ExplicitData When writing a message to the Target (Adapter), SourceElement is the data (as

Page 647 of 757


* Parameter Data Type Description

an array of bytes) that the Scanner (MPiec Controller) will send to the Target.
V Destination ExplicitData When reading a message from the Target (Adapter), the Destination Element is
the data (as an array of bytes) where the Scanner (MPiec Controller) will copy the
data from the Target.
VAR_INPUT Default
B Execute BOOL Upon the rising edge, all other function FALSE
block inputs are read and the function is ini-
tiated. To modify an input, change the value
and re-trigger the execute input.
V AdapterIPAddress STRING IP Address of the Target device. STRING#''
V ServiceCode BYTE Code for the particular service type as BYTE#0
defined for a CIP message. The value can
be obtained from the Target's (Adapter's)
documentation.
V Class BYTE Class parameter of a CIP Generic message. BYTE#0
The value can be obtained from the Target's
(Adapter's) documentation.
V Instance BYTE Instance parameter of a CIP Generic mes- BYTE#0
sage. The value can be obtained from the
Target's (Adapter's) documentation.
V Attribute BYTE Attribute parameter of a CIP Generic mes- BYTE#0
sage. The value can be obtained from the
Target's (Adapter's) documentation.
V SourceLength INT The number of bytes to be written to the Tar- BYTE#0
get. This is the actual data size required,
not the full size of the SourceData DataType.
VAR_OUTPUT
B Done BOOL The done bit is set high when the last packet of the message is successfully trans-
ferred.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, Com-
mandAborted, or Error is true. In the case of a function block with an Enable
input, a Busy output indicates the function is operating, but not ready to provide
Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.
V Status DWORD Indicates if the Target was able to execute the requested command. A value of
zero indicates successful execution of the command by the remote device.
V Response WORD Response from the Target.
V ResponseStatus WORD Status of the response from the Target.

Notes
l The Explicit_Message function block uses the Y_DeviceComm firmware library. This firmware library must be added to
your project. Y_DeviceComm was incorporated into firmware version 2.1.0 and has been included as a firmware lib-
rary starting in MotionWorks IEC v2.1.0.

l Enter parameters as entered in Message Configuration for the MSG function block in AB RSLogix software.

l See Yaskawa's Youtube webinar - EtherNet/IP Explicit Messaging for more info.

Page 648 of 757


Error Description

See the Function Block ErrorID list.

Example 1

Set single attribute.

Page 649 of 757


Example 2

Get single attribute.

Page 650 of 757


Page 651 of 757
Toolbox Help Documentation
Help version created 7/23/2021

HEX_TO_DEC

This function block converts a hexadecimal STRING into a base 10 output value as a
DINT.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V HexString STRING Input hexadecimal string. Can only contain values 0-9, A-F, and a- STRING#''
f. A maximum of 8 characters is allowed, because this would rep-
resent the maximum value of a DINT as STRING#'FFFFFFFF'
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V DecimalNum DINT Output value from hexadecimal conversion.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Page 652 of 757


Notes

l Converts both upper and lower case ASCII characters to a DINT value.

Error Description

This function may output ErrorIDs from the STRING_TO_BUF Status output used
internally.

Page 653 of 757


Toolbox Help Documentation
Help version created 7/23/2021

IsInteger

This function block checks if InputString is an integer (Any non floating point value
such as BYTE, SINT, INT, UINT, DINT, UDINT). If InputString is an integer, Result will
be set high. This function block is useful when preparing to copy string data into other
datatypes using the STRING_TO_* functions. If the data is corrupt or not an integer
when using the STRING_TO_ functions, a String Conversion Exception will occur. This
function block helps to eliminate that risk.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B EN BOOL The function will continue to execute every scan while Enable FALSE
is held high and there are no errors.
V InputString STRING Input string to be tested. STRING#''
VAR_OUTPUT
B ENO BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V Result BOOL Result will be TRUE if the string is convertible to an integer.

Page 654 of 757


Notes

The PROCONOS firmware library must be added to the project, otherwise, the com-
piler error "A function block POU "STRING_TO_BUF" is referencing a sub function, but
the library containing the function is not included."

Page 655 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Library

If InputString is numeric, Result will be set high. This function block is useful when pre-
paring to copy string data into other datatypes using the STRING_TO_* functions. If
the data is corrupt or not a valid number when using the STRING_TO_ functions, a
String Conversion Exception will occur. This function block helps to eliminate that risk.
Valid strings may include a '+', '-' or '.' character as the first character, otherwise
every character must be between or including '0 -9'. If there is an 'E' for scientific
notation, another '+' or'-' may immediately follow the 'E'.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
B EN BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V InputString STRING Input string to be tested. STRING#''
VAR_OUTPUT
B ENO BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V Result BOOL Result will be TRUE if the string is convertible to a number.

Page 656 of 757


Notes

The PROCONOS firmware library must be added to the project, otherwise, the com-
piler error "A function block POU "STRING_TO_BUF" is referencing a sub function, but
the library containing the function is not included."

Page 657 of 757


Toolbox Help Documentation
Help version created 7/23/2021

LAU

This function block generates a linear ramp from a current value to the target value
with a slope based on the Rate input on the function block. The input can be con-
tinuously update on the fly.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held FALSE
high and there are no errors.
V Input LREAL Target value. LREAL#0.0
V Rate LREAL Acceleration/Deceleration per scan. The time required for the Output LREAL#0.0
to become the Input value profile depends on the Rate Input and the
interval (Application task rate) at which the LAU function block is being
run.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.

Page 658 of 757


* Parameter Data Description
Type
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

V Output LREAL Output value.

Error Description

See the Function Block ErrorID list.

Example 1

The figure shown below illustrates how the LAU block can generate a ramp output
even if the Input value instantaneously changes from 0 to 10. The rate of 1 unit spe-
cifies that the output value is expected to increase at the rate of 1 unit per application
scan.

Page 659 of 757


Example 2

The figure shown below shows the effect of a ramp of 0.2 units per scan. The signal
takes 50 application scans to reach 10 units from an initial value of 0.

Page 660 of 757


Toolbox Help Documentation
Help version created 7/23/2021

MovingAverage

This function block will provide the MovingAverage of a series of samples. The
NewValue can either be streamed continuously or updated only when the Trigger
input goes high.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held FALSE
high and there are no errors.
V NewValue LREAL The new value to be added to the total LREAL#0.0
V SampleSize UINT The total number of values to total UINT#0
V Trigger BOOL To indicate when a NewValue should be added to the total FALSE
V Stream BOOL To indicate if the NewValues should be added to the total every scan. FALSE
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V MovingAverage LREAL The moving average of all the samples.
B Error BOOL Set high if an error has occurred during the execution of the function block. This out-
put is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute'
or 'Enable' goes low.

Page 661 of 757


Notes

See Yaskawa's YouTube webinar - MPiec Web Tension Control Applications for more
info on using this function block.

Error Description

See the Function Block ErrorID list.

Example

The MovingAverage function acts as a smoothing filter. In this example, the Sweep
function will increment by 5 each cycle. The Sweep function will continue to increment
the OutputValue until it has reached 100.

The Moving average function has a sample size of 50 which means that if Sweep
reaches its maximum value after 19 cycles, MovingAverage will output the maximum
value after 69 cycles. By looking at the Logic Analyzer plot below, notice there is a 5
cycle pre-record that must be taken in to account: 74 - 5 = 69 cycles.

Page 662 of 757


Page 663 of 757
Toolbox Help Documentation
Help version created 7/23/2021

PackByte

This function block converts 8 BOOL inputs to a single BYTE output.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
V Bit0 BOOL Bit 0 of the BYTE to be output FALSE
V Bit1 BOOL Bit 1 of the BYTE to be output FALSE
V Bit2 BOOL Bit 2 of the BYTE to be output FALSE
V Bit3 BOOL Bit 3 of the BYTE to be output FALSE

Page 664 of 757


* Parameter Data Type Description

V Bit4 BOOL Bit 4 of the BYTE to be output FALSE


V Bit5 BOOL Bit 5 of the BYTE to be output FALSE
V Bit6 BOOL Bit 6 of the BYTE to be output FALSE
V Bit7 BOOL Bit 7 of the BYTE to be output FALSE
VAR_OUTPUT
V OutputByte BYTE Resulting byte of the input bits

Error Description

No errors will be generated

Example

Page 665 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PackWord

This function block converts 16 Boolean inputs to a single WORD output.

Page 666 of 757


Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description

VAR_INPUT Default
V Bit0 BOOL Bit 0 of the WORD to be output

V Bit1 BOOL Bit 1 of the WORD to be output

V Bit2 BOOL Bit 2 of the WORD to be output

V Bit3 BOOL Bit 3 of the WORD to be output

V Bit4 Bit 4 of the WORD to be output


BOOL
V Bit5 BOOL Bit 5 of the WORD to be output

V Bit6 BOOL Bit 6 of the WORD to be output

V Bit7 BOOL Bit 7 of the WORD to be output

V Bit8 BOOL Bit 8 of the WORD to be output

V Bit9 BOOL Bit 9 of the WORD to be output

V Bit10 BOOL Bit A of the WORD to be output

V Bit11 BOOL Bit B of the WORD to be output

V Bit12 BOOL Bit C of the WORD to be output

V Bit13 Bit D of the WORD to be output


BOOL
V Bit14 BOOL Bit E of the WORD to be output

V Bit15 BOOL Bit F of the WORD to be output

VAR_OUTPUT
V OutputWord WORD The resulting WORD of the input bits

Error Description

No errors will be generated

Page 667 of 757


Example

Page 668 of 757


Toolbox Help Documentation
Help version created 7/23/2021

PIDControl

This function block can be used as a generic control loop feedback mechanism. A PID
controller calculates an "error" value as the difference between a measured process
variable and a desired set point, or reference. PIDParameters must be adjusted to
allow the process to provide the proper ControlOutput for a given error situation.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable FALSE
is held high and there are no errors.
V PIDParameters PIDStruct Structure containing all the information for PID control block N/A
to operate
V Reference LREAL Setpoint for the PID control loop. LREAL#0.0
V ProcessValue LREAL Real world value to be compared with the Reference in the LREAL#0.0
control loop
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the
function are valid.
V ControlOutput LREAL Output value from the PID control block. The range of values will be gov-
erned by the PID parameters, especially the upper and lower limit.
B Error BOOL Set high if an error has occurred during the execution of the function
block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when

Page 669 of 757


* Parameter Data Type Description
'Execute' or 'Enable' goes low.

Notes

l All time parameters in the PIDStruct (Ts, Td1, and Td2) must be in the same
units, i.e seconds or ms.
l See Yaskawa's Youtube webinar - MPiec Web Tension Control Applications for
more info on using this function block.

Example

Initialization of the PIDStruct:

PIDPrm.Ts := LREAL#0.004; (* Set to the same value as the cyclic application


task *)

PIDPrm.Kp := LREAL#40.0; (* Proportional gain *)

PIDPrm.Ki := LREAL#0.0; (* Integral gain *)

PIDPrm.Kd := LREAL#0.0; (* Derivative gain *)

PidPrm.Td1 := LREAL#4.0; (* Divergence differentiation time *)

PidPrm.Td2 := LREAL#4.0; (* Convergence differentiation time *)

PIDPrm.Ti := LREAL#4.0; (* Integration time *)

PIDPrm.ILL := LREAL#-10.0; (* The smallest integration value *)

PIDPrm.IUL := LREAL#10.0; (* The largest integration value *)

PIDPrm.LowerLimit:= LREAL#-2000.0; (* The smallest ControlOutput that will be


output *)

PIDPrm.UpperLimit:= LREAL#2000.0; (* The largest ControlOutput that will be out-


put *)

PIDPrm.DeadBand := LREAL#0.00001; (* Maximum absolute error value that will


result in a

ControlOutput of zero *)

Symbol Specification

Page 670 of 757


Ts Scan time set value
Kp Proportional gain
Ki Integral gain
Kd Derivative gain
Td1 Divergence differentiation time
Td2 Convergence differentiation time
Ti Integration time
IUL Upper integration limit
ILL Lower integration limit
LowerLimit Lower PID Limit
UpperLimit Upper PID limit
Deadband Width of the deadband for the P+I+D correction value

Here, the PID operation is expressed as follows:

X: deviation input value; Y: output value

The following operation is performed within the PID instruction:

X’: previous input value; Yi’: previous I output value; Ts: scan time set value

Page 671 of 757


1. An example controlling a servo in torque mode:

Page 672 of 757


The following series of graphs show changes made to the PID gains to minimize
error:

a. Proportional Control Only. Severe oscillation:

b. PID Control. Derivative helps to control oscillation:

c. PID Control – Increasing the derivative gain:

Page 673 of 757


d. Further increase in the derivative gain:

Page 674 of 757


Page 675 of 757
e. PD Control – Integral gain is set to zero, which is best suited for this example.

Page 676 of 757


Page 677 of 757
PLC_mSec

Toolbox Help Documentation


Help version created 7/23/2021

PWM

This function block can be used for generally lower performance PWM requirements.
For higher performance PWM applications, consider a SLIO PWM remote I/O module.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held high FALSE
and there are no errors.
V DutyCycle UINT DutyCycle / MaxWidth indicates the percentage of time the output will be UNIT#0
on.
V MaxWidth UINT The maximum DutyCycle that can be applied. The task interval in which UINT#0
this function block is executed will dictate the cycle period.
VAR_OUTPUT
V Output BOOL The output value.

Page 678 of 757


Notes

This functions performance is governed by the task interval in which it is executed.


For example, if this function block is executed in a 50 mSec task and MaxWidth is set
to 250, the total cycle duration is 50 mSec * 250 = 12.5 seconds with a resolution of
50 mSec. If this function block is executed in a fast task, such as 1 mSec with a
MaxWidth of 100, the output could be controlled with a resolution of 1% and updated
10 times per second.

Errors

This function will not produce any errors.

Example

Page 679 of 757


Toolbox Help Documentation
Help version created 7/23/2021

RangeCheck

This function block will set the output 'InRange' if the Value input is between the Min-
imum and Maximum. The check is inclusive, meaning that if Value=Minimum or
Value=Maximum, then the InRange output will be on.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is FALSE
held high and there are no errors.
V Minimum LREAL The smallest 'Value' that will set the InRange output high. LREAL#0.0
V Value LREAL The data to be tested against the Minimum and Maximum. LREAL#0.0
V Maximum LREAL The largest 'Value' that will set the InRange output high. LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V InRange BOOL Indicates if the Value is between the Minimum and Maximum. (Inclusive)

Page 680 of 757


Error Description

No errors will be generated.

Example

ExeRange does not need to be toggled if Value is changed, as demonstrated below:

Page 681 of 757


Toolbox Help Documentation
Help version created 7/23/2021

RateCalculator

This function block determines the frequency and number of occurrences of an


event, such as determining the part output rate of a machine. RateCalculator counts
the number of times an input 'Sensor' signal produces a rising edge and determines
the frequency of that signal with respect to a chosen time period. It can account for
real-time changes to the time period.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every FALSE
scan while Enable is held high and there are
no errors.
V Sensor BOOL Periodic signal to be measured. Commonly a
"part-complete" sensor.
V TimePeriod_ DINT Sensor is measured with respect to this time
ms window (milliseconds) to determine the cur-
rent real-time rate.
VAR_OUTPUT

Page 682 of 757


* Parameter Data Description
Type
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted,
or Error is true. In the case of a function block with an Enable input, a Busy output indicates
the function is operating, but not ready to provide Valid information. (No Error)
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V CounterValue LREAL Number of times 'Sensor' has measured a rising edge since the function block has been
enabled.
V CurrentRate LREAL The current frequency of the 'Sensor' input with respect to the chosen time period.

Notes

Upon enabling or a change of the time period, the 'Busy' signal remains active until
the specified time period elapses, whereupon 'Busy' will go low and 'Valid' will go
high. This is to receive a complete initial measurement of the rate 'Sensor' /
'TimePeriod_ms'.

Error Description

No errors will be generated.

Page 683 of 757


Toolbox Help Documentation
Help version created 7/23/2021

RealTimeClock

This function block provides the controllers real time clock as an RTCStruct containing
year, month, day, hour, minute, second, and millisecond. This function uses the
RTC_S function, provided in the ProConOS firmware library, which returns the real
time clock as a string.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V Clock RTCStruct Structure containing year, month, day, hour, minute, second, and millisecond.

Page 684 of 757


Notes

The controllers clock can be set from the web server, or by using the Y_SetRTC func-
tion block from the YMotion firmware library, which requires firmware version 2.0.0
or greater.

Error Description

No errors will be generated.

Example

The output of this block is continually updated as long as Enable is TRUE.

Page 685 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Scaler

This function block performs the calculation y:= mx + b.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description
Type
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V Input LREAL The x variable of y:=mx + b. LREAL#0.0
V CalX1 LREAL Datapoint specifying a line along which data is to be LREAL#0.0
scaled.
V CalY1 LREAL Datapoint specifying a line along which data is to be LREAL#0.0
scaled.
V CalX2 LREAL Datapoint specifying a line along which data is to be LREAL#0.0
scaled.

Page 686 of 757


* Parameter Data Description
Type
V CalY2 LREAL Datapoint specifying a line along which data is to be LREAL#0.0
scaled.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V Output LREAL The result of the calculation y:=mx + b.
V m LREAL The calculated slope of the line.
V b LREAL The calculated intercept of the line.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes

l This function can be used with temperature sensors or any analog value that
must be adjusted before further processing takes place.
l m is determined by the slope of a line specified by Cal_X1, Cal_Y1, Cal_X2, Cal_
Y2.
l x is the 'Input'
l b is determined by calculating the Y intercept of the line.

Error Description

See the Function Block ErrorID list.

Example

Page 687 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SLAU

This function block generates an S-curve profile to the input value based on a moving
average calculation. First, a slope is calculated based on the ramp input. Second, a
moving average is applied to the ramp profile. The input value can be changed con-
tinuously on the fly.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Description Default
Type
VAR_INPUT
B Enable BOOL The function will continue to execute every scan while Enable is held FALSE
high and there are no errors.
V Input LREAL Target Value. LREAL#0.0
V Rate LREAL Acceleration/Deceleration per scan. The time required for the Output LREAL#0.0
to become the Input value profile depends on the Rate and S_Scans
Inputs and the interval (Application task rate) at which the LAU func-
tion block is being run.
V S_Scans UINT Number of scans for the moving average calculation (S-Curve). UINT#0
VAR_OUTPUT

Page 688 of 757


* Parameter Data Description Default
Type
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is
cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.
V Output LREAL Target Value.

Error Description

See the Function Block ErrorID list.

Example 1

An example of a step input converted to a smooth s-curve by the SLAU function block
is shown below. The 0 to 10 unit step change is converted to a smooth s-curve profile
with a 20 scan ramp and an additional 20 scan s-curve (moving average). Output of
the LAU function block with a similar rate input is also shown.

Page 689 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Sweep

This function block generates an output that rises and falls between the minimum
and maximum outputs specified by the inputs. The OutputValue is the changed by
the Increment input. This function block is useful for testing purposes by forcing
other portions of application code to be tested with a full range of expected values.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held FALSE
high and there are no errors.
V StartValue LREAL The OutputValue will start from this value. LREAL#0.0
V Increment LREAL The amount by which the Outputvalue is changed each scan. LREAL#0.0
V Minimum LREAL The minimum value output. LREAL#0.0
V Maximum LREAL The maximum value output. LREAL#0.0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function
are valid.
V OutputValue LREAL The output of the function.
B Error BOOL Set high if an error has occurred during the execution of the function block. This
output is cleared when 'Execute' or 'Enable' goes low.

Page 690 of 757


* Parameter Data Type Description
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Error Description

No errors will be generated.

Example:

Page 691 of 757


Toolbox Help Documentation
Help version created 7/23/2021

TemperatureControl

This function block contains an autotuning and temperature control solution.


This block automatically maintains a heating element within a few percent of a
desired temperature.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V TC_Parameters AutoTuneStruct Structure containing the parameters for operating the Temperature Control
function.
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while FALSE
Enable is held high and there are no errors.
V Mode INT 0: Normal operation. The function block looks for a pre- INT#0
viously stored DeviceName file and runs. If the file is not
found, then an Autotuning process starts. Upon successful
autotuning, the system runs normally.
1:Force autotuning before running, even if the DeviceName
file already exists.

Page 692 of 757


V DeviceName STRING The name of the device being controlled. This will be used N/A
when writing the the TC_Parameters to a file on the con-
troller flash file system.
V TargetTemperature LREAL The target temperature value. LREAL#0.0
V ActualTemperature LREAL The current temperature value. LREAL#0.0
V MinTemperature Minimum allowable temperature. An Error will be generated LREAL#-
LREAL if the ActualTemperature goes below this value and the Con- 200.0
trolOuptut will be set to zero. If unconnected or set to zero,
an operating value of -200.0 will be assumed.
V MaxTemperature LREAL Maximum allowable temperature. An Error will be generated LREAL#400.0
if the ActualTemperature exceeds this value and the Con-
trolOuptut will be set to zero. If unconnected or set to zero,
an operating value of 400.0 will be assumed.
V RewritePrms BOOL Rewrites the TC_Prameters to the DeviceName file to update FALSE
any changes made manually after the autotuning process.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the func-
tion are valid. This block does not set the Valid output until autotuning has
been completed.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done,
CommandAborted, or Error is true. In the case of a function block with an
Enable input, a Busy output indicates the function is operating, but not
ready to provide Valid information. (No Error)
V ControlOutput LREAL Output value from the PID control block. The range of values will be gov-
erned by the PID parameters, especially the upper and lower limit.
B Autotuning BOOL Indicates if the function is performing autotuning.
B Error BOOL Set high if an error has occurred during the execution of the function block.
This output is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when
'Execute' or 'Enable' goes low.

Notes

l It may be necessary to add external filtering to the ControlOutput to accom-


modate certain heaters such as relays.
l The block automatically achieves 90-95% of the 'most ideal' performance.
l The TC_Parameter values can be further adjusted manually if better per-

formance is desired.
l If loading autotuning parameters from a file. the DeviceName must be the
same as the filename on the controller.
l DeviceName cannot be left empty.

l RewritePrms must be toggled for every new write. When toggled, it will write
whatever data is in the TC_Parameters into the file as long as tuning has been
completed.
l Note that it is possible for the user to write garbage data to the file, which

can result in errors when that file is read.


l If TC_Parameters.ResponseType is left at 0, an operating value of 2 (medium
response) is assumed.

Page 693 of 757


l It is recommended to add a moving average filter on the ActualTemperature
input to reduce noise and result in more accurately calculated PID parameters.
l If the heater can only be controlled by turning it fully on or fully off, then it would
be appropriate to place a PWM function block attached to the ControlOutput with
a duty cycle of 100.

See the TemperatureControl eLearning Module on Yaskawa's YouTube Channel.

Fine Adjustments for Increased Performance

Flow Diagram

Error Description

See the Function Block ErrorID list.

Page 694 of 757


Example: 3D Printer Extruder

Hardware Setup

Function Block Setup

Initialization of Variables

Mode := INT#0; (* 0: Calculate gains and run, 1: Run without calculating gains *)

MinTemperature := LREAL#0.0; (* The MinTemperature will assume a value of -


200.0 *)

Initialization of AutoTuneParameters

TC_Parameters.AutotuneCycles := INT#1; (* The number of oscillations to calculate


gains for *)

Page 695 of 757


TC_Parameters.IgnoreCycles := INT#0; (* The number of oscillations to ignore
before calculating gains *)

TC_Parameters.ResponseType := INT#3; (* Response type: Slow (1), Medium (2),


Fast (3) *)

Analysis of the Response

The following graph shows the output power vs temperature value for the rise time,
tuning period, settling time, and then the ControlOutput compensation when the
extruder was intentionally cooled with a fan (artificial disturbance).

The calculated gains were as follows:

l Kp = 15.5
l Ki = 0.1
l Kd = 0.5

The following graph shows that it took 11 seconds to complete tuning and settled to
197.8 degrees in the following minute.

Page 696 of 757


The following chart shows the tuning process when AutotuneCycles are set to 3 and
IgnoreCycles are set to 2. The calculated gains of each oscillation during tuning are
averaged together.

Page 697 of 757


Toolbox Help Documentation
Help version created 7/23/2021

UnpackByte

This function block converts a byte into discrete bits.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B InputByte BYTE The input data to be separated into bits. BYTE#0
VAR_OUTPUT
V Bit0 BOOL Bit 0 of the InputByte

Page 698 of 757


* Parameter Data Type Description
V Bit1 BOOL Bit 1 of the InputByte
V Bit2 BOOL Bit 2 of the InputByte
V Bit3 BOOL Bit 3 of the InputByte
V Bit4 BOOL Bit 4 of the InputByte
V Bit5 BOOL Bit 5 of the InputByte
V Bit6 BOOL Bit 6 of the InputByte
V Bit7 BOOL Bit 7 of the InputByte

Error Description

No errors will be generated.

Example

Page 699 of 757


Toolbox Help Documentation
Help version created 7/23/2021

UnpackWord

This function block separates a word into individual bits.

Page 700 of 757


Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B InputWord WORD The input data to be separated into bits. WORD#0
VAR_OUTPUT
V Bit0 BOOL Bit 0 of the InputWord
V Bit1 BOOL Bit 1 of the InputWord
V Bit2 BOOL Bit 2 of the InputWord
V Bit3 BOOL Bit 3 of the InputWord
V Bit4 BOOL Bit 4 of the InputWord
V Bit5 BOOL Bit 5 of the InputWord
V Bit6 BOOL Bit 6 of the InputWord
V Bit7 BOOL Bit 7 of the InputWord
V Bit8 BOOL Bit 8 of the InputWord
V Bit9 BOOL Bit 9 of the InputWord
V Bit10 BOOL Bit 10 of the InputWord
V Bit11 BOOL Bit 11 of the InputWord
V Bit12 BOOL Bit 12 of the InputWord
V Bit13 BOOL Bit 13 of the InputWord
V Bit14 BOOL Bit 14 of the InputWord
V Bit15 BOOL Bit 15 of the InputWord

Error Description

No errors will be generated.

Page 701 of 757


Example

Page 702 of 757


Toolbox Help Documentation
Help version created 7/23/2021

WindowCheck

This function block sets the InWindiow output high if the InputValue is within +/- (Win-
dow/2) of the TargetValue. This function is useful when making a comparison that
only relies on the InputValue to be close to the Target, but an exact match is not
required.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan while Enable is held high FALSE
and there are no errors.
V InputValue LREAL The data to be tested against the TargetValue LREAL#0.0
V TargetValue LREAL The desired data to be compared against. LREAL#0.0
V Window LREAL This amount will be divided in two. The InputValue must fall within half LREAL#0.0
the window distance of the TargetValue for the InWindow output to go
high. Window must be greater than zero.
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V InWindow BOOL Indicates that the InputValue is within the TargetValue +/- (Window/2) inclusive.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Page 703 of 757


Error Description

See the Function Block ErrorID list.

Example

Page 704 of 757


Toolbox Help Documentation
Help version created 7/23/2021

XYLookup

This function block will do a binary search on the XYdata to find the X value, then out-
put the corresponding Y value. This function will perform linear interpolation if the X
value is between two data points in the XYData and calculate the appropriate Y value.

Library

Yaskawa Toolbox

Parameters
* Parameter Data Type Description
VAR_IN_OUT
V XYData XYDataStruct An array of X & Y data pairs
VAR_INPUT Default
B Enable BOOL The function will continue to execute every scan FALSE
while Enable is held high and there are no errors.
V X LREAL The input reference

VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are
valid.
V Y LREAL The resulting output that relates the input.

Page 705 of 757


* Parameter Data Type Description
B Error BOOL Set high if an error has occurred during the execution of the function block. This output
is cleared when 'Execute' or 'Enable' goes low.
B ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or
'Enable' goes low.

Notes

Works for sets where the X value is always increasing or always decreasing, but to
use decreasing values of X requires v205 or higher.

Error Description

See the Function Block ErrorID list.

Example

The XY_Data structure was initialized as:

Page 706 of 757


Yaskawa DataTypes

Toolbox Help Documentation


Help version created 7/23/2021

Data Type: TempControlStruct

Used with the TemperatureControl function block.

Data Type Declaration


* Element Data Type Description Usage
MyAutoTuneStruct AutoTuneStruct
C Version UDINT A unique value used to determ- MyAutoTuneStruct.Version
ine the structure format to allow
for upgradability.
U AutotuneCycles INT The number of Actu- MyAutoTuneStruct.AutotuneCycles
alTemperature oscillations
about the TargetTemperature
over which to calculate gains.
U IgnoreCycles INT The number of oscillations to MyAutoTuneStruct.IgnoreCycles
ignore before calculating gains.
U AutotuneTimeout DINT Maximum amount of time in MyAutoTuneStruct.AutotuneTimeout
minutes to spend auto tuning
(0 = infinite).
C TuningComplete BOOL Denotes whther tuning has MyAutoTuneStruct.TuningComplete
been completed or not.
U ResponseType INT Response type: Slow (1), MyAutoTuneStruct.ResponseType
Medium (2), Fast (3).
U OutputBias LREAL Optional control output offset to MyAutoTuneStruct.OutputBias
be calculated based on setpoint.
U/C PIDParameters PIDStruct Structure containing all para- MyAutoTuneStruct.PIDParameters
meters necessary for PID con-
trol.

Page 707 of 757


Data Type: MovingAverageArray
Data Type: PIDStruct
Data Type: RTCStruct
Data Type: XYData
Data Type: XYDataStruct

ExplicitMessage Types

Toolbox Help Documentation


Help version created 7/23/2021

DataType: ExplicitData

For use with the Explicit_Message function block.

Data Type Declaration


TYPE

ExplicitData : ARRAY[0..503] OF BYTE;

END_TYPE

Page 708 of 757


Toolbox Help Documentation
Help version created 7/23/2021

RegSessionRequestStruct

For use with the Explicit_Message function block.

Refer to 2-5.4.2 in Vol 2, Chapter 2 EtherNet/IP Adaptation of CIP

Data Type Declaration


* Element Data Type Description Usage
MyRegSessionRequestStruct RegSessionRequestStruct
U RSR_Command1 BYTE MyRegSessionRequestStruct.RSR_Command1
U RSR_Command2 BYTE MyRegSessionRequestStruct.RSR_Command2
U RSR_Length1 BYTE MyRegSessionRequestStruct.RSR_Length1
U RSR_Length2 BYTE MyRegSessionRequestStruct.RSR_Length2
U RSR_SessionHandle1 BYTE MyRegSessionRequestStruct.RSR_Ses-
sionHandle1
U RSR_SessionHandle2 BYTE MyRegSessionRequestStruct.RSR_Ses-
sionHandle2
U RSR_SessionHandle3 BYTE MyRegSessionRequestStruct.RSR_Ses-
sionHandle3
U RSR_SessionHandle4 BYTE MyRegSessionRequestStruct.RSR_Ses-
sionHandle4
U RSR_Status1 BYTE MyRegSessionRequestStruct.RSR_Status1
U RSR_Status2 BYTE MyRegSessionRequestStruct.RSR_Status2
U RSR_Status3 BYTE MyRegSessionRequestStruct.RSR_Status3
U RSR_Status4 BYTE MyRegSessionRequestStruct.RSR_Status4
U RSR_SenderContext SenderContext MyRegSessionRequestStruct.RSR_Sender-
Context[0]
U RSR_Options1 BYTE MyRegSessionRequestStruct.RSR_Options1
U RSR_Options2 BYTE MyRegSessionRequestStruct.RSR_Options2
U RSR_Options3 BYTE MyRegSessionRequestStruct.RSR_Options3
U RSR_Options4 BYTE MyRegSessionRequestStruct.RSR_Options4
U RSR_ProtocolVersion1 BYTE MyRegSessionRequestStruct.RSR_Pro-
tocolVersion1
U RSR_ProtocolVersion2 BYTE MyRegSessionRequestStruct.RSR_Pro-
tocolVersion2
U RSR_OptionFlags1 BYTE MyRegSessionRequestStruct.RSR_OptionFlags1
U RSR_OptionFlags2 BYTE MyRegSessionRequestStruct.RSR_OptionFlags2

Page 709 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ExplicitReceiveDataStruct

For use with the Explicit_Message function block.

Refer to 2-5.7.2 in Vol 2, Chapter 2 EtherNet/IP Adaptation of CIP.

Data Type Declaration


* Element Data Type Description Usage

Page 710 of 757


MyExplicitReceiveDataStruct ExplicitReceiveDataStruct
U ED_Command1 BYTE MyExplicitReceiveDataStruct.ED_Command1
U ED_Command2 BYTE MyExplicitReceiveDataStruct.ED_Command2
U ED_Length1 BYTE MyExplicitReceiveDataStruct.ED_Length1
U ED_Length2 BYTE MyExplicitReceiveDataStruct.ED_Length2
U ED_SessionHandle1 BYTE MyExplicitReceiveDataStruct.ED_Ses-
sionHandle1
U ED_SessionHandle2 BYTE MyExplicitReceiveDataStruct.ED_Ses-
sionHandle2
U ED_SessionHandle3 BYTE MyExplicitReceiveDataStruct.ED_Ses-
sionHandle3
U ED_SessionHandle4 BYTE MyExplicitReceiveDataStruct.ED_Ses-
sionHandle4
U ED_Status1 BYTE MyExplicitReceiveDataStruct.ED_Status1
U ED_Status2 BYTE MyExplicitReceiveDataStruct.ED_Status2
U ED_Status3 BYTE MyExplicitReceiveDataStruct.ED_Status3
U ED_Status4 BYTE MyExplicitReceiveDataStruct.ED_Status4
U ED_SenderContext SenderContext MyExplicitReceiveDataStruct.ED_SenderContext
[0]
U ED_Options1 BYTE MyExplicitReceiveDataStruct.ED_Options1
U ED_Options2 BYTE MyExplicitReceiveDataStruct.ED_Options2
U ED_Options3 BYTE MyExplicitReceiveDataStruct.ED_Options3
U ED_Options4 BYTE MyExplicitReceiveDataStruct.ED_Options4
U ED_InterfaceHandle1 BYTE MyExplicitReceiveDataStruct.ED_Inter-
faceHandle1
U ED_InterfaceHandle2 BYTE MyExplicitReceiveDataStruct.ED_Inter-
faceHandle2
U ED_InterfaceHandle3 BYTE MyExplicitReceiveDataStruct.ED_Inter-
faceHandle3
U ED_InterfaceHandle4 BYTE MyExplicitReceiveDataStruct.ED_Inter-
faceHandle4
U ED_TimeOut1 BYTE MyExplicitReceiveDataStruct.ED_TimeOut1
U ED_TimeOut2 BYTE MyExplicitReceiveDataStruct.ED_TimeOut2
U ED_ItemCount1 BYTE MyExplicitReceiveDataStruct.ED_ItemCount1
U ED_ItemCount2 BYTE MyExplicitReceiveDataStruct.ED_ItemCount2
U ED_AddressItemID1 BYTE MyExplicitReceiveDataStruct.ED_
AddressItemID1
U ED_AddressItemID2 BYTE MyExplicitReceiveDataStruct.ED_
AddressItemID2
U ED_AddressItemLength1 BYTE MyExplicitReceiveDataStruct.ED_
AddressItemLength1
U ED_AddressItemLength2 BYTE MyExplicitReceiveDataStruct.ED_
AddressItemLength2
U ED_DataItemID1 BYTE MyExplicitReceiveDataStruct.ED_DataItemID1
U ED_DataItemID2 BYTE MyExplicitReceiveDataStruct.ED_DataItemID2
U ED_DataItemLength1 BYTE MyExplicitReceiveDataStruct.ED_
DataItemLength1
U ED_DataItemLength2 BYTE MyExplicitReceiveDataStruct.ED_
DataItemLength2
U ED_Response1 BYTE MyExplicitReceiveDataStruct.ED_Response1
U ED_Response2 BYTE MyExplicitReceiveDataStruct.ED_Response2
U ED_ResponseStatus1 BYTE MyExplicitReceiveDataStruct.ED_Respon-
seStatus1
U ED_ResponseStatus2 BYTE MyExplicitReceiveDataStruct.ED_Respon-
seStatus2
U ED_Data ExplicitData MyExplicitReceiveDataStruct.ED_Data[0]

Page 711 of 757


Toolbox Help Documentation
Help version created 7/23/2021

Service

For use with the Explicit_Message function block.

Data Type Declaration


TYPE

Service : ARRAY[0..7] OF BYTE;

END_TYPE

Page 712 of 757


Toolbox Help Documentation
Help version created 7/23/2021

ExplicitSendDataStruct

For use with the Explicit_Message function block.

Refer to 2-5.7.2 in Vol 2, Chapter 2 EtherNet/IP Adaptation of CIP.

Data Type Declaration


* Element Data Type Description Usage
MyExplicitSendDataStruct ExplicitSendDataStruct
U ED_Command1 BYTE MyExplicitSendDataStruct.ED_Command1
U ED_Command2 BYTE MyExplicitSendDataStruct.ED_Command2
U ED_Length1 BYTE MyExplicitSendDataStruct.ED_Length1
U ED_Length2 BYTE MyExplicitSendDataStruct.ED_Length2
U ED_SessionHandle1 BYTE MyExplicitSendDataStruct.ED_SessionHandle1
U ED_SessionHandle2 BYTE MyExplicitSendDataStruct.ED_SessionHandle2
U ED_SessionHandle3 BYTE MyExplicitSendDataStruct.ED_SessionHandle3
U ED_SessionHandle4 BYTE MyExplicitSendDataStruct.ED_SessionHandle4
U ED_Status1 BYTE MyExplicitSendDataStruct.ED_Status1
U ED_Status2 BYTE MyExplicitSendDataStruct.ED_Status2
U ED_Status3 BYTE MyExplicitSendDataStruct.ED_Status3
U ED_Status4 BYTE MyExplicitSendDataStruct.ED_Status4
U ED_SenderContext BYTE MyExplicitSendDataStruct.ED_SenderContext[0]
U ED_Options1 BYTE MyExplicitSendDataStruct.ED_Options1
U ED_Options2 BYTE MyExplicitSendDataStruct.ED_Options2
U ED_Options3 BYTE MyExplicitSendDataStruct.ED_Options3
U ED_Options4 BYTE MyExplicitSendDataStruct.ED_Options4
U ED_InterfaceHandle1 BYTE MyExplicitSendDataStruct.ED_InterfaceHandle1
U ED_InterfaceHandle2 BYTE MyExplicitSendDataStruct.ED_InterfaceHandle2
U ED_InterfaceHandle3 BYTE MyExplicitSendDataStruct.ED_InterfaceHandle3
U ED_InterfaceHandle4 BYTE MyExplicitSendDataStruct.ED_InterfaceHandle4
U ED_TimeOut1 BYTE MyExplicitSendDataStruct.ED_TimeOut1
U ED_TimeOut2 BYTE MyExplicitSendDataStruct.ED_TimeOut2
U ED_ItemCount1 BYTE MyExplicitSendDataStruct.ED_ItemCount1
U ED_ItemCount2 BYTE MyExplicitSendDataStruct.ED_ItemCount2
U ED_AddressItemID1 BYTE MyExplicitSendDataStruct.ED_AddressItemID1
U ED_AddressItemID2 BYTE MyExplicitSendDataStruct.ED_AddressItemID2
U ED_AddressItemLength1 BYTE MyExplicitSendDataStruct.ED_
AddressItemLength1
U ED_AddressItemLength2 BYTE MyExplicitSendDataStruct.ED_
AddressItemLength2
U ED_DataItemID1 BYTE MyExplicitSendDataStruct.ED_DataItemID1
U ED_DataItemID2 BYTE MyExplicitSendDataStruct.ED_DataItemID2
U ED_DataItemLength1 BYTE MyExplicitSendDataStruct.ED_DataItemLength1
U ED_DataItemLength2 BYTE MyExplicitSendDataStruct.ED_DataItemLength2
U ED_DataService Service MyExplicitSendDataStruct.ED_DataService[0]
U ED_Data ExplicitData MyExplicitSendDataStruct.ED_Data[0]

Page 713 of 757


Toolbox Help Documentation
Help version created 7/23/2021

SenderContext

For use with the Explicit_Message function block.

Data Type Declaration


TYPE

SenderContext : ARRAY[0..7] OF BYTE;

END_TYPE

Page 714 of 757


Toolbox Help Documentation
Help version created 7/23/2021

UnRegSessionRequestStruct

For use with the Explicit_Message function block.

Refer to 2-5.4.3 in Vol 2, Chapter 2 EtherNet/IP Adaptation of CIP.

Data Type Declaration


* Element Data Type Description Usage
MyUnRegSessionRequestStruct UnRegSessionRequestStruct
U USR_Command1 BYTE MyUnRegSessionRequestStruct.USR_Com-
mands1
U USR_Command2 BYTE MyUnRegSessionRequestStruct.USR_Com-
mands2
U USR_Length1 BYTE MyUnRegSessionRequestStruct.USR_
Length1
U USR_Length2 BYTE MyUnRegSessionRequestStruct.USR_
Length2
U USR_SessionHandle1 BYTE MyUnRegSessionRequestStruct.USR_Ses-
sionHandle1
U USR_SessionHandle2 BYTE MyUnRegSessionRequestStruct.USR_Ses-
sionHandle2
U USR_SessionHandle3 BYTE MyUnRegSessionRequestStruct.USR_Ses-
sionHandle3
U USR_SessionHandle4 BYTE MyUnRegSessionRequestStruct.USR_Ses-
sionHandle4
U USR_Status1 BYTE MyUnRegSessionRequestStruct.USR_
Status1
U USR_Status2 BYTE MyUnRegSessionRequestStruct.USR_
Status2
U USR_Status3 BYTE MyUnRegSessionRequestStruct.USR_
Status3
U USR_Status4 BYTE MyUnRegSessionRequestStruct.USR_
Status4
U USR_SenderContext SenderContext MyUnRegSessionRequestStruct.USR_
SenderContext[0]
U USR_Options1 BYTE MyUnRegSessionRequestStruct.USR_
Options1
U USR_Options2 BYTE MyUnRegSessionRequestStruct.USR_
Options2
U USR_Options3 BYTE MyUnRegSessionRequestStruct.USR_
Options3
U USR_Options4 BYTE MyUnRegSessionRequestStruct.USR_
Options4

Page 715 of 757


Function Block ErrorID List

Toolbox Help Documentation


Help version created 7/23/2021

Function Block ErrorID List

ErrorID Description
0 No error.
1 Time limit exceeded.
2 Distance limit exceeded.
3 Torque limit exceeded.
4 The file is already opened.
5 The file is write protected or access is denied. Tip #1: Make sure a leading / has not been omit-
ted. Example STRING#'/flash/user/data/myfile.txt' Tip #2: If the FileName is a STRING variable,
do not include single quotes in the string. Only include single quotes if when specifying the
FileName as a literal such as STRING#'MyFile.txt'
6 File name not defined. Tip: If the FileName is a STRING variable, do not include single quotes in
the string. Only include single quotes if when specifying the FileName as a literal such as
STRING#'MyFile.txt'
17 Soft Limit Violation for group (position max).
Motion State Error
4369 The move could not be buffered because the motion queue is full. The default queue size for
single axis moves is 16. For Mechatrolink groups, the queue size can be set in the Hardware Con-
figuration, Yaskawa recommends setting the IO Task Assignment to the cyclic task with the fast-
est update interval. For MLX hosted robots, the queue size is 25.
4370 The move could not be started because motion is prohibited. Possible causes: 1) The axis may
not be enabled. Check MC_Power.Status output. 2) An MC_Stop.Execute might be held high - no
other block can override the Stopping state. 3) Verify that the limit switches are not active -
check the Global Variables for the Axis. 4) A motion block may be attempting to abort an MC_Tor-
queControl move. 5) If this axis is included in a set of Grouped axes, this Error may occur when
executing a single axis function block while the axis is part of an Enabled Group. Use MC_
GroupDisable first. 6) If the axis is a cam slave AND configured as a rotary axis, verify that the
slave positions in the Y_MS_CAM_STRUCT are within 0.0 to MachineCycle.
4371 The servo drive failed to enable or disable. Check the amplifier wiring for L1 / L2 / L3. The amp-
lifier could be e-stopped or has an alarm.
4375 CamOut called while not camming.
4376 The master slave relationship cannot be modified because the master axis has not been set yet.
4377 File reading already in progress.
4378 The function block is not applicable for the external axis specified.
4379 A homing sequence is already in progress.
4380 MC_SetPosition cannot be executed while the axis is already moving.
4381 Motion was aborted due to an axis alarm.
4382 When an axis is configured for rotary mode, and the MC_SetPosition tries to set a position that is
equal to or greater than the MachineCycle, this error is generated, and the position is not set.
4383 Axis must be commanded at standstill when homing is attempted. Refer to the Motion State Dia-
gram and MC_ReadStatus. Maybe the axis is not enabled using MC_Power?

Page 716 of 757


ErrorID Description
4390 Position cannot be defined while the axis is in a master / slave relationship. To redefine the pos-
ition, use the MC_Stop function block for slave axis, then execute MC_SetPosition. If attempting
the redefine a master position, execute MC_Stop for all slaves first.
4391 The function block cannot be used with a virtual axis.
4394 More than 10 Y_CamIn, Y_CamOut, or MC_GearInPos function blocks for a given axis are active
at the same time. Most likely the application program is not coded correctly, and the Execute
input is being fired too frequently.
4395 Window parameters are outside of the master axis' machine cycle. (0 to Prm 1502, the last mas-
ter position in the active cam table.)
4396 Axis latch function already in use.
4397 Over travel is limit still ON after attempting to move away from it.
4398 The cam shift is not possible with EndPosition and current master position. This error occurs if
the shift is greater than the distance to the end of the window. For example: shift = 90, window
[180,360], and the master position = 300 when Y_CamShift.Execute=TRUE. (There is only 60
degrees of distance remaining.) To remedy this situation, execute Y_CamShift sooner. The func-
tion itself will monitor for the StartPosition and wait if necessary to actually start the correction.
It is not necessary to monitor for the right position in the IEC application task before executing
this function. This error has also been experienced when using very low resolution external
encoders, or during testing when using a hand wheel to manually move the master. Both of
these situations can lead to noisy encoder movement, and if the master moves backwards during
a CamShift, it may cause this error. (A low resolution encoder is defined as a system with a
Master / Slave equivalent movement pulse ratio greater than 50 or 100 or higher.)
4399 The L1 / L2 / L3 power inputs on the drive may not be supplied with power, possibly due to an E-
Stop condition.
4400 The safety input (HBB on the CN8 connector) is preventing the drive from enabling.
4401 The controller cannot communicate with the drive. It may be disconnected from the
MECHATROLINK network.
4402 The scan compensation delay parameter 1305 is only valid for external encoders.
4403 The High Speed Output functionality is only available on external encoders.
4404 Cannot execute MC_GearOut because the axis is not in gear.
4405 Y_CamOut was aborted.
4406 Continuous Latch Mode is not supported on Sigma II, Sigma III, or external encoders.
4407 Internal buffer overflow.
4408 PatternSize is out of range (1-8) or PatternCount is out of range (0-255).
4409 Parameter write is already in progress.
4410 Parameter is read-only.
4411 The function block cannot be re-executed while it already is in progress.
4412 Parameter not supported for the specified axis or group.
4413 The stepper axis does not support the mode of motion commanded.
4414 MECHATROLINK communications to the drive was disrupted. Execute MC_Reset to restore the
connection.
4415 Reboot is already in progress.
4416 Add IP Address already in progress
4417 Remove IP Address already in progress
4418 Debug Print already in progress
4419 Motion queue resize failed. Motion queue is not empty.
4420 Brake release function failed to execute. Brake release is prohibited while servo on, or the axis
may not support brake release
4421 Servo ON is prohibited while the brake is manually released with Y_BrakeRelease
4422 Position offset update failed. This can happen if MC_SetPosition is called too often with absolute
encoder axis on Sigma-7Siec (can't write the offset to flash fast enough).
4423 The function block cannot be used with an active slave axis.
4424 Velocity override value is outside the allowable range of 0.0 to 1.0 inclusive.

Page 717 of 757


ErrorID Description
4425 Slave axis must be configured as a rotary axis type with a valid Machine Cycle.
4426 The function block is only supported for VFDs.
Invalid Structure Value
4624 RESERVED - General structure value error.
4625 AXIS_REF.AxisNum does not correspond to an axis configured on the system. Verify the value of
AxisNum matches a logical axis number in the configuration. Tip: Make sure a variable of type
AXIS_REF is properly declared as a VAR or VAR_GLOBAL in all relevant POUs.
4626 The master / slave relationship is already defined. If a slave must follow a different master, use
the MC_Stop block on the slave before executing the next Y_CamIn. If cascading master slaves,
a maximum of two levels of cascaded master / slave relationships can be configured.
4630 Trigger reference is not valid.
4633 Table size results in misaligned data. Refer to the help section 'Internally Created Cam Data.' A
cam table will have a multiple of 16 bytes if created correctly.
4634 Buffer size results in misaligned data.
4635 Table type is not supported.
4636 Invalid start index.
4637 Invalid end index.
4638 Buffer Overrun. User Buffer is full.
Invalid Enumeration Type
4641 Buffer mode does not correspond to a valid enumeration value.
4642 Direction does not correspond to a valid enumeration value.
4643 Start mode does not correspond to a valid enumeration value.
4644 Invalid shift mode.
4645 Offset mode does not correspond to a valid enumeration value.
4646 Mode does not correspond to a valid enumeration value or the enumeration is not supported.
4647 The synch mode does not correspond to a valid enumeration value.
4648 The parameter number does not exist for the specified axis - OR The parameter number requires
the other function block (e.g. MC_WriteParameter vs. MC_WriteBoolParameter)
4649 Invalid adjust mode.
4650 RampIn does not correspond to a valid enumeration value.
4651 ControlMode does not correspond to a valid enumeration value.
4652 EndMode does not correspond to a valid enumeration value. Y_CamOut only supports 'AtPosition'
mode.
4653 ExecutionMode does not correspond to a valid enumeration value or the selected behavior is
unsupported.
4654 Invalid Speed Unit setting in Y_MoveOptions.ProfileUnit. Select 0 for Absolute units, or 1 for % of
maximum.
Range Error
4657 Distance parameter is less than or equal to zero.
4658 Velocity parameter is less than or equal to zero.
4659 Acceleration is less than or equal to zero. For remote hosted robots, acceleration cannot be less
than 20.0.
4660 Deceleration is less than or equal to zero. For remote hosted robots, deceleration cannot be less
than 20.0.
4661 Torque is less than or equal to zero.
4662 Time is less than or equal to zero.
4663 Specified time was less than zero.
4664 Specified scale was less than or equal to zero.
4665 Velocity parameter is negative. (Conveyor moving in wrong direction.)
4666 Denominator is zero.
4667 Jerk is less than or equal to zero. For remote hosted groups such as MLX200, the Jerk units are
in percentage, and the range is 20 to 100%.

Page 718 of 757


ErrorID Description
4668 Torque Ramp is less than or equal to zero.
4669 Engage position is outside the cam table domain.
4670 Engage window is less than zero.
4671 Disengage position is outside the cam table domain.
4672 Negative Disengage Window.
4673 StartPosition is outside of master's range.
4674 EndPosition is outside of master's range.
4675 Axis filter time constant out of range, or an attempt to change the value was made while the axis
was enabled. (The axis must be disabled to change the moving average time constant.)
4676 The time value must be within 0 to 10 MECHATROLINK cycles.
4677 Array size too large.
4678 Buffer array index out of range.
4679 Invalid date or time values entered.
4680 Invalid acceleration filter type entered.
4681 Position value exceeded configured limits.
4682 Velocity value exceeded configured limits.
4683 Acceleration value exceeded configured limits.
4684 IdentInGroup not found. Verify that the string name of the joint exactly matches the definition in
the Hardware Configuration. OR - Invaild JointIndex. The value provided does not map to a valid
AXIS_REF on the system.
Invalid Input Data
4847 MotomanSync controller did not receive a watchdog value from MPiec in time. There may be net-
work communcation issues causing delays. Check S3C1380 (communication timeout, 50ms
default) on MotomanSync controller.
4875 MotomanSync controller did not receive a watchdog value from MPiec in time. There may be net-
work communcation issues causing delays. Check S3C1380 (communication timeout, 50ms
default) on MotomanSync controller.
4880 RESERVED
4881 The specified Pn does not exist.
4882 The mask does not correspond to valid tracks.
4883 The profile must start with relative time equal to zero, and the time must be increasing.
4884 The specified cam file does not exist.
4885 Invalid header for the cam file (missing # of rows, #of columns, or feed-forward velocity flag).
You must first populate the TableType and DataSize in the Y_MS_CAM_STRUCT before executing
the function.
4886 The first (master) column must be either increasing or decreasing. If the master data is incre-
mental, even the very first point cannot be zero.
4887 CamTableID does not refer to a valid cam table.
4888 The engage phase exceeded the time limit. Slave axis could not attain the target position and
velocity within the user specified time limit.
4889 The engage phase exceeded the distance limit. Slave axis could not attain the target position and
velocity within the user specified master distance.
4890 Invalid width input. Width is an enumeration type with the following allowable values 'WIDTH_
8'=0, 'WIDTH_16'=1, and 'WIDTH_32'=2.
4891 The slave axis cannot be the same as the master axis.
4892 Default drive parameter info is not available for this parameter. Use the DataType Override input
to specify the parameter size.
4893 The specified external axis may not be used. A physical axis is required.
4894 The specified virtual axis may not be used with this function block.
4895 Missing or unrecognized file extension.
4896 Could not find the axis parameter file.
4897 The drive's model number or type does not match the parameter file.

Page 719 of 757


ErrorID Description
4898 The S Curve filter parameter must first be enabled in the Hardware Configuration before it is pos-
sible to enable/disable it using MC_WriteParameter.
4899 Axis position compensation file not found.
4900 Invalid axis position compensation file format.
4901 Cannot enable/disable axis position compensation while servo on.
4902 Invalid compensation table wrap range.
4903 Data Type value does not match the data type of the Value input.
4904 Data Type is out of range.
4905 Invalid IO Identifier.
4912 Invalid Mechatrolink-III Node ID
4913 Aux Cmd for Mechatrolink-III IO module not supported
4914 Invalid Mode argument for Y_MLinkIOMode
Y_DeviceComm ErrorIDs
8705 The maximum number of concurrently open user sockets/IO device handles has been reached or
exceeded.
8706 The socket/IO device handle was invalid. Invalid IP address.
8707 The IP address string was not in a valid format.
8708 The socket/IO device handle could not be created.
8709 The specified address or port is already in use on the local network.
8710 The specified address or port is not available for use. (Maybe the IP address specified is not
assigned to one of the networks available on this MPiec?)
8711 Unable to accept new socket/IO device handle connection.
8712 Unable to bind to the specified address.
8713 The socket/IO device handle type argument was invalid.
8714 The local address or port was not valid.
8715 Connecting to the socket/IO device handle failed.
8716 The remote IP address is unreachable. Check the default gateway.
8717 The socket/IO device handle is already connected to another endpoint.
8718 The socket/IO device handle connection attempt was actively refused by the remote device. Poss-
ibly the remote device is not listening on the port.
8719 The socket/IO device handle was not connected to a remote endpoint. Call Y_ConnectSocket
prior to Y_ReadDevice or Y_WriteDevice.
8720 An error occurred trying to get or set the device option.
8721 The communication device could not be read.
8722 The communication device could not be written.
8723 A valid buffer argument to WriteDevice and ReadDevice is required.
8724 Invalid Device Option ID.
8725 The device option value was not the right size or the data was out of range.
8726 The serial port ID was not a valid serial port.
8727 The serial port specified could not be opened.
Group ErrorIDs. Please note that Group Errors up to 200 listed here are reported as 32 bit values on the
Web UI such as "3202 0018" and also reported via MC_GroupReadError as an ErrorClass (3202) and a
GroupErrorID (0018), but in some cases only the GroupErrorID is reported if the function block reporting
an error only outputs the traditional Error and ErrorID.
0001 The command position was outside the allowable range for the axis in the positive direction (pos-
itive overtravel). The axis may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which
pulls the axis further away from the allowed region will re-trigger the alarm.
0002 The command position was outside the allowable range for the axis in the negative direction
(negative overtravel). The axis may not be moved again until the alarm condition is cleared. After
the alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which

Page 720 of 757


ErrorID Description
pulls the axis further away from the allowed region will re-trigger the alarm.
0003 The command speed was greater than the allowable range for the axis in the positive direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0004 The command speed was greater than the allowable range for the axis in the negative direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0005 [[[Undefined variable Primary.ErrorID_0005_Description]]]
0006 The command acceleration was greater than the allowable range for the axis in the negative dir-
ection. The axis may not be moved again until the alarm condition is cleared.
0007 The command torque was greater than the allowable range for the axis in the positive direction
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0008 The command torque was greater than the allowable range for the axis in the negative direction
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0011 The command position was outside the allowable range for the axis in the positive direction (pos-
itive overtravel). The axis may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which
pulls the axis further away from the allowed region will re-trigger the alarm.
0012 The command position was outside the allowable range for the axis in the negative direction
(negative overtravel). The axis may not be moved again until the alarm condition is cleared. After
the alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which
pulls the axis further away from the allowed region will re-trigger the alarm.
0013 The command speed was greater than the allowable range for the axis in the positive direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0014 The command speed was greater than the allowable range for the axis in the negative direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0015 The command acceleration was greater than the allowable range for the axis in the positive dir-
ection. The axis may not be moved again until the alarm condition is cleared.
0016 The command acceleration was greater than the allowable range for the axis in the negative dir-
ection. The axis may not be moved again until the alarm condition is cleared.
0017 The command torque was greater than the allowable range for the axis in the positive direction
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0018 The command torque was greater than the allowable range for the axis in the negative direction
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0021 The command position was outside the allowable range for the axis in the positive direction (pos-
itive overtravel). The axis may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which
pulls the axis further away from the allowed region will re-trigger the alarm.
0022 The command position was outside the allowable range for the axis in the negative direction
(negative overtravel). The axis may not be moved again until the alarm condition is cleared. After
the alarm is cleared, it is permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed region. Any move which
pulls the axis further away from the allowed region will re-trigger the alarm.
0023 The command speed was greater than the allowable range for the axis in the positive direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0024 The command speed was greater than the allowable range for the axis in the negative direction
(overspeed). The axis may not be moved again until the alarm condition is cleared.
0025 The command acceleration was greater than the allowable range for the axis in the positive dir-
ection. The axis may not be moved again until the alarm condition is cleared.
0026 The command acceleration was greater than the allowable range for the axis in the negative dir-
ection. The axis may not be moved again until the alarm condition is cleared.
0027 The command torque was greater than the allowable range for the axis in the positive direction
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0028 The command torque was greater than the allowable range for the axis in the negative direction

Page 721 of 757


ErrorID Description
(overtorque). The axis may not be moved again until the alarm condition is cleared.
0031 The move specified would exceed the software position limits in the positive direction and was
rejected before being started. The group may be moved again immediately if desired.
0032 The move specified would exceed the software position limits in the negative direction and was
rejected before being started. The group may be moved again immediately if desired.
0033 The move specified would exceed the software speed limits in the positive direction and was
rejected before being started. The group may be moved again immediately if desired.
0034 The move specified would exceed the software speed limits in the negative direction and was
rejected before being started. The group may be moved again immediately if desired.
0035 The move specified would exceed the software acceleration limits in the positive direction and
was rejected before being started. The group may be moved again immediately if desired.
0036 The move specified would exceed the software acceleration limits in the negative direction and
was rejected before being started. The group may be moved again immediately if desired.
0037 The move specified would exceed the software torque limits in the positive direction and was
rejected before being started. The group may be moved again immediately if desired.
0038 The move specified would exceed the software torque limits in the negative direction and was
rejected before being started. The group may be moved again immediately if desired.
0039 The predictive soft limit encountered a segment that doesn't support the predicted stopping
point.
0041 Cam and Contour tables must have a header indicating the number of rows and colums and a
feed forward velocity flag. Comma seperated data values following the header.
0042 In CamTables, the first (master) column must be either increasing or decreasing.
0043 In ContourTables, the first (time) column must start at zero and be increasing.
0044 The master postion was outside the range of the CamTable, which automatically stopped the cam
motion.
0045 One one or more slave axes could not attain the target postion and velocity within the user spe-
cified time limit for the Cam or Gear motion.
0046 One one or more slave axes could not attain the target postion and velocity within the user spe-
cified distance limit for the Cam or Gear motion.
0051 Axis enable failed. This problem is usually a result of communication problems with the servo
drive.
0052 Runtime computation detected an invalid motion parameter.
0053 Runtime computation detected jerk limit too low to allow correction for off-axis motion.
0054 Runtime computation detected acceleration limit too low to allow correction for off-axis motion.
0055 [[[Undefined variable Primary.ErrorID_0055_Description]]]
0056 Off-axis initial conditions correction was not able to complete before the main motion profile
ended, leading to a discontinuity in velocity. This can happen if the motion planning com-
putations are not adequate for short moves in cross-frame transitions.
0100 The inverse kinematics computation detected a world position that can not be reached.
0101 The inverse kinematics computation detected that the elbow 'handedness' (orientation) does not
match the configuration. The 'handedness' must be fixed by commanding the individual axes or
manually moving the robot.
0102 The robot XY position intruded into the configured dead zone area near the origin.
0103 A valid command velocity is required for inverse kinematics computation of Scara robots when
near the singularity. Choose a different motion type which includes valid command velocity gen-
eration.
0104 The solution for Scara inverse kinematics requires that any motion very near the singularity be
continuous. Coming to a stop very near the singularity can cause a sudden position jump in sub-
sequent motions. This region is controlled with the configuration parameter 'correctionRadius'.
0105 The axis group has been misconfigured with too few axes or too small a world coordinate space
to satisfy the dimensionality of the kinematics.
0106 The commanded motion generated elbow values that lie within the configured 'out-
erSingularInterpRange', and the orthogonality check between the direciton of motion and the sin-
gular direction was not within the configured 'singularityOrthogonalityTolerance'

Page 722 of 757


ErrorID Description
0107 The kinematics algorithm encountered an unexpected error
0108 The kinematics solution produced angles outside the allowable range
0109 Inverse kinematics is not supported when at the singularity configuration.
010A [[[Undefined variable Primary.ErrorID_010A_Description]]]
0200 The axis group split-axis command data did not agree. The component axes must be moved to
identical locations separately before issuing multi-axis commands.
8960 Invalid axes group. Confirm that the AxesGroup variable has the correct %M address as auto-
matically assigned by the Hardware Configuration. Be sure the AxesGroup variable is global, and
that if the group has been recently defined, the controller was rebooted.
8961 An axis is already owned by another group.
8962 Group activation is blocked. Ownership cannot be changed while Mechatrolink reset is in pro-
gress.
8963 Specified Coordinate System is not supported. Possible causes: If a custom group is specified,
only the ACS Coordinate System is applicable.
8964 Move prohibited because group has an alarm.
8965 Group activation prohibited, invalid axis/joint config.
8966 Group activation prohibited, mismatched axis command position for split axis. Example: X and X
Prime sharing the same load. The group must be disabled to clear this alarm.
8967 The group reports one or more of its axes has an error.
8968 Axis group reset is already in progress.
8969 Invalid circular path method.
8970 Invalid PathChoice. MC_MoveCircularAbsolute.PathChoice cannot be set to Clockwise or Counter
Clockwise if the Group can move in three dimensions.
8971 Invalid circle geometry. Check the PathChoice input, only Longest and Shortest are allowed if the
group has more than two dimensions. Be sure that the starting point (which is the position of the
group before executing MC_MoveCircularAbsolute,) the AuxPoints, and the EndPoint define the
intended arc. If using MC_CircleMode#Center, the calculated radius of the start position to the
center and the end position to the center must be within 0.1%. It may be necessary to increase
the resolution of the values provided.
8972 A grouped axis is disabled. If using MC_GroupEnable, all axes must be powered up using Y_
GroupPower first.
8973 Invalid transition mode.
8974 Invalid transition parameter.
8975 Invalid transition geometry. The values for the acceleration, deceleration, and/or velocity of the
transition yield an invalid geometry. Given the limits of accel/decel, velocity, and length of the
segment, can't create the corner geometry to meet the specification.
8976 Invalid axes group state transition. Axes groups cannot transition directly between certain
states, such as direct transition to disabled state from moving or error states. Use the appro-
priate function block to transition to the correct intermediate state.
8977 Invalid axes group motion coordinate type. The optional limit coordinate type specifier (a.k.a.
VelocityUnit) parameter for the motion was outside the allowed range.
8978 Infinite velocity constraint. The resolved velocity limit for the move was infinite. If there is no
Cartesian motion, and a rotational change only, use the MoveOptions input to specify the Velo-
cityUnits as 'UseRotationalScalers.' Or - There is a non zero value in the position VECTOR for a
degree of freedom that the AxesGroup does not support.
8979 Infinite acceleration constraint. The resolved acceleration limit for the move was infinite.
8980 Infinite deceleration constraint. The resolved acceleration limit for the move was infinite.
8981 Insufficient Coordinate Frame size.
8982 Invalid Tangent Plane.
8983 Invalid Colinearity Angle. The range is 0.0 to 10.0.
8984 The points specified to describe the circle are invalid due to a mismatch in dimensions, or the
rotations do not match.
8985 Acceleration constraints violation. Computed motion violates acceleration constraints.
8992 Computed motion violates velocity constraints.

Page 723 of 757


ErrorID Description
8993 Group must not be enabled for this action.
8994 Group filter not supported.
8995 Axis group filter time constant too large.
8996 Group filter time constant must be set to non-zero value prior to enabling
8997 The specified action was not supported for the specified coordinate frame combination.
8998 A zero-length vector was supplied for the direction
8999 The specified coordinate frame was actively involved in commanded motion and could not be
modified. PCS frame already in motion with ExecutionMode#immediate (use queued mode
instead.)
9000 The specified blending transition is not possible based on the two moves in the buffer to be blen-
ded. For example, Move 1 is a line and Move 2 is an arc, and they are not in the same plane.
9001 The specified blending transition required exact corner distance or deviation, but insufficient
distance remained in the segment to satisfy the transition geometry.
9002 The position was unreachable due to inverse kinematics limitations. Try a direct move instead of
a linear move.
9003 Specified blending transition for the function block could not be realized due to blending para-
meter restrictions. Typically due to accel limit too low or segment length too short, relative to
transition velocity.
9004 Invalid or unsupported ExecutionMode.
9005 Invalid or unsupported TrackProfile
9006 Invalid TrackProfile parameter, possibly the SyncIn and SyncOut master distance sum is greater
than (EndDistance - StartDistance)
9007 The execution of the function with ExecutionMode = Queued or Delayed failed. The conditions for
applying the function were validated when it was executed, but when the deferred execution
occurred the conditions were no longer valid. Check the sequencing of the program.
9008 Invalid ServoPack memory address. The specified memory address is out of range.
9009 Unsupported ServoPack memory operation. Memory operations are not supported on this Ser-
voPack model.
9010 Invalid ServoPack memory access mode. Attempted non volatile write to volatile only address.
9011 The tracking position was already past the allowable sync range before the conditions for sync-
in were met.
9012 Conveyor tracking cannot be re executed while TrackState is non zero. (Tracking is currently in
operation.)
9013 The target coordinate frame is invalid or not defined. Tip: Use Y_GroupSetFrameOffset or MC_
TrackConveyorBelt before executing a move in PCS.
9014 The Conveyor reversed direction and re entered a previously completed TrackState region.
9015 The tracking position traveled past TrackOptions.StartDistance + DelayLimit with Exe-
cutionMode#Queued or #Delayed without the ExecutionMode being satisfied.
9016 Group not paused / interrupted.
9017 A synchronized group cannot enter the velocity override state.
9018 Attempted non volatile write while axis enabled.
MLX200 ErrorIDs
9216 Invalid Host_ID. Supported Host_IDs are (0 = MECHATROLINK group, 1 = MLX robot group, 2 =
MotomanSync robot group.)
9217 Invalid Interface_ID. Supported Interface_IDs are (0..7)
9218 Invalid Device_ID. Device_ID must be 0.
9219 The groups motion engine generated an error. Use the MC_GroupReadError function block to
obtain the GroupErrorID. Possibly a motion input such as velocity or acceleration are out of
range.
9220 Group is not enabled. Enable the group using MC_GroupEnable.
9221 EtherNet/IP communication between the MPiec and the MLX robot interface was lost.
9222 State Transition Error. Refer to MC_GroupReadError for further details.
9223 Trajectory Shape Error. The value passed to MoveOptions.TrajectoryShape is invalid. Valid tra-

Page 724 of 757


ErrorID Description
jectory types are 0 = Trapezoid and 1 = S-Curve.
9224 Profile Unit Error. The value passed to MoveOptions.ProfileUnit is invalid. Valid values are 0 (% of
maximum) or 1 (Absolute units).
9225 Invalid Control Mode. The group is set for Jogging or Manual mode, and an MC_MoveLinear or
similar function block was executed, or Y_GroupJog or similar function block was called while
the group was set for Automatic mode.
9226 IdentInGroup not found in AxesGroup.Axis.Label[]
9227 The Conveyor Position is already greater than RecordedPosition +Track-
Options.SyncIn.EndDistance before MC_TrackConveyorBelt became Active.
9228 An unsupported value of Y_VelocityUnit was used as the VelocityUnit input for the function
block. Valid values are 0, 1 and 2.
9229 The AxisRef passed into the function block does not match any AxisNums in AxesGroup.AxisRef
[].AxisNum
9230 MLX_Driver startup error. Possible causes: 1) Verify that the correct IP address for the remote
hosted controller is configured. 2) Possibly the EIP_Output structure is not mapped to the cor-
rect hardware address. 3) Try slowing the cyclic task interval of the MLX_Driver FB to 8 mSec.
9231 MLX_Driver startup error. Possibly the EIP_Input structure is not mapped to the correct hard-
ware address. The Ethernet/IP status word has a value of zero, which should never occur. Open
the Hardware Configuration and save again. The Hardware Configuration configures the neces-
sary variables and maps them to the appropriate hardware address.
9232 Trajectory Type Error. An invalid trajectory type input was used for the function block. Valid tra-
jectory types are 0 = Axis and 1 = Tool Center Point (TCP)
9233 An invalid value was passed to the TCPCoordinate input. Valid value are (0, 1, 2, 3, 4, 5) which
correspond to (X, Y, Z, Rx, Ry, Rz)
9234 A watchdog error for data passing between the MPiec and an MLX Ethernet/IP interface has
occurred
9235 Module Info Read Error. There was an internal error in the function which reads the MLX module
information.
9236 Ethernet/IP communication Error. The status variable for the MLX interface does not indicate
healthy communication. (It is not 1000 Hex.)
9237 When there is more than one robot configured on an MLX interface, there must be one MLX_
Driver for each robot. The first function block to run is designated as the primary. A secondary
MLX_Driver will indicate this error if the primary MLX_Driver function block is no longer 'Valid'.
9238 Invalid [Origin, XX, XY] points. Origin coincides with XX, or Origin coincides with XY, or XX coin-
cides with XY or Origin to XX is parallel to XX-XY.
9239 Invalid input or output frame. This function supports WCS, MCS, and PCS.
9240 Calculation leads to a singularity. Calculated output coordinates is in a singular or gimbal lock
configuration.
9241 The AxesGroup BaseOffset, ToolOffset, or PartFrameOffset was changed while this function
block was enabled.
9242 The MLX interface has a firmware version that is not compatible with the MLX200_**** user lib-
rary in the project. Check the MLX hardware to verify the firmware version. Either change to the
appropriate user library or send the MLX200 unit to Yaskawa for a firmware upgrade.
9243 The MLX reports Error 17. Possible causes include: HardwareMode was selected, but the MLX
could not connect to the ServoPacks via EtherCat.
9244 The HardwareMode selected does not match the MLX operation mode. Possible causes are: 1)
The HardwareMode cannot be changed after the Enable input goes high. 2) If the MLX is con-
figured to support more than one robot, all robots must be set for the same HardwareMode. 3)
The MLX may require a reboot to enter Hardware mode.
9245 Setting the Tool Transformation offset failed. The expected TCP position was out of range of 0.1
units on one or more of the axes.
9246 One of the GroupInputs is in a state which prevents this function block from executing.
9247 Use the MLX_Conveyor_Config Function Block to configure MLX200 Conveyors.
9248 ConveyorTracking, PalletSolver, or MotoPick is not installed on the MLX200

Page 725 of 757


ErrorID Description
9249 The Group's E-Stop input is preventing motion.
9250 The Group's guard circuit input is preventing motion.
9251 One of the Group's interference zones is violated.
9252 The Group's live man switch is preventing manual mode operation.
9253 The Group's Safety circuit is preventing motion.
9258 MC_GroupSetPosition.SetMode can only have values of 0, 1, or 2.
9259 MC_GroupSetPosition cannot be used on remote hosted groups with simulated or virtual axes.
9261 Interference Zone can't be activated during motion.
9262 General SetFrameOffset error. One of the lower level functions returned an error. Please call
Yaskawa America motion applications for assistance.
9263 There is more than one scanner (EIP master) device trying to communicate with the same
remote hosted robot controller.
9264 Although communication between the MPiec controller and the remote hosting controller has
been established, valid data read is not possible. Try re-enabling the function block.
9265 The required Option Monitor value is not retaining the required UserFeedbackDataType. Maybe
more than one function block is trying to use the same service.
9266 For remote hosted groups such as MLX200, the Y_GroupInputs function block cannot be used
when MLX_Driver.HardwareMode = TRUE.
9267 Wrong MPiec controller hardware for a configured group mechanism. Part number ending in "-
RBT" or "-ER" is required and a minimum of firmware version 3.4.
9268 Invalid Tool Number. Valid Tool numbers range from 0 - 63.
9269 This function block must be executed in a task with an update interval of 4 or 8 mSec.
9270 Robot Controller Key switch or E-Stop error. Robot Controller programming pendant Key switch
might not be set to 'Remote' or the E-Stop is pressed. Set the Key switch to 'Remote' and verify
that the E-Stop is released, then re-enable MS_Driver.
9271 Robot Controller is configured for the wrong endianness. Either downgrade the MSync user lib-
rary to MSync_3f220, or configure the Robot Controller for MotomanSync as BIG endian.
9272 [[[Undefined variable Primary.ErrorID_9272_Description]]]
9273 It took longer than normal for the axes to be switched to the requested power state. Make sure
that there are not multiple instances of Y_GroupPower or other MC_Power or AxisControl FBs for
the same group or axis as this can cause conflicting commands and therefore a timeout. This
error may also occur if Y_GroupPower is executed in a task with an interval less than 4 mSec.
9274 Wrong MPiec controller hardware for 5 or 6 axis mechanisms. Part number ending in “–ER” is
required and a minimum of MPiec firmware version 3.4.
Toolbox ErrorIDs
10020 ProductSize cannot be less than or equal to zero.
10021 Maximum allowed consecutive missed registration marks reached.
10022 Product or circular buffer overrun / full.
10023 Buffer size too small / cannot be zero.
10024 DataSize must be greater than zero.
10025 SensorMinimum must be less than SensorMaximum.
10026 Positive Position Limit must be greater than Negative Position Limit.
10027 Negative Position Limit must be less than Positive Position Limit.
10028 Positive Velocity Limit must be LREAL#0.0 or greater.
10029 Negative Velocity Limit must be LREAL#0.0 or lower.
10030 Positive Acceleration Limit must be greater than 0.
10031 Negative Acceleration Limit must be less than 0.
10032 Positive Deceleration Limit must be greater than 0.
10033 Negative Deceleration Limit must be less than 0.
10034 Interpolation calculation error.
10035 Gripper Close Error (Timeout).
10036 Latch Error. LatchReference was negative. This situation should never occur. Verify that the nor-

Page 726 of 757


ErrorID Description
mal axis movement is in a positive direction. Use PLCopen Toolbox v340 which contains
improved code for applications with registration marks near the end of the default move. DCR
1183
10037 Offset cannot be in the same direction as the original motion into the limit switch.
10038 CamData.LastSegment must be greater than 0 and less than 400, or whatever value has been
declared as the ARRAY size in the CTB_Types file.
10039 Cam Segment 'Resolution' cannot be zero unless the CurveType is TB_CurveType#StraightLine.
Another cause of this error is if the Resolution is greater than the master delta for a given seg-
ment.
10040 Curve Type selected in a segment is not valid.
10041 Total pairs required would exceed DataType definition for MS_Array_Type based on number of
segments and resolution settings in CamData.
10042 Master must be always increasing from segment to segment.
10043 Tangent Match formula error, cannot have only one segment.
10044 Tangent Blend error, must have two segments, a straight line and a Tangent Blend, in either
order.
10045 SlavePosition not found in Y_MS_CAM_STRUCT.
10046 Both cam tables must have the same number of point to be added together.
10047 Both tables must have the same master cycle to be added together.
10048 The IndexSpeed is less than 20.
10049 Frequency cannot be less than 1 Hz.
10050 The dwell cannot be greater than the IndexTime.
10051 There must be a whole number of oscillations in an index at a given speed.
10052 There is a discrepancy between the master values in Profile1 and Profile 2. At the same pair
somewhere in the table, the masters have values differing by more than 1 user unit.
10053 DataPoint Error.
10054 One of the Segments in the PathData has an invalid Segment Type. Valid Segments types are
defined in the Group Toolbox GroupTypes file as enumeration GTB_SegmentType. This error
may also be the result of a mismatch in support for certain G Code / Segment Types based on the
user's MachineStruct.MachineType setting.
10055 The absolute sum of the motion for all axes relative travel from the previous segment cannot be
zero. One axis must always be in motion from segment to segment, otherwise the virtual master
distance cannot be calculated.
10056 Arc Error.
10057 Point Error.
10058 The start angle must be a value from 0.0 to 360.0 degrees.
10059 The axes got out of sync during the path motion. All Cam Slaves InSync output must be on or off
at the same time, or this ErrorID is generated.
10060 The axis must be configured as a rotary type for this function block to be applicable.
10061 MasterType is something other than 0 or 1.
10062 MachineCycle must be a positive value if MasterType = 0
10063 LastSwitch is set outside the 0-255 range. Sigma7_FT62 feature supports switch with the range
of 0-31
10064 Track Number outside the 0-31 range. Sigma7_FT62 feature supports track(signal) with the
range of 0-
10065 FirstOnPosition is not equal to 0.
10066 LastOnPosition is not equal to 0.
10067 AxisDirection is not equal to 0. Direction enumeration is ranging from 0 to 2.
10068 CamSwitchMode is not equal to 0. Sigma7_FT62 supports both position mode or time mode,
which is 0 OR 1.
10069 Duration is set to 0 or a negative value.
10070 OnCompensationScaler is set to an invalid value.
10072 ImproperOnPos_SetError.

Page 727 of 757


ErrorID Description
10073 OnOffPosition_Error. In Sigma7_FT62 feature, when it is position mode, FirstOnPosition and
LastOnPosition can't be the same value.
10074 Direction must be 0 for positive, or 2 for negative.
10075 Calibration Error: Cal_X2 must be greater than Cal_X1.
10076 WindowSize must be greater than zero.
10077 Cubic Spline maximum number of consecutive segments exceeded. DataType definition for the
Matrix could be increased if necessary.
10078 Formula 27 Error is reserved for errors with circle calculations.
10079 When using UserNoDwellModifiedConstant Velocity, there must be three contiguous segments
with the same formula code applied, and the master percentages must be increasing.
10080 Formula 29 error.
10081 ControlData.DecisionPosition is 0. The position to determine when to disengage the cam cannot
be less than or equal to zero.
10082 Mode Error. ControlData.Mode can only be 1 (one way cam) or 2 (two way cam).
10083 Unsupported Cubic Spline Sequence.
10084 One of the Cam Tables has an invalid TableID.
10085 Arc Error. The direction must be 1 or -1 and the radius must be greater than zero.
10086 MaxPosCorrection must be zero or positive, MaxNegCorrection must be or zero or negative.
10087 Arc Error. The arc radius cannot be less than half the distance between the two points that
define the arc.
10088 Arc Error. The arc profile makes the x axis (master) go backwards.
10089 Bezier Error. There should be a straight line segment before and after the Bezier segment.
10090 LREAL value too large to convert to the specified ASCII representation.
10091 CheckSum Error.
10092 Invalid Method.
10093 Rate is less than or equal to 0.
10094 S_Scans is less than 2 or greater than 30000.
10095 TiError - PIParameters.Ti is set to <=0.0. This variable must be a positive number'.
10096 Time Period value for RateCalculator FB (e.g. ppm) is less than or equal to 10 ms.
10097 Bezier Slope Error. The slopes of the two straight lines before and after the Bezier segment
should have slopes with same signs. If the slopes are positive, the slave end point should be GE
slave start point. If the slopes are negative, slave end point should be LE slave start point.
10098 BufferPatternSize cannot be equal to 1 or greater than 10.
10100 Both axes must be configured for the same axis type (Rotary / Linear) and if Rotary, they must
have the same Machine Cycle.
10101 Invalid Mode Error: The specified mode is invalid. The acceptable modes are 0:Calculate Gains,
1:Run
10102 Temperature Out of Range Error. The actual temperature is above or below the acceptable
range.
10103 Response Error. The specified tuning response is invalid. The acceptable responses are 1:Slow,
2:Medium, 3:Fast
10104 Output Limit Error. The lower limit must be less than the upper limit.
10105 Sample Time Error. The sample time cannot be 0. Responsible for divide by 0 error.
10106 Clock Error. The clock was left unconnected.
10107 Cycle Error. The system must be able to tune for at least 1 cycle. Check CycleCount and
IgnoreCycle variables.
10108 Timeout Error. The system has taken too long to complete auto tuning.
10110 Too many tabs specified.
10111 Pitch between labels would be negative, need more spacing between tabs.
10112 Tab mode must be specified as 1 (Tabbing) or 2 (Stamp).
10113 Incorrect cam table size (check the CamTable.Header.datasize)
10114 Incorrect cam table size (check the CamTable.Header.Datasize).

Page 728 of 757


ErrorID Description
10115 XML Tag not found. Tip: If this error is generated from an application with a group configured,
and the AxesGroup has additional non group axes added to it such as for tangent operation, con-
firm that the AXIS_REF specified in the AxesGroup.Axis_Ref[] matches the intended AXIS_REF of
the additional axis. See the Toolbox manual, Group Toolbox section on “Tangent Mode.” Other-
wise, possibly the file is corrupt or the schema is not compatible with this function block.
10116 Problem converting string data to the output buffer.
10117 The controller already has a String Conversion Error at the rising edge of this function. Clear the
alarm using Y_ClearAlarms and try again.
10118 STRING_TO_BUF Conversion Error.
10119 In the Data Structure, rows must be set greater than zero and columns must be set greater than
zero.
10120 File could not be opened. Check for accurate directory path and use of "/"
10121 The CSV file was written in a format unsupported by this function block.
10122 Row Error. The data is out of sync with the expected row / column arrangement expected.
10123 Column Start Error. The data is corrupted.
10124 Unsupported Case condition.
10125 Conversion Error. Check the ErrorRow and ErrorCol / ErrorString outputs for details.
10126 NoDataError - The End Of File was reached, but the record count is zero. Verify the file is not cor-
rupted.
10127 TooManyRecords - DataType is not large enough.
10128 MaxNotDefined - The user must set the maximum number of records that can be added to the
structure.
10129 No Carriage return found in CSV buffer. The function searched the file for twice the length of the
specified buffer and was unable to find a carriage return indicating the end of a row. Either the
buffer size is too small, or the data is invalid.
10130 The center to co-ordinate distance for the two input co-ordinates are not the same
10131 Zero radius is invalid.
10132 Only modes 0 (center + 2 co-ordinates) and 1 (radius + 2 coordinates) are supported.
10133 The coordinates of the two data points are the same.
10138 The positions of the main and prime axes are outside the specified Allowance to permit motion on
the prime axis.
10139 VelocityScaler cannot be less than or equal to zero.
10140 Must be greater than zero and less than 20.
10141 Same Points Error - The 2 points given are equal.
10142 Negative Radius Error - The Radius given is less than or equal to 0.
10143 Incorrect Circle Info - incorrect inputs were given for the Direction or PathChoice.
10144 Points Too Close Error - The smallest possible diameter for a circle given two points can be cal-
culated as the distance between both the points.
10150 Theta 1 Below Minimum.
10151 Theta 1 Above Maximum.
10152 Theta 2 Below Minimum.
10153 Theta 2 Above Maximum.
10154 Imaginary ChordHeight (impossible for mechanism).
10155 Maximum Compression Reached (Mechanism squats too deeply).
10156 Locked Leg at Knee Joint B (Link2-Link3).
10157 Locked Leg at Knee Joint D (Link1-Link4).
10160 CommandString length is invalid.
10161 Invalid CommandCode.
10162 Parameter being searched for is out of range.
10163 Mode input not valid.
10164 Invalid character position input.
10165 CommandString length is too long or command delimiter not found.

Page 729 of 757


ErrorID Description
10166 File Not Found.
10168 Buffer Size Error.
10170 Maximum deviation between motor and encoder was exceeded.
10171 Home approach distance limit encountered. Latch input not detected within the approach dis-
tance limit.
10172 Use Pointer Error when using MultiUsePointers.
10173 Duplicate latch values detected. Consider upgrading to firmware 3.4 or higher to avoid this
issue. SCR 10736
10174 Out of range Error. When GridLookup started executing, the Coordinate position was already out
of the range of the measured region.
10175 Too many custom G or M Code segments were deferred for future processing to be synchronized
with buffered motion preceding the custom codes.
10176 Unrecognized motor model number.
10177 There was an internal problem calculating the segment length. Contact Yaskawa for support.
10178 There was an internal problem calculating the segment time. Contact Yaskawa for support.
10179 There was an internal problem managing segments during Tool Compensation. Contact Yaskawa
for support.
10182 Speed Match Range Error: SpeedMatch start angle <= SpeedMatch end angle.
10183 Sensor Distance Error: Sensor distance <= Part length. Cam blend cannot be accomplished with
such a set up.
10184 Engage Distance Error: Safe Engage Distance <= Part length. Cam Blend cannot be accom-
plished with such a set up.
10190 Part Length Error: PartLength input must be greater than zero.
10191 Speed Match Distance Negative: The SpeedMatchDistance input must be greater than zero.
10192 Master Speed Match Position Negative: The MasterSpeedMatchStartPosition must be greater
than zero.
10193 Speed Match Length Error: The PartLength must be > SpeedMatchDistance.
10194 Stroke Length Exceeded: The calculated stroke length is greater than the allowable
ShearStrokeLength. Increase the allowable shear stroke length or reduce the speed match dis-
tance.
10141 Same Points Error - The 2 points given are equal.
10200 Region Error: The min and max values for the region size are swapped.
10201 No Outputs Error: The function did not find an output on the tooling which resides in the area for
the part to be picked.
10202 Duplicate Output Error: The function tried to allocate an output for a part which was already
assigned to another part.
10203 Container Error: CP_Struct.LastContainer must be greater than zero.
10204 Part Error: CP_Struct.LastPart must be greater than zero.
10205 Layer Error: CP_Struct.LastLastLayer must be greater than zero.
10206 Pick Error: Each CP_Struct.Layer[n].LastRegion must be greater than zero.
10207 Pick Dimension Error occurred when calculating the size of the region to be picked.
10208 Region Location Error.
10209 Location Error: CP_Struct.LastLayer must be greater than zero.
10210 Region Error: All parts in a region must be from the same location / conveyor system.
10211 Tool Error: CP_Struct.Tool.XTips and CP_Struct.Tool.YTips must be greater than zero.
10220 Encoder ConfigurationError. Encoder must be configured as an absolute encoder for Sigma7_
FT62 feature. Set Pn002.2 to 0.
10221 Invalid Enumeration. Sigma7_FT62 high speed output signal enumeration does not match
acceptable values.
10222 Reboot Required Error. Reboot the controller to complete writing of non-volatile memory.
10223 Out Of SyncError. The current encoder position is out of sync with the current output and check-
point positions.
10224 Output Delta Error. The output position cannot be changed by more than +/- 45 degrees in a

Page 730 of 757


ErrorID Description
single machine cycle.
10225 Excessive Pos Error: Configured output distance exceeds one machine cycle. Decrease position
setting to within one machine cycle.
10226 Excessive Distance Error: Configured output distance exceeds one machine cycle. Decrease the
distance setting to within one machine cycle.
10227 Flash Memory Write Error: A failed attempt was made to write to the drive's non-volatile flash
memory. The drives non-volatile memory cannot be written while the axis is enabled. Disable the
axis and try again.
10228 Invalid Cam Switch Mode Error: The configured CamSwitchMode does not correspond to a valid
enumeration value.
10230 Winder1RevPulse cannot be less than or equal to zero.
10231 LineRoll1RevPulse cannot be less than or equal to zero.
10232 LineRollDiameter cannot be less than or equal to zero.
10233 WinderInitDiameter cannot be less than or equal to zero.
10234 WinderMinDiameter cannot be less than or equal to zero.
10235 WinderMaxDiameter cannot be less than or equal to zero.
10236 Normal_Rate cannot be less than or equal to zero.
10237 E_Stop_Rate cannot be less than or equal to zero.
10238 Sshape_Time cannot be less than or equal to zero.
10239 Rate cannot be less than or equal to zero.
10240 PI_Parameters.RefRate cannot be less than or equal to zero.
10250 Data Size Mismatch. The size of the Temperature Control Parameter File is different than the size
of the structure it must be copied to. Possible data corruption.
10251 Version Error. The file version of the Temperature Control Parameters is not recognized by this
version of the function block.
10600 Unsupported Letter Code. A G Code started with a character that was not recognized.
10601 Unsupported G Code
10602 Unsupported M Code
10603 PathData is currently in use by MC_MovePath, it is not possible to START reading data into the
structure until MC_MovePath is Done.
10604 Circle Error. When specifying an arc (G02 or G03), both the I and J registers cannot be zero.
10605 Offset Error. G10 'P' parameter must be 1 through 9.
10606 User Unit Error. An invalid combination of user units between the Hardware Configuration and
the G code data was found. Example: HC is configured for revolutions, and the G Code file spe-
cifies mm. The G Code Processor can only convert between linear units.
10607 Segment Error. A function inside MC_MovePath could not find a SegmentID for the current
motion that matches one assigned when the motion function block was executed.
10608 CompTypeError - There was no valid combination of motion segments (Line-Line, Line-Arc, Arc-
Line, Arc-Arc)
10609 Tool Compensation Error - There was no valid solution found for an Arc - Arc combination
10610 Tool Compensation Error. No Solution Found (Logic Error)
10611 Division by zero.
10612 Tool Compensation Error. A segment transition from line to line, line to arc, arc to line, or arc to
arc was not detected.
10613 Tool Compensation Error. No solution found for an arc to arc transition.
10614 Tool index as specified in the 'P' register must be between 1 and MaxTools, which is the size of
the ToolDataStruct in the Group Toolbox G Code datatypes file.
10615 G10 Error. The 'L' register must be 1 or 2.
10616 OperationMode Error. The VAR_INPUT is requesting "Infinite Repeat" but the path is too large to
fit within the PathData.Segment struct at once, and the beginning of the path was overwritten.
Infinite repeat mode is only possible if the entire path can be contained in the PathData struc-
ture.
10617 Group Name Error. Check AxesGroup.Name for validity.

Page 731 of 757


ErrorID Description
10618 ControllerInfo Error. Connect a Global variable of datatype CONTROLLER_INFO and locate it at
address %MD3.66560
10621 Final Segment Error. The PathData.FillMethod is set as n/a and the PathData.FinalSegment is
zero. Please set PathData.FinalSegment properly. Tip for G Code users: Make sure that either the
Read_Code_File or Read_GCode_Stream functions are 'Busy' before executing MC_MovePath.
10622 Tangent configuration error. Maybe the Tangent axis is configured as a theta axis of the group,
and not as an external axis. (Must not be a group's theta axis.)
10623 Max Segments Error. AxesGroup.Status.FreeMotionSegments <= (MachineData.Prm-
s.MaxSegmentsPerScan * 2). Either increase the Motion Queue Size in the Hardware Con-
figuration for this group, or reduce MyMachine.MaxSegmentsPerScan.
10624 Emulation Error. MachineData.Emulation is not set to a valid value.
10625 Program List Error. There are more sub program calls in the data than are supported by the G
Code functions. (O register)
10626 Stack Overflow. There are more Jump Segment Types in MC_PATH_DATA_REF than the defined
size for PathData.Logic.Events
10627 Variable Error. A line that starts a variable assignment is missing an equal sign, or the variable
index is out of range [1 to 1000]
10628 The canned cycle G Code is not supported.
10629 Cycle Array Error. The G code data contains more information for a canned cycle than an internal
structure which holds all the XZ information contained within the P & Q line numbers.
10630 Canned Cycle Finishing Error. Possible causes are: #1) (End - Start) block must be at least one
block. 2) The range of commands to be repeated must come after G71.
10631 A command was encountered that is not supported for the configured MachineType. For
example, M270 is found (for 3D printing,) but MachineData.MachineType <> GTB_
MachineType#Printer
10632 Joint Not Configured. Could not find a Degree of Freedom in the HomeData. For Example, in
HomeData.Sequence[1].DOF[1] :='Z', 'Z' was not found in the AxesGroup configuration.
10633 Queue Size Error occurs if the Motion Queue Size set in the Hardware Configuration is larger
than the DataType MC_PATH_DATA_REF.Segment[ ] in the Group Toolbox.
10634 The Motion Queue Size set in the Hardware Configuration is larger than the DataType MC_PATH_
DATA_REF.Segment[ ] in the Group Toolbox. Adjust the Motion Queue Size so it is smaller than
the size declared for MC_PATH_DATA_REF.Segment[ ].
10635 Program List Error. The G Code data refers to more program labels (typically from an IF or M98
command) than the declared size of ProgramList.Name[], which is typically 16.
10636 Logic Type Error. The command is not formatted correctly. Examples: N25 IF [#500 LT 25] N35
or N10 #3=0
10637 Conversion Error. A logical expression could not be converted from a byte array to a string.
Contact technical support for assistance.
10638 JumpError. The IF instruction must include a line number reference as Nxx where the first char-
acter is "N" and the remaining characters are numeric. Example: N25 IF [#500 LT 25] N35
10639 Operand Error. The following operands are supported in an IF instruction: EQ, GE, GT, LE, LT,
NE, =, >=, >, <=, <, <>
10640 Tool Length Error - G Code Register._H is not 0, 1, or 2.
10641 Evaluation Error. There was something wrong with a logical command such as a missing # sign,
unsupported or improperly formatted logical comparison, or divide by zero.
10642 The MC_MoveAbsolute to touch the plane set its Done output before the specified torque limit
was reached. Maybe the position specified for the contact measurement is not enough. It must
be a position which cannot be achieved due to contact with the surface.
10643 Input product has an invalid ProductType. Must be 0-49.
10644 Specified ConveyorBelt not defined in DistributionConfig.
10645 DistributionConfig has an invalid SequenceLength for the specified ConveyorBelt. The valid
range is 0-16. Check DistributionConfig[x].SequenceDistribution.SequenceLength, where x is
the element that specifies sequence parameters for the selected ConveyorBelt.
10646 DistributionConfig has invalid sequence element values for specified ConveyorBelt. Must be 0-7.

Page 732 of 757


ErrorID Description
Check DistributionConfig[x].SequenceDistribution.SequencePattern[] where x is the element
that specifies sequence parameters for selected ConveyorBelt.
10647 GroupNumber is invalid. Must be 0-7.
10648 Specified ProductNumber is invalid. Must be 0-49.
10649 Number of products is greater than maximum allowed.
10651 The sample size must be between 0 and 32.
10652 Y_ProbeContinuous is configured incorrectly to catch both the rising and falling edge of the
incoming part. SlaveBuffer.PatternSize must equal 2, .PatternArray[0] must be 1, .PatternArray
[1] must be 2, and Pn511.1 must be 4 and Pn511.2 must be E.
10653 Incoming products have a part length delta that exceeds the defined tolerance.
10654 The StartPoint must always be less than the EndPoint.
10655 The specified Degree is invalid. The acceptable range is 7 to 31.
10656 The specified Mode is invalid. The acceptable modes are 1:SyncInMode, 2:GapMatchMode,
3:SyncOutMode.
10657 The sensor distance must be greater than 0.0
10658 The tolerance must be greater than 0.0
10660 Selected Extruder Error. Up to three extruders are supported. The G Code data specified a T
value which is out of range.
10661 Unconfigured Extruder Error. The G code data specified a valid extruder number as Tn but the
corresponding extruder is not part of the group configuration. Check the MachineStruct.Variant
setting, possibly a feature being accessed is not supported given the variant.
10662 Grid Setup Error. X or Y range is less than or equal to zero, or the resolution is less than 3
points.
10663 Group name not found in Group.XML configuration file. Contact Yaskawa Motion Support.
10664 Structure version or size mismatch. Data received from DLL does not fit the expected data
format. Maybe using incompatible DLL and Toolbox.
10665 Set Position Error. Only 3D Printer Extruder 'E' axes are supported.
10666 ExtruderOffsetInvalid. Extruder offset has not been revalidated since the extruder has been
changed. Make sure that the extruder position is set with a G92 command before attempting to
move it.
10667 Feed Mode Error. When using Inverse Time Mode (G93) each motion instruction must contain an
'F' register feedrate value.
10668 Parameter Error. A G code register contained an invalid (non numeric parameter)
11050 Cam correction (shift/offset) has been aborted by another function block.
11051 Segment Error, could not find the previous motion segment to determine change in XYZ coordin-
ates. Maximum search is 20 segments. Contact Yaskawa America for support.
11052 There are no degrees of freedom defined for the Group. There could be a group configuration
error. At least one of the first 6 AxesGroup.Machine.Label[] must be populated with a string
name, or the AxesGroup.HostID must indicate a remote hosted robot.
11053 Specified Degree of Freedom not found. (X,Y,Z,Rx,Ry,Rz) These are case sensitive and must
match a Group Label from the Hardware Configuration.
11054 Tolerance Too Wide Error. The tolerance specified is larger than the distance between the
Approach and Measurement Positions.
11055 Premature Touch Error. The measurement torque was achieved before the position was within
GridSetup.MeasurementPosition + /- Gridsetup.Tolerance
11056 Transfer, Approach, and Measurement Positions provided in the setup data are not in a pro-
gressive order
11057 The External Plane specified contains axes which are not servos, which is required for this func-
tion to operate when the group is configured with a virtual axis as the joint used for meas-
urements.
11058 No axes specified for the Plane Joint which is required for this function to operate when the
group is configured with a virtual axis as the joint used for measurements. Populate Setup.Ex-
ternalPlane with the AXIS_REF of the servo.
11059 There are more secondary axes in the AXES_GROUP_REF than there is room allocated in the

Page 733 of 757


ErrorID Description
Plane Ref
11060 The groups is configured with a virtual axis operating the plane to be measured and Setup.Ex-
ternalPlane is not configured to reference the real servo axis to be operated.
11061 The mechanism is not supported by this function.
11062 Stream Watchdog. The KeepAlive packets were not received by Read_GCode_Stream within the
specified InactivityTimeout.
11063 There were too many expression commands in the file. See the Group Toolbox DataType defin-
ition for LogicArray: ARRAY[1..256] OF LogicData; to see or adjust the size
11064 Rotary Error. The R register was specified on a G0 or G1 move, but the C axis is not configured
as LoadType = Rotary in the Hardware Configuration.
11065 Rotary Error. Rotary moves within one MachineCycle are only supported on the C axis.
11066 Unhandled Override Error. A code was declared to be overidden, but no supporting IEC 61131
code was added in the Custom_Code_* fucntion blocks.
11067 Path Capacity Error. This was thought to be an internal error that should never occur. Please
report this problem to Yaskawa America Motion Application Engineering.
11068 G53 Error. The Motion code in effect at the time of the G53 command must be G0 or G1, and no
tool offsets can be enabled.
11069 Block Sequence Error. There are more than one command on a line and the parser could not
determine how to arrange the proper command sequence.
11070 Sensor Config Error. MachineData.Printer.Extruder[SelectedExtruder].TempSensors is greater
than the maximum size of the array for Temp Settings OR MachineData.Printer.BedTempSensors
is greater the max size in the related structure.
11072 No Previous Motion. An arc segment cannot be the first motion because a previous datapoint is
required to calculate the arc parameters.
11073 No Axes Specified. PathData.Segment[].AxesFlags cannot be zero, at least one of the axes pos-
itions must be specified.
11074 Lookahead Error - Buffer capacity reached the limit while trying to look ahead the required stop-
ping distance for a segment. Contact Yaskawa America Motion Applications for advice on this
problem.
11075 There was an internal problem sub dividing segments. Contact Yaskawa for support.
11076 Home Preset Error. There are no axes specified for the Home Preset selected.
11077 Block Sequence Error. All of instructions on the line did not resolve, not all of the commands
were processed.
11078 There was an internal with the Segment SubType. Contact Yaskawa for support.
11080 Drill Cycle Error. Check to make sure all the register data provided with the G73 or G83 com-
mand are valid. In particular, make sure the Q value is positive.
11100 BufferUseError. The buffer bank where data is to be recorded is currently writing data to the
disk. This problem is due to a timing issue / race condition. (Recording is faster than writing.
Consider changing the task interval or buffer size.)
11101 Precision must be greater than 0 and less than 16.
11102 reserved
11103 TimeLimitError. The max recording time must be in the range of 0 to 60 seconds.
11104 ChannelError. A maximum of 7 channels is supported.
11105 DuplicateFilenameError. The file name's cannot be identical.
11106 The reference file contains no data.
11107 The comparison file contains no data.
11108 The number of channel data in each file is different and cannot be compared.
11109 Reference data in the file was not located. The file may be corrupt or it was not created by the
DataLogWrite function block.
11110 The Noise Window must be within the range of 0 to 20 samples.
11111 Percent deviation must be within the range of 0 to 100%.
11112 Cannot find matching values in the comparison file.
11113 A samples timestamp is less than the previous timestamp, the file may be corrupt.

Page 734 of 757


ErrorID Description
11114 SampleRateError. The sample rate must be greater than zero.
11115 FileLocationError. The file can only be stored in Flash or Ram.
12000 Read response timeout, no response was received within the supplied TimeOut.
12010 Not a response (QR should be 1 but it was 0).
12011 Response was truncated because it extended beyond the 512byte UDP packet size.
12012 Recursive is not available but was requested by the Query packet
12021 Format error, the name server was unable to interpret the query.
12022 Server failure, the name server was unable to process the query due to an internal problem.
12023 Name error, not valid for this block (only valid for Authoritative servers).
12030 Address length was less than 3 characters which is not possible.
12031 Address format was incorrect as it does not contain a '.'.
12032 Buffer Size Error. CommandType is set to 'Fixed'.
12033 Packet Size Error. CommandType is set to 'Fixed'.
12034 Comm Type Error - CommType must be set to either 'serial' or 'Ethernet'. Default of 0 is n/a.
12100 Connect to SMTP server timeout, no connection was established within the supplied TimeOut.
12101 DATA portion of e-mail was not successful and therefore the e-mail may not send/be malformed.
12102 QUIT error, there was an error sending the 'QUIT' command to the server.
12103 NumRcpt cannot equal 0.
12200 Connect to FTP server timeout, no connection was established within the supplied TimeOut.
12201 Connect to FTP data socket timeout, no connection was established within the supplied TimeOut.
12202 QUIT error, there was an error sending the 'QUIT' command to the server.
12203 The credentials for the FTP server were incorrect (either one or both username and password).
12300 File Error, no error information available.
12301 Invalid file handle.
12302 Maximum number of files are already opened.
12304 File is already opened.
12305 File is write protected or access denied.
12306 File name not defined.
12310 End of data reached.
12312 The number of characters to be read from file is greater than the data buffer.
12322 No data could be read from file.
12421 Service not available, closing control connection. This may be a reply to any command if the ser-
vice knows it must shut down.
12425 Can't open data connection.
12426 Connection closed; transfer aborted.
12430 Invalid username or password.
12434 Requested host unavailable.
12450 Requested file action not taken / Requested mail action not take (mailbox unavailable).
12451 Requested action aborted. Local error in processing.
12452 Requested action not taken, insufficient storage space in system (FTP: File unavailable)
12500 Syntax error, command unrecognized.
12501 Syntax error in parameters or arguments.
12502 Command not implemented.
12503 Bad sequence of commands.
12504 Command not implemented for that parameter.
12521 [domain] does not accept mail.
12530 Not logged in / Access denied.
12532 Need account for storing files.
12550 Requested action not taken. File unavailable (e.g., file not found, no access) / Mailbox unavail-
able.
12551 Requested action aborted. Page type unknown / User not local.

Page 735 of 757


ErrorID Description
12552 Requested file action aborted, exceeded storage allocation / Requested mail action aborted,
exceeded storage allocation.
12553 Requested action not taken, file name not allowed / mailbox name not allowed.
12554 Transaction failed.
12560 Invalid Equipment Module number.
12561 Equipment Module not enable in the system.
12562 Invalid number of enabled Control Modules in selected Equipment Module.
12563 Time rollover warning.
Axis Error
40960 RESERVED
45332 Sending clear alarms command to servo drive failed.
45335 Failed to initialize absolute encoder.
45336 Function block could not be executed because a program download was in progress.
45337 Rebooting the controller is prohibited while an axis is enabled.
Operating System Error
57620 The DataType connected to a function block parameter specified as ANY type does not match the
required data size. Right click on the function block and select 'Object Properties' to determine
which parameters are ANY type. The size of the variable connected to these parameters is not
checked during the compilation but validated at run time. Typically errors occur when a variable
of type AXIS_REF is not connected to an Axis VAR_IN_OUT, or a variable of type Y_Engage_Data
is not connected to the Y_CamIn function block.
57873 InvalidStructureSize. The structure size does not match. Check all the variables connected to the
function block. A common mistake is to connect a structure element, not the entire structure.
Example: EngageData.StartMode is connected instead of just EngageData
57874 Argument data is NULL. The EngageData input must be connected.
Kernel Error
60909 This function block is not supported for the AxesGroup specified - OR -.... NOTE: Starting with
MotionWorks IEC release 3.5.0, a new strategy for supporting remote hosted groups was imple-
mented. When operating remote hosted robots groups via MotomanSync, the MSync_3****
user library MUST appear above the PLCopen Part4 library in the libraries folder of the Project
Tree Window, or this error may be erroneously thrown.
Unsupported functions based on Group Type
61713 This function block caused an internal error. Possible causes: MC_Power - Check if multiple
instances of this block are executed for the same axis. Y_CamIn - Check in the cam table if the
master values are the same for two datapoints or decreasing. Y_CamStructSelect - Y_MS_CAM_
TABLE.Header.DataSize must not be zero.

Page 736 of 757


Controller AlarmID List

Toolbox Help Documentation


Help version created 7/23/2021

Controller AlarmID List

The following is a list of alarm codes that are reported in the Hardware Configuration's Controller Alarms tab, Y_ReadAlarm and
MC_GroupReadError function blocks, and the webUI. These are non axis specific system alarms.

Hex Code Description


ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
motionKernel 1201 0103 An alarm task queue was full when a new alarm was posted. This indic-
ates that the task is being starved of execution time or that the system is
generating many alarms simultaneously.
app 1401 0005 The script environment ran out of memory. This is a serious condition
because it may prevent further errors from being handled correctly.
app 1401 0006 An error occurred while running the standard error handler for a general
script error. This is a serious condition because it indicates the standard
error handler is malfunctioning.
app 1401 0007 This error should never occur and is included only for completeness. It
indicates that an unknown and potentially fatal problem has occurred
within the script engine.
app 1401 000A The script task failed to stop cleanly, which may result in unreleased sys-
tem resources. Error recovery requires the controller be reset.
app 1401 000B The command line task failed to stop cleanly, which may result in unre-
leased system resources. Error recovery requires the controller be reset.
app 1403 0002 The task responsible for publishing events to a remote client failed to stop
cleanly, which may result in unreleased system resources. Error recovery
requires the controller be reset.
app 1403 0003 The task responsible for replying to remote clients failed to stop cleanly,
which may result in unreleased system resources. Error recovery
requires the controller be reset.

Page 737 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 1403 0004 The task responsible starting and stopping connections to remote clients
failed to stop cleanly, which may result in unreleased system resources.
Error recovery requires the controller be reset.
app 1407 0001 The file system on which the configuration file directory resides could not
be read and may be unmounted or corrupted. The system has booted in a
minimal configuration mode, and most functionality is limited. If possible,
the file system should be recovered or reformatted and new config files
uploaded if applicable.
app 1407 0103 The watchdog timer expired.
app 1407 0108 A CPU exception occurred.
app 1407 0109 The firmware files on the controller do not match the expected check-
sums.
app 1407 010A The manufacturing procedure failed. The controller probably could not
fetch the current time from the network.
app 140A 0009 Network reset detected multiple Axes connected to the same servo net-
work node.
app 140A 000A Network reset detected multiple I/O connected to the same network node.
app 140A 0015 Controller memory was corrupted during network reset resulting in a lost
logical Axis data structure.
app 140A 0016 Controller memory was corrupted during network reset resulting in a lost
logical I/O data structure.
app 140A 0018 An Abort input specified in the configuration could not be found. The
abort condition is considered permanently asserted. No motion is possible
until the I/O configuration can be matched to the abort inputs (restart
required).
app 140A 0021 Too many events were posted from the system ISR. The motion scan and
servo net loop have been shut down.
app 140B 0002 The controller ran out of free memory, possibly resulting in an unre-
coverable failure. Please reboot the controller. A common cause for this
alarm is when an application uses camming, and continues to create new
cam tables without releasing the memory (Y_ReleaseCamTable) for old
cam tables that are no longer needed. See the Cam Toolbox for a function
to help called "CamTableManager." If using the Gantry toolbox and the
MovePath function block, a similar function called PathIDManager is avail-
able.
app 140B 0004 The largest free memory block is too small, possibly resulting in an unre-
coverable failure. Please reboot the controller.
app 140C 1035 The manufacturing data on the controller is invalid. The controller needs
to be returned to Yaskawa for reprogramming.
Mechatrolink 2301 0001 The drive returned an invalid watch dog code indicating a possible
dropped communication packet.
Mechatrolink 2301 0002 The drive failed to return confirmation of last aux command within the
default timeout period.
Mechatrolink 2301 0003 An unrecoverable error occurred during auto configuration. As a result,
one or more drives are excluded from the servo network.
Mechatrolink 2301 0004 Overriding the auto configured axes parameters failed. As a result, one or
more drives are excluded from the servo network.
Mechatrolink 2301 0005 Two or more nodes have the same ID. As a result, all servo network com-
munication has been suspended.
Mechatrolink 2301 0006 The controller must be the root node on the servo network. All servo net-

Page 738 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
work communication has been suspended
Mechatrolink 2301 0007 The servo network communication device failed to initialize. Servo net-
work communication is not possible.
Mechatrolink 2301 0008 An error occurred sending command to a node during initialization. The
node may not support the configured communications rate. Com-
munication with this node has been prohibited, but communication with
other nodes may be possible.
Mechatrolink 2301 000E The drive does not return response packet.
Mechatrolink 2301 000F Bus reset generation that controller is not demanding.
Mechatrolink 2301 0010 It receives response with the same channel at the same Iso cycle.
Mechatrolink 2301 0011 The ID in the response packet is not same to ID of AxisNode.
Mechatrolink 2301 0012 The data length in the response packet is not same to value of CSR
register(SEND_DSP_DATA_LENGTH) of drive.
Mechatrolink 2301 0013 The packet type in the response packet is not same S-DSP.
Mechatrolink 2301 0014 Invalid cycle time has passed with configuration file 'servonet.xml'. As a
result, all servo network communication has been suspended.
Mechatrolink 2301 0015 Node is not found on 1394 network.
Mechatrolink 2301 0016 Invalid node.
Mechatrolink 2301 0017 Error matching node IDs.
DPRAM 2309 0001 Invalid watch dog code from drive
DPRAM 2309 0002 Aux command confirmation failure
DPRAM 2309 0003 Auto configuration failed
DPRAM 2309 0004 Overriding auto configuration failed
DPRAM 2309 0005 Invalid cyclic check sum from drive
DPRAM 2309 0006 Invalid watch dog from drive
DPRAM 2309 0007 Control mode is not supported
DPRAM 2309 0008 Communication with a node failed during servo network startup
motionKernel 3103 0100 Controller SRAM battery is low
motionKernel 3103 0101 The file system failed the integral consistency check. Remedy: Power up
the controller in supervisory mode using the SUP switch. (On 3000 series
controllers, this switch is labeled 'MNT' as in Maintenance.) Clear the
alarm. Turn off the SUP switch. Power cycle the controller.
motionKernel 3201 0001 The motion kernel didn't request to enable axis. But, the axis is enabled.
motionKernel 3201 0002 The motion kernel didn't request to disable axis. But, the axis is disabled.
motionKernel 3201 0004 The encoder position stored in SRAM could not be validated. The value has
been reset.
motionKernel 3201 0005 Main bus power was disconnected while the axis was enabled. Main
power must be restored and this alarm cleared before motion can con-
tinue.
motionKernel 3201 0101 Configuration error: multiple alarm tasks with duplicate priority.
motionKernel 3201 0102 Configuration error: Alarm task not configured. Using default priority and
name.
motionKernel 3202 0001 Axis Coordinate System: The command position was outside the allowable
range for the axis in the positive direction (positive overtravel). The axis
may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from

Page 739 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
the allowed region will re-trigger the alarm.
motionKernel 3202 0002 Axis Coordinate System: The command position was outside the allowable
range for the axis in the negative direction (negative overtravel). The axis
may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from
the allowed region will re-trigger the alarm.
motionKernel 3202 0003 Axis Coordinate System: The command speed was greater than the allow-
able range for the axis in the positive direction (overspeed). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0004 Axis Coordinate System: The command speed was greater than the allow-
able range for the axis in the negative direction (overspeed). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0005 Axis Coordinate System: The command acceleration was greater than the
allowable range for the axis in the positive direction. The axis may not be
moved again until the alarm condition is cleared.
motionKernel 3202 0006 Axis Coordinate System: The command acceleration was greater than the
allowable range for the axis in the negative direction. The axis may not be
moved again until the alarm condition is cleared.
motionKernel 3202 0007 Axis Coordinate System: The command torque was greater than the allow-
able range for the axis in the positive direction (overtorque). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0008 Axis Coordinate System: The command torque was greater than the allow-
able range for the axis in the negative direction (overtorque). The axis
may not be moved again until the alarm condition is cleared.
motionKernel 3202 0011 Joint Coordinate System: The command position was outside the allowable
range for the axis in the positive direction (positive overtravel). The axis
may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from
the allowed region will re-trigger the alarm.
motionKernel 3202 0012 Joint Coordinate System: The command position was outside the allowable
range for the axis in the negative direction (negative overtravel). The axis
may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from
the allowed region will re-trigger the alarm.
motionKernel 3202 0013 Joint Coordinate System: The command speed was greater than the allow-
able range for the axis in the positive direction (overspeed). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0014 Joint Coordinate System: The command speed was greater than the allow-
able range for the axis in the negative direction (overspeed). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0015 Joint Coordinate System: The command acceleration was greater than the
allowable range for the axis in the positive direction. The axis may not be
moved again until the alarm condition is cleared.
motionKernel 3202 0016 Joint Coordinate System: The command acceleration was greater than the
allowable range for the axis in the negative direction. The axis may not be

Page 740 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
moved again until the alarm condition is cleared.
motionKernel 3202 0017 Joint Coordinate System: The command torque was greater than the allow-
able range for the axis in the positive direction (overtorque). The axis may
not be moved again until the alarm condition is cleared.
motionKernel 3202 0018 Joint Coordinate System: The command torque was greater than the allow-
able range for the axis in the negative direction (overtorque). The axis
may not be moved again until the alarm condition is cleared.
motionKernel 3202 0021 World Coordinate System: The command position was outside the allow-
able range for the axis in the positive direction (positive overtravel). The
axis may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from
the allowed region will re-trigger the alarm.
motionKernel 3202 0022 World Coordinate System: The command position was outside the allow-
able range for the axis in the negative direction (negative overtravel). The
axis may not be moved again until the alarm condition is cleared. After the
alarm is cleared, it is permissible to execute a move which brings the axis
back toward the allowed region, even though the axis is probably still out-
side the allowed region. Any move which pulls the axis further away from
the allowed region will re-trigger the alarm.
motionKernel 3202 0023 World Coordinate System: The command speed was greater than the
allowable range for the axis in the positive direction (overspeed). The axis
may not be moved again until the alarm condition is cleared.
motionKernel 3202 0024 World Coordinate System: The command speed was greater than the
allowable range for the axis in the negative direction (overspeed). The
axis may not be moved again until the alarm condition is cleared.
motionKernel 3202 0025 World Coordinate System: The command acceleration was greater than
the allowable range for the axis in the positive direction. The axis may not
be moved again until the alarm condition is cleared.
motionKernel 3202 0026 World Coordinate System: The command acceleration was greater than
the allowable range for the axis in the negative direction. The axis may not
be moved again until the alarm condition is cleared.
motionKernel 3202 0027 World Coordinate System: The command torque was greater than the
allowable range for the axis in the positive direction (overtorque). The
axis may not be moved again until the alarm condition is cleared.
motionKernel 3202 0028 World Coordinate System: The command torque was greater than the
allowable range for the axis in the negative direction (overtorque). The
axis may not be moved again until the alarm condition is cleared.
motionKernel 3202 0031 The move specified would exceed the software position limits in the pos-
itive direction and was rejected before being started. The group may be
moved again immediately if desired.
motionKernel 3202 0032 The move specified would exceed the software position limits in the neg-
ative direction and was rejected before being started. The group may be
moved again immediately if desired.
motionKernel 3202 0033 The move specified would exceed the software speed limits in the positive
direction and was rejected before being started. The group may be moved
again immediately if desired.
motionKernel 3202 0034 The move specified would exceed the software speed limits in the neg-
ative direction and was rejected before being started. The group may be
moved again immediately if desired.

Page 741 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
motionKernel 3202 0035 The move specified would exceed the software acceleration limits in the
positive direction and was rejected before being started. The group may
be moved again immediately if desired.
motionKernel 3202 0036 The move specified would exceed the software acceleration limits in the
negative direction and was rejected before being started. The group may
be moved again immediately if desired.
motionKernel 3202 0037 The move specified would exceed the software torque limits in the positive
direction and was rejected before being started. The group may be moved
again immediately if desired.
motionKernel 3202 0038 The move specified would exceed the software torque limits in the neg-
ative direction and was rejected before being started. The group may be
moved again immediately if desired.
motionKernel 3202 0039 The predictive soft limit encountered a segment that doesn't support the
predicted stopping point.
motionKernel 3202 0041 Cam and Contour tables must have a header indicating the number of
rows and columns and a feed forward velocity flag. Comma separated
data values following the header.
motionKernel 3202 0042 In CamTables, the first (master) column must be either increasing or
decreasing.
motionKernel 3202 0043 In ContourTables, the first (time) column must start at zero and be
increasing.
motionKernel 3202 0044 The master position was outside the range of the CamTable, which auto-
matically stopped the cam motion.
motionKernel 3202 0045 One or more slave axes could not attain the target position and velocity
within the user specified time limit for the Cam or Gear motion.
motionKernel 3202 0046 One or more slave axes could not attain the target position and velocity
within the user specified distance limit for the Cam or Gear motion.
motionKernel 3202 0051 Axis enable failed. This problem is usually a result of communication prob-
lems with the servo drive.
motionKernel 3202 0052 Runtime computation detected an invalid motion parameter. This alarm
ID can occur if a discrete move has to be completed but the commanded
deceleration for that move is not sufficient. For example if a MC_MoveAb-
solute aborts another move and the axis has to stop at a position that will
come up in a couple of scans, but the deceleration input on the MC_
MoveAbsolute is not high enough to make the desired profile, this alarm
will occur.
motionKernel 3202 0061 The axis Positive Overtravel (P-OT) limit has been exceeded. Motion is pre-
vented in the positive direction. The axis may not be moved again until the
alarm condition is cleared.
motionKernel 3202 0062 The axis Negative Overtravel (N-OT) limit has been exceeded. Motion is
prevented in the negative direction. The axis may not be moved again
until the alarm condition is cleared.
motionKernel 3202 0100 The inverse kinematics computation detected a world position that can not
be reached.
motionKernel 3202 0101 The inverse kinematics computation detected that the elbow 'handedness'
(orientation) does not match the configuration. The 'handedness' must be
fixed by commanding the individual axes or manually moving the robot.
motionKernel 3202 0102 The robot XY position intruded into the configured dead zone area near
the origin.
Mechatrolink 3301 0009 Some motor properties, such as encoder resolution, maximum speed, and

Page 742 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
maximum torque, could not be determined for the attached motor. The
serial encoder may be malfunctioning, incorrectly programmed, or
unplugged.
Mechatrolink 3301 000B Setting of Pn002, digits 3 and 4, disables torque limit and/or velocity limit
in velocity and/or torque control modes. Set Pn002 = xx11 to initialize.
Saving in the Hardware Configuration will automatically set Pn002.
Mechatrolink 3301 000D The servo network does not support this motion control mode.
Mechatrolink 3301 0018 The command position specified an instantaneous jump too large relative
to the current position. Sigma-5 amplifiers give an A.94b warning and
ignore subsequent position commands for any absolute position reference
greater than 2,097,152 encoder pulses (2 revolutions of a 20-bit
encoder). The controller watches for deviation between command pos-
ition and actual motor position greater than 1,966,080 encoder pulses
and issues an alarm. This is at 1.875 revolutions of a 20-bit motor little
bit of margin. Sigma-II/III drives have a lower maximum following error
limit of 1,048,576 encoder pulses. The position error limit on the Ser-
vopack (Pn520) should not be set greater than 1.875 rev = 1,966,080.
Mechatrolink 3301 0019 Setting of Pn002 digit 4 specifies torque feed-forward, but the
SERVOPACK model does not support torque FF in position mode.
Mechatrolink 3302 00E4 The setting of the MECHATROLINK-II transmission cycle is out of the allow-
able range.
Mechatrolink 3304 0000 The base code for io alarms. The io's alarm value is bitwise OR'd in with
this base value.
DPRAM 3309 0009 An error occurred sending command to a servo
DPRAM 3309 000A The drive has an alarm
DPRAM 3309 000B The data buffer for reading drive parameters via the messaging interface
was too small
DPRAM 3309 1000 Error code prefix for data link errors
DPRAM 3309 100F Servo check sum error for data link
DPRAM 3309 1010 Invalid function code for data link
DPRAM 3309 1040 Option card computed an invalid check sum
DPRAM 3309 1041 Invalid data size from the option card
DPRAM 3309 2000 Error code prefix for message errors
DPRAM 3309 2001 Unsupported message function code
DPRAM 3309 20A0 Controller option card detected bad CRC
DPRAM 3309 3000 Error code prefix for data link errors
Mechatrolink 3312 0000 The base code for inverter alarms. The inverter's alarm value is bitwise
OR'd in with this base value.
Mechatrolink 3312 00EC Power reset required.
Mechatrolink 3312 00ED (Access not possible 10 consecutive times). Power reset required.
Mechatrolink 3312 00EE (1s elapsed). Power reset required.
app 3401 0001 The user script encountered an alarm, suspending its operation.
app 3401 0002 Script syntax errors are detected before the script is actually executed,
during the pre-compile phase. The syntax must be corrected before the
script can be run successfully.
app 3401 0003 Script runtime errors can be caused by a variety of incorrect script
routines. The most common error is an attempt to use a 'nil' object where
it should not be used.

Page 743 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 3401 0004 The system could not find the file specified.
app 3401 0011 A data value argument provided to the API function was out of the expec-
ted range.
app 3401 0012 An argument provided to the API function was not the expected type.
app 3401 0013 An object argument provided to the API function was not the expected
object type.
app 3401 0014 A scalar value was provided where a vector was expected, or a vector
value was provided where a scalar was expected.
app 3401 0015 The script attempted to write to a read-only variable.
app 3401 0016 Use of that API function is not permitted with the current conditions
and/or arguments.
app 3401 0017 The number of data values provided did not match the expected number
of axes.
app 3401 0018 CamTable must have a header indicating the number of rows and columns
and a feed forward velocity flag. Comma separated data values follows the
header. The first (master) column must be either increasing or decreas-
ing.
app 3401 0019 ContourTables must have a header indicating the number of rows and
columns and a feed forward velocity flag. Comma separated data values
follow the header. In ContourTables, the first (time) column must start at
zero and be increasing.
app 3401 001A It is prohibited to start a torque (or velocity) move when any moves other
than torque moves (or velocity moves) are currently in progress or
queued.
app 3401 00ED 'LastMove' events should be detected when a move completes normally or
is aborted. However, the controller detected a situation in which the move
finished but the event did not occur. Please submit an SCR.
communication 3403 0200 Invalid EtherNet/IP I/O configuration. Common causes of invalid con-
figuration include duplicate t2o/o2t assembly instances or invalid client
connection parameters.
communication 3403 0202 EtherNet/IP remote server unreachable. There is no route to the Ether-
Net/IP server. Common causes include: invalid remote server address,
invalid gateway, invalid subnet mask, or the Ethernet network is not cor-
rectly configured.
communication 3403 0203 EtherNet/IP remote server unreachable. There is no route to the Ether-
Net/IP server. Common causes include: invalid remote server address,
invalid gateway, invalid subnet mask, or the Ethernet network is not cor-
rectly configured.
communication 3403 0204 EtherNet/IP network unreachable. Unable to reach the network for the
EtherNet/IP server. Common causes include: invalid remote server
address, invalid gateway, invalid subnet mask, or the Ethernet network is
not correctly configured.
communication 3403 0205 EtherNet/IP connection refused. Remote server rejected connection
attempt. The remote server may not be listening for connections or there
may be a firewall preventing the connection.
communication 3403 0206 Too many EtherNet/IP connections. The Ethernet/IP client ran out of con-
nection slot resources. Reduce the number of concurrent client con-
nections.
communication 3403 0302 Error connecting to the Modbus TCP slave. Unable to connect to the Mod-
bus TCP slave. Common causes include: invalid Modbus TCP slave

Page 744 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
address, invalid gateway, invalid subnet mask, or the Ethernet network is
not correctly configured.
communication 3403 0303 Modbus TCP slave unreachable. There is no route to the Modbus TCP
slave. Common causes include: invalid Modbus TCP slave address, invalid
gateway, invalid subnet mask, or the Ethernet network is not correctly
configured.
communication 3403 0304 Modbus TCP network unreachable. Unable to reach the network for the
Modbus TCP slave. Common causes include: invalid Modbus TCP slave
address, invalid gateway, invalid subnet mask, or the Ethernet network is
not correctly configured.
communication 3403 0305 Modbus TCP slave connection refused. Modbus TCP slave rejected con-
nection attempt. The Modbus TCP slave may not be listening for con-
nections or there may be a firewall preventing the connection.
communication 3403 0306
app 3406 0001 A web server login user was assigned to a group which did not exist. The
system is unaffected, but that user will have limited (default) access.
app 3406 0002 The default login group for the web server was assigned to a group which
did not exist. Access control has been disabled, because a minimal
amount of access is required in order to log in. The configuration file
should be fixed before continuing.
app 3406 0003 The web server configuration specified access control should be enabled,
but did not specify at least one path to control access to. Access control
has been disabled. The configuration file should be fixed before con-
tinuing.
app 3407 0002 The base directory for configuration files was missing and has been cre-
ated automatically. The system has booted in a minimal configuration
mode, and most functionality is limited. Please upload a new complete con-
figuration file set.
app 3407 0003 A required default configuration file was missing. A minimal configuration
for the corresponding component has been loaded, and some func-
tionality may be limited.
app 3407 0004 A required default configuration file was incorrectly formatted. A minimal
configuration for the corresponding component has been loaded, and
some functionality may be disabled.
app 3407 0005 A configuration file specified by the user configuration file set was incor-
rectly formatted. The corresponding default configuration file is being
used instead.
app 3407 0006 The file describing which configuration set to use was corrupted. The
default configuration set is being used.
app 3407 0007 An error occurred while writing a config file. The file system may be full or
damaged.
app 3407 0101 The configured RAM disk on the controller was unable to be created.
app 3407 0102 Detected an unsupported option card inserted in the controller.
app 3407 0104 Data in the controller SRAM did not match the expected value. It should be
treated as corrupted until it is re-initialized.
app 3407 0106 The SRAM battery backup power failed. SRAM data should be treated as
corrupted until it is re-initialized.
app 3407 0107 The controller's time-of-day clock detected a voltage decrease in the
backup battery. The current time and date is likely to be incorrect. This
alarm can be cleared, but will recur when the controller is powered ON

Page 745 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
until the time and day is reset and the battery is replaced.
app 3407 0204 Unable to set configured network default gateway
app 3409 0001 The servo network axis node for the axis specified in the configuration file
was not found.
app 3409 0002 Axis enable failed. This problem is usually a result of communication prob-
lems with the servo drive. It may occur after a drive was disconnected
from the network. In this case, use Y_ResetMechatrolink to establish com-
munication with the drives once again.
app 3409 0003 Axis group motion activation failed. Some axes in the group are currently
under control of another group, or motion has been blocked by the user.
app 3409 0004 The motion segment could not be added to the motion queue because it is
already queued.
app 3409 0005 Moves are prohibited when any of the group's axes are disabled, have an
alarm, or are in violation of their soft limits.
app 340A 0001 The source for the logical input was not found, the configured input will
not be available.
app 340A 0002 The source for the logical output was not found, the configured output
will not be available.
app 340A 0003 Two or more axis in the configuration file had the same axis ID.
app 340A 0004 The servo network axis node for the axis specified in the configuration file
was not found.
app 340A 0005 The axis group specified in the configuration file could not be created
because either one or more of its axes are invalid or the group name is
already being used.
app 340A 0006 The type of AtTargetAgent specified in the configuration file is unknown.
This is because AtTargetAgent could not be created.
app 340A 0007 The number of constraints for axis group soft limit must be the same as
the number of axes in the axis group.
app 340A 0008 The axis group doesn't have the configured frame.
app 340A 000B A continuous-wrap range for an axis causes its position to automatically
wrap around between two user-specified numbers. Generally these num-
bers evaluate to full revolutions of the encoder but other ranges are per-
mitted. However, all ranges specified in user units must map exactly to an
integral number of encoder pulses. This alarm indicates that the mapping
from user units to encoder ticks was inexact. Use more precise numbers
to describe the range or choose a different range that evaluates to an
integral number of encoder pulses. When this alarm occurs at startup or
servo-net reset, it indicates that the axis has not been connected to an
axis node and cannot be servoed on. Otherwise, this alarm indicates that
the specified continuous-wrap range was not put into effect.
app 340A 000D Two or more logical outputs specified in the I/O configuration file use the
same physical bit. This can cause writes to not correctly generate value-
change events on logical outputs for the shared bits. The configuration
file should be fixed.
app 340A 000E One or more of the data parameters in the axis configuration file were out-
of-range or otherwise incorrectly specified for the axis. The axis was not
created and is not available.
app 340A 0010 After servo network reset, the Axis failed to reconnect to the servo net-
work. The drive might have been removed from the network, the node ID
of the drive might have changed or there might be a communication prob-

Page 746 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
lem.
app 340A 0012 After servo network reset, the network I/O failed to reconnect to the servo
network. The network I/O module might have been removed from the net-
work, the node ID of the network I/O module might have changed or there
might be a network communication problem.
app 340A 0013 After servo network reset, a new axis node was discovered. This axis node
is not associated with any existing axes and will not be available. To make
this node available, update the configuration and power cycle the con-
troller.
app 340A 0014 After servo network reset, a new I/O node was discovered. This I/O node
is not associated with any existing I/O and will not be available. To make
this node available, update the configuration and power cycle the con-
troller.
app 340A 0017 One or more of the axis data or configuration parameters were incon-
sistent or incompatible with the axis node specified. The axis was created
but was not connected to the servo node.
app 340A 001B Two or more LogicalInput have the same ID. The configuration file should
be fixed.
app 340A 001C Two or more LogicalOutput have the same ID. The configuration file
should be fixed.
app 340A 001D Two or more AnalogInput have the same ID. The configuration file should
be fixed.
app 340A 001E Two or more AnalogOutput have the same ID. The configuration file
should be fixed.
app 340A 001F Analog I/O configuration is missing the 'hardwareConfig' element, and
configuration could not be resolved by the physical hardware. The con-
figuration file should be fixed by adding this element to the analog I/O ele-
ment.
app 340A 0020 One or more axes failed to respond to a servo-off command during a sys-
tem I/O initiated abort. This is normally the result of communication prob-
lems with the drive, which also causes an automatic servo-off.
app 340A 0022 Reset of a servo node failed.
app 340A 0023 The axis position may not be valid because the persistent axis data was
corrupted. SRAM should be reinitialized and the axis should be homed.
app 340C 0001 Time limit exceeded.
app 340C 0002 Distance limit exceeded.
app 340C 0003 Torque limit exceeded.
app 340C 0100 Modbus TCP I/O Driver Error on Server because of invalid address range
app 340C 0101 MBTCP Client I/O driver, MBTCP Connection config is missing input mem-
ber
app 340C 0102 I/O memory area is not aligned to the correct byte to accommodate read-
ing and writing.
app 340C 0103 Watchdog Error
app 340C 0104 Reserved
app 340C 0106 Reserved
app 340C 0107 Reserved
app 340C 0108 Reserved
app 340C 0109 Reserved
app 340C 010A Not enough memory on PLC for POU during insertion. Project size must be

Page 747 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
reduced.
app 340C 010B Internal PLC Error in memory management. This error can occur if an
older project was loaded on the controller which was compiled to use lees
of the controllers total memory space. By using the "Resource" Dialog
box, perform "Delete On target," for the bootproject, and then download
the application code again.
app 340C 010C Internal PLC Error: POU invalid
app 340C 010D Internal PLC Error: Unknown POU type
app 340C 010E Cannot insert a POU because there is no project.
app 340C 010F Internal PLC Error: Cannot insert a POU because it does not belong to the
project.
app 340C 0110 Internal PLC Error: Cannot insert a POU.
app 340C 0111 Internal PLC Error: Invalid POU type
app 340C 0112 Internal PLC Error: Memory reorganization not possible; PLC stopped.
app 340C 0113 Internal PLC Error: SPG defined more than once.
app 340C 0114 Internal PLC Error: Memory error for initialized data of POU.
app 340C 0115 Internal PLC Error: Retain CRC failed. Possible reasons: (1) actual project
does not have any retain data, (2) actual project is 'old style' without
retain CRC (3) PLC isn't in STOP mode
app 340C 0116 Internal PLC Error: FB defined more than once.
app 340C 0117 Internal PLC Error: Not all POU sent.
app 340C 0118 Internal PLC Error: No program memory defined.
app 340C 0119 Internal PLC Error: Invalid FB number.
app 340C 011A Internal PLC Error: Invalid PG number.
app 340C 011B Internal PLC Error: Invalid SPG number.
app 340C 011C POU uses more than 80 percent of POU memory.
app 340C 011D Project uses more than 80 percent of program memory.
app 340C 011E Internal PLC Error: Invalid function or function block.
app 340C 011F Internal PLC Error: Invalid firmware function or function block.
app 340C 0120 Internal PLC Error: Invalid program.
app 340C 0121 Internal PLC Error: Invalid change of mode.
app 340C 0122 Internal PLC Error: Unknown system mode! PLC stopped!
app 340C 0123 Stack overflow. Increase stack size.
app 340C 0124 System error in module. Check debugging output via controller's web
interface.
app 340C 0125 System error in module. Check debugging output via controller's web
interface.
app 340C 0126 Internal PLC Error: Error during indirect variable access.
app 340C 0127 PLC CPU overload.
app 340C 0128 Internal PLC Error: Breakpoint unexpected.
app 340C 0129 Internal PLC Error: Error in data configuration.
app 340C 012A Internal PLC Error: Error in retain data configuration.
app 340C 012B Internal PLC Error: Floating point error.
app 340C 012C Internal PLC Error: Fatal error.
app 340C 012D Output string is too short.
app 340C 012E Input string is too short.

Page 748 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 340C 012F Invalid input parameter 'p' or 'l' (position or length).
app 340C 0130 String is identical to the output string.
app 340C 0131 Invalid string comparison.
app 340C 0132 Invalid data type for string conversion.
app 340C 0133 Error in format string.
app 340C 0134 Error during string conversion.
app 340C 0135 Error in I/O configuration.
app 340C 0136 Initializing I/O driver failed.
app 340C 0137 Board not instantiated.
app 340C 0138 Board number not allowed.
app 340C 0139 Input Group doesn't fit.
app 340C 013A Output Group doesn't fit.
app 340C 013B Board not found.
app 340C 013C Error reading inputs.
app 340C 013D Error writing outputs.
app 340C 013E Error creating I/O semaphore.
app 340C 013F Invalid memory size.
app 340C 0140 Invalid I/O memory address.
app 340C 0141 Internal PLC Error: PG defined more than once.
app 340C 0142 POU exceeds 64K module size during insertion. POU size must be
reduced.
app 340C 0143 Internal PLC Error: Error in task configuration.
app 340C 0143 Unknown I/O Driver.
app 340C 0200 Ethernet/IP I/O driver not initialized: change configuration to include Eth-
ernet/IP driver.
app 340C 0201 Modbus/TCP I/O driver not initialized: change configuration to include
Modbus/TCP driver.
app 340C 0201 PLC Controller initialization failed.
app 340C 0202 Modbus/TCP I/O driver ran out of resources. This can be caused by using
too many poll blocks per server.
app 340C 0202 PLC Domain initialization failed.
app 340C 0203 PLC Communication server initialization failed.
app 340C 0204 PLC initialization failed.
app 340C 0205 PLC System Error.
app 340C 0206 Unspecified PLC Error. Could be divide by zero in application code?
app 340C 1028 The driver parameter specified in the axis configuration caused an excep-
tion
app 340C 1029 The driver parameter did not match the axis configuration
app 340C 1030 The configured axis count exceeded the allowable limit.
app 340C 1031 The axis count exceeded the allowable limit due to an auto-detected axis.
app 340C 1033 Using an incompatible version of the PLCopenPlus firmware function block
library may result in controller instability. Consequently, the PLC applic-
ation will not be allowed to run. Please change either the controller's firm-
ware or the firmware function block library.
app 340C 1110 All motion error codes are in the range from 0x1111 to 0x111f.
app 340C 1111 The move could not be buffered because the motion queue for that axis is
full.

Page 749 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 340C 1112 The move could not be started because motion is prohibited.
app 340C 1113 The servo drive failed to enable or disable.
app 340C 1114 Drive parameter read/write did not complete.
app 340C 1115 Drive parameter read/write failed
app 340C 1116 Torque move prohibited while non-torque moves queued or in progress.
app 340C 1117 Y_CamOut called while not camming.
app 340C 1118 The master slave relationship can not be modified because the master
axis has not been set yet.
app 340C 1119 Y_CamFileSelect can not open a second cam table while the first cam table
is still being opened.
app 340C 111A The function block can not command an external axis.
app 340C 111B The homing sequence is already in progress.
app 340C 111C MC_SetPosition can not be called while the axis is moving.
app 340C 111D Motion aborted due to axis alarm.
app 340C 111E MC_SetPosition can not set the position to be outside the configured wrap
range (Machine Cycle).
app 340C 111F Can not transition to homing state; must be in StandStill state first.
app 340C 1120 Clear alarms is already in progress.
app 340C 1121 Axis reset is already in progress.
app 340C 1122 Mechatrolink reset is already in progress.
app 340C 1123 Y_CamStructSelect cannot transfer a second cam structure while the first
cam structure is being transferred.
app 340C 1124 Y_ReadCamTable cannot be read a second cam structure while the first
cam structure is being read.
app 340C 1125 Y_WriteCamTable cannot write a second cam structure while the first cam
structure is being written.
app 340C 1126 MC_SetPosition cannot be called while either the master or slave axis is
camming.
app 340C 1127 The function block can not be used with a virtual axis.
app 340C 1128 The function block can not be used with an inverter axis.
app 340C 1129 Y_VerifyParmeters and Y_WriteParameters can not be called a second
time while the first one is in progress.
app 340C 1210 All error codes for structures are in the range from 0x1211 to 0x121f.
app 340C 1211 Axis ID does not correspond to an axis.
app 340C 1212 The master slave relationship is not defined.
app 340C 1213 The input reference does not correspond to a real input
app 340C 1214 The output reference does not correspond to a real output.
app 340C 1215 The input/output number does not correspond to a real input or output
bit.
app 340C 1216 Trigger reference is not valid.
app 340C 1217 The cam switch structure is not valid.
app 340C 1218 The track structure is not valid.
app 340C 1219 Table size results in misaligned data.
app 340C 121A Buffer size results in misaligned data.
app 340C 121B Table type is not supported.
app 340C 121C Invalid start index.

Page 750 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 340C 121D Invalid end index.
app 340C 1220 All error codes for invalid enumeration values are in the range from
0x1221 to 0x122f.
app 340C 1221 'BufferMode' does not correspond to a valid enumeration value.
app 340C 1222 'Direction' does not correspond to a valid enumeration value.
app 340C 1223 'StartMode' does not correspond to a valid enumeration value.
app 340C 1224 'ShiftMode' does not correspond to a valid enumeration value.
app 340C 1225 'OffsetMode' does not correspond to a valid enumeration value.
app 340C 1226 'Mode' does not correspond to a valid enumeration value.
app 340C 1227 'SynchMode' does not correspond to a valid enumeration value.
app 340C 1228 'Parameter' does not correspond to a valid enumeration value.
app 340C 1229 'AdjustMode' does not correspond to a valid enumeration value.
app 340C 122A 'RampIn' does not correspond to a valid enumeration value.
app 340C 122B 'ControlMode' does not correspond to a valid enumeration value.
app 340C 1230 All error codes for range errors are from 0x1221 to 0x122f.
app 340C 1231 Distance parameter is less than zero.
app 340C 1232 Velocity parameter is less than or equal to zero.
app 340C 1233 Acceleration is less than or equal to zero.
app 340C 1234 Deceleration is less than or equal to zero.
app 340C 1235 Torque is less than or equal to zero.
app 340C 1236 Time is less than or equal to zero
app 340C 1237 Specified time was less than zero.
app 340C 1238 Specified scale was less than or equal to zero.
app 340C 1239 Velocity is negative.
app 340C 123A Denominator is zero.
app 340C 123B Jerk is less than or equal to zero.
app 340C 123C TorqueRamp is less than or equal to zero.
app 340C 123D Engage position is outside the table domain.
app 340C 123E Negative engage width.
app 340C 123F Disengage position is outside the table domain.
app 340C 1240 Negative disengage width.
app 340C 1241 StartPosition is outside of master's range.
app 340C 1242 EndPosition is outside of master's range.
app 340C 1310 All error codes for invalid input data range from 0x1211 to 0x121f.
app 340C 1311 The specified Pn does not exist.
app 340C 1312 The mask does not correspond to valid tracks.
app 340C 1313 The profile must start with relative time equal to zero, and the time must
be increasing.
app 340C 1314 The specified cam file does not exist.
app 340C 1315 Invalid header for the cam file. Cam tables must have a header indicating
the number of rows, number of columns and a feed forward velocity flag
app 340C 1316 The first (master) column must be either increasing or decreasing.
app 340C 1317 Cam table reference does not refer to a valid cam table.
app 340C 1318 The engage phase exceeded the time limit. Slave axis could not attain the
target position and velocity within the user specified time limit.
app 340C 1319 The engage phase exceeded the distance limit. Slave axis could not attain
the target position and velocity within the user specified master distance.

Page 751 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 340C 131A Invalid width input. Width is an enumeration type with the following allow-
able values 'WIDTH_8'=0, 'WIDTH_16'=1, and 'WIDTH_32'=2.
app 340C 131B The slave axis can not be the same as the master axis.
app 340C 131C Default drive parameter info is not available for this parameter.
app 340C 131D Invalid external axis.
app 340C 131E Invalid virtual axis.
app 340C 131F File extension is not recognized or missing.
app 340C 1320 Could not find the axis parameter file.
app 340C 2110 All log error codes are in the range from 0x2111 to 0x211f.
app 340C 2111 Adding log items or setting up log is not possible because the data log is
already set up.
app 340C 2112 Starting or stopping logging is not possible because the data log is not set
up.
app 340C 2113 Invalid handle for user log item.
app 340C 2114 Data log can not be created because too many data logs are in use.
app 340C 2115 Invalid handle for data log.
app 340C 2116 A user log item can only support eight iputs for each type.
app 340C 2117 Saving the log failed.
app 340C 2300 Invalid group handle
app 340C 2301 An axis is already owned by another group
app 340C 2302 Group activation is blocked
app 340C 2303 Invalid coordinate system
app 340C 2304 Move prohibited because group has an alarm
app 340C 2305 Group activation prohibited, invalid axis/joint config
app 340C 2306 Group activation prohibited, mismatched axis command position
app 340C 2307 The group reports one or more of its axes has an error.
app 340C 2308 Axis group reset is already in progress.
app 340C 2309 Invalid circular path method
app 340C 230A Invalid circular path direction
app 340C 230B Invalid circle geometry
app 340C 230C Grouped axis is disabled.
app 340C 230D Invalid transition mode.
app 340C 230E Invalid transition parameter.
app 340C 230F Invalid transition geometry. The values for the acceleration, deceleration,
and/or velocity of the transition yield an invalid geometry. Can't create the
corner geometry to meet the specification.
app 340C B114 Failed to send clear alarms command.
app 340C B115 Failed to reset Mechatrolink.
app 340C B116 Mechatrolink reset is prohibited while axes are moving.
app 340C B117 Failed to initialize absolute encoder.
app 340C E110 All error codes for ProConOS errors range from 0xE111 to 0xE11f.
app 340C E111 Instance object is NULL.
app 340C E112 The instance data is NULL.
app 340C E113 The structure pointer check sum is invalid.
app 340C E114 The structure size does not match.
app 340C EDED This function block was implemented in a later firmware version. If you
would like to use this function block, then the controller must be updated.

Page 752 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 340C F110 All error codes for kernel errors range from 0xF111 to 0xF11f.
app 340C F111 An internal assertion in the motion kernel failed indicating the controller is
not in a stable state. This error should be reported to Yaskawa Electric
America.
app 340D ???? User generated alarm via the Y_PostUserAlarm FB in IEC6131 code.
user 3501 0000 A user script task posted an alarm directly.
motionKernel 4202 0001 The command position will soon reach the allowable range for the axis in
the positive direction (positive overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed
region will re-trigger the alarm.
motionKernel 4202 0002 The command position will soon reach the allowable range for the axis in
the negative direction (negative overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed
region will re-trigger the alarm.
motionKernel 4202 0003 The command speed will soon reach the allowable range for the axis in the
positive direction (overspeed). The axis may not be moved again until the
alarm condition is cleared.
motionKernel 4202 0004 The command speed will soon reach the allowable range for the axis in the
negative direction (overspeed). The axis may not be moved again until the
alarm condition is cleared.
motionKernel 4202 0005 The command acceleration will soon reach the allowable range for the axis
in the positive direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0006 The command acceleration will soon reach the allowable range for the axis
in the negative direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0007 The command torque will soon reach the allowable range for the axis in
the positive direction (overtorque). The axis may not be moved again until
the alarm condition is cleared.
motionKernel 4202 0008 The command torque will soon reach the allowable range for the axis in
the negative direction (overtorque). The axis may not be moved again
until the alarm condition is cleared.
motionKernel 4202 0011 The command position will soon reach the allowable range for the axis in
the positive direction (positive overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed
region will re-trigger the alarm.
motionKernel 4202 0012 The command position will soon reach the allowable range for the axis in
the negative direction (negative overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed

Page 753 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
region will re-trigger the alarm.
motionKernel 4202 0013 The command speed will soon reach the allowable range for the axis in the
positive direction (overspeed). The axis may not be moved again until the
alarm condition is cleared.
motionKernel 4202 0014 The command speed will soon reach the allowable range for the axis in the
negative direction (overspeed). The axis may not be moved again until the
alarm condition is cleared.
motionKernel 4202 0015 The command acceleration will soon reach the allowable range for the axis
in the positive direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0016 The command acceleration will soon reach the allowable range for the axis
in the negative direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0017 The command torque will soon reach the allowable range for the axis in
the positive direction (over torque). The axis may not be moved again
until the alarm condition is cleared.
motionKernel 4202 0018 The command torque will soon reach the allowable range for the axis in
the negative direction (over torque). The axis may not be moved again
until the alarm condition is cleared.
motionKernel 4202 0021 The command position will soon reach the allowable range for the axis in
the positive direction (positive overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed
region will re-trigger the alarm.
motionKernel 4202 0022 The command position will soon reach the allowable range for the axis in
the negative direction (negative overtravel). The axis may not be moved
again until the alarm condition is cleared. After the alarm is cleared, it is
permissible to execute a move which brings the axis back toward the
allowed region, even though the axis is probably still outside the allowed
region. Any move which pulls the axis further away from the allowed
region will re-trigger the alarm.
motionKernel 4202 0023 The command speed will soon reach the allowable range for the axis in the
positive direction (over speed). The axis may not be moved again until the
alarm condition is cleared.
motionKernel 4202 0024 The command speed will soon reach the allowable range for the axis in the
negative direction (over speed). The axis may not be moved again until
the alarm condition is cleared.
motionKernel 4202 0025 The command acceleration will soon reach the allowable range for the axis
in the positive direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0026 The command acceleration will soon reach the allowable range for the axis
in the negative direction. The axis may not be moved again until the alarm
condition is cleared.
motionKernel 4202 0027 The command torque will soon reach the allowable range for the axis in
the positive direction (over torque). The axis may not be moved again
until the alarm condition is cleared.
motionKernel 4202 0028 The command torque will soon reach the allowable range for the axis in
the negative direction (over torque). The axis may not be moved again
until the alarm condition is cleared.

Page 754 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
Mechatrolink 4301 000A The SERVOPACK model type was unable to be determined. This can indic-
ate that some parameters may be incorrect.
Mechatrolink 4301 000C The controller was unable to send the drive command because servo net-
work resources were allocated to motion. Brake on, brake off, absolute
encoder initialization and alarm clear can only be sent when not moving.
Mechatrolink 4301 001C The Mechatrolink.xml file specified duplicate configuration structures for
a node. The first match was used, subsequent matches were ignored.
Mechatrolink 4301 001D The Mechatrolink.xml file specified duplicate default configuration struc-
tures for a node type. The first default structure was used, subsequent
structures were ignored.
Mechatrolink 4301 001E A node was detected on the Mechatrolink network, but it is not supported
by the software.
Mechatrolink 4301 001F The Mechatrolink comm board inverter control reference/run control is
not enabled. Change the settings in parameters b1-01 and b1-02 to '3' to
select PCB reference/run source.
Mechatrolink 4301 0020 The drive returned an invalid watch dog code indicating a possible
dropped communication packet.
Mechatrolink 4302 0000 The base code for Sigma-II drive warnings. The drive's warning value is
bitwise OR'd in with this base value.
Mechatrolink 4302 0091 This warning occurs before the overload alarms (A.710 or A.720) occur.
If the warning is ignored and operation continues, an overload alarm may
occur.
Mechatrolink 4302 0092 This warning occurs before the regenerative overload alarm (A.32)
occurs. If the warning is ignored and operation continues, a regenerative
overload alarm may occur.
Mechatrolink 4302 0093 This warning occurs when the absolute encoder battery voltage is
lowered. Continuing the operation in this status may cause an alarm.
Mechatrolink 4302 0094 A value outside the setting range was set using MECHATROLINK-II com-
munications.
Mechatrolink 4302 0095 A command not supported in the product specifications was sent, OR the
command reception conditions were not met.
Mechatrolink 4302 0096 A communications error occurred (once).
Mechatrolink 4303 0000 The base code for Sigma-III drive warnings. The drive's warning value is
bitwise OR'd in with this base value.
Mechatrolink 4303 0900 Position error pulse exceeded the parameter settings (Pn520 x
Pn51E/100).
Mechatrolink 4303 0901 When the servo turned ON, the position error pulses exceeded the para-
meter setting (Pn526 x Pn528/100).
Mechatrolink 4303 0910 This warning occurs before the overload alarms (A.710 or A.720) occur.
If the warning is ignored and operation continues, an overload alarm may
occur.
Mechatrolink 4303 0911 Abnormal vibration at the motor speed was detected. The detection level
is the same as A.520. Set whether to output an alarm or warning by
"Vibration Detection Switch" of Pn310.
Mechatrolink 4303 0920 This warning occurs before the regenerative overload alarm (A.320)
occurs. If the warning is ignored and operation continues, a regenerative
overload alarm may occur.
Mechatrolink 4303 0930 This warning occurs when the absolute encoder battery voltage is
lowered. Continuing the operation in this status may cause an alarm.

Page 755 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
Mechatrolink 4303 0941 The change of the parameters can be validated only after turning the
power ON from OFF.
Mechatrolink 4303 094A Incorrect command parameter number was set.
Mechatrolink 4303 094B Command input data is out of range.
Mechatrolink 4303 094C Calculation error was detected.
Mechatrolink 4303 094D Data size does not match.
Mechatrolink 4303 095A Command was sent though command sending condition was not satisfied.
Mechatrolink 4303 095B Unsupported command was sent.
Mechatrolink 4303 095C Command condition is not satisfied for parameter settings.
Mechatrolink 4303 095D Command, especially latch command, interferes.
Mechatrolink 4303 095E Subcommand and main command interfere.
Mechatrolink 4303 0960 Communications error occurred during MECHATROLINK communications.
Mechatrolink 4304 0000 The base code for io warnings. The io's warning value is bitwise OR'd in
with this base value.
DPRAM 4309 1000 Error code prefix for data link errors
DPRAM 4309 1011 Invalid register
DPRAM 4309 1012 Value exceeded data limit
DPRAM 4309 1013 Data math error
DPRAM 4309 1014 Register number and data size do not agree
DPRAM 4309 1015 Invalid data size
DPRAM 4309 1030 Servo and option card accessed data link channel at the same time
DPRAM 4309 10FF Unknown data link error
DPRAM 4309 2000 Error code prefix for message errors
DPRAM 4309 2002 Invalid register
DPRAM 4309 2003 Message size and data quantity do no match
DPRAM 4309 2030 Invalid register
DPRAM 4309 2031 Register access not allowed
DPRAM 4309 2032 Setting value is out of range
DPRAM 4309 2033 Messaging accessed only part of a register group or spanned register
groups
DPRAM 4309 2034 Message command could not be processed because pre-conditions have
not been met
DPRAM 4309 2035 Command processing is not possible due to conflict
DPRAM 4309 20A1 Controller option card received an empty message response
Mechatrolink 4312 0000 The base code for inverter warnings. The inverters warning value is bit-
wise OR'd in with this base value.
app 4401 0008 Each call to groupAxes() must be matched by a corresponding call to
ungroupAxes(). If a script exits without such a matching call (thus leav-
ing an 'orphaned' group behind), this warning is issued. Clearing the
warning also ungroups the orphaned group.
app 4401 0009 The debug stack trace was longer than expected. It may be clipped.
app 4403 0001 The event queue for the remote client was full, and an event was dropped.
This is generally caused either by exceeding the network bandwidth or
exceeding the general system processing power (starving the con-
nection). When an event is dropped in this manner, the connection is ter-
minated.
app 4403 0005 An RMI connection was attempted by an external client and rejected due
to the concurrent connection limit.

Page 756 of 757


Hex Code Description
ErrorClass AxisErrorID ErrorClass+AxisErrorID output from MC_ReadAxisError
(UINT) (UINT)
GroupErrorID
(UINT)
AlarmID (UDINT) AlarmID output from Y_ReadAlarm
app 4407 0001 The configuration file directory is read-only or resides on a read-only file
system. Attempts to update the configuration or create directories will
fail.
app 4407 0002 An attempt was made to write to a read-only configuration file. The write
failed.
app 4407 0105 There was an indication that the SRAM battery backup power may have
failed temporarily. SRAM data may have been compromised.
app 4408 0001 The alarm history was configured to use NVRAM storage, but either the
available NVRAM was not sufficient to contain the configured buffer size,
or the configured buffer size was not large enough to contain the con-
figured number of records. The alarm history will contain fewer records
than configured.
app 4408 0002 The alarm history was configured to use NVRAM storage and the data was
found to be corrupted. The alarm history has been lost. NOTE: this alarm
also occurs if the configured size of the alarm history has been changed.
app 440A 000C The position and torque scales specified in the configuration file have dif-
ferent signs. As a result, a positive acceleration results in a negative
torque, and position limits are opposite in sign as the torque limits.
app 440A 000F The axis was temporarily disconnected from the servo network during
reset. During this time, the feedback data is not valid and the axis cannot
be moved.
app 440A 0011 The network I/O was temporarily disconnected from the servo network
during reset. During this time, any network I/O state change will be unob-
servable to the controller.
app 440A 0019 The system was rebooted by the user.
app 440A 001A The system failed to shut down gracefully during a reboot, although the
reboot did occur. This does not necessarily indicate that the software is
damaged.
app 440B 0001 The controller is running out of memory. Memory should be freed as soon
as possible. Try closing connections to the controller or stopping scripts.
app 440B 0003 The largest free memory block is approaching the critical level. Memory
should be freed as soon as possible. Try closing connections to the con-
troller or stopping scripts.
Axes Group 440C 0103 Unable to add AxesGroup to groupIODriver. Check the validity of the
AXES_GROUP_REF.Handle.
app 440C 0105 Reserved
app 440C 0207 If the minor version on the controller is less than the one in the IDE, then
some function blocks will not be supported. However, since the major ver-
sion matches, those that are supported have identical interfaces.
app 440C 1032 The configuration file version is not compatible with the fimware version.
Please use the configuration tool to update the configuration files to match
the firmware version.
app 440C 1034 Some function blocks are not supported by the controller firmware. If
these function blocks are used in the PLC application, then their ErrorID
will always equal 60909. If these function blocks are needed, then please
upgrade the controller's firmware.
app 4501 0000 A user script task posted a warning directly.

Page 757 of 757

You might also like