<< Prev        Next >>

ID : 7873

Create Input and Output Global Variables

On your PLC, create a global variable to communicate with a robot controller.

The following shows how to create a global variable.

1

In the [Solution Explorer] tab, right-click [GVLs] folder.

Click [Add] - [Global Variable List...].

2

Enter any name and click [Open].

[Global Variable List] is created.

3

Double-click [Global Variable List] just created, delete the first line of the code.

4

Between "VAR_GLOBAL" and "END_VAR", declare global variables for input and output.

Both input and output global variables must be declared as array type of 256 bytes.

VAR_GLOBAL
   Any input variable name AT %I* : ARRAY[0..255] OF BYTE;
   any output variable name AT %Q* : ARRAY[0..255] OF BYTE;
END_VAR

5

Build the created global variables.

In the [BUILD] tab, click [Build Solution].

6

"PlcTask Inputs" and "PlcTask Outputs" are created in the [Instance] folder.

 

This completes the creation of input and output global variables.

ID : 7873

<< Prev        Next >>