138
Jetter AG
6 CANopen® STX API
The declaration of the emergency message Rx consists of the following
elements:
CanOpenAddEmergencyRx(
CANNo:Int,
// Number of the bus line
NodeID:Int,
// Node ID
// Status, number of valid messages
ref stCanOpenEmergencyStat:CanOpenEmergencyStat,
// Array holding the emergency messages
ref CanOpenEmergencyMSG:CanOpenEmergencyArray,
):int
Example:
The above program lines must be included into the corresponding tasks of
your application program.The example below shows an emergency message
from a device with node ID 21.
...
// Initializing the CAN bus once.
...
// Defining global variables
Var
stCanOpenEmergencyMsg : ARRAY[5] of CanOpenEmergencyMsg;
stCanOpenEmergencyStat : CanOpenEmergencyStat;
End_Var
;
stCanOpenEmergencyStat.lBuffer :=
sizeof
(stCanOpenEmergencyMsg);
iRet:= CanOpenAddEmergencyRx(0,
// CANNo.
21,
// NodeID
stCanOpenEmergencyStat,
// Status
stCanOpenEmergencyMsg);
// Array
...
The above program lines produce the following result:
When the device with node ID 21 receives an emergency message, the value
in register 400100 switches from 0 to 1 (true).
Reset this value always to 0 (false). In doing so, you make sure that new
emergency messages are displayed.
Emergency message Rx
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: ......