Oc (output compare), Ocx = 0 will disable the output compare function, Ocx contains the state of the oc function – Yaskawa LEGEND-MC User Manual

Page 186

Advertising
background image

176

LEGEND-MC User’s Manual

OC (Output Compare)

[I/O]

DESCRIPTION:

The OC command allows the generation of output pulses based on the main encoder positions. The output is
a low-going pulse with a duration of approximately 600 nanoseconds and is available at the output compare
signal.

The auxiliary encoder cannot be used while using this function.

NOTE: The OC function requires that the main encoder and auxiliary encoders be configured

exactly the same (see the command, CE). For example: CE 0, CE 10.

The output on pin 7 of the 5 CN connector is a TTL signal and requires JP3 to be installed. The output is
accurate to +/- 40 nanoseconds.

ARGUMENTS: OCX = m, n where

m = Absolute position for first pulse. Integer between -2

⋅ 10

9

and 2

⋅ 10

9

n = Incremental distance between pulses. Integer between -65535 and 65535.

OCx = 0 will disable the Output Compare function.

The sign of the parameter, n, will designate the expected direction of motion for the output compare
function. When moving in the opposite direction, output compare pulses will occur at the incremental
distance of 65536-|n| where |n| is the absolute value of n.

USAGE:

OPERAND USAGE:

_OCx contains the state of the OC function

_OCx = 0: OC function has been enabled but not generated any pulses.

_OCx = 1: OC function not enabled or has generated the first output pulse.

EXAMPLES:

While Moving

Yes

Default Value

-

In a Program

Yes

Default Format

-

Command Line

Yes

Can be Interrogated

No

Used as an Operand

Yes

Distributed Control

Use SA

OCX=300,100

Select X encoder as position sensor. First
pulse at 300. Following pulses at 400, 500…

Advertising