LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing terminal COM data to graph using Visa

Solved!
Go to solution

Are you seeing correct data on your numeric indicator in Serial Comm.vi?

 

If you are reading data as expected, wire your data directly to a 'Waveform Chart' inside of the loop, which will update every iteration of the while loop. If you would like to plot your data all at once after reading, build your data into in an array using an 'Auto-Indexing Tunnel' on the border of the loop, then plot using a waveform graph outside of the while loop.  http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657

0 Kudos
Message 11 of 22
(1,982 Views)

Thank you sir,I tried to modify the Code but error is there.As values 1 to 10 is stored in string ,I used "scan from string" to get numeric values but error is coming. so how can I plot them in waveform graph.

serial com VI

 

serail.jpg

When I am executing its showing error, may be I am not able to give the proper fomat.Plz help me to resolve this.

 

0 Kudos
Message 12 of 22
(1,965 Views)

Please help us help you by more completely describing your problem, as well as offering detailed information about the error(s) you are receiving.

 

Thanks!  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 22
(1,954 Views)

hi,

I connected MSP430 from Texas Instrument to PC , and in Hyperterminal I seen its printing values from 1 to 10 like this --

1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9 10

 

its printing continously.Now I made a serial commuincation VI which takes COM Port then reading values from serial PORT.In Result box its blinking 1 to 10 numbers.

Now I want to plot these values in waveform Graph.Hope I am able to explain.I checked using probes that I am geting correct values from serial Port but I am not able to plot them in graph.I send the screenshot also of the error.

 

 

 

Thank you

Rita

0 Kudos
Message 14 of 22
(1,945 Views)
You have NOT provided the error code our message. Your VI is using the bytes at serial port incorrectly and you are likely using the wrong function to convert the string data from the read. Since you have not provided the actual string that it's returned, it is impossible to say. Please post an image of the front panel with some data in a string indicator and be sure to show the display mode of that indicator (normal, hex, \ code).
0 Kudos
Message 15 of 22
(1,936 Views)

Hi,

Sorry I attached errror message in my previous post but it was not attached , I will send that error code from office.I dont have hardware to run the VI right now.But about the front pannel , its just showing values 1 2 3 4 5 6 7 8 9 10 in the Result

0 Kudos
Message 16 of 22
(1,928 Views)
If it is showing as ASCII/normal text and you want each individual value, use the spreadsheet sheet to array and specify the delimiter that is in the string. I'm not sure why you thought it was a binary string.
0 Kudos
Message 17 of 22
(1,925 Views)

Thank you sir , I tell try to use that also.In the morning I will post error and front panel from office.

0 Kudos
Message 18 of 22
(1,918 Views)

Hello sir,

I modify my VI , I used the spreadsheet string to array function,Now this time its showing the graph values.

 

serial_1.jpg

this result is coming.Its correct ?

0 Kudos
Message 19 of 22
(1,905 Views)
It's plotting the values 1-10 which is what you have shown that the device is sending. I don't understand the point of sending the same data over and over again, though.

Please modify your VI. The configuration needs to be done only once, outside the loop. Don't use bytes st serial port since you have a termination character enabled.
0 Kudos
Message 20 of 22
(1,894 Views)