Internally created cam data, Diagram – Yaskawa MotionWorks IEC User Manual

Page 373

Advertising
background image

PLCopenPlus Function Blocks for Motion Control 2013-04-13

365

Internally Created Cam Data

Cam tables can be calculated within the application. The DataType called

Y_MS_CAM_STRUCT

specified in the MotionBlockTypes DataType

worksheet must be used in conjunction with the Y_CamStructSelect
function block. The structure contains two headers to accommodate future
cam file formats.

Notice that the DataSize value shown at the right has a value of
2880. This is the actual size of the cam table in bytes. Since each
element (Master or Slave position value) is an LREAL, each cam point
occupies 16 bytes. This means that the cam table shown below contains
2880/16, or 180 pairs. Also note that the value of DataSize must be less
than or equal to the hard coded array size defined in the DataType
definition for MS_Array_Type. The default size may be changed to
accommodate larger cam tables if desired.

The following is an example of a structured text program that calculates a
modified sine superimposed on a straight line.

Advertising