Data Sheet

MicroBasic Scripting
214 Advanced Digital Motor Controller User Manual V1.8, August 28, 2017
Replace entire sentence with:
Where:
<index> : 0 - 4 for old controller models
0 - 7 for new controller models
<state> : 0 - Timer Running
1 - Timer has completed/stopped (reached 0ms)
Sending RoboCAN Commands and Configuration
Sending commands or configuration values to remote nodes on RoboCAN is done using
the functions.
SetCANCommand(<id>, <cc>, <ch>, <vv>)
SetCANCong(<id>, <cc>, <ch>, <vv>)
Where:
id is the remote Node Id in decimal.
cc is the Command code, eg. _G.
cc is the channel number. Put 1 for commands that do not normally require a channel
number.
vv is the value.
Reading RoboCAN Operating Values Configurations
The following functions are available in Micro Basic for requesting operating values and
configurations from a remote node on RoboCAN.
FetchCANValue(<id>, <cc>, <ch>)
FetchCANCong(<id>, <cc>, <ch>)
Where:
id is the remote Node Id in decimal
cc is the Command code, eg. _G
cc is the channel number. Put 1 for commands that do not normally require a channel
number.
The following functions can be used to wait for the data to be ready for reading.
IsCANValueReady()
IsCANCongReady()
These functions return a Boolean true/false value. They take no argument and apply to the
last issued FetchCANValue or FetchCANCong function.
The retrieved value can then be read using the following functions.
ReadCANValue()
ReadCANCong()
These functions return an integer value. They take no argument and apply to the last is-
sued FetchCANValue or FetchCANCong function.