LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to do comparison between array of strings using Labview

the string subset that you suggest, i should put at the transmiter or receiver?
0 Kudos
Message 11 of 17
(939 Views)
Since at the transmit side, you know which is sending and at the receive side you want to determine which VISA Write did the send, it only makes sense that you need to do the parsing at the receive side. You've been asking all along how to modify the receive part of the code.
0 Kudos
Message 12 of 17
(937 Views)
to determine which VISA Write did the send, it only makes sense that you need to do the parsing at the receive side>>>>> how to do that?
0 Kudos
Message 13 of 17
(935 Views)
Ravens Fan gave you the answer here. You have to do a comparison then on whether the substring is A, B, C. If you haven't already, you might want to spenmd some time learning the basics.
0 Kudos
Message 14 of 17
(926 Views)
I am not sure how you are planning on handling the data.  Collect it all and then write to spreadsheet or write at each read (probably a bad idea.  This VI is broken because I left the spreadsheet stuff disconnected, but the communication part should give you an idea of how you can communicate with all three and identify the data.
Jim

LV 2020
0 Kudos
Message 15 of 17
(909 Views)

Let me confess that I have only quickly read through this thread and have not attempted to review any of the posted code.

I'd like to step back from the low level details and try to look at this from a bird-eye view.

You are doing two things in this code;

1) Reading from the serial port

2) Processing the data.

I would restructure the code such that the reading is handled seperately from the processing.

Using this approach, the processing code* can decide which collum the data goes in and maintain the list. It would also allow you to do extensive unit testing of the processing code without having to jump through hoops to get the serial port to read all of the possible variations as well as handling corrupted recieve data.

Ben

*This may be a good candidate for an Action Engine that has the states;

"Init" Clears history

"Process" accept arbitrary string and sorts depending on what it parses out of the string. Optionally buffer incomplete strings for use when processing the next update.

"Reset" clears history

"Get table" returns the history for use in a GUI.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 16 of 17
(904 Views)
Excellent suggestion Ben,
 
I took a step back from continuing to reply to this thread because it was not clear to be the objective and I didn't want to go on a tangent.  I also read it quickly and from my "bird's eye view", I didn't see the same information at the beginning as I did by a quick review of later posts. 
From what I gathered, it appears that the program sends and receives serial data over 3 different ports. Or at least 3 different sessions not all at once..  This is what is still fuzzy in my mind.  So what I still do not understand is whether the letter A, B & C are actually part of anything that is sent or received..  If they are not, they are not really necessary if what Ben proposes is implemented.  There are other (better) ways of keeping track of what goes where and where it came from. 
 
Of course, reading the posts from the left eye only combined with a single cup of coffee doesn't help either..    😉   😄
0 Kudos
Message 17 of 17
(895 Views)