# Python examples sorted by function call

## User-interface-based example programs

Python function name | Program name | Special features/notes
a_in() a_in_32() | ULAI01 ULGT01 |
a_in_scan() | ULAI02 ULAI03 ULAI06 ULAI10 ULAI12 ULAI13 ULAI14 ULAI15 ULAIO01 | FOREGROUND mode BACKGROUND mode with manual data conversion CONTINUOUS BACKGROUND mode EXTCLOCK mode SCALEDATA mode (ULAI15) Various sampling mode options
a_load_queue() | ULAI10 |
a_out() | ULAO01 |
a_out_scan() | ULAO02 ULAO04 ULAIO01 | concurrent a_in_scan() and a_out_scan() SCALEDATA mode (ULAO04)
a_pretrig() | ULAI08 |
a_trig() | ULAI07 |
c_config_scan() | CInScan02 CInScan03 | Demonstrates how to scan a counter input channel in decrement mode, and then write the data to an array. Board 0 must support counter scans. For CInScan03, board 0 must support counter scans in encoder mode.
c_in_32() c_in_64() | ULCT07 | Board 0 must have an event counter.
c_in_scan | CInScan01 CInScan02 CInScan03 | Demonstrates how to scan a range of counter channels and then write the data to an array. The board must support counter scans. For CInScan03, board 0 must support counter scans in encoder mode.
c_load_32() c_load_64() | ULCT07 | Board 0 must have an event counter.
create_daq_device() | DaqDevDiscovery01 DaqDevDiscovery02 |
daq_in_scan() | DaqInScan01 DaqInScan02 DaqInScan03 DaqSetTrigger01 | Demonstrates how to synchronously scan analog, counter, and thermocouple input channels, and digital input ports. Board 0 must support synchronous output.
daq_out_scan() | DaqOutScan01 | Demonstrates how to synchronously write to an analog output channel and digital output port in the background. Board 0 must support synchronous output.
daq_set_setpoints() | DaqSetSetpoints01 | Demonstrates how to configure and use setpoints, including how to add the setpoint status to the scan list and perform asynchronous reads of the setpoint status. Board 0 must support daq_in_scan().
daq_set_trigger() | DaqSetTrigger01 | Demonstrates how to set up start and stop trigger events. Board 0 must support synchronous output.
d_bit_in() | ULDI02 |
d_bit_out() | ULDO02 |
d_config_bit() | ULDI06 |
d_config_port() | ULDI01 ULDI02 ULDI03 ULDO01 ULDO02 |
d_in_scan() | ULDI03 |
d_out() | ULDO01 ULDO02 |
d_out_scan() | None | No example programs at this time
flash_led() | ULFL01 | Flashes the onboard LED for visual identification. Board 0 must have an external LED.
from_eng_units() | ULAO01 ULAI07 ULAI14 |
get_board_name() | ULGT03 ULGT04 |
get_config() | ULGT03 ULGT04 ULTI01 ULTI02 |
get_daq_device_inventory() | DaqDevDiscovery01 | Discovers DAQ devices and assigns board numbers to the detected devices.
get_net_device_descriptor() | DaqDevDiscovery02 | Discovers network DAQ devices and assigns board numbers to the detected devices.
get_status() | ULAI03 ULAI06 ULAIO01 ULDI03 |
get_tc_values() | DaqInScan03 | Demonstrates how to retrieve analog, thermocouple, and digital data from a synchronous scan operation. Board 0 must support synchronous input.
pulse_out_start() pulse_out_stop() | PulseOutStart01 | Demonstrates how to start and stop a timer square wave output. Board 0 must have a timer output. You enter a frequency and a duty cycle within the timer range.
release_daq_device() | DaqDevDiscovery01 DaqDevDiscovery02 |
scaled_win_array_to_buf() | None | No example programs at this time.
scaled_win_buf_alloc() scaled_win_buf_to_array() | ULAI15 | Demonstrates how to store scaled data in an array.
set_trigger() | ULAI14 |
stop_background() | ULAI03 ULAI06 ULAIO01 ULDI03 | concurrent a_in_scan() and a_out_scan()
t_in() | ULTI01 |
t_in_scan() | ULTI02 |
timer_out_start() timer_out_stop() | TimerOutStart01 | Demonstrates how to start and stop a timer square wave output. Board 0 must have a timer output. You enter a frequency within the timer's range.
to_eng_units()> to_eng_units_32() | ULAI01 ULAI07 |
v_in() v_in_32() | VIn01 | Demonstrates how to read an A/D input channel.
v_out() | VOut01 | Demonstrates how to write to a D/A output channel.
win_buf_alloc() win_buf_alloc_32() win_buf_alloc_64() win_buf_free() win_buf_to_array() win_buf_to_array_32() | ULAI02 ULAI03 ULAI06 ULAI08 ULAI10 ULAI12 ULAI13 ULAI14 ULAI15 ULAIO01 ULAO02 ULDI03 |
win_array_to_buf() | ULAIO01 ULAO02 |
win_buf_alloc_32() | CInScan01 CInScan02 | Demonstrates how to allocate a Windows global memory buffer for use with 32-bit scan functions.
win_buf_to_array_32() | CInScan01 CInScan02 | Demonstrates how to copy 32-bit data from a Windows memory buffer into an array.

## Console-based example programs

Python function name | Program name | Special features/notes
a_in() | a_in.py | Returns a single analog input value in counts and converts the data to voltage.
a_in() | usb_2408_2416.py | Sets up and configures device-specific properties to perform analog input operations on the USB-2408 and USB-2416 devices.
v_out() | v_out.py | Outputs a single analog output voltage value.
a_in_scan() | a_in_scan_foreground.py | Runs an analog input scan in the foreground at a slow rate and shows the last 10 samples per channel in the buffer on the console.
a_in_scan() | a_in_scan_background.py | Runs an analog input scan in the background at a slow rate and shows some of the samples in the buffer on the console.
a_in_scan() | a_in_scan_file.py | Runs an analog input scan using a circular buffer and writes the data to a file.
a_out_scan() | a_out_scan.py | Performs an analog output scan; a slow sine wave from two analog output channels is demonstrated.
c_in() | c_in.py | Reads events from a counter.
daq_in_scan() | daq_in_scan_USB-1800.py | Sets up and configures device-specific properties to perform a DaqInScan operation on the USB-1808 and USB-1808X devices
d_bit_in() d_in() | digital_in.py | Acquires data from a single digital bit as well as from a digital input port.
d_bit_out() d_out() | digital_out.py | Updates a single digital bit as well as a digital output port.
pulse_out_start() | pulse_out.py | Performs a pulse output operation.
timer_out_start() | timer_out.py | Performs a timer output operation.
t_in() | thermocouple.py | Sets up and configures device-specific properties for our thermocouple products and read analog input data as temperature.
v_in() v_in_32() | v_in.py | Returns a single analog input value in voltage.