beautypg.com

Red Lion GEMINI 42 User Manual

Page 33

background image

The command string is constructed by using the above commands and value

identifiers along with the data values that are required. Data values may or may

not contain the decimal point if a decimal point is programmed into the Gemini.

The Gemini will accept the decimal points, however, it does not interpret them in

any way. Leading zeros can be eliminated, however, all trailing zeros must be

present. For example, if a Scale Factor of 1.0000 is to be sent, the data value can

be transmitted as 1.0000 or 10000. If a “1” is transmitted, the Scale Factor will be

changed to 0.0001.

The Address command is used to allow a command to be directed to a specific

unit in the Serial Communications Loop. Whenever the unit address is zero,

transmission of the Address command is not required. This is done for

applications which do not require more than one Gemini. For applications that

require several units, it is recommended that each Gemini in the loop be given a

separate address. If they are given the same address, a command such as the

Transmit Value Command, will cause all the units to respond at the same time,

resulting in erroneous data.

The command string is constructed in a specific logical sequence. The Gemini

will not accept command strings that do not follow this sequence. Only one

operation can be performed per command string. Below is the procedure to be

used when constructing a command string.

1. If the Gemini, to which the command is to be sent, is assigned an address other

than zero, the first two characters of the command string must consist of the

Address Command (N) and the address number of the unit (1-15).

2. The next characters in the command string is the actual command that the

Gemini is to perform and the value identifier if it pertains to the command. (A

command such as the Transmit per Print Options, “P”, command does not

require a Value Identifier.)

3. If the “Change Value” command is being used, the next characters in the

command string is the numerical data value.

4. The last character in the command string is the command terminator (*). This

character must be sent in order to tell the Gemini that the command string is

complete, so that they can begin processing the command.

Below are some typical examples of properly constructed command strings.
(EX. 1) Change Preset 1 on the Gemini with address of 2 to 00123.4.

COMMAND STRING: N2VA1234*

(EX. 2) Have the Gemini with address of 3 transmit the Count B value.

COMMAND STRING: N3TF*

(EX. 3) Reset Counter B of the Gemini with address of 0.

COMMAND STRING: RF*

As shown, all commands must be terminated with a “Command Terminator”

(* or 2AH). The Gemini will not process the command until the terminator is

sent. If illegal commands or characters are sent to the Gemini, they still would

need to be terminated by an (*). If they are not terminated, the next command will

not be accepted.

When writing application programs in Basic, the transmission of spaces or

carriage return and line feed should be inhibited by using the semicolon delimiter

with the “PRINT” statement. The Gemini will not accept a carriage return or line

feed as valid characters.

When a “Change Value” command is sent to the Gemini, a short amount of

time is required for the unit to process the data. This time increases with the count

rate. During this time, only one additional command may be sent to the Gemini.

This may be done 80 msec after the transmission of the “Change Value”

command. After the second command has been transmitted, the unit will ignore

any further commands until 10 msec after both the “Change Value” and second

command have been processed. It is recommended that a “Transmit Value”

command follow a “Change Value” Command. If this is done, the reception of

the data can provide a timing reference for sending another command and will

insure that the change has occurred.

-31-

This manual is related to the following products: