733
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
High-speed Counter/Pulse Output Instructions
3
INI
Function
INI(880) performs the operation specified in C for the port specified in P. The possible combinations of
operations and ports are shown in the following table.
z Starting Comparison (C = 0000 hex)
If C is 0000 hex, INI(880) starts comparison of a high-speed counter's PV to the comparison table
registered with CTBL(882).
Note A target value comparison table must be registered in advance with CTBL(882). If INI(880) is executed with-
out registering a table, the Error Flag will turn ON.
z Stopping Comparison (C = 0001 hex)
If C is 0001 hex, INI(880) stops comparison of a high-speed counter's PV to the comparison table
registered with CTBL(882).
z Changing a PV (C = 0002 hex)
z Stopping Pulse Output (C = 0003 Hex)
If C is 0003 hex, INI(880) immediately stops pulse output for the specified port. If this instruction is
executed when pulse output is already stopped, then the pulse amount setting will be cleared.
z Changing Origin Search/Return Settings (C = 0005 Hex) (CJ2M Only)
If C is 0007 hex, INI(880) changes the settings for origin searches/returns during operation. The ini-
tial settings for origin searches/returns are set in the PLC Setup. INI(880) is used to temporarily
change a speed or acceleration/deceleration rate in an application.
Note The settings in the PLC Setup are not changed. When power is turned ON, the settings in the PLC Setup will
be used.
The following parameters can be changed with INI(880).
P: Port specifier
C: Control data
0000 hex: Start
comparison
0001 hex: Stop
comparison
0002 hex:
Change PV
0003 hex: Stop
pulse output
Changing the
origin
search/return
settings (0005
hex) (CJ2M
only)
Changing the
maximum ring
value (0006
hex) (CJ2M
only)
0000 or 0001 hex:
Pulse output
Not allowed. Not allowed. OK OK OK Not allowed.
0010 or 0013 hex:
High-speed counter input
OK OK OK Not allowed. Not allowed. OK
0100 to 0107 hex:
Input interrupt in counter mode
Not allowed. Not allowed. OK Not allowed. Not allowed. Not allowed.
1000 or 1001 hex:
PWM (891) output
Not allowed. Not allowed. Not allowed. OK Not allowed. Not allowed.
Port and mode Operation Setting range
Pulse output (P = 0000 0003 hex)
The present value of the pulse output is
changed. The new value is specified in NV.
Note: This instruction can be executed only
when pulse output is stopped. An error will
occur if it is executed during pulse output.
8000 0000 to 7FFF FFFF hex
(-2,147,483,648 to 2,147,483,647)
High-speed
counter input (P =
0010 to 0013 hex)
Linear Mode
Differential inputs,
increment/decre-
ment pulses, or pulse
+ direction inputs
The present value of the high-speed counter is
changed. The new value is specified in NV.
Note: An error will occur for the instruction if
the specified port is not set for a high-speed
counter.
8000 0000 to 7FFF FFFF hex
(-2,147,483,648 to 2,147,483,647)
Increment pulse input
0000 0000 to FFFF FFFF hex
(0 to 4,294,967,295)
Ring Mode
0000 0000 to FFFF FFFF hex
(0 to 4,294,967,295)
Interrupt inputs in counter mode (P = 0100 to 0107 hex)
The present value of the interrupt input is
changed. The new value is specified in NV.
0000 to FFFF hex
(0 to 65,535)
Note: An error will occur if a value outside this
range is specified.