LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Shift Register to Stacked Case structure

Solved!
Go to solution

 


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

 

 

 

0 Kudos
Message 11 of 28
(2,764 Views)

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

0 Kudos
Message 12 of 28
(2,760 Views)

Not all Express VI's are ugly and NI continues to make them better.  Here is what is under it.  Looks pretty simple. 

 

0 Kudos
Message 13 of 28
(2,751 Views)

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

Jim

LV 2020
0 Kudos
Message 14 of 28
(2,746 Views)

 


@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. Smiley Very Happy

 

0 Kudos
Message 15 of 28
(2,744 Views)

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.

0 Kudos
Message 16 of 28
(2,712 Views)

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.

0 Kudos
Message 17 of 28
(2,705 Views)

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

0 Kudos
Message 18 of 28
(2,695 Views)

I believe he was suggesting something like this.

Jim

LV 2020
0 Kudos
Message 19 of 28
(2,671 Views)
Solution
Accepted by topic author Newenglandguy_LV

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

Message 20 of 28
(2,657 Views)