12-09-2021 09:00 AM
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!
Solved! Go to Solution.
12-10-2021 04:45 AM
Can't you screenshot the code at least?
12-20-2021 04:45 AM
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.