05-14-2012 10:57 AM
Guys,
I have a problem with reading data from my DAQmx.b I am using a USB 6009 DAQ.
Basically, the data is being read from an ADC and output from Port 1/ Line 3 (Digital I/O).
I scoped the port using my Tektronix and found out that the ADC data coming out of the board and into the port is just the stuff I want. but, the main problem is when I try to read the data using software.
The ADC Im using the AD7490. it ourputs a 16 bit data (first 4 bits = ADDRESS, 12 bits = DATA) on every -(ve) edge clock transition.
I am reading the DAQ within a For Loop which loops 32 times. and I update an array (initialised value of 16 bits - boolean FALSE). So every clock pulse, the array is updated and this is then converted to a readable value and displayed as two meters on the Front panel.
at the moment, the data appearing on the screen is not what I want. It is infact a set of spurious data. when I stop the program and start it again, it will sometimes output the proper data and sometimes the spurious one. I say to my self. "If any one is using this system, then when testing it, if they get it right the first time, that should defo get a lottery ticket that day and they will be really lucky".
How do I sort this problem out? Im ataching my code here for your information. The code can seem a bit messy because I'm a newbie in Labview.
Much appreciated
Labmat.
05-14-2012 11:54 AM
I'm not sure you're using the right tools for the job... Are you hooking up the 7490 to the DAQ? Are you trying to read the 7490's output on the DAQ?
Why not just use an analog input on the 6009? With a property node you can read the raw data on the A/D in the DAQ.
05-14-2012 01:01 PM
first of all, thanks for replying.
Yes you are correct. I am hooking up the 7490 to the DAQ and I control the 7490 completley through the DAQ (writing and reading it)
And No, I cannot connect the Analog output directly to the DAQ and use the A/D in that because I am writing a test procedure for a certain board and the only lines I have access to the board are the read/write pins of the 7490. If it wasnt, then I would have defenitely used the A/D on the DAQ rather than the 7490. But Im stuck with it.
Infact, I have used the method you suggested to read data from another PCB and it reads great. I just wish that this board was the same. 😞
any idea?
thanks