Possible syntax within the device object
logi.CAD 3 supports the following syntax for a device configuration:
DEVICE deviceConfig
TYPE
PTK := platform-name;
END_TYPE
COMMUNICATION
(* optional_begin *) VIA comm_node_1; (* optional_end *)
TARGET comm_node_2;
END_COMMUNICATION
END_DEVICE
COMMNODE comm_node_1
PARAMS :=
'jsonstring'
;
END_COMMNODE
COMMNODE comm_node_2
PARAMS :=
'jsonstring'
;
END_COMMNODE
The content for the device configuration results from the following sections/elements:
Section/element |
Explanation |
DEVICE name |
declaration of a device configuration, name must be an →IEC-identifier |
TYPE PTK := platform-name;END_TYPE |
platform for the device configuration Best practice is to use the content assist in order to select a platform form the list of the available platforms. |
COMMUNICATION |
specification for the communication with the target system – the details for the target system are being defined in the named sections COMMNODE ... END_COMMNODE that are following
|
COMMNODE comm_node_x |
details for the communication with the target system
|
DEVICE deviceConfig1
TYPE
PTK := SafeLibraryWindowsX86;
END_TYPE
COMMUNICATION
TARGET plc;
END_COMMUNICATION
END_DEVICE
COMMNODE plc
PARAMS := '{"ipAddress": "127.0.0.1", "port": 1535}';
END_COMMNODE
DEVICE deviceConfig2
TYPE
PTK := SafeLibraryWindowsX86;
END_TYPE
COMMUNICATION
VIA gateway1;
TARGET plc1;
END_COMMUNICATION
END_DEVICE
COMMNODE gateway1
PARAMS := '{"ipAddress": "127.0.0.1", "port": 1535}';
END_COMMNODE
COMMNODE plc1
PARAMS :=
'
{
"transport" : {
"type": "websockets",
"parameters" : {
"ip": "127.0.0.1",
"port": 8081
}
},
"infrastructure" : {
"programmer": "STARTLOCAL",
"parameters" : "8081"
}
}
';
END_COMMNODE