LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting wrong analog input from PCI-6229

Hi,
I'm using PCI-6229 as my multifunction card for machine machine automation project. Using LV8.2 for software development.
 
I did use Digital I/O, Analog Output & Analog Input for monitoring. So far, only Analog Input giving me a headache result. I cannot get the correct reading from the input channel which I compare against digital multimeter. Basically this analog input is connected to my Servo Motor Controller Analog Output.
 
I did purposely measure the AI.2 which is NOT CONNECTED at all & yet it still get the reading.
 
please help......
 
regards
 
0 Kudos
Message 1 of 2
(2,811 Views)
Hi StevenK,

Have you tried reading the voltage from test panels in Measurement and Automation Explorer (MAX).  This can be found at Start » All Programs » National Instruments » Measurement and Automation.  Find your device under devices and interfaces and right-click and select test panels.  By running the test in test panels, we can verify that the device is able to read the proper voltage and eliminate any possible errors with the LabVIEW code.  If you are still reading voltages that are incorrect, what type of break-out box are you using to make connections to your PCI-6229?  What is the voltage range you are trying to read and how far off is the reading? 

If you're able to get the test panels to show the correct voltage, I would suggest moving towards our example programs to verify that the device is working in LabVIEW.  One example can be found in the following: (Help » Find Examples » Hardware Input and Output » DAQmx » Analog Measurements » Voltage » Acq&Graph Voltage-Int Clk.vi).  From the code that you posted, it looks like your trying to take in digital values and then you wait 500ms before you do your analog input.  I also wanted to warn you that when running two concurrent loops with global variables you may need to watch out for race conditions.  A good article on this can be found here.  Take a look at the Producer/Consumer tutorial in the related links. 

I hope this helps,
Paul C.
0 Kudos
Message 2 of 2
(2,790 Views)