Parker TWIN-N Series User Manual page 114

Table of Contents

Advertisement

Parker Hannifin S.p.A Divisione S.B.C.
user's manual TWIN-N and SPD-N
In the mathematical operations on double words, the operands and the result are defined as
follows: the parameter of the operand defines the least significant part while the most
significant part is represented by the next word.
After every arithmetic operation, b99.2=0 if the result is positive and b99.2=1 if it is negative.
In the same way b99.3=1 if the result is 0 and b99.3=0 if it is not 0. These settings remain
active until the next arithmetic operation is executed (the operation is executed only if the
stack bit is equal to 1). A mathematical operation can be executed by placing the result in one
of the constant parameters (Pr71...Pr79) in order to set bit b99.2 and b99.3.
If the DIV operation is executed on a double word, the most significant part of the result
contains the remainder of the division, that is, if b94.0=1 and the operation [DIV 79 77 80] is
executed, the result will be Pr80=4 and Pr81=96.
The FIN instruction . Two instructions are available for the fast acquisition of inputs: in this
case the scanning occurs at the rate of 512μs (normal scanning is at the rate of 6.144ms). If
this is used, they must be the first instructions of the PLC. The first instruction FIN copies
digital input 0 to the y bit of the Pb40 parameter (the second operand =0) or Pb150 (the
second operand=1). The second FIN copies digital input 1 to the y bit of the Pb40 parameter
(second operand=0) or Pb150 (second operand=1). If the value 2 is added to the second
operand, the input must be negated before being copied. If an FIN instruction is inserted in a
different position, it will not have any effect. The FIN instructions can be enabled/disabled
using a bit for each FIN: the first FIN is enabled if b94.5=0; the second FIN is enabled if
b94.6=0. The FIN instruction inserted in the PLC program after the first two instructions and
in any case if it follows any instruction that is not a FIN instruction is ignored.
The user can make use of two timers, Pr92 and Pr93. To use the first timer load the time as a
number of sampling (6.144 ms) into PR92. For example, Pr92=100 is equal to 614
milliseconds. Pr92 will automatically be decremented as time goes by and the b99.0 bit will
remain set to 0 until the timer has expired. When Pr92=0, then b99.0=1. The second timer
works the same way using the PR93 parameter and the b99.1 bit. Pr92, Pr93, b99.0 and b99.1
are updated only before the pico-PLC program is scanned.
The maximum number of instructions is 256. The arithmetic operations occupy the space of
two logical operations. If they are used, the maximum number of instructions accepted is
reduced.
The PLC program must always end with the END instruction.
The pico-PLC program can be edited via serial link or directly using the keyboard. In this last
case, in order to facilitate the modification of the program, if you want to delete an
instruction, go to the instruction to be deleted and hit the [M] key. The type of instruction is
then displayed. By holding down the [M] key and pressing the [-] key, the instruction will be
deleted when both keys are released. If you want to add an instruction after the In06, go to the
next instruction In07 and hit the [M] key. The type of instruction is then displayed. By
holding down the [M] key and pressing the [+] key, the FIN instruction will be inserted when
both keys are released. In this last case make sure that the program does not exceed the
maximum limit of the instructions, otherwise the last instructions will be lost. The pico-PLC
program can be edited or modified only when the PLC is in stop (b99.13=0).
113

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents