
Parker Hannifin S.p.A. - S.B.C. Division HPD N User’s Manual
62
At the completion of each mathematical operation b99.2 is set to 0 if the result is positive,
and to 1 if the result is negative; likewise, b99.3=0 if the result is zero and b99.3=1 if it is
different from zero. These settings remain valid until the next mathematical operation is
performed (the operation is executed only if the stack bit is equal to one). A mathematical
operation can be performed, setting the result in one of the constant parameters (Pr71...Pr79)
in order to set bits b99.2 and b99.3.
In the case of the DIV operation, if it is executed on a double word the most significant
part of the result contains the rest of the division, i.e. if you set b94.0=1 and perform [DIV 79
77 80] the result will be Pr80=4 and Pr81=96.
Note that parameters Pr23, Pr24, Pr25, Pr26, Pr27, Pr29, Pr31 and Pr34 are bytes like Pb42
and Pb94; therefore, these parameters cannot be used for mathematical operations; logical
operations must be used to alter their values.
FIN instruction.
Three instructions are provided for high speed input acquisition: in this
case the scan is executed at 512
μ
s (normal scanning is 6.144ms). If used, FIN instructions
must be the first PLC instructions. The first FIN instruction copies digital input 1 into bit y of
parameter Pb40 (second operand=0) or Pb70 (second operand =1). The second FIN
instruction copies digital input 2 into bit y of parameter Pb40 (second operand=0) or Pb70
(second operand=1). The third FIN instruction copies digital input 3 into bit y of parameter
Pb40 (second operand=0) or Pb70 (second operand=1). If the second operand is added to
value 2, before the input is copied it will be inverted. If a FIN instruction is included at any
other position in the program it will have no effect. FIN instructions can be enabled/disabled
for each FIN: 1st FIN enabled if b94.5=0; 2nd FIN enabled if b94.6=0; 3rd FIN enabled if
b94.7=0.
A FIN instruction in the PLC program after the first three instructions or after any other
type of instruction will always be ignored.
There are two timers Pr92 and Pr93 at the disposal of the user. To use the first timer simply
load the time in terms of number of samplings (6.144 ms) in parameter Pr92: for example
Pr92=100 is equivalent to 614 milliseconds. Pr92 automatically decreases through time, bit
b99.0 remains on zero until the timer interval has elapsed; when Pr92=0 then b99.0=1. The
same functionality applies to the second timer regarding parameter Pr93 and bit b99.1. Ensure
that Pr92 Pr93 b99.0 and b99.1 are refreshed only after the first pico-PLC program scan.
The maximum number of instructions is 64 including the END instruction. Note that
mathematical operations occupy the space of two logical operations so when they are used the
maximum number of instructions available is decreased accordingly.
The PLC program must always be terminated with an END instruction.
The pico-PLC program can be edited on a PC (see
Programming with Pcbrush)
or directly
from the keypad. In this latter case, to facilitate procedures, when you need to delete an
instruction, select it and then press [M] to display the type of instruction; now keep [M]
pressed and simultaneously press [-]; when both keys are released the instruction will be
deleted. On the contrary, in order to add an instruction after In06 for example, select the next
instruction In07, press [M] to display the type of instruction; now keep [M] pressed and press
[+] simultaneously; when both keys are released an FIN instruction will be inserted. In this
latter procedure make sure that the instructions in the program are no more than the maximum
number or you will lose the last one(s). The pico-PLC program can be edited or altered only
when the PLC is in stop status (b99.13=0).
Содержание HPD2N
Страница 1: ...HPD N HPD2N HPD5N HPD8N HPD16N HPD20N HPD24N User s manual rev 8 5 November 2004 software rel 41...
Страница 3: ......
Страница 4: ......
Страница 121: ...Parker Hannifin S p A S B C Division HPD N User s Manual 118...
Страница 125: ......