Super Systems 9205 Series User Manual

Page 130

Advertising
background image

Series 9205 Operations Manual Rev A

129

number is not needed and the variable is scaled to the correct value (decimals included) based on the input

type specified.

In a Video Recorder, the slave instrument data slots can be defined as variables D1 through D32. D31 and

D32 are extra slots and have no restrictions as output variables. D1 through D30 are shared with the first

ten (10) slave instruments in groups of three (3) – PV, SP, PO – and caution should be used when assigning

as outputs.

A line in the program of the instrument calculation must start with a variable or a keyword.

Variables must be followed by an equal sign (=) and then an expression. The expression can be a simple

assignment (V1 = 3) or a variable operation variable as described below (V1 = M225 * 0.1).

Keywords

MUST

be entered in capital letters only.

The list of valid keywords is: IF, ELSE, ENDIF, QUE, RLY, and END.

“IF” must be followed by an expression which is a variable, relationship operator, then variable.

The list of valid relationship operators is: > (Greater Than), < (Less Than). = (Equals), >= (Greater Than or

Equal To), <= (Less Than or Equal To), != (Not Equal To), and == (Equal To).

Note – The “=” and “==”

relationship operators are identical

.

The list of valid bitwise operators is: & (AND), | (OR), ^ (XOR), << (Left Shift), and >> (Right Shift).

The result of the “IF” relationship test determines if the lines following the “IF” statement will be executed

or not.

The “ELSE” and “ENDIF” must be on a line by themselves. “ELSE” will toggle the program based on the

result of the “IF” test. “ENDIF” will close out the “IF”.

Example:

IF V1 >= 30

V3 = V2 * 1.5

ELSE

V3 = 5

ENDIF

In this example, if the value in V1 is greater than or equal to 30, then the value of V3 will be the value of V2

multiplied by 1.5. If the value in V1 is less than 30, the value of V3 will be 5.

EVERY

“IF” must have a closing “ENDIF”. However, the “ELSE” is optional.

The “QUE” is used to send data to a slave instrument and must have three (3) variables separated by

spaces. The first is the slave instrument number, the second is the register number, and the third is the

data to send.

Example:

QUE 3 1129 V1

This example will send the value of V1 to register 1129 on instrument 3.

The “RLY” is used to control a relay if the relay assignment is 999. The “RLY” must be followed by a

variable which is the relay number (1 – 8) and a relationship expression.

Example:

RLY 5 M554 < 2

This example would turn Relay 5 ON if the communication status for instrument 5 was bad.

The “END” keyword will stop the lines from running, and start over from line 1.

There are a few functions that are available as well. The list of valid functions is: FSIN (Sine), FCOS

(Cosine), FEXP (Exponent), FLOG (Logarithm), FLN (Natural Logarithm), FSQRT (Square Root), FABS

(Absolute Value), and FPOW (Power). The Sine and Cosine functions need to have the parameter in radians.

A function must be in all caps and begin with an “F” and have a pair of parenthesis. An undefined function

returns the value of the expression in the parenthesis.

Note – A pair of parenthesis by themselves is

considered an undefined function

.

The instrument calculation has limited parsing ability. This is kept to variables, operation, variable – i.e. V1

= 12.25 * V2. Another example is M128 = V1/100.

A negative sign (-) in front of the number is considered part of the number – i.e. V1 = -2.55 + V2.

A variable to the parser is one of the following: a program variable (Vxx), a Modbus register (Mxxx), a

number, or a function.

Example:

V1 = (V2 * 1.35) + (V3 * V4)

Advertising
This manual is related to the following products: