キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ11/17
1,233件の閲覧回数
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 件の賞賛
メッセージ12/17
1,231件の閲覧回数
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 件の賞賛
メッセージ13/17
1,229件の閲覧回数
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 件の賞賛
メッセージ14/17
1,220件の閲覧回数
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 件の賞賛
メッセージ15/17
1,203件の閲覧回数

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
メッセージ16/17
1,198件の閲覧回数
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 件の賞賛
メッセージ17/17
1,189件の閲覧回数