66
CJ1-H Functions Arranged by Purpose Section 1-8
Increas-
ing
struc-
ture
Using more tasks. Define interrupt tasks as cyclic tasks (called “extra cyclic tasks”).
Reducing the cycle time even with structured
programs using many tasks.
Use shared index and data registers.
Using the same index or data registers in dif-
ferent tasks without saving and loading reg-
ister contents.
Initializing processing when a task is started. Use the Task Start Flags.
Using standard processing shared by more
than one task.
Use a global subroutine (GSBN to GRET) in interrupt task num-
ber 0.
Standardization and program structure
based on subroutines.
Increase speed using subroutine instructions (SBS, SBN, and
RET) and global subroutine instructions (GSBS, GSBN, and
GRET)
Special
applica-
tions
Displaying floating-point decimal data on a
PT.
Use the FLOATING- POINT TO ASCII instruction.
Using text string data from measurement
devices in calculations.
Use the ASCII TO FLOATING-POINT instruction.
Performing high-precision positioning, e.g.,
for XY tables.
Use the Double-precision Floating-point instructions.
Managing information on workpieces flowing
on a conveyer in realtime in table form, e.g.,
when workpieces are added or removed
from the conveyor during processing.
Use the stack instructions.
STACK DATA READ, STACK DATA OVERWRITE, STACK DATA
INSERT, and STACK DATA DELETE (Operate on a specified ele-
ment in the stack.)
STACK SIZE READ (Counts the number of elements in the
stack.)
Performing high-precision linear approxima-
tions, e.g., converting a level meter reading
in mm to a capacity value in liters according
to the shape of a tank.
Use the ARITHMETIC PROCESS instruction (unsigned 16-bit
binary/BCD data, signed 16/32-bit binary data, or single-precision
floating-point data can be used for line data).
Autotuning PID constants (particularly to
automatically tune PID constants and start
the system faster when using multiloop PID).
Use the PID CONTROL WITH AUTO TUNING instruction.
Saving and loading execution results (e.g.,
from comparison instructions) at different
locations in a task or in different tasks.
Use the SAVE CONDITION FLAGS (CCS) and LOAD CONDI-
TION FLAGS (CCL) instructions to save the current status of the
Condition Flags or load the previous status.
Using a CVM1/CV-series program contain-
ing real I/O memory addresses in a CJ-
series CPU Unit.
Use the CONVERT ADDRESS FROM CV (FRMCV) instruction.
Using I/O memory tables containing CVM1/
CV-series real I/O memory addresses (e.g.,
to return the data to a CVM1/CV-series CPU
Unit after processing by the CJ-series CPU
Unit).
Use the CONVERT ADDRESS TO CV (TOCV) instruction.
Disabling power interruptions during specific
regions of the program.
Create program sections for which power interrupts have been
disabled with the DI and EI instructions (set A530 to A5A5 hex).
Purpose Function