beautypg.com

Pulsecount input, Hardware considerations, Usage – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual

Page 155: Example, Ge 145

background image

I/O Model Reference

145

io-object-name

A user-specified name for the I/O object, in the ANSI C format for variable
identifiers.

Usage

unsigned long

input-value

;

input-value

= io_in(

io-object-nam

e);

Example

IO_4 input period mux clock(7) ioPeriod;

// END OF PERIOD:
when (io_update_occurs(ioPeriod)) {
unsigned short timegap; // in tenths of a second

// convert to tenths of sec
timegap = (unsigned short)(io_in(ioPeriod) / 3906);
}

Pulsecount Input

The pulsecount I/O model counts the number of input edges at the input pin over

a period of 0.8388608 seconds. You can use this model to perform average
frequency measurements, implement tachometers, or control devices that require

a precision count of pulses, such as stepper motors.
This model applies to Series 3100 Neuron Chips and Smart Transceivers, and to
Series 5000 Neuron Processors and Smart Transceivers.

Hardware Considerations

A timer/counter can be configured to count the number of input edges (up to

65535) in a fixed time (0.8388608 second) at all allowed input clock rates. Edges
can be defined as rising or falling.
This I/O model is edge sensitive. The clock driving the internal counter in the

Neuron Chip or Smart Transceiver is the actual input signal. The counter is
reset automatically every 0.839 second.
The internal counter increments with every occurrence of an active input edge.
Every 0.839 second, the content of the counter is saved and the counter is then

reset to 0. This sequence is repeated indefinitely.
The actual active edge of the input depends on whether the invert option is used
in the declaration of the function block. The default is the negative edge.