LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

getting daq device attributes,calculate AI voltage faster

Hellow there
Iam developing a DLL for general use of DAQ AI devices under CVI 5.5 and NI_DAQ 6.9.3
1. how can i get some attributes on my daq device such as resolution, no# of channels , max sampling rate programaticly on the fly (without having a huge arrey holding those parameters for all device type and have to update this arrey whenever ni intreduce new device).
2.The functions AI_Vsacle & scan_vsacle are way to slow when ia have to convert on the fly the values of a2d reading using high sample rate and diffrent gain for every channel.sample rate over 500000 smp/s the computer cant handle(pentium 4 2.4 MHz 512Mram)

Please Advice
Gabel Daniel
chaban@netvision.net.il
0 Kudos
Message 1 of 4
(3,188 Views)
Hi Gabel,

There is no easy way to get the attributes you described from your daq device because the hardware does not maintain these values on the card to read. You would have to create a table or an .ini file and store the information yourself. If you want to receive information such as serial number, base address, interrupt levels, etc., you can use the call Get_Daq_Device_Info. You can search for some examples of how to read the serial number on the NI website.

Unfortunately, there is no way to speed up the function AI_Vscale and Scan_Vscale. One workaround would be to try using Measurement and Automation Explorer instead. You can create a virtual channel and scale that channel accordingly. Another way would be to implement a multithreaded environment.


Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,188 Views)
Hi Jeremy

I think NI MUST add those attributes in the NI_Daq level driver even thow the hardware does not maintain these info. Other vendors supply this info & much more
For example => Data Translation.

For the 2Nd part 'speed scale functions' my daq system
is already in multy threaded mode, in any case the time to calculate some K samp/sec take more than the next half buffer is ready so iventualy the pc memory allocation will be too large.

Thanks
Gabel Daniel
0 Kudos
Message 3 of 4
(3,188 Views)
Hi Gabel Daniel,

I apologize for this inconvenience. I have created a product suggestion note and sent it to our developers for consideration in future versions of NI-DAQ.

My only other suggestions for your system would be to lower your sampling rate if possible, or stream to disk and perform post-read operations. 500 kS/s is a very high rate of data, and it may be better to focus on reading the data before applying any calculations.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,188 Views)