trent r
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by trent r
-
-
I am using a USB-2416-4AO with AI-EXP32 expansion board and am getting an Error 24: Invalid Sampling Rate. This code works properly using on other DAQ / PC pairs so there must be something wrong with my setup. The DAQ is using the latest firmware (2.03). A colleague recalls seeing something similar when the DAQ came back from calibration and was still in some "calibration" configuration rather than its normal state but does not recall the details - could this be the cause here? Any other suggestions?
board_num = 0 dout_low_chan = 0 dout_high_chan = 0 dout_total_count = 10240 dout_rate = 1000 dout_ao_range = ULRange.BIP10VOLTS dout_memhandle = ul.win_buf_alloc(10240) dout_scan_options = (ScanOptions.BACKGROUND | ScanOptions.CONTINUOUS) low_chan = 0 high_chan = 1 ul_buffer_count = 3300 rate = 550 ai_range = ULRange.BIP10VOLTS memhandle = ul.scaled_win_buf_alloc(3300) scan_options = (ScanOptions.BLOCKIO | ScanOptions.BACKGROUND | ScanOptions.CONTINUOUS | ScanOptions.SCALEDATA) chan_array = [0,23] gain_array = [ULRange.BIP10VOLTS,ULRange.BIP10VOLTS] ul.a_out_scan(board_num, dout_low_chan, dout_high_chan, dout_total_count, dout_rate, dout_ao_range, dout_memhandle, dout_scan_options) ul.a_load_queue(board_num, chan_array, gain_array, len(chan_array)) ul.a_in_scan(board_num, low_chan, high_chan, ul_buffer_count, rate, ai_range, memhandle, scan_options) # Running this line results in Error 24
Error 24: Invalid Sampling Rate
in Measurement Computing (MCC)
Posted
Oh interesting! We should be calling ul.ignore_instacal() before setting up the DAQ (which I forgot to include in my stub code - my bad on that! The full code is located below). Changing Ch23's rate to 3750 in InstaCal did resolve it, despite the call to ul.ignore_instacal(). Thanks for the help!