Jetter AG
121
JVM-407B
CANopen® STX API
In the following example, the heartbeat time is entered in the CANopen®
object directory of the device with the addressed node ID.
Const
CANNo =
0
;
// Number of the bus line
NodeID_Node_0 =
10
;
// Node ID of node 1
NodeID_Node_0 =
68
;
// Node ID of node 2
End_Const
;
Var
busy: Int;
Heartbeat_time: Int;
Objectindex: Word;
Subindex: Byte;
Result: Int;
End_Var
;
Task
Example_DownloadSDO
autorun
Var
SW_Version: String;
End_Var
;
SW_Version :=
'v4.3.0.2004'
;
// Initializing CAN 0
CanOpenInit(CANNo,
// Number of the bus line
NodeID_Node_0,
// Device ID of the node
SW_Version);
// Manufacturer's software version
// Setting the node with ID NodeID_Node_1 on the CAN bus to
// PREOPERATIONAL state
CanOpenSetCommand(CANNo, CAN_CMD_NMT_Value(NodeID_Node_1,
CAN_CMD_NMT), CAN_NMT_PREOPERATIONAL);
// Changing the heartbeat time of the addressed device via SDO
Objectindex :=
0x1017
;
Subindex :=
0
;
Result:= CanOpenDownloadSDO(CANNo,
// Number of the bus line
NodeID_Node_1,
// Node ID
Objectindex,
// wIndex
Subindex,
// SubIndex
CANOPEN_WORD,
// DataType
sizeof
(Heartbeat_time),
// DataLength
Heartbeat_time,
// DataAddr
busy);
// Busy
// Checking the command for successful execution
If
(Result ==
0)
Then
JetSym STX program
Summary of Contents for JVM-407B-HMI
Page 1: ...User Manual JVM 407B HMI 60879892 We automate your success...
Page 14: ......
Page 26: ...26 Jetter AG 2 Product description and design Rear view...
Page 34: ......
Page 80: ......
Page 106: ......
Page 144: ......
Page 168: ......
Page 178: ......
Page 182: ......
Page 258: ......
Page 268: ......
Page 274: ......
Page 294: ...294 Jetter AG Appendix Rear view...
Page 299: ......