(only available for certain terminals with a special, modified implementation of the CANopen protocol)
This document describes how to scan a CANopen network for all connected nodes.
Note: Only very few terminals support this function - since 2005 (see Feature Matrix) !
See also:
Because MKT's "Terminals with CANopen" are no CANopen-MASTERs but CANopen-SLAVES, having a node-scanner as explained below is NON-CONFORMAL TO THE CANOPEN PROTOCOL ! ! ! !
... and will most likely only be implemented ONLY IN A SPECIAL FIRMWARE ("Art11102") .
Why ?
The node-scanner sends read-requests via SDO to all 127 possible CANopen-nodes to find out "who answers". During this time, the SDO-timeout will be set to some hundred milliseconds, which is necessary to detect "slow" slaves too.
But unfortunately SDO-transfers are simple point-to-point connections, which must be carefully planned in a CANopen network by an administrator (or manager). There are very nice, but costly PC programs out there for managing all nodes in a CANopen network.
When the terminal scans for nodes itself (trying to communicate with all 127 nodes, which the admin doesn't know) is generally FORBIDDEN in a CANopen network, because doing so will DEFINITELY cause collisions on the bus sooner or later, when other devices (or the "real" CANopen-master) want to communicate with each other via SDO too ! Remeber this, it is your responsibility: Only use the node-scan function if you can guarantee that it will not cause problems - which may result in a minor catastrophy like the total breakdown of the CAN network (if you don't know why, or what all this is about, you cannot guarantee it; so you must not use it ) !
If the SDO-client returns a valid result to the application layer (here: node scanner) :
After the above node-scan-loop :
< sorry, not translated yet >
#define NODESCAN_STATE_OFF 0 /* Urzustand, "nichts los" */
#define NODESCAN_STATE_PREPARE 1 /* CANopen-Stack wird vorbereitet */
#define NODESCAN_STATE_WAIT_SDO_FREE 2 /* Warte bis SDO-Client FREI ist */
#define NODESCAN_STATE_WAIT_RESPONSE 3 /* Warte auf SDO-Antwort */
#define NODESCAN_STATE_CLOSE 4 /* SDO-Kanal wird geschlossen */
#define NODESCAN_STATE_SCAN_DONE 5 /* SCAN-Vorgang abgeschlossen */
#define NODESCAN_STATE_SWITCH_NODE 6 /* Warte auf Umschaltung Node-ID */
#define NODESCAN_STATE_NODE_SWITCHED 7 /* Node-ID-Umschaltung
abgeschlossen*/
File: ..?..\uptwin1\help\nodescan_01.htm
Author: W.Büscher, MKT Systemtechnik
Last modified: 2005-08-15 (ISO8601, YYYY-MM-DD)