DscQMMCounterControl

Universal Driver Documentation
Initiates a Load, Arm, Load & Arm, Disarm, Save, or Disarm & Save command on a group of counters on Quartz-MM.

An Arm command causes the counter to start counting, and a Disarm command causes it to stop. The counter will not count until it receives an Arm command.

The Save command or Disarm and Save command are used to latch the current contents of the counter into the Hold register for reading. If just the Save command is executed, the counter will continue to count; this is equivalent to the Lap button on a stopwatch. After executing one of these commands, use the dscQMMReadHoldRegister() function to read the latched data.

The Load command or Load and Arm command are used to load the contents of the Load register into the counter before or while arming it. Before executing one of these commands, use the dscSetLoadRegister() function to load the Load register with the desired data.

If you are using a QMM-5 board with only one 9513 chip, or if you are acting on only one counter chip, set the other counter's action to QMM_ACTION_NONE.

The function returns the current counter status bytes in the two-byte array status, which primarily indicates the current state of the outputs of all 5 counters in each group. To just read the status bytes, set the action flags to QMM_ACTION_NONE. On a QMM-5, the second byte of the array will have meaningless data.

Table of contents

Function Definition

BYTE dscQMMCounterControl(DSCB board, DSCQMMMCC* dscqmm_mcc, BYTE* status)

Function Parameters

NameDescription
boardThe handle of the board to operate on
dscqmm_mccData structure for the function
statusThe counter chip status byte:

Return Value

Error code or 0.

Status Bit Table

Bit76543210
NameCMP2CMP1OUT5OUT4OUT3OUT2OUT1BPTR

CMPn -- Status of the comparators for counters 2 and 1

OUTn -- Logic state of the indicated counter output signal

BPTR -- Byte pointer internal to the 9513 chip; used by Universal Driver; not relevant to the user application


This page was last modified 12:08, 12 Feb 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.