0% found this document useful (0 votes)
47 views2 pages

Programming Counter/Timer Tasks For Driverlinx Supported Boards in Labview

This document provides instructions for programming counter/timer tasks for DriverLINX supported boards in LabVIEW. It describes: 1) A bundle is used to control the counter/timer task type and timing parameters. The bundle contains 8 values including clock source, edge, gating, mode, output behavior, pulses, period, and onCount. 2) One technique is to unbundle and rebundle the information to allow a more intuitive front panel control like square wave frequency. The bundle scaling from microseconds can be done on the wiring diagram. 3) The bundle values correspond to the ActiveX or DLL API used in Visual Basic or C/C++, providing examples of how to configure the bundle to match

Uploaded by

Jack Eito Neo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

Programming Counter/Timer Tasks For Driverlinx Supported Boards in Labview

This document provides instructions for programming counter/timer tasks for DriverLINX supported boards in LabVIEW. It describes: 1) A bundle is used to control the counter/timer task type and timing parameters. The bundle contains 8 values including clock source, edge, gating, mode, output behavior, pulses, period, and onCount. 2) One technique is to unbundle and rebundle the information to allow a more intuitive front panel control like square wave frequency. The bundle scaling from microseconds can be done on the wiring diagram. 3) The bundle values correspond to the ActiveX or DLL API used in Visual Basic or C/C++, providing examples of how to configure the bundle to match

Uploaded by

Jack Eito Neo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming Counter/Timer Tasks for DriverLINX Supported Boards in

LabVIEW
Below is shown a typical wiring diagram from LabVIEW for a counter/timer (CT) task for a
DriverLINX supported board.
A bundle is used to control which CT task type (Square Wave Generation, Event Counting,
Frequency Measurement, Pulse Generation, etc.) will be performed as well as the timing
parameters of the task (frequency of the Square Wave, etc.).

The names of the eight values within the bundle are, in top to bottom order: clock, clock edge,
gate, mode, output, pulses, period and onCount.
Clock: pacing source either internal or external
Clock Edge: rising or falling edge of Clock (not used)
Gate: enable or disable gating. If enabled, select level or edge gating
Mode: one of the Task based CT operations implemented by DriverLINX
Output: behavior of the output pin of the selected CT channel
Pulses: either single or continuous
Period: controls timing. Mode dependent. In LabVIEW, is expressed in microseconds.
OnCount: controls timing of delays or pulse duration. Mode dependent. In LabVIEW, is
expressed in microseconds.
One typical technique used is to unbundled and then re-bundle the information. As the wiring
diagram above shows, this allows placement of a single, more intuitive control on the
applications front panel (Square Wave Freq). The user can input the desired frequency of the
square wave on the front panel. The scaling for time expressed in microseconds required by the
VIs implementation can be done on the wiring diagram.
With the exception of clock edge, these values correspond to the ActiveX or DLL API of the
DriverLINX driver that would be used from Visual Basic or C/C++ languages as shown below.

VB code:

C/C++ code:

NOTE: These VB and C/C++ code fragments do not show all the necessary code. For example, opening the driver,
closing the driver and hardware initialization steps are not shown.

If a functional VB or C++ example exists for a given mode of operation for a board, then that code
could be used as a guideline for how the bundle in the LabVIEW program should be configured to
carry out the same operation.

You might also like