06-12-2013 01:28 PM
8 seconds sounds quite excessive. I would expect more like 50 to 100ms.
06-12-2013 02:41 PM
Hello Konrad,
Maybe you could feed some data values into the for loop from an array. Run with highlight execution enabled and place some probes on the block diagram to ensure you are seeing the correct things at the correct points.
Btw error clusters are extremely useful for ensuring that your code exectues in the order which you want it to rather than the order of processes in the machine.
--dave
06-12-2013 02:44 PM
Just read the rest of the thread while I was doing something else...
I'm glad that you are sorted now.
--dave
06-12-2013 02:58 PM
@niedk wrote:
Ah I see, that makes sense. So the error wire would basically just stop the program should one of the procedures fail? I know the loop is running because after running the program, I see the GPIB take control of the HP 4155 I'm using, it then loads the MES file as per the program and then runs thru a scan of the spectrum. It then stops after one scan. Basically I want it to run this scan 10 different times in a row. Once I get that part of my code to work, then I can focus on the state machine architecture to get the user response part done. Could it be that the instrument doesn't have enough time between commands to process? For example it's running the first measurement still and the other 9 commands come in and it simply ignores them since it's still running the previous command?
Konrad
No.
An error wire won't just stop the program. (Actually, not having the errors wired will cause an abrupt stop to the program with a dialog box if you have automatic error handling turned on.)
Information on the error wire will allow other downstream VI's to skip over their execution depending on the way they were written. Most NI VI's behave this way. (Some VI's will execute even if there is an error.) If the VI is so written, there is a case structure inside that executes all the normal code in the No Error condition, and will not do anything but pass along the error in the Errror Condition.