beautypg.com

GTCO Cordless Roll-Up - Users Guide User Manual

Page 50

background image

Cordless Roll-Up 50


Cordless Roll-Up sends a “>” (hex 3E) as a prompt to the commanding device. The
Cordless Roll-Up is now ready to accept commands.

A command consists of two upper case ASCII letters or numbers followed by a delimiter.
The delimiter lets the Cordless Roll-Up know the command is complete. There are two
kinds of delimiters:

(carriage return, hex 0D): indicates end of current command and more
commands will follow. If the command just sent is valid, it will be carried out. The
Cordless Roll-Up then sends another > prompt and awaits the next command.

(escape, hex 1B): indicates end of current command and no more commands
will follow. If the command is valid, it will be carried out. Then the Cordless Roll-Up
will exit Command Mode and return to Digitizing Mode.

If you are entering several commands, end each one with a carriage return delimiter. After
each , the Cordless Roll-Up carries out the command and sends a new command
prompt. After the last command or if you are entering only one command, use an .
The Escape delimiter takes you directly back to Digitizing Mode.

If the command entered is not recognized as a valid command, it will be ignored and
Cordless Roll-Up will send a “?” (question mark). If the delimiter following an invalid
command was an (indicating your desire to leave Command Mode), Cordless Roll-Up
stays in the Command Mode, awaiting a valid command.

A command may be aborted before entering a delimiter by sending a CTRL-X (hex 18). The
Cordless Roll-Up then ignores the preceding one or two characters and responds with a
new prompt.

To Leave Command Mode:

Send an (hex 1B). The may follow a command code or it can be sent in
response to the Cordless Roll-Up’s prompt. Cordless Roll-Up returns to digitizing, now
operating according to the commands sent to it.

A Hint for Programmers

Here is the most efficient method for sending commands:

1. Send the CTRL-A and wait until the Controller responds with the prompt >. A loop

that retrieves one byte at a time from the serial port and checks for the > is best.