Command Descriptions
233
2. Compile the PLCP program (
PCOMP PLCPi
). A compiled program runs much faster than a standard
program.
3. Execute the PLCP program (
SCANP PLCPi
). When the PLCP program is launched with the
SCANP
command, it is executed in the “PLC Scan Mode”. The advantage of the PLC Scan Mode is that the
PLCP program is executed within a dedicated 0.5 ms time slot during every 2 ms system update
period. This gives the PLCP program faster throughput for monitoring and manipulating I/O.
For more
information on how the PLCP program is executed with
SCANP
, refer to the
SCANP
command
description.
An alternative execution method is to use the
PRUN
command (
PRUN PLCPi
). This method is similar
to the
SCANP PLCPi
method, but will only run through the PLCP program once.
Memory Requirements
: Most commands allowed in a PLCP program consume one segment of compiled
memory after the program is compiled with
PCOMP
; the exceptions are
VARI
and
VARB
(each consume 2
segments) and
IF
statements. Each
IF
conditional evaluation compounded with either an
AND
or an
OR
operator consumes an additional segment (e.g.,
IF(IN.1=b1 AND AS.1=b0)
consumes three segments of
compiled memory). The number of compounds is limited only by the memory available.
Conditional Expressions
:
•
Order of Evaluation. Because only
one level of parenthesis is allowed,
the order of evaluation of
IF
conditionals is from left to right.
Refer to the flowchart for the
evaluation logic.
•
Conditional expressions in a PLC
program use the non-scaled integer
(“raw”) operand values. Examples
of the “raw” operand values are:
NO
Evaluate
Compound = AND?
Compound = OR?
FALSE
YES
YES
TRUE
Get Next Conditional
Statement
Evaluates FALSE
NO
Statement
Evaluates TRUE
−
The
PE
operator reports encoder counts not scaled by
SCLD
and not scaled by
ERES
.
−
The
ANI
operator reports ADC counts from an analog input. Assuming the default
ANIRNG4
setting (+/-10V voltage range), 205 ADC counts = 1 volt.
−
The
ANO
operator reports DAC counts commanded to an analog output. The range is 0-4095 counts
over the –10 to +10V range. The calculation is:
ANO
value = (Vout + 10) x 4095 / 20.
The only operands that are not allowed are:
SIN
,
COS
,
TAN
,
ATAN
,
VCVT
,
SQRT
,
VAR
,
TW
,
READ
,
DREAD
,
DREADF
,
DAT
,
DPTR
, and
PI
.
Programming Example
: Refer to the example in the
SCANP
command description.
PLN
End of Loop, Compiled Motion
Type
Compiled Motion
Syntax
<a_>PLN
Units
n/a
Range
n/a
Default
n/a
Response
No response; instead ends loop for compiled motion
See Also
GOBUF, PCOMP, PLOOP, PRUN, PUCOMP
Product Rev
GT6K 6.0
GV6K 6.0
Use the
PLN
command to specify the end of a compiled motion profile loop, as initiated with the
PLOOP
command.
Programming Example: see
PLOOP
.
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...