
Command Descriptions
27
'
Enter Interactive Data
Type
Operator
(Other)
Syntax
!'<numeric
data>
Units
Numeric
data
is
command-dependent
Range
Numeric
data
is
command-dependent
Default
n/a
Response
n/a
See Also
[
READ
],
VARI
,
VARS
Product Rev
GT6K 6.0
GV6K 6.0
To enter data interactively, two operations must occur. First, numeric information must be requested.
Requesting the numeric information is accomplished with the
VARx=READy
command. The
x
specifies the
numeric variable to place the data into, and the
y
specifies the string variable to transmit before the data is
entered. Numeric information can also be requested by placing the
READ
command in place of a command
argument (e.g.,
A(READ1),12.52,(READ2),5.62
). After the data has been requested, a numeric
response must be provided. The numeric response must be preceded by the interactive data specifier (
!'
)
and followed by a delimiter (<cr> or <lf>).
Command processing will pause while waiting for data.
Example:
VARS1="Enter the count > " ; Set string variable 1 equal to the message
VAR5=READ1
; Transmit string variable 1, and wait for numeric data in the
; form of !'<data>. Once numeric data has been received, place
; it in numeric variable 5
!'65.12
; Variable 5 will receive the value 65.12
[ . ]
Bit Select
Type
Operator
(Other)
Syntax
<command>.i
Units
i = bit number
Range
Command-dependent
Default
None
Response
n/a
See Also
[
AS
],
[
ER
],
ERROR,
[
IN
],
INEN,
INLVL,
[
INO
],
INTHW,
LIMLVL,
[
MOV
],
ONIN,
ONUS,
OUT, OUTEN,
OUTLVL,
POUT,
[
SS
],
TAS,
TER,
TIN,
TINO,
TIO , TOUT,
TSS,
TUS,
[
US
]
Product Rev
GT6K 6.0
GV6K 6.0
The Bit Select (
.
) operator specifies which bit to select. The primary purpose of this command is to let the
user specify a specific bit (or range), instead of having to type in an entire bit string.
When using the bit operator in a comparison, the bit operator must always come to the left of the
comparison. For example, the command
IF(AS.12=b1)
is legal, but
IF(b1=AS.12)
is illegal.
Command Shortcut Examples
(affect only one binary bit location)
:
•
Activate outputs at I/O location Brick 3, I/O point 9:
3OUT.9=1
•
Enable analog input at I/O location Brick 2, I/O point 2:
2ANIEN.2=E
•
Enable error-checking bit 6 for task 3:
3%ERROR.6=1
Example:
VARB2=ER.12
; Error status bit 12 assigned to binary variable 2
VARB2
; Response (if bit 12 is set to 1):
; *VARB2=XXXX_XXXX_XXX1_XXXX_XXXX_XXXX_XXXX_XXXX
2OUT.5=1
; Activate the output at location Brick 2, I/O point 5
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...