775
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
High-speed Counter/Pulse Output Instructions
3
ORG
Flags
Function
ORG(889) performs an origin search or origin return operation for the port specified in P using the
method specified in C.
The following parameters must be set in the PLC Setup before ORG(889) can be executed.
An origin search or origin return is started each time ORG(889) is executed. It is thus normally sufficient
to use the differentiated version (@ORG(889)) of the instruction or an execution condition that is turned
ON only for one scan.
z Origin Search (Bits 12 to 15 of C = 0 hex)
ORG(889) starts outputting pulses using the
specified method at the Origin Search Initial
Speed (1 in diagram).
Pulse output is accelerated to the Origin Search
High Speed using the Origin Search
Acceleration Rate (2 in diagram).
Pulse output is then continued at constant speed
until the Origin Proximity Input Signal turns ON
(3 in diagram), from which point pulse output is
decelerated to the Origin Search Proximity
Speed using the Origin Search Deceleration
Rate (4 in diagram).
Pulses are then output at constant speed until
the Origin Input Signal turns ON (5 in diagram).
Pulse output is stopped when the Origin Input
Signal turns ON (6 in diagram).
When the origin search operation has been
completed, the Error Counter Reset Output will
be turned ON.
The above operation, however, depends on the operating mode, origin detection method, and other
parameters.
Name Label Operation
Error Flag P_ER • ON if the specified range for P or C is exceeded.
• ON if ORG(889) is specified for a port during pulse output for SPED(885), ACC(888), PLS2(887) or IFEED(892).
• ON if ORG(889) is executed in an interrupt task when an instruction controlling pulse output is being executed in a
cyclic task.
• ON if the origin search or origin return parameters are not within range.
• ON if the Origin Search High Speed is less than or equal to the Origin Search Proximity Speed or the Origin Search
Proximity Speed is less than or equal to the Origin Search Initial Speed.
• ON if an origin return is specified and the origin has not been established.
• For a CJ2M CPU Unit, ON for any function that uses I/O on the Pulse I/O Module even if a Pulse I/O Module is not
mounted.
• OFF in all other cases.
Origin search Origin return
• Origin Search Function Enable/Disable
• Origin Search Operating Mode
• Origin Search Operation Setting
• Origin Detection Method
• Origin Search Direction Setting
• Origin Search/Return Initial Speed
• Origin Search High Speed
• Origin Search Proximity Speed
• Origin Search Acceleration Rate
• Origin Search Deceleration Rate
• Origin Compensation
• Origin Proximity Input Signal Type
• Origin Input Signal Type
• Limit Input Signal Type
• Positioning Monitor Time
• Origin Return Target Speed
• Origin Search/Return Initial Speed
• Origin Return Acceleration Rate
• Origin Return Deceleration Rate
A
B
C
D
E
F
Pulse frequency
Origin search
initial speed
Origin search
high speed
Origin search
proximity speed
ORG(889) executed.
Origin Proximity Input Signal
Stop
Origin Input Signal
Time
Origin search
acceleration rate
Origin search
deceleration rate