LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loops not working properly

Solved!
Go to solution

8 seconds sounds quite excessive.  I would expect more like 50 to 100ms.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 14
(525 Views)

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

0 Kudos
Message 12 of 14
(515 Views)

Just read the rest of the thread while I was doing something else...

 

I'm glad that you are sorted now.

 

--dave

0 Kudos
Message 13 of 14
(514 Views)

@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.

0 Kudos
Message 14 of 14
(511 Views)