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
Содержание JVM-407B-HMI
Страница 1: ...User Manual JVM 407B HMI 60879892 We automate your success...
Страница 14: ......
Страница 26: ...26 Jetter AG 2 Product description and design Rear view...
Страница 34: ......
Страница 80: ......
Страница 98: ...98 Jetter AG 5 Initial commissioning Initial commissioning in JetViewSoft see page 86 Related topics...
Страница 106: ......
Страница 144: ......
Страница 168: ......
Страница 178: ......
Страница 182: ......
Страница 196: ...196 Jetter AG 10 Programming If Merker1 Then Inc Status_LEDs Delay T 100ms End_If End_Loop End_Task...
Страница 220: ...220 Jetter AG 10 Programming Topic Page Programming 221 Registers 233 Sample programs 238 Contents...
Страница 258: ......
Страница 268: ......
Страница 274: ......
Страница 294: ...294 Jetter AG Appendix Rear view...
Страница 299: ......