« Close

Datasheets and User Guides

App Notes

Software & Driver

 

2.22 - eTCValues()

An easy function that updates and reads all the timers and counters. This is a simple alternative to the very flexible IOType based method normally used by this driver.

Declaration:

LJ_ERROR _stdcall eTCValues (  LJ_HANDLE Handle,
                               long *aReadTimers,
                               long *aUpdateResetTimers,
                               long *aReadCounters,
                               long *aResetCounters,
                               double *aTimerValues,
                               double *aCounterValues,
                               long Reserved1,
                               long Reserved2)

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:

  • Handle – Handle returned by OpenLabJack().
  • aReadTimers – An array where each element specifies whether to read that timer. A nonzero value for an array element specifies to read that timer.1
  • aUpdateResetTimers – An array where each element specifies whether to update/reset that timer. A nonzero value for an array element specifies to update/reset that timer.1
  • aReadCounters – An array where each element specifies whether to read that counter. A nonzero value for an array element specifies to read that counter.2
  • aResetCounters – An array where each element specifies whether to reset that counter. A nonzero value for an array element specifies to reset that counter.2
  • aTimerValues – An array where each element is the new value for that timer. Each value is only updated if the appropriate element is set in the aUpdateResetTimers array.1
  • Reserved (1&2) – Pass 0.

Outputs:

  • aTimerValues – An array where each element is the value read from that timer if the appropriate element is set in the aReadTimers array.
  • aCounterValues – An array where each element is the value read from that counter if the appropriate element is set in the aReadCounters array.

1 Array size must be equal to the number of timers available on the device. UE9:6, U6:4, U3:2
2 Array size must be equal to the number of counters available on the device. UE9:2, U6:2, U3:2