10-27-2009 04:32 AM
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
Solved! Go to Solution.
10-27-2009 04:42 AM
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
10-27-2009 04:45 AM - edited 10-27-2009 04:47 AM
Hi Jackedi,
I would also recommend the DAQmx functionality to read the word.
What kind of device are you using to send the word?
10-27-2009 11:17 AM
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?
10-27-2009 11:19 AM
10-28-2009 01:13 AM
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?
10-28-2009 03:25 AM
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
10-28-2009 06:48 AM
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
10-28-2009 08:34 AM
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
10-29-2009 08:51 AM - edited 10-29-2009 08:52 AM