LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Example LabWindows/CVI code for NI435x

Hi,

Does NI have any tested example code that I can download for the NI4351 PCI DAQ card using the NI435x driver on LabWindows/CVI v5.5? I have only been able to find LabVIEW examples to date. I'm using functions such as NI435X_Check_and_Read(), called from an asynchronous timer for continous scan of temperature and voltages, but I get crazy temperature readings from time to time. No such problems when I use NI MAX, so a hardware problem is ruled out. I would therefore like to see if my programming approach is flawed.


Thanks,
John.
0 Kudos
Message 1 of 3
(3,187 Views)

Hi,

  was wondering if you've got this resolved now? I beleive you were talking directly with one of my colleagues in the UK office, and he'd suggested allowing more settling time or a channel gap (grounded channel between your inputting channels) so it got a chance to leak away any built up charge.

Also, For examp if you measure a large voltage and then try and measure a thermocouple (mV levels) in the same scan, the device will select the higher range and gain and your thermocouple reading will not be accurate. If you must measure a wide range of voltages then you will need to scan them separately and reconfigure the range settings each time.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 3
(3,160 Views)

Hi,

Your colleagues in the UK are currently dealing with my query and are being very helpful, thanks. I've inserted 'dummy' channels between 'real input' channels, grounded all unused channels, grounded one end of the thermocuple through a resistor, and have deliberately kept all other channels at 0V, but the problem still remains for both fast and slow sampling rates. I will post another reply to this thread when the issue is resolved.

Regarding the range: I define my group of channels with the 'NI345X_Set_Scan_List' function. The 'NI345X_Set_Auto_Zero' function (as well as functions for powerline frequency, reading rate, etc.), doesn't take a channel list because as its on-line documentation indicates, it "sets auto zero for all channels". However, the 'NI435X_Set_Range' function *has* an argument for a channel list, which implies to me that ranges can be independently set for each channel in the list. If not, then there's no point in having this argument, as the channel string is already defined by 'NI345X_Set_Scan_List'. If my understanding of your message is correct however, the DAQ will only read at a setting appropriate to the highest range specified using 'NI435X_Set_Range', which would indeed appear to make its argument for a channel string both redundant and a little misleading vis a vis capability. If this is the case though, 'NI435X_Set_Range' need only be called once for each scan list configuration and I have overestimated the capabilities of the NI4351. I cannot afford the overhead of continously reconfiguring the hardware as you suggest, because I need to feed an averaged temperature reading to a PID algorithm once every second.

Thank you for your feedback though, and I would be grateful for clarification on the above please.

Regards,

John.

0 Kudos
Message 3 of 3
(3,142 Views)