beautypg.com

Setup – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 180

background image

Communications Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

167

8726

The serial port ID was not a valid serial port.

8727

The serial port could not be opened.

10022

Product or circular buffer overrun / full

10023

Buffer size too small / cannot be zero

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 controllers 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 mean the user will not be required to manually type in the controllers IP address for each
system deployed.

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 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.