LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2019 Merged Vi's Don't Work?

Solved!
Go to solution

Hi, Regrettably, I have no code snippets as the code in question is on a remote machine. Hopefully the description is adequate.

 

I have two  separately working vi's (LV2019). The first working vi creates a directory structure on a remote instrument. It uses Open VISA to open session, enters SCPI commands to create directories, and VISA Close upon completion. If directories don't already exist, they get created. If they do exist, an error message 'File can't be created' gets generated at the instrument status display (by the instrument itself). I'm not concerned with the error message having been generated as I only want to ensure the directories exist, and which is what 'File can't be created' is telling me. I only want to clear the message to avoid passing downstream unnecessarily.

 

The second working vi also uses open/close VISA's in same manner as vi#1. This vi queries (SCPI) the instrument for error messages, if detected, it clears the message and closes the session. 

 

However, when merging the two vi's into sequential code (open/create directory/query for error message/clear message/close), and using only one VISA Open to start the merged code, and with a single Visa Close to finish merged code, and with all other code unchanged, my instrument error message doesn't clear. In fact, a probe at my query (a VISA Write which sends a SCPI string query followed by VISA Read), doesn't show the error message response being detected ("" gets returned), but when debugging, NI-MAX with the same SCPI command, and at that same point in time returns the expected 'File can't be created' message. Any idea as to what may be going on in my LV code? TIA!

0 Kudos
Message 1 of 3
(1,321 Views)

Can't you screenshot the code at least?

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 3
(1,280 Views)
Solution
Accepted by topic author JimboD

Issue resolved. Both vi's used Error Query.vi before closing. Consequently, when I merged the code, and unwittingly leaving them both in place it was burping on me.

0 Kudos
Message 3 of 3
(1,248 Views)