232
Gemini GV6K/GT6K Command Reference
[ PI ]
PI (
π
)
Type
Operator
(Trigonometric)
Syntax
See
examples
below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
[
=
],
[
+
],
[
-
],
[
*
],
[
/
],
[
&
],
[
|
],
[
^
],
[
~
],
[
ATAN
],
[
COS
],
IF,
[
SIN
],
[
SQRT
],
[
TAN
],
VAR
Product Rev
GT6K 6.0
GV6K 6.0
The (
PI
) command is assigned the value 3.14159265. There are 2
π
radians in 360°. This command is
useful for doing trigonometric functions in radian units (
RADIAN
command).
Example:
VAR1=PI
; 3.14159265 is assigned to variable 1
VAR2=2 * PI
; 2 pi is assigned to variable 2
PLCP
Compiled PLC Program
Type
PLC Scan Program
Syntax
<a_><!>PLCPi
Units
i = number of PLC program
Range
1-99
Default
n/a
Response
n/a
See Also
ANO, [ ANO ], BREAK, DEF, ELSE, EXE, HALT, IF, L, LN, MEMORY,
NIF, OUT, PCOMP, PEXE, PRUN, PUCOMP, [ SC ], [ SCAN ], SCANP,
TIMST, TIMSTP, TSC, TSCAN, VARI, VARB
Product Rev
GT6K 6.0
GV6K 6.0
PLCP
is not a command; it is used to identify a PLCP program to be defined (e.g.,
DEF PLCP2
), compiled
(e.g.,
PCOMP PLCP2
), and executed (e.g.,
SCANP PLCP2
or
PRUN PLCP2
). Up to 99 PLCP programs may
be defined, identified as
PLCP1
,
PLCP2
,
PLCP3
, and so on. The purpose of PLCP programs is to facilitate
fast I/O scanning. The process of creating and executing a PLCP program is:
1. Define the PLCP program (
DEF PLCPi
statement, followed by commands from the list below,
followed by
END
). Only these commands are allowed in a PLCP program:
•
IF
,
ELSE
, and
NIF
(conditional branching) — see note below for limitations
•
L
and
LN
(loops)
•
HALT
:
- If the PLCP program is executed with
SCANP
,
HALT
will terminate the current PLCP
program and kill the
SCANP
mode.
- If the PLCP program is executed with
PRUN
,
HALT
will stop the PLCP program (and the
program that executed the
PRUN
statement) running in that task.
•
BREAK
:
- If the PLCP program is executed with
SCANP
,
BREAK
will end only the current scan loop.
At the next 2-millsecond update, the scan will restart at the first line of the PLCP program.
- If the PLCP program is executed with
PRUN
,
BREAK
will stop the PLCP program and
execution will continue in the program from which the
PRUN
was executed (resuming at the
command immediately following the
PRUN
command).
•
TIMST
and
TIMSTP
(start and stop the timer)
•
OUT
(turn on a digital output)
•
ANO
(set an analog output voltage – requires an extended I/O brick with on an analog output
SIM)
•
EXE
(execute a program in a specific task — e.g.,
2%EXE MOVE
)
•
PEXE
(execute a compiled program in a specific task — e.g.,
3%PEXE PLCP4
)
•
VARI
(integer variables).
•
VARB
(binary variables). Bitwise operations are limited to Boolean And (
&
), Boolean Inclusive
Or (
|
), and Boolean Exclusive Or (
^
).
www.comoso.com
Summary of Contents for Gemini GV6K
Page 24: ...www comoso com...
Page 40: ...www comoso com...
Page 344: ...www comoso com...
Page 350: ...www comoso com...