Schneider Electric IP67 Computer Hardware User Manual


 
Software Tools
1606218 02 08/2006 121
(*request*)
READ_VAR(ADR#y.1.SYS,'SDO', _
Index_dw,Node_Id,Diag0:120,Status1:4);
END_IF;
Programmed
SDO Request:
Example 2
This example shows the program for saving parameters with object 1010H. The data
to be sent is contained in the table Diag0:4 (defined below).
Variables used and parameters of the function
Program
Slave_add:=2 (*node at address 2 on the CANopen network*)
Index:=16#1000; (*index 1000H*)
Sub_index:=0; (*sub-index 0*)
Diag0:=16#6173; (*'as'*)
Diag0[1]:=16#6576; (*'ev'*)
IF write_sdo THEN
(*clear control*)
write_sdo:=FALSE;
(*Parameter update*)
Variable Type Description
Write_sdo Boolean Request launch bit.
Index Word Index of the object to poll (LSB of the double word
"Index_dw").
Sub-index Word Sub-index of the object to poll (MSB of the double
word "Index_dw").
Slave_add Word Address of the slave to poll.
Diag0:120 Word table Data exchange area.
Status0:4 Word table Control and exchange status words.
ADR#y.SYS Immediate value Master board address.
‘SDO’ Character string Type of SDO object (SDO always in upper case).
Index_dw Double word MSB = sub-index.
LSB = index.
Node_Id Word Word or value identifying the destination device
on the CANopen bus.