Schematic

MicroBasic Scripting
200 Advanced Digital Motor Controller User Manual V1.8, August 28, 2017
Controller Configuration and Commands
The following is a set of device functions for interacting with the Controller:
SetConfig Set a configuration parameter
SetCommand Send a Real Time command
GetConfig Read a configuration parameter
GetValue Read an operating value
A set of similar commands are available for accessing/changing configurations, sending
commands and reading operating values of remote nodes on CAN networks using the
RoboCAN protocol.
Timers Commands
The following is a set of functions for interacting with the timers:
SetTimerCount Set number of milliseconds for timer to count.
SetTimerState Set state of a specific timer.
GetTimerCount Read timer count.
GetTimerState Read state of a specific timer.
Pre-Processor Directives (#define)
The #define creates a macro, which is the association of an identifier with a token expres-
sion. After the macro is defined, the compiler can substitute the token expression for each
occurrence of the identifier in the source file.
#dene <var> <expression>
The following example illustrates how use pre-processor directive:
#dene CommandID _GO + 5
Print(CommandID)
Option (Compilation Options)
Micro Basic by default treats undeclared identifiers as integer variables. If you want the
compilers checks that every variable used in the program is declared and generate com-
pilation error if a variable is not previously declared, you may use Option explicit compiler
option by pacing the following at the beginning of the program:
Option Explicit
Dim (Variable Declaration)
Micro Basic contains only two types of variable (Integer and Boolean) in addition to arrays
of these types. Boolean and arrays must be declared before use, but Integer variables
may not be declared unless you use the Option Explicit compiler directive.
Dim var As { Integer | Boolean }