![](http://datasheet.mmic.net.cn/280000/GS-C200_datasheet_16060492/GS-C200_10.png)
The general format of a command string is the
following:
ADDRESS
COMMAND
ARGUMENT
CHECKSUM CAR.RETURN
The
Address
must be the firsttransmitted charac-
ter and it is present only ifthe Multipointprotocol is
used (at least one of SEL0, SEL1, SEL2is different
from zero).
The
Command
is the second character(s) of the
string, inthe Multipoint protocol, but it becomes the
transmission opening character when the Point-to-
Point protocol is used (SEL0, SEL1and SEL2 = 0).
The
Argument
, ifrequired, isspecified immediately
after the command and its length depends on the
command type.
The
Checksum
character verifies the correctness
of the received string; its value isdetermined bythe
sum of the binary values of the preceding charac-
ters. Theresult iscut atthe seventh least significant
bit and ORed with exadecimal 10 (C200S/C200
from V2.2) to make the result compatible with the
transmission system. The last character, the string
ending character, is always a
CarriageReturn
that
will be identified in the following by the symbol (
↓
).
By connecting the pin CHS (pin 7) to ground, the
checksum character isnot anymore requested, and
the task of guaranteeing the correctness of the
message is left to the parity bit. It should be noted
that by using thisdialogue mode, the data integrity
confidence level is reduced. Because motion sys-
tems normally operate in manufacturing premises
subjected to heavy electro-magnetic noise, and
because any communication problem may have
catastrophic effects on the system actions, it is a
good practice to usethechecksumcharacter when-
ever possible. Thechecksum character is normally
not used (pin CHS connected to ground) when the
GS-C is connected to a video-terminal, i.e. during
the initial programming and debugging phase. In
the following, three examples of command strings
sent to a GS-C module are given.
Example 1
- MULTIPOINTPROTOCOL. The Host
Computer wants to set the USER output 3 of the
module #2. The command will have the following
format:
10/31
The checksum character
6
results from the binary
sum of the character
2
(ASCII value = 32) + char-
acter
A
(ASCII value = 41) + character
3
(ASCII
value = 33) truncated at the seventh bit.
Example 2
- POINT-TO-POINT PROTOCOL.
The same instruction is given by the Hostto a Point
to Point connected module.
The command will have the following format:
A3t
↓
The checksum character has an ASCII value
t
that
derives from the sum ofthe ASCIIcode A+3 =41+33
= 74 in binary weighted code or
t
inASCII code.
Example 3
- POINT-TO-POINT PROTOCOL
WITHOUT CHECKSUM.
For the same instruction, the command format will
be:
A3
↓
The stringconsistsofcommand and argument only.
The GS-Cfeeds backinformation to theHost every
time it receives a command, therefore it has not to
identify itself to the Host when answering in a
Multipoint connection.
The formatof thestring answered backbythe GS-C
is the following:
ANSW.CODE
ARGUMENT
CHECKSUM
CAR.RETURN
The first character, which always identifies the an-
swer type,may assume one of the following values:
Y
The command string has been correctly
received.
The controller is Busy and cannot process
commands.
The controller is Ready to process commands.
B
R
E
An error has been detected. The type of error
is specifiedby the number following the ”E”.
V
A controller status (a position or an USER
input/output status) is sent back and its value
is specified by the characters following the”V”.
The lengthofthe Argument, presentonly for”E” and
”V” answers, can range between 1 and 7 charac-
ters, and it is a function of the received command.
The number following the ”E” code, i.e. the error
argument, specifies the detected error type accord-
ing to the following table:
2A36
↓
Address
Module #2
Command
Activate
Argument
USERout 3
Carriage return
Checksum
GS-C200/ GS-C200S