Parker Hannifin S.p.A. - S.B.C. Division HPD N User’s Manual
84
For parameter addresses and lengths refer to the relative table.
In the case of PLC instructions, each one occupies 2 or 4 bytes, the format of which is
described below.
The memory area available for PLC instructions is 128 bytes, with addresses from 0h to 7Fh.
As the minimum length for each instruction is 2 bytes, the PLC program can hold a
maximum of 64 instructions.
The first four bits of the first byte in each instruction (b0..b3) contain the instruction
code.
For the first 8 instructions in the table (LD...ORN) and the SET and RES instructions, the
remaining 4 bits of the first byte (b4..b7) contain the value
y, while the second byte contains
the value
Pa.
For instructions ADD, SUB, MUL and DIV, the second byte contains the value
Pa, the
third
Pb, and the fourth Pc.
The second byte is not utilised for the END instruction.
For the FIN instruction the fifth bit (b4) of the first byte selects the parameter: b4=0 refers
to Pr.40, b4=1 refers to Pr.70; the sixth bit (b5) of the first byte is used for negative logic if
required: b5=0 the bit is copied; b5=1 the bit is inverted and then copied. The second byte of
the FIN instruction contains the value of
y.
If FIN instructions are used they must be the first of the program and there must be no
more than 3 so they will occupy addresses from 0h to 5h. If a FIN instruction is included from
address 6h forward or, anyway, after any other instruction, it will be ignored (NOP).
The instructions must be one after the other starting from address 0h, without any free bytes.
There is just one program and it terminates with the END instruction.
Instruction code length (bytes)
LD Pa.y 0 2
LDN Pa.y 1 2
OUT Pa.y 2 2
OUTN Pa.y 3 2
AND Pa.y 4 2
ANDN Pa.y 5 2
OR Pa.y 6 2
ORN Pa.y 7 2
ADD Pa, Pb, Pc 8 4
SUB Pa, Pb, Pc 9 4
MUL Pa, Pb, Pc 10 4
DIV Pa, Pb, Pc 11 4
SET Pa.y 12 2
RES Pa.y 13 2
FIN Pb40.y/Pb70.y 14 2
END 15 2