07-01-2022 06:38 PM
Hello,
I've encountered an issue for which I can't seem to find a solution. I have a VI which builds debug commands based on a bunch of selectors. I had it working for a long time, but I recently added the option to build varying commands for communicating with multiple DUTs at once. Some commands for example require writing a string unique to each DUT, which ultimately requires a for loop. The loop should iterate for N cycles where N is the number of COM ports listed in the port array, and the unique strings are indexed on each iteration of the loop.
The VI executes just fine on its own (from its front panel), but when I call the VI from my higher level VI it seems to be bypassed without executing at all.
Essentially, when I probe the inputs of the problematic VI there is only the "not executed" message in the probe watch window. I then watch my main test interface (This would be the highest level VI in the structure) proceed to the next stage of the test, where I acquire data from a DAQ. At that point I can't proceed, because all of the setup I needed to be configured prior to testing was just skipped for no explicable reason.
Snapshot of my probe watch window from both perspectives. COM8 goes in... then nothing. I don't even see the front panel execute like it normally would. I tried recompiling the VI to no avail.
07-01-2022 06:55 PM
Interestingly, placing a breakpoint inside the problem VI "fixes" the issue. Of course I can't keep the breakpoint in there, and removing it allowed the problem to return.
07-01-2022 07:31 PM
Additionally, if I place a breakpoint on the Sub-VIs icon it also functions as expected after clicking the continue button. It's like the breakpoint is reminding the VI that this Sub-VI exists... Really scratching my head here.
07-01-2022 07:33 PM
07-01-2022 07:35 PM
Check the vi properties for execution before head scratching removes hair.
07-01-2022 07:42 PM
So I believe I am getting to the heart of the issue. It seems to be a timing issue.
Originally, I had a wait timer with a zero wired to it on the consumer loop which contained the "problem" sub-vi.
I increased the wait period to 100ms and it now works like a charm. Interesting that I didn't have this issue before. I typically wire all of my loops up with a 0 timer and don't encounter any weird problems.
I really don't want to keep a 100ms delay every time I execute this loop. Test time is critical in my application and arbitrarily adding delays is something that drives me crazy. I want to just run the software as fast as possible without burning the CPU.
07-01-2022 07:43 PM
I will give it a try. thank you for the suggestion.
07-01-2022 07:45 PM
Both VIs are set to non-reentrant.
07-01-2022 07:47 PM
should attach the code instead of the screenshot, it is one vi/zip instead of 2 jpgs
may be a flow problem, if you have tested having a breakpoint can solve the problem, it hints that that section need some flow control. but without the code, cannot really give any useful comments