beautypg.com

Example – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 477

background image

PLCopen Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

464

10022

Product or circular buffer overrun / full

10023

Buffer size too small / cannot be zero

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.

Example

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);