LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read digital word in labview?

Solved!
Go to solution

Hello,

I'm using DAQ card (6259) and I want to read a digital word in it.

for example I want to be able to read the sequence "011000110" that will be send by an outside user (another different kind of card).

what is the best way to do that?

 

thank you

0 Kudos
Message 1 of 12
(4,385 Views)

If the "word" is transmitted in parallel lines, this is very easy. Just configure your DAQ device to acquire digital data per port (by default 8 lines) and configure the DAQmx Read to return data as U8.

If the word is transmitted serial on a single line, you have to acquire data in a buffered approach. The problem that might occur here: how do you know that the first bit you read is really the first bit of your word?

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 12
(4,380 Views)

Hi Jackedi,

 

I would also recommend the DAQmx functionality to read the word.

What kind of device are you using to send the word?

Message Edited by Pattos on 10-27-2009 04:47 AM
Pattos

LabVIEW Gretchin
0 Kudos
Message 3 of 12
(4,378 Views)

i'm using a dsp to send the word

 

is it possible to get on the same line the first rise as synchronizer and then get the words?

is there an example for such VI?

0 Kudos
Message 4 of 12
(4,352 Views)

Is this the same as your other question?

 

If so, please stick to ONE thread. 

Message 5 of 12
(4,348 Views)

no it is not the same

the other one is about tcp connection

here i'm trying to figure if i'm getting bit sequence from anothere component into my DI/O is it possible to read this seq. as a "word"?

transfer it to a string?

0 Kudos
Message 6 of 12
(4,333 Views)

Since you did not tell us how the signal looks like (except that it is digital which infact only describes certain states of the signal) we cannot give you proper guidance on how to work with the data.....

The general approach you are searching for is not connecte to LV or a special DIO device... it has to do on "What is the interface (physically)? What do i want to do with the data?"

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 12
(4,324 Views)

Hi norbert b

I'm not sure I understand you correctly but: 

the physical interface is a TTL output into the DI/O and the freq is not defined yet (can be change according LV demands)

the "word" is stream of bits that define several variables I need to save and compare to other measures. 

 

hope it's OK

 

thank you

0 Kudos
Message 8 of 12
(4,315 Views)

jackedi wrote:
[...]the "word" is stream of bits[...]

So it is serial. This makes it hard to know when the "word" starts....

If you manage to determine a start condition for the "word", it is simple a series of Highs and Lows which has to be analyzed by your software.

You should acquire the data with a buffered method (either finite or continuous which is hardware timed).

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 12
(4,307 Views)
Mensaje editado por Wilmer_S
0 Kudos
Message 10 of 12
(4,293 Views)