C9513Config()

Sets all of the configurable options of a 9513 counter.

For more information, refer to the AM9513A data sheet (9513A.pdf) in the Documents subdirectory where you installed the UL (C:\Program files\Measurement Computing\DAQ by default).

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function C9513Config(ByVal counterNum As Integer, ByVal gateControl As MccDaq.GateControl, ByVal counterEdge As MccDaq.CountEdge, ByVal counterSource As MccDaq.CounterSource, ByVal specialGate As MccDaq.OptionState, ByVal reload As MccDaq.Reload, ByVal recycleMode As MccDaq.RecycleMode, ByVal bcdMode As MccDaq.BCDMode, ByVal countDirection As MccDaq.CountDirection, ByVal outputControl As MccDaq.C9513OutputControl) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo C9513Config(int counterNum, MccDaq.GateControl gateControl, MccDaq.CountEdge counterEdge, MccDaq.CounterSource counterSource, MccDaq.OptionState specialGate, MccDaq.Reload reload, MccDaq.RecycleMode recycleMode, MccDaq.BCDMode bcdMode, MccDaq.CountDirection countDirection, MccDaq.C9513OutputControl outputControl)

Parameters

counterNum

Counter number (1 - n) where n is the number of counters on the board. (For example, a CIO-CTR5 has 5, a CIO-CTR10 has 10, and so on. See board-specific info).

gateControl

Sets the gating response for level, edge, etc. Set it to one of the constants in the "gateControl parameter values" section below.

counterEdge

Which edge to count. Referred to as "Source Edge" in the 9513 data book. Can be set to POSITIVEEDGE (count on rising edge) or NEGATIVEEDGE (count on falling edge).

counterSource

Each counter may be set to count from one of 16 internal or external sources. Set it to one of the constants in the "counterSource parameter values" section below.

specialGate

Special gate may be enabled (MccDaq.OptionState.Enabled) or disabled (MccDaq.OptionState.Disabled).

reload

Reload the counter from the load register (reload = MccDaq.Reload.LoadReg) or alternately load from the load register, then the hold register (reload = MccDaq.Reload.LoadAndHoldReg).

recycleMode

Execute once (MccDaq.RecycleMode.OneTime) or reload and recycle (MccDaq.RecycleMode.Recycle) to count repetitively.

bcdMode

Counter may operate in binary coded decimal count (MccDaq.BCDMode.BCDCount) or binary count (MccDaq.BCDMode.BinaryCount).

countDirection

AM9513 may count up (MccDaq.CountDirection.CountUp) or down (MccDaq.CountDirection.CountDown).

outputControl

The type of output desired. Set it to one of the constants in the "outputControl parameter values" section below.

Returns

gateControl parameter values

All of the gateControl settings are MccDaq.GateControl enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the GateControl enumeration (for example, variable = MccDaq.GateControl.NoGate, variable = MccDaq.GateControl.AhlTcPrevCtr, etc.).

NoGateNo gating
AhlTcPrevCtrActive high TCN -1
AhlNextGateActive High Level GATE N + 1
AhlPrevGateActive High Level GATE N - 1
AhlGateActive High Level GATE N
AllGateActive Low Level GATE N
AheGateActive High Edge GATE N
AlegateActive Low Edge GATE N

counterSource parameter values

All of the counterSource settings are MccDaq.CounterSource enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the CounterSource enumeration (for example, variable = MccDaq.CounterSource.TcPrevCtr, variable = MccDaq.CounterSource.CtrInput1, etc.).

TcPrevCtrTCN - 1 (Terminal count of previous counter)
CtrInput1SRC 1 (Counter Input 1)
CtrInput2SRC 2 (Counter Input 2)
CtrInput3SRC 3 (Counter Input 3)
CtrInput4SRC 4 (Counter Input 4)
CtrInput5SRC 5 (Counter Input 5)
Gate1GATE1
Gate2GATE2
Gate3GATE3
Gate4GATE4
Gate5GATE5
Freq1F1
Freq2F2
Freq3F3
Freq4F4
Freq5F5

outputControl parameter values

All of the outputControl settings are MccDaq.9513OutputControl enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the 9513OutputControl enumeration (for example, variable = MccDaq.9513OutputControl.AlwaysLow, variable = MccDaq.9513OutputControl.HighPulseOnTc, etc.).

AlwaysLowAlwaysLow
HighPulseOnTcHigh pulse on Terminal Count
ToggleOnTcTC Toggled
DisconnectedInactive, Output High Impedance
LowPulseOnTcActive Low Terminal Count Pulse
3, 6, 7(numeric values) Illegal

Notes