User Manual

Table Of Contents
Raw Redirect Mode
Advanced Digital Motor Controller User Manual 183
If the controller issues the -” character, it should be assumed that the command was
not recognized or lost and that it should be repeated.
Watchdog time-out
For applications demanding the highest operating safety, the controller should be config-
ured to automatically switch to another command mode or to stop the motor (but other-
wise remain fully active) if it fails to receive a valid command on its RS232, RS485, TCP,
USB or CAN ports, or from a MicroBasic Script for more than a predefined period.
By default, the watchdog is enabled with a timeout period of 1 second. Timeout period
can be changed or the watchdog can be disabled by the user. When the watchdog is en-
abled and timeout expires, the controller will accept commands from the next source in
the priority list. See Command Priorities on page 1 6 7.
Controller Present Check
The controller will reply with an ASCII ACK character (0x06) anytime it receives a QRY
character (0x05). This feature can be used to quickly scan a serial port and detect the
presence, absence or disappearance of the controller. The QRY character can be sent at
any time (even in the middle of a command) and has no effect at all on the controllers
normal operation.
Raw Redirect Mode
In the Raw Redirect mode, received unprocessed data coming from either RS232 or
RS485 interfaces, can be read by the user. Likewise, the user can send data with any
content towards either RS232 or RS485 interfaces. The data are split into frames. In ASCII
mode one frame is the sequence of characters ending with a termination character (\r).
In RTU mode one frame is defined based on the Modbus RTU regulations (after specific
silent time goes by, see Modbus Manual for more details).
Configuration
Raw Redirect mode is enabled for either RS232 or RS485 interfaces using the Raw Redi-
rect Mode (see ISM - Raw Redirect Mode, in page 300) configuration command. By de-
fault ASCII mode is used, however if the respective Modbus Mode (see DMOD – Modbus
Mode, in page 298) is set to RTU then the received data will be handled according to the
Modbus RTU regulations (See Modbus Manual for more details).
Checking Received Frames
Received frames are first loaded in the 256-byte FIFO buffer. Before a frame can be read,
it is necessary to check if any frames are present in the buffer using the ?CD query. The
query can be sent from the serial/USB port, or from a MicroBasic script using the getval-
ue(_CD) function. The query will return the number of frames that are currently pending,
and copy the oldest frame into the read buffer, from which it can then be accessed. Send-
ing ?CD again, copies the next frame into the read buffer.
The query usage is as follows: