User Manual
MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
147
3.3 MCL Modiers
3.3.1 Output Modiers
Modiers can be use when outputing data using the PUTS command or when storing data in a
variable using the LET(=) command.
An example of a command modier is formatting a decimal value into a printable string. The
decimal value 32 would output to a terminal window as a space character(ASCII code 32 is a
space). Instead, to display the actual decimal value of the variable in a human readable format
you would use the DEC modier:
Temp Var Byte
Temp = 32
puts 0,[DEC TEMP] ;send the ascii characters “32” to the USB port
This code snippet above will send the ascii characters “3” and “2” to the USB port. If the DEC
modier was not used, a space character (“ “), binary value 32, would be sent instead
Modiers can be used to modify values stored in arrays with the LET(=) commands:
string var byte(100)
string = “Hello World” ;string(0-10)=”Hello World”
string = dec 1234567 ;string(0-6)=”1234567”
string = ihex 0x3456 ;string(0-4)=”$3456”
3.2.2 Modiers
Name Description
DEC Decimal
SDEC Signed Decimal
HEX Hexadecimal
IHEX Indicated ($) Hexadecimal
REP Repeat character n times
REAL Floating point number with decimal point
STR Write specied number of characters(can be used to copy arrays)