# cbC8536Config()

Configures an 8536 counter for desired operation. This function can only be used with 8536 counters.

For more information, refer to the Zilog 8536 product specification (Z8536.pdf) on our web site at mccdaq.com.

## Function Prototype

C/C++

int cbC8536Config(int BoardNum, int CounterNum, int OutputControl, int RecycleMode, int TrigType)

Visual Basic

Function cbC8536Config(ByVal BoardNum&, ByVal CounterNum&, ByVal OutputControl&, ByVal RecycleMode&, ByVal TrigType&) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99. The board must have an 8536 counter.

CounterNum

Selects one of the counter channels. An 8536 has three counters. The value may be 1, 2 or 3. INT32 Series boards have two chips installed, so the CounterNum value may be 1 to 6.

OutputControl

Specifies the action of the output signal. Set it to one of the constants in the "OutputControl argument values" section below.

RecycleMode

If set to RECYCLE (as opposed to ONETIME), the counter automatically reloads to the starting count every time it reaches 0, then counting continues.

TrigType

Specifies the trigger type. Set it to one of the constants in the "TrigType argument values" section below.

## Returns

- Error code or 0 if no errors

### OutputControl argument values

HIGHPULSEONTC | Output transitions from low to high for one clock pulse on the terminal count.
TOGGLEONTC | Output changes state on the terminal count.
HIGHUNTILTC | Output transitions to high at the start of counting, then goes low on the terminal count.

### TrigType argument values

HW_START_TRIG | The first trigger on the counter's trigger input initiates loading of the initial count. Counting proceeds from the initial count.
HW_RETRIG | Every trigger on the counter's trigger input initiates loading of the initial count. Counting proceeds from the initial count.
SW_START_TRIG | The cbCLoad() function initiates loading of the initial count. Counting proceeds from the initial count.