11-04-2010 01:04 PM - edited 11-04-2010 01:05 PM
Imtis wrote:
I have never understood why NI hasn't done that. I'll bet 99% of experienced developers have that VI stashed for quick access. Not to mention OpenG
They did. It's an express vi named time delay.

11-04-2010 01:06 PM
@Wayne.C wrote:
@Imtis wrote:
I have never understood why NI hasn't done that. I'll bet 99% of experienced developers have that VI stashed for quick access. Not to mention OpenG
They did. It's an express vi named time delay.
Yeah, I was just about to go and edit my post to mention that when I saw your reply. I hate Express VIs, and have you actually seen the code for that VI?
11-04-2010 01:08 PM - edited 11-04-2010 01:10 PM
Not all Express VI's are ugly and NI continues to make them better. Here is what is under it. Looks pretty simple.

11-04-2010 01:12 PM - edited 11-04-2010 01:16 PM
And they BLOW UP the size of your code. I put that sucker in a blank VI and it was 12KB. Put in the equivalent structure and it was 8.4KB.Correction, 5.2KB
11-04-2010 01:14 PM
@Wayne.C wrote:
Not all Express VI's are ugly and NI continues to make them better. Here is what is under it. Looks pretty simple.
Oh, sorry, I'm thinking of the Elapsed Time Express VI. See? I stay away from them so much that I don't remember which is which. ![]()
11-04-2010 04:36 PM
Here's the code as it stands. I'd be intereted to see how someone would do this with a SS. Also, as I'm not a degreed SE, can someone show me how you would do this with a wrapper. I've had some SEs throw that term around, and I have to admit, I never heard that term in my software classes.
Thanks for the feedback.
11-04-2010 05:34 PM
While you could convert your code to a state machine, there's not much to gain here unless this is likely to grow. As it is, you can just wire the error cluster from function to function (including those dialog VIs) and get your execution order. To make sure the code doesn't run until you end the loop you can just wire the error cluster through the loop using tunnels.
I haven't a clue as to what you were trying to do with those Feedback Nodes.
Aside: Why are you using the GPIB functions instead of VISA? Also, you should not hard-code addresses.
11-04-2010 06:58 PM
@smercurio_fc wrote:
While you could convert your code to a state machine, there's not much to gain here unless this is likely to grow. As it is, you can just wire the error cluster from function to function (including those dialog VIs) and get your execution order. To make sure the code doesn't run until you end the loop you can just wire the error cluster through the loop using tunnels.
I haven't a clue as to what you were trying to do with those Feedback Nodes.
Aside: Why are you using the GPIB functions instead of VISA? Also, you should not hard-code addresses.
What I'm trying to accomplish with the Feeback Nodes it is to carry the Error Out of one sequence in to the Error In of the next. My thought is to carry the errors forward. If I use a Flat Sequence, it's obviously more straightforward, but I don't want to grow in the X-dimension. Not sure what you mean by "through the using tunnels" - I'm attempting to wire the error cluster from sequence to sequence.
With this older instrument, I kept hanging the bus up, when trying to get VISA running.
11-05-2010 07:43 AM
I believe he was suggesting something like this.
11-05-2010 08:38 AM
Newenglandguy,
Run your VI with Highlight execution turned on and you will see that the feedback nodes do not have the effect that you desire.
Here is a cleaned up version of your VI which does not use the sequence structure and does not need any feedback nodes. The shift register on the error line in the for loop will prevent subsequent writes if an error has occurred earlier. If the instrument cannot accept the commands as fast as they are sent, you may need to add delay inside the for loop.
Lynn