Omron NX701-17 Series User Manual page 126

Nj/nx-series, machine automation controller, cpu unit built-in ethercat port
Hide thumbs Also See for NX701-17 Series:
Table of Contents

Advertisement

6 Process Data Communications and SDO Communications
Sample Programming to Check the Validity of the Process Data for
Each Slave
With this sample program, validity of the process data is checked individually for each slave, and the
data inputs and outputs with the salve are controlled.
The slave with which the process data is input and output is given the node address 1 and named
"slave 1".
The _EC_PDSlavTbl (Process Data Communicating Slave Table) system-defined variable is used to
see if the process data inputs and outputs are valid for the slave 1.
If the process data inputs and outputs with the slave 1 are valid, E001_Out_Bit07 changes to TRUE
when E001_In_Bit00 changes to TRUE. Also, when the process data outputs with the slave 1 are
valid, E001_Out_Bit00 changes to TRUE.
 LD
_EC_PDSlavTbl[1]
Slave 1 inputs
Slave_1_inputs_valid
Slave 1 outputs
Slave_1_outputs_valid
 ST
IF _EC_PDSlavTbl[1]=TRUE AND _EC_CommErrTbl[1]=FALSE AND
_EC_SlavErrTbl[1]=WORD#16#0 THEN
A:=TRUE;
ELSE
A:=FALSE;
END_IF;
(* Output valid condition *)
IF A=TRUE THEN
Slav_Out:=TRUE;
ELSE
Slav_Out:=FALSE;
END_IF;
6-8
_EC_CommErrTbl[1]
_EC_SlavErrTbl[1]
WORD#16#0000
E001_In_Bit00
NJ/NX-series CPU Unit Built-in EtherCAT Port User's Manual (W505)
EQ
EN
In1
In2
_EC_InDataInvalid
Slave_1_outputs_valid
Slave_1_inputs_valid
E001_Out_Bit07
E001_Out_Bit00

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents