2. PLC Processing Program
2.1 PLC Processing Program Level and Operation
- 53 -
2.1.2 Cautions on high-speed processing programming
The cautions on programming a high-speed processing program are explained. Pay careful attention
to the following items before programming a high-speed processing program.
(1) Index resistor
There are some function commands which use the index Z0 or Z1. When a value is changed by
using Z0 or Z1 in high-speed processing, the function command on the main processing side
may operate illegally. Do not use Z0 or Z1 for the high-speed processing.
Z2 to Z13 may be used on the high-speed processing, but cannot be used on the medium-speed
side simultaneously.
If contents of the index resistor are rewritten by executing a high-speed processing while using
on the medium-speed side, an illegal operation is caused.
(2) Each command of LDP, LDF, ORP, ORF, ANDP, ANDF
LDP, LDF, ORP, ORF, ANDP and ANDF are the commands that are turned ON by leading edge
or trailing edge of device. Do not use these commands in high-speed processing since incorrect
operation is caused.
When processing leading edge or trailing edge, use PLS/PLF commands or MEP/MEF
commands.
(3) DDBA command
34-word devices from the head device used for a DDBA command are rewritten upon completion
of a DDBA command. If using the medium-speed processing and high-speed processing
overlapped in use this area, unexpected operation may be carried out. Please separate the area
not to overlap.
The case where a device overlaps in the DDBA command executed by medium-speed
processing and high-speed processing is shown below.
D100
D101
D102
D133
34-word
devices are
rewritten upon
completion of
a DDBA
command.
S.DDBA D100
LD M100
LD SM32
MOV D100 K4M10
Medium-speed processing
P252
FEND
High-speed processing
INC D132
LD X03
LD< K10 D132
SET Y28
P251
FEND
D132
In medium-speed processing, the devices from D100 are used. Data is transmitted to
D100-D133 (control data and 14 axes) at the completion of a DDBA command. On the
other hand, in high-speed processing, D132 is used.
While processing a DDBA command with a medium-speed processing, high-speed
processing may be started, which causes the data to be overwritten on D106-D133 at
the completion of the DDBA command, even if D132 has been incremented. Thus, the
contents of D132 will change.
Since such a phenomenon is not necessarily generated and it generates very rarely,
studying a cause of the problem may be difficult. In order not to cause such a problem,
do not use D100-D133 in high-speed processing.