Red Lion GEMINI 2 User Manual

Page 25

Advertising
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

2000. The Gemini 2000 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 unit 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

2000 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 2000, to which the command is to be sent, is assigned an

address other than zero, the first two or three characters of the command

string must consist of the Address Command (N) and the address number of

the unit (1-15).

2. The next character(s) in the command string is the actual command that the

Gemini 2000 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 command is being used, the next characters in the command

string are 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 Geminis 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 2000 with an address of 2 to 00123.4.

COMMAND STRING: N2VA1234*

(EX. 2) Have the Gemini 2000, with an address of 13, transmit the Count value.

COMMAND STRING: N13TC*

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

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

is sent. If illegal commands or characters are sent to the Gemini 2000, 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 2000 will not accept a carriage return or

line feed as valid characters.

When a “Change Value” command is sent to the Gemini 2000, 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 2000. 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.

The timing diagrams show the timing considerations that need to be made.

–23–

FIG. 2: TIMING FOR SENDING COMMANDS

FIG. 3: TRANSMIT COUNT & RESET COMMAND TIMING

(**) This is the time that it takes the Gemini 2000 to process the preset.

It varies with the Count Rate and Scale Factor Value.

Advertising
This manual is related to the following products: