User Manual

Table Of Contents
Serial (RS232/USB) Operation
184 Advanced Digital Motor Controller User Manual V2.1 December 3, 2020
Syntax: ?CD
Reply: CD=number of frames pending
Reading Received Frames
After a frame has been moved to the read buffer, the byte size and the data can be read
with the ?DDT query. The query can be sent from the serial/USB port, or from a MicroBa-
sic script using the getvalue(_DDT, n) function or getvalue(_SDT, n) function for ASCII
mode. The query usage is as follows:
Syntax: ?DDT [ee]
Reply: DDT=byte size:data0:data1: .... :dataN
Where: ee = frame element
1 = byte size
2-64 = data0 to data62
Examples:
Q: ?DDT
R: DDT=8:82:111:98:111:116:101:113
Q: ?DDT 3
R: DDT=111
Q: ?SDT
R: SDT=”Roboteq”
Transmitting Frames
ASCII or RTU data can easily be transmitted using the Send Raw USART Frames Com-
mand !CU. This command can be used to enter the port to send the data (RS232 or
RS485), the frame length and the data, one element at a time. The frame is sent immedi-
ately after the frame length is entered, and so it should be entered last.
Syntax: !CU ee nn
Where: ee = frame element
1 = outport (0 for RS232 and 6 for RS485)
2 = frame length