04-17-2020 12:36 PM
Hi!
I have developed a LabView program which goes through a few nested loops in order to perform the characterization of one device. The program randomly generates an error -1073807342 after reading the state of the alarms (the ER, EC and CC registers) of a BERT (Anritsu MP2101A) by means of the attached VI.
All my instruments are connected to my computer through a GPIB-to-USB adapter (NI GPIB-USB-HS+).
Any help would be highly appreciated.
Thanks!
04-18-2020 08:24 AM
You have a VISA Error: VISA: (Hex 0xBFFF0012) Invalid resource reference specified. Parsing error.
Thank you for attaching the VI (possibly) causing this Error. However, if the Error message is correct, it suggests that the Resource Reference (carried on the wire whose input is "VISA Resource Name") is not valid, which points to VIs that call this VI.
If you need further help on this problem, please do the following:
Your code has a few peculiarities that I recommend you change. You should verify some of the assumptions I'm going to make against the Manual from the Instrument Manufacturer.
I look forward to seeing the entire Project.
Bob Schor
04-18-2020 10:09 AM
Hi, Bob.
Thanks for your detailed reply.
I would like to remark that the whole program runs fine for certain time (which can vary from minutes to hours) until this error suddenly happens. The program is based on a state machine and it is used to check all the working conditions of one device that I am characterizing. There are a few loops which have been created by linking the different states of the state machine. The program works correctly for a random time, going through all the states until the error -1073807342 occurs. The state in which the VI attached to my first message is located has been already correctly executed tens or even hundreds of times before the failure happens.
Please let me add my notes on your comments:
Once again, I would like to thank you for your detailed response.
Pablo
04-19-2020 08:07 AM
Ah, thank you for the detailed responses. After hearing your comments, I'm beginning to wonder if you are running into hardware problems. [We "software guys" tend to blame the hardware, and the "hardware guys" blame the software -- in my experience, 95% percent of the problems turn out to be software (even including the code that I write, I'm sorry to say ...].
I have seen situations when VISA devices appear to "go off line" or otherwise stop communicating, often for hard-to-understand reasons. Sometimes it seems to involve the communication path (are there network switches involved, such as taking RS-232 signals through a concentrator that sends them via TCP/IP to your PC, where you use VISA to connect to the TCP port), other times it might be a "loose wire" or "bad connector" somewhere.
Are you using the Error Line everywhere you can, and trapping errors and reporting them through an Error Handler? Do you know where in your code the error occurs? Is there a VISA Read associated with it? Can you try to add Error-correcting code (such as trying to clear the VISA port, reissue the command, and see what happens)?
Is your code fully documented? Does every VI you wrote have, at a minimum, a Description that lists every Front Panel Input and Output, describing the name, type, and brief purpose of the connection? A 2-3 sentence header saying what the VI is designed to do is also helpful, particularly if some else needs to look at your code.
Bob Schor
04-20-2020 09:04 AM
Hi, Bob.
I have exchanged my BERT and executed the program. It has been running for like 3h now without any issue.
You can see below a screenshot of the state where the VIs which generate the error message are located (sequence on the bottom):
I have placed 6 probes and set the stop condition to "error" to capture the error as soon as it happens (the VIs attached to my first message are the ones placed before the probes 3 and 4).
Regarding the VIs of the program, they are not really documented. I only put comments where I do things that are no "easy to understand", otherwise I do not put comments (maybe it is a bad habit, I agree...).
I have to clean the delays, as you suggested, and delete the sequences where they are not really needed.
I will let you know whether the program fails again.
Thanks for your time!
Pablo
04-20-2020 09:16 PM
Working from home on my (not huge) laptop, I can't see any detail in your picture, so I can't make any further suggestions without seeing the actual VIs.
Bob Schor
04-22-2020 04:38 AM
Hi, Bob.
Yesterday I exchanged the BERT and everything is running smoothly since then. It seems like the issue was caused by an error in the communication with the device.
Thanks a lot for your time and your support
Pablo