LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read digital Load Cell with LTC 1298 ADC using USB-6009

I am very new to the DIO and using LV7.1 with NI USB-6009 to acomplish following task.

 

I have a load cell that provides 0-7 V output. I need to connect a ADC (LTC 1298) to convert analog output to digital.

 

Read this digital output from load cell into LV using USB-6009.

 

Note: I am trying this understand how to read digital output from a sensor. I know how to use the anlog out from load cell to make measurements.

 

I have tried different knowledge base articles, NI exmples and forum to understand this task with no success.

 

Please provide your recommendations for the same.

 

For reference: DATA sheet for the ADC

 

Thanks

 

 

0 Kudos
Message 1 of 13
(5,096 Views)

Hello and welcome to NI forums.  I was looking at the datasheet for the 1298 and it looks like as long as you are wiring pin 6 (Dout) to one of the digital pins of the 6009 you should be good to go.  One thing to take note of is the supply voltage (Vcc).  Make sure you are using a supply voltage around 5V in order to operate around the digital logic level.  There are several digital examples in the NI Example Finder (Help » Find Examples) which can read a digital line from your DAQ card.  In the NI Example Finder you just need to go to Hardware Input and Output » DAQmx » Digital Measurements, and within there are plenty of examples for reading digital lines.  You mentioned that you have tried using the task with no success so far, but what exactly is happening.  Are you receiving an error or just not reading anything from the digital line?  One thing you should try is to verify the output of the 1298 by using a voltmeter, just to make sure the output is within an acceptable range (0-5V). 

 

Regards,

Message 2 of 13
(5,060 Views)

Let me send you my VI, that way you can what i trying to accomplish.

 

I have already measured the output voltage from 1286 which is zero volts. After reading the digital line and changing binary output to decimal format and displaying the result on front panel.

 

When i load the cell, i see the analog output chaging but the digital output remains constant.

 

I am displaying both analog and digital output on FP to make sure A/D coversion is right.

 

 

0 Kudos
Message 3 of 13
(5,046 Views)
First, since you already have a way to read the analog voltage with the NI device, what is the point of a second A/D? Second, nowhere in your code do you have any logic to shift out the digital signal. Have you looked at the timing diagrams of the A/D? You have to implement those and not just sit around and wait for the digital signal to appear.
Message 4 of 13
(5,040 Views)

Hey guys,

 

The 1298 has a digital output line (pin 6) so I believe he is just trying to read from there.  The question I would like to know is whether you have tried measuring the digital output line with a voltmeter and not LabVIEW?  Your code looks correct for reading a digital line, but you need to verify that there is actually a voltage being generated from pin 6 of the 1298.  Probe that pin before you send it to the DAQ card and let me know what the voltage output is.

 

Regards,

Message 5 of 13
(5,001 Views)
Yes, it is a digital output and in order to get the 12 different bits (it is clearly described as a serial stream), you have to use the CLK pin to shift each bit out. This is also clearly described. No matter what the voltmeter reads or whether it matches what the USB-6009 is reading, it's still a single bit and there is nothing in the code to provide the necessary clock. Figure 2 is a timing diagram of the 1298
Message 6 of 13
(4,992 Views)

Let me answer few of the queries raised during last few posts,

 

I measured the output from the 1286. its always 0 volts.

 

Dennis mentioned about reading 12 bits separatey and transform those bits into actual measurement. This makes sense to me. can you please elaborate on it.

 

I know how to measure load using AI. I am trying this task to read Digital out from a digital sensor. Presently i dont have the digital sensor so i am building this digital load cell by adding ADC.

 

I would like to understand How in the world i could read digital output from a digital sensor using NI Hardware and LV and convert it to engg units. I think i have to read the digital output in bits (12, 16, 18, 24 etc) and conver these bits in integer number. It sounds very complex to me. Please help me understand this. Without background into digital electronics, it is kinda becoming difficult to me.

 

1286 requires a clock (Pin 7, Max 200 Khz) to operate. I am providing this clock using an external function gernerator. Let me know if i could provide a clock for 1286 from Labview.

 

Let me know, if you guys have any questions.

0 Kudos
Message 7 of 13
(4,966 Views)

Yes, of course it requires a clock and that is what I have been is missing from your program. You need to clock it with a digital output from the 6009 and not something external that you cannot synchronize to. You have to reproduce the entire timing diagram that is in the data sheet. Essentially, you clock one bit out at a time. When you read, you will then need to assign it a value based on it's bit location. If it's bit 0 and it's high, it's value is 1, if it's bit 1 and high, it's value is 2, bit 2 has a value of 4, etc. This is elementary binary arithmetic.

 

You may be wasting your time though, unless the digital sensor uses the exact same mechanism.

Message 8 of 13
(4,963 Views)

Search the forum for 'I2C' and 'SPI'  to find vis that helps you with programming the bit-banging of your DIO lines... (here is one)

 

However an understanding of the communication principles and timing is needed.

RTFMD(atasheet), there is a detailed chapter on how to get the ADC to output data(bits).... 

 

 

Message Edited by Henrik Volkers on 01-25-2010 01:42 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 9 of 13
(4,908 Views)

hi

 

sorry i interrupt. i am also using a load cell but with a PIC16f876A. i am snding via bluetotth and emulating as serial with visa. the fact is that i can read the values correctly, but always after a rigth value there comes up a zero. attached you will find an image of what my wavechart looks like so you can give an idea of what i am talking about. does anybody knows what could be happening??

 

thank you all,

 

Best wishes,

 

Lucas.

0 Kudos
Message 10 of 13
(3,700 Views)