Echelon I/O Model Reference for Smart Transceivers and Neu Manual de usuario Pagina 163

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 209
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 162
I/O Model Reference 153
Syntax
pin
[input] totalcount [mux | ded] [invert]
io-object-name
;
pin
An I/O pin. Totalcount input can specify pins IO_4 through IO_7.
mux | ded
Specifies whether the I/O object is assigned to the multiplexed or dedicated
timer/counter. This keyword is used only when pin IO_4 is used as the input
pin.
The mux keyword assigns the I/O object to the multiplexed timer/counter.
The ded keyword assigns the I/O object to the dedicated timer/counter. The
multiplexed timer/counter is always used for pins IO_5 through IO_7.
invert
Causes positive edges to be counted. By default, totalcount input counts the
number of negative input edges.
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-name
);
Example
IO_4 input totalcount ded ioEventCount;
unsigned long events = 0;
mtimer repeating tick = 100;
when (timer_expires(tick)) {
events += io_in(ioEventCount);
// this sums up all events since initialization-time
}
Vista de pagina 162
1 2 ... 158 159 160 161 162 163 164 165 166 167 168 ... 208 209

Comentarios a estos manuales

Sin comentarios