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>)
SetCANCong(<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>)
FetchCANCong(<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()
IsCANCongReady()
These functions return a Boolean true/false value. They take no argument and apply to the
last issued FetchCANValue or FetchCANCong function.
The retrieved value can then be read using the following functions.
ReadCANValue()
ReadCANCong()
These functions return an integer value. They take no argument and apply to the last is-
sued FetchCANValue or FetchCANCong function.