User`s guide

Universal Library User's Guide Counter Boards - QUAD Series
169
QUAD Series
Counter I/O
Counter functions and methods supported
UL: cbC7266Config(), cbCIn(), cbCIn32(), cbCLoad(), cbCLoad32(), cbCStatus()
UL for .NET: C7266Config(), CIn(), CIn32(), CLoad(), CLoad32(), CStatus()
Counter argument values
CounterNum PCM-QUAD02, CIO-QUAD02
1 to 2
CIO-QUAD04, PCI-QUAD04
1 to 4
RegName UL:
COUNT1, COUNT2, PRESET1, PRESET2, PRESCALER1, PRESCALER2
UL for .NET:
QuadCount1, QuadCount2, QuadPreset1, QuadPreset2, QuadPreScaler1,
QuadPreScaler2
CIO-QUAD04, PCI-QUAD04 also support:
UL:
COUNT3, COUNT4, PRESET3, PRESET4, PRESCALER3, PRESCALER4
UL for .NET:
QuadCount3, QuadCount4, QuadPreset3, QuadPreset4, QuadPreScaler3,
QuadPreScaler4
LoadValue When using cbCLoad32() or CLoad32() to load the COUNT# or PRESET# registers,
values up to 16.78 million (2
24
1) can be loaded. Values using cbCLoad() and
CLoad()are limited to 65,535 (2
16
1). Refer to "Basic signed integers" on page 164
for more information. When loading the PRESCALER# register, values can be from 0
to 255. (Digital Filter Clock frequency = 10 MHz/LoadValue + 1.)
Hardware considerations
Loading and Reading 24-bit values
The QUAD series boards feature a 24-bit counter. For counts of less than 16-bits (65535), you can use the
cbCIn() and cbCLoad() functions, or the CIn() and CLoad() methods. You can use the cbCIn32() and
cbCLoad() functions, or the CIn32() and CLoad32() methods for any number supported by the LS7266
counter (24 bits = 16777216).
Cascading counters (PCI-QUAD04 only)
The PCI-QUAD04 can be set up for cascading counters. By setting the appropriate registers, you can have (4)
24-bit counters, (2) 48-bit counters, (1) 24-bit and (1) 72-bit counters, or (1) 96-bit counter. The OUTPUT pins
of a counter are directed to the next counter by setting the FLG1 to CARRY/BORROW and the FLG2 to UP/DOWN.
Bits 3 and 4 of the IOR Register control are set to 1,0 to accomplish this.
You can set these bits by using the functions cbC7266Config(BoardNum, CounterNum, Quadrature,
CountingMode, DataEncoding, IndexMode, InvertIndex, FlagPins, and GateEnable). When using the
Universal Library for .NET, use the C7266Config() method.
The constant CARRYBORROW_UPDOWN (value of 3) is used for the parameter FlagPins.