Schematic

MicroBasic Language Reference
Advanced Digital Motor Controller User Manual 215
RoboCAN Continuous Scan
A scan of a remote RoboCAN node is initiated with the function.
ScanCANValue(<id>, <cc>, <ch>, <tt>, <bb>)
Where:
id is the remote Node Id in decimal.
cc is the Query code, eg. _V.
cc is the channel number. Put 1 for commands that do not normally require a channel
number.
tt is the scan rate in ms.
bb is the buffer location.
The scan rate can be up to 255ms. Setting a scan rate of 0 stops the automatic sending
from this node.
Unless otherwise specified, the buffer can store up to 32 values.
The arrival of a new value is checked with the function.
IsScannedCANReady(<aa>)
Where:
aa is the location in the scan buffer.
The function returns a Boolean true/false value.
The new value is then read with the function.
ReadScannedCANValue(<aa>)
Where:
aa is the location in the scan buffer.
The function returns an integer value. If no new value was received since the previous
read, the old value will be read.
Checking the Presence of a RoboCAN Node
No error is reported in MicroBasic if an exchange is initiated with a node that does not ex-
ist. A command or configuration sent to a non-existent node will simply not be executed.
A query sent to a non existing or dead node will return the value 0. A function is therefore
provided for verifying the presence of a live node. A live node is one that sends the dis-
tinct RoboCAN heartbeat frame every 128ms. The function syntax is:
IsCANNodeAlive(<id>)
Where:
id is the remote Node Id in decimal
The function returns a Boolean true/false value.