Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

question from a beginner

Thank you Dennis. When I run it (run arrow of front panel), the "writeBS subvi appears as well as a small window with the number 0 inside. The pump values of rat and dia are not changed and the pump does not run. What am I doing something wrong? Thanks again.
0 Kudos
Message 81 of 108
(791 Views)
Click the OK button on the dialog box and the next frame will execute. Each frame has a dialog box. You will have to click ok on each one. You should see the dialog box appear 4 times. The messages refer to the frame number that they are in. This is only to prove to you that each frame is being executed. I set the subVIs to show front panel when called, close afterwards if originally called, and suspend when called. I only did this so I can run it on my pc without any hardware. You should turn it off. This is a pretty basic debug tool. Right click on each WriteBS subVI and select SubVI Node Setup. You will see three checkboxes. Uncheck them all. The options help you debug subVIs. You should be using it a lot or the breakpoint. When the options are set, the subVI will pop up and to run it, click it's run arrow. To continue, click the up arrow next to it. It's sort of like single stepping through your program. Here's the same example with all of the debug stuff turned off.
0 Kudos
Message 82 of 108
(793 Views)
Thanks. It works! I did the same for the second subVi in which I add a case for a wait time and a case for changing the rate. It does not work, the rate is changed but the wdr does notexecute. Sometimes the run works sometimes it does not. Do you know why/ Thanks
0 Kudos
Message 83 of 108
(789 Views)
0 Kudos
Message 84 of 108
(788 Views)
Hi Dennis. You sent me a blank answer. Thanks
0 Kudos
Message 85 of 108
(787 Views)
Sorry, don't know how that happened.

What I meant to say was that perhaps you have a timing issue. Set a breadkpoint on each write function and as you step through, see if that makes a difference. Also since you don't have any dataflow between the wait and the write in the first frame, you don't know which will execute first. Even if the wait is happening second, a change to your VI will force a recompile and the wait might happen first. Use a separate frame for each wait or use the Time Delay function. This has error in/out connections so you can force dataflow.
0 Kudos
Message 86 of 108
(787 Views)
Actually, when I use the one buttom dialog in each case, the program works. So it is probavbly a timing issue. What should I do to solve this problem/ Thanks again
0 Kudos
Message 87 of 108
(784 Views)
Hi Dennis,
When you get a chance, could you help me solve the timing problem? Thank you.
0 Kudos
Message 88 of 108
(806 Views)
The simple answer is to use additional waits. Like I said, put each one in it's own separate frame or use the time delay and no sequence structure at all.
Message 89 of 108
(809 Views)
Thanks Dennis. I add some wait times of 0.1s in the subVi (copy (A of manual pump drive single execution_last) and it works. Now when I insert it in the Vi (Main_ctrl(A), the time of the Vi is really slow. I suspect that the wait times in the subVi modify the clock of the Vi. Is that true? Could you help me to solve this problem? I feel that I am almost there?! Thank you!
0 Kudos
Message 90 of 108
(799 Views)