UL for Linux
User library to access and control supported MCC hardware over the Linux platform
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Example Projects

UL for Linux includes example projects you can run with MCC hardware.

UL for Linux example projects are installed into an "examples" folder as part of the project make and are ready to run.
Connect a supported Measurement Computing DAQ device to your system before running an example. Perform the following steps to run a UL for Linux example from a terminal window:

  1. Open a terminal window in the UL for Linux examples folder directory.
  2. Enter ./filename.
    For example, enter ./AIn to run the analog input example.

Users can also choose to import the example code into an IDE, such as Eclipse, and run the examples from that environment.

The UL for Linux package includes the following example projects:

UL for Linux ExampleDescription
AInReads an A/D input channel. Demonstrates the use of ulAIn().
AInScanScans a range of A/D input channels, and stores the data in an array. Demonstrates the use of ulAInScan() and ulAInScanStop().
AInScanWithEventsPerforms an A/D scan using events to determine when data is available or when the acquisition is complete. The example also demonstrates how to retrieve the data when it becomes available. Demonstrates the use of ulEnableEvent(), ulAInScanWait(), and ulAInScanStop().
AInScanWithQueueCreates a queue that sets individual channel ranges for an A/D scan. Demonstrates the use of ulAInLoadQueue(), ulAInScan(), and ulAInScanStop().
AInScanWithTriggerScans a range of A/D channels when a trigger is received, and stores the data in an array. This example shows how to obtain and configure trigger options. Demonstrates the use of ulAInScan() and ulAInScanStop().
AInScanIepeEnables IEPE mode for a range of A/D input channels, and scans the specified A/D input channels. Demonstrates the use of ulAInScan() and ulAInScanStop().
AOutWrites a specified value to a D/A output channel. Demonstrates the use of ulAOut().
AOutScanPerforms a D/A scan. Data can be viewed with an oscilloscope or meter. Demonstrates the use of ulAOutScan() and ulAOutScanStop().
CInSets the initial value of a counter and counts events. Demonstrates the use of ulCIn() and ulCClear().
CInScanScans a range of counter channels. Demonstrates the use of ulCInScan() and ulCInScanStop().
CInScanWithEncoderScans a range of encoder channels. Demonstrates the use of ulCInScan(), ulCConfigScan(), and ulCInScanStop().
DaqInScanSimultaneously acquires analog, digital, and counter data. Demonstrates the use of ulDaqInScan(), ulDaqInScanStatus, and ulDaqInScanStop().
DaqInScanWithTriggerSets up a trigger function, and simultaneously acquires analog, digital, and counter data when the trigger is received. Demonstrates the use of ulDaqInScan() and ulDaqInScanStop().
DaqOutScanSimultaneously outputs analog and digital data. Demonstrates the use of ulDaqOutScan(), ulDaqOutScanStatus, and ulDaqOutScanStop().
DBitInConfigures multiple digital bits for input and reads the bit values. Demonstrates the use of ulDConfigBit() and ulDBitIn().
DBitOutWrites a specified value to multiple digital output bits. Demonstrates the use of ulDConfigBit() and ulDBitOut().
DInConfigures a port for input and reads the port value. Demonstrates the use of ulDConfigPort() and ulDIn().
DInScanConfigures a port for input and continuously reads it. Demonstrates the use of ulDConfigPort(), ulDIn(), and ulDInScanStop().
DOutConfigures a port for output and writes a specified value. Demonstrates the use of ulDConfigPort() and ulDOut().
DOutScanConfigures the port direction and outputs digital data. Demonstrates the use of ulDConfigPort(), ulDOutScan(), and ulDOutScanStop().
RemoteNetDiscoveryDiscovers remote Ethernet DAQ devices. Demonstrates the use of ulGetNetDaqDeviceDescriptor() and ulFlashLed().
TInReads a temperature input channel. Demonstrates the use of ulTIn().
TmrPulseOutGenerates an output pulse at a specified duty cycle and frequency. Demonstrates the use of ulTmrPulseOutStart() and ulTmrPulseOutStop().