Oc[n] – output compare – ElmoMC SimplIQ Command Reference User Manual

Page 113

Advertising
background image

OC[N] – Output Compare

Purpose:
Output a signal when the present position is compared to a user defined position.

The OC command generates a train of pulses according to the encoder position values.

The OC[1] command operates in two modes:

1. OC[1]=1: Absolute position mode. The first pulse is generated by the initialized

absolute position defined by OC[2] (i.e. PX=OC[2] or PY=OC[2] depending on the
OC[6] setting) and continues at position intervals specified by the OC[3] value. That
is, PX or PY =OC[2]+k*OC[3], where k is the number of successful compared
occurrences (k=1,2,...).

2. OC[1]=2: Immediate mode. The first pulse is generated immediately after the

command is received by the drive (no initialized absolute position value is required)
and continues at position intervals specified by OC[3] counts.

The number of occurrences in which the pulses are generated can be limited by OC[5].
The duration of a pulse can be set by OC[4].

Index Description

1

0: Disable Output Compare

1: Accept last changes in OC[N] and enable Output Compare beginning at

Absolute Position OC[2].

Note: to get proper execution of the command, the following condition
should be met: OC[3]*(OC[2]-PX)>0 when the source is the main
feedback, or OC[3]*(OC[2]-PY)>0 when the source is the auxiliary
feedback.

2: Accept last changes in OC[N] and enable Output Compare immediately

2

The absolute position for first pulse (PX or PY value). Applicable only in
absolute position mode. This value cannot exceed the modulo limit in the same
direction of motion i.e. |OC[2]|-|PX| or |OC[2]|-|PY| must be positive.

3

The position interval between subsequent pulses (in encoder counts).

The positive/negative value of OC[3] should be set according to the
direction of the encoder motion. When the direction is positive (increasing
PX value) OC[3] should be positive; otherwise it should be negative.

4

N: Pulse duration in 25*(N+1) [nSec].

5

N: Number of pulses to generate

0: Infinite Output Compare mode (train of pulses will end only with the
OC[1]=0 command)

6

Output Compare Source Signal

0: Output Compare on Main feedback.

1: Output Compare on Auxiliary feedback

OC[1] returns the following values:

SimplIQ

Command Reference Manual

Alphabetical Listing

MAN-SIMCR (Ver. 4.5)

3-100

Advertising