Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ADC communiction with UART to Labview

Solved!
Go to solution

Is that how you set it up have the byte count at 1, then use match patter to look for "!" then find a match. I have attached the vi code along with pictures.

0 Kudos
Message 21 of 47
(3,693 Views)
It's a start. After the read, you do an Equals comparison to the !. If true, stop that loop. Then you would do another read loop with a specific byte count.

You still need to join the bytes. The opposite of your micro code that breaks the adc value into separate bytes. After joining, a typecast can be done to convert to a floating point number.
0 Kudos
Message 22 of 47
(3,674 Views)

Okay so i ran a new code from what you said im not to sure if im doing it right but i set the read buffer string in a equal function and if it is equal to "!" i stop the loop but the loop is not stoping. I am reading one bit at time as you described. check out the code.

0 Kudos
Message 23 of 47
(3,665 Views)
The loop will only stop if your special character is detected. Are you sure it's being sent. Are you sure of the format? A quick check is to read something like 6 or 7 bytes and look at the result. According to what you said, at least one of the bytes should be the start character.
0 Kudos
Message 24 of 47
(3,657 Views)

okay i know there data coming in but i dont know what form it is do i need to convert or what so i can find the "!" or is my code wrong for comparing.

0 Kudos
Message 25 of 47
(3,646 Views)
You obviously are not sending an ASCII text ! since it is not in the string.
0 Kudos
Message 26 of 47
(3,641 Views)

okay so the conversion problem is with labview cause it coming back in some kind of chinese looking code. I heard there some kind of advanced visa control to be able to covert the data to a reable format so it labview changing the text format.

0 Kudos
Message 27 of 47
(3,612 Views)
No, the format does not get changed by VISA. I'm sure the read would look exactly the same if you used another terminal emulation program such as putty. You can, of course, select to view the data as hex but I've already told you that.
0 Kudos
Message 28 of 47
(3,603 Views)

sorry, so how do you view as hex, what function does that.

0 Kudos
Message 29 of 47
(3,600 Views)
Go back and reread what I have said. It's a simple right click option.
0 Kudos
Message 30 of 47
(3,598 Views)