LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

realtime serial data plotting

Dear Sir!
 
I want to plot my serial data of 8 bits on graph/plotter.The serial data is received from another PC at baudrate 115200.After setting serial port on reception side i start capturing serial data but the problem is that it is not continous it plots my  continous constat data for example decimal number '5' in the form of gilitches which are also random in time space.I am using simple IN port.vi.
 
 
Another problem is that when i capture this data using VISA Read it caputre data correctly for only 7sec and or u can say that it doesnot update my data received from serial.Please help me in this regard as soon as possible through my email address iieexpert@yahoo.com.
 
Thanks
0 Kudos
Message 1 of 23
(4,268 Views)
I would recomend that you use VISA instead of the in port function. I'm not sure why it would stop after 7 seconds. Do you get any error generated? What is the error code if  you do. How is the data from the other pc formated? Is it always a single byte? Is there a termination character? A VISA Bytes at Serial Port and a VISA Read inside a while loop is generally all you have to do. Can you post the VI that your wrote?
Message 2 of 23
(4,239 Views)

Dear Sir!

Please check my VI and after debugging it send it to my mailing address iieexpert@yahoo.com   .Thanks for ur kind and quick response.

 

0 Kudos
Message 3 of 23
(4,217 Views)

Dear Sir!

Please check my VI and after debugging it send it to my mailing address iieexpert@yahoo.com   .Thanks for ur kind and quick response.

 

0 Kudos
Message 4 of 23
(4,217 Views)
Well, I can't debug it because I don't have anything to read from but I did make some changes. You might want to go back to a fixed byte count to read if the data sent is some constant.
Message 5 of 23
(4,211 Views)
Dear Sir!
 
 
I  am very much inspired by your quick response.But i will again disturb you and want to know .....what is meant by constant data may be in future i have to plot variable data what i do then?.
 
please answer me.
 
Thanks again
0 Kudos
Message 6 of 23
(4,199 Views)
By constant data, I mean that you will always expect a fixed number of bytes. The VI I posted will read a variable number by getting the actual number of bytes in the serial buffer. To go back to a fixed count, replace the VISA Bytes at Serial Port with your numerical control or a constant on the block diagram.
0 Kudos
Message 7 of 23
(4,195 Views)

dear sir!

Ok i understand ur last reply........

i only want again to mention that my data sending PC sends data at sample time of 20msec on serial baud rate of 1152000....what i have to execute my vi in normal priority or high priority mode?

Thanks

0 Kudos
Message 8 of 23
(4,191 Views)

dear sir!

Ok i understand ur last reply........

i only want again to mention that my data sending PC sends data at sample time of 20msec on serial baud rate of 1152000....what i have to execute my vi in normal priority or high priority mode?

Thanks

0 Kudos
Message 9 of 23
(4,192 Views)
Normal just work just fine in most cases. That's where I would start. If you've got a lot of other things going on in the background, you might need to change this.
Message 10 of 23
(4,188 Views)