07-03-2019 02:53 AM
Hello,
I am stuck with plotting multiple points on XY graph from a serial strings with different string ID's. I want to plot separate point from data corresponding to each string ID on a single XY graph.
Serial Strings are coming from different sources at different time i want to make each point persistent on XY graph as well.
But in the VI attached when one point corresponding to a string ID gets plotted the previously plotted points of other string ID get removed please help me to make every point persistent corresponding to each string from different source(different String ID's)
07-03-2019 05:43 AM
Well, you just need to build the data structure inside a shift register. Here's a simple example.
Shift registers are some of the most fundamental tools, make sure you understand them.
We don't really know how a typical received string looks like, so modify as needed.
Notes:
07-08-2019 02:28 AM
Hello Sir,
Sorry for not attaching sub VI's with previous example i have attached the sub VI's with this message.
What i am trying to do that there are some strings which is continuously coming through serial port each string have a node ID like node1, node2, node3, node4 etc. firstly the string starts with some junk values which i am not able to remove but i know that the actual string starts with '$' and ends with '&&' so i am searching for '$' and then splitting and searching for '&&' and again splitting, now using commas i have separated the string into array the 1st index of array contains string ID and i compare the string ID and enters the desired switch in position 6&7 latitude and longitude is stored so i am taking that value and plotting in XY graph but here whats the problem is the string comes of node ID node2 so it displays node2 lat long position of node 2 but then another string comes with different node ID and it suppose node3 so the node3 lat long is now plotted but problem is node2 mark has been removed from X-Y graph i want to show all those lat long values of those string to also unless and until it is updated
07-08-2019 03:04 AM - edited 07-08-2019 03:05 AM
Hi Anjaney,
there is no shift register in your VI - despite Christians suggestion.
And most of the rest is still way to complicated!
Like:
- why convert the same strings in 4 different case structures?
- why convert all those data from serial port to hex-formatted strings? Why not operate with "original" data?
- Using BytesAtPort is not useful. Using a wait of 2.5s in parallel surely isn't helpful either!
Btw. when you want to attach more than 2 files you should put them all inside a ZIP file!