LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

realtime serial data plotting

Dear Sir!

I am in big problem as i want to read a long integer from my serial port which is consist of 4 bytes of string or 4string of serial read vi but it limits my plotting to 255 and reset my plot to zero.what i do for that.pls help soon.

 

thanks

0 Kudos
Message 11 of 23
(1,319 Views)
Dear All programmers!!!!!!!
 
I am waiting for your reply.
0 Kudos
Message 12 of 23
(1,317 Views)
You're using a graph to plot the data. Every time you create a new array to plot, the old data is lost. You could create a shift register to hold old data and use the build array to add the new data to graph. If you run this for a long time, the array could get pretty big and your VI will slow down. If you know how much data you're going to acquire, then you can use the Initialize Array function and then the Replace Array Element. You could also use a chart. A chart has a history that you can adjust it's size. A chart will retain old data until the history size is exceeded.
0 Kudos
Message 13 of 23
(1,295 Views)

dear1

i think so u donot understand my proble.My problem is that i already use chart for plotting but now i want to plot 32 bit of data(long integer) but i donot now how i convert 32bit string in to 32bit numeric data.

please help me..

 

0 Kudos
Message 14 of 23
(1,291 Views)
Why don't you post the exact string you're getting and what number it is supposed to represent? It's impossible to know that from your VI. Your Format Into String is doing nothing. You would typically use a Scan From String to convert a string to a number. One thing you can do is create a string indicator for the output of your VISA Read. Run the VI and stop it. Go to the Operate menu and select Make Current Values Default. Save the VI and repost it. I would still need to know what the string is supposed to represent.
0 Kudos
Message 15 of 23
(1,283 Views)

dear sir!

i am worry as i receive ascii characters on my serial receive string which cannot be understand by me reply me soon..............

 

0 Kudos
Message 16 of 23
(1,280 Views)

dear

i already try scan format string but it gives me error..............another problem is that if my simulation runs for more time a error message of not enough system resources also appear.help me..........

 

0 Kudos
Message 17 of 23
(1,276 Views)
If you're receiving ASCII characters that can't be understood by you, then it sounds like you're getting raw hex. A string indicator can display hex just by right clicking on it and selecting that option. What do you think you should be getting and what do you think the number is supposed to be?
0 Kudos
Message 18 of 23
(1,273 Views)
If you could provide the error code, then we may be able to find the source of the problem.  Also, you could try using the Basic Serial Read and Write example from the NI Example Finder to see if this is an error with the device or the code.
0 Kudos
Message 19 of 23
(1,248 Views)
dear sir!
i have to run this vi for 45 minutes but the problem is that it stops after random time maximum it runs for only 45seconds.what is the problem?Is there any write and read cycle conflict which cause my data sending hardware (PC)device to stop sending data and data reading device to stop reading data ?pls help.......
Also i receive spike of random data(which shows me that sometime read cycle found no byte in the read buffer and sometime it find 8 bytes in the buffer) in between my plotting.
as u observe in my 'jpeg' attached file.
I think so that it is not possible in Labview 7.0 to read data accurratly without synchronization but how i achieve this synchronization as my data sending hardware run in hard realtime using RTlinux and writes data after each 20msec be precise.........
 
thanks for your interest in solving my problem.
0 Kudos
Message 20 of 23
(1,243 Views)