Sample Programming - Omron NX102 series User Manual

Nx-series; nj-series machine automation controller cpu unit built-in ethercat port
Hide thumbs Also See for NX102 series:
Table of Contents

Advertisement

6-2-2

Sample Programming

This sample uses an EtherCAT communications instruction to read the software version of an OMRON
R88D-KN01L-ECT Servo Drive. The node address of the slave is 1.
The object index for the software version is 16#100A. The subindex is 0. The read value is stored in
STRING variable VersionInfo.
Built-in EtherCAT port
LD
Internal
Variables
Trigger
SdoObject
VersionInfo
EC_CoESDORead_instance
External
Variables
_EC_MBXSlavTbl
Accept trigger.
Trigger
_EC_MBXSlavTbl[1]
Processing after normal end
Trigger EC_CoESDORead_instance.Done
Processing after error end
EC_CoESDORead_instance.Error
Trigger
NJ/NX-series CPU Unit Built-in EtherCAT Port User's Manual (W505)
6 Process Data Communications and SDO Communications
SDO read
Variable
Data type
BOOL
_sSDO_ACCESS
STRING[256]
EC_CoESDORead
V
r a
a i
b
e l
D
a
a t
y t
p
ARRAY[1..192] OF BOOL
(@)MOVE
EN
In
UINT#16#100A
(@)MOVE
EN
USINT#0
In
(@)MOVE
EN
FALSE
In
EC_CoESDORead_instance
EC_CoESDORead
Execute
UINT#1
NodeAdr
SdoObject
SdoObj
UINT#20
TimeOut
ReadDat
VersionInfo
Remote slave node address 1
Object Dictionary Settings
Index: 16#100A
Subindex 0
Initial value
False
(Index:=0, Subindex:=0,
IsCompleteAccess:=False)
''
e
Constant
Message Communications Enabled Slave Table
ENO
Out
SdoObject.Index
ENO
Out
SdoObject.Subindex
ENO
Out
SdoObject.IsComleteAccess
Done
Busy
Error
ErrorID
AbortCode
ReadSize
Inline ST
1 // Processing after normal end
2 ;
Inline ST
1 // Processing after error end
2 ;
Comment
Execution condition
SDO parameter
Read data
C
o
m
m
e
t n
6-21
6

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents