Jump to content

static variable in SubVI?


Recommended Posts

Control values are static if they are not wired to the connector pane, so you can write to them using a local variable and compare the value later.

A better implementation is to use LV2 style functional globals by creating a loop with an unitialized shift register and a case statement inside the loop to select the action that will either set the shift register or compare the last value. Since the shift register is uninitialized it will not change values between subvi calls.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.