LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert syncronous serial data into sequence of hex values

Hi,
 
I have a problem analysing captured data of a digital I/O board. I hope one of you can give me an advice/hint on this.
Used Software: Labview Express 7.0
 
Problem description:
The captured digital data contains on channel 0 a clock signal, on channel 1 a reset signal and on channel 3 a data signal. The data signal is syncronized to the clock and consists out of 8 serial data bits. My problem is, how to convert this clock syncronized serial data signal into a sequence (array) of bytes each represented by 2 hex digits?
 
 
More details on the problem environment:
- The captured data comes from an ASCII file which contains data samples of a 16bit digital I/O card. Every line contains one sample encoded as 4 hex digits
- The file is converted by a VI to a digital waveform and plotted by a digital waveform graph.
 
One of my core problem on the way to a solution lies in the area, of how to "Trigger and Gate" the digital waveform based on the rising edge of channel 0.
 
Thanks in advance for your help!
Tryber.
0 Kudos
Message 1 of 4
(3,158 Views)
I'm not sure if this will solve your problem or even help, but I tinkered around with the idea some and tried to mimic the situation.  I use 7.1 so I'm attaching a jpg of my block diagram and front panel instead of the file.  I have three loops in mine but you would probably only need one since you probably know the clock time.  The first two are to allow me to mimic an unknown clock speed and closely match the recording loop to it.
 
 
0 Kudos
Message 2 of 4
(3,143 Views)

Thanks a lot SeaDevil for your great effort!

Your third part gave me some good hints how to do the actual conversion from bin to 2 hex digits.

Concerning the timer solution: my special problem with the captured data is that the clock signal is not constant, with the consequence that I have to trigger the data reading on every rising edge of the clock signal.

Are the trigger functions for waveforms in Labview 7.1 better than in 7.0?
Since in 7.0 they seem to work only for analog data waveforms. Or what other possibilities do I have to trigger on a digital signal?
e.g. the array search function allows to search only for a single element. To look for a transition from 0->1 I would have to use 2 nested searches, which is imho quite time consuming, considering I have a few thousand samples.

Thanks in advance,
Tryber.

0 Kudos
Message 3 of 4
(3,128 Views)
I checked with the 7.0 express version we have loaded on an older computer still and the part that I think you can use was in that version. In the second loop I had made a note: Boolean Crossing PtByPt.  This looks at a binary input and can output a true pulse (one iteration) based on the direction input condition.  This has three options;  False-True (rising), True-False (falling), or Either which is the option I had used in that vi.  This should allow you to detect a false-true state change on the clock channel.  Now, you say that the clock pulse is not consistant, but what about the information pulses? That was the reason for the first two loops on my program.  To insure that the digital value was measured during one input pulse to avoid turning two or more input pulses into one digital value. 
 
As far as your question about trigger functions between the two, I'm not too sure.  I believe they offer the same options that I tend to use so I havnt had a problem with either.  On your block diagram menu select All Functions > Analyze > Point by Point > Other Functions PtbyPt.  There are some very handy tools in that menu. 
0 Kudos
Message 4 of 4
(3,115 Views)