Jump to content

Firing non-user events programmatically?


Recommended Posts

Is there a way to fire an event programmatically? Ex; I open a file from a config file and put that data into an array indicator. From there I write and read using a local variable (don't worry, no chance of race condition). During the vi's running a user might change the file they want to use and so as an event I have a "value changed" event driven off of the file path change. This then fires code to load the array and do some work with it. The problem is I have that same code that does some work going on at the start of the program if there is a file found in the config file! There is now 2 repeats and no, this isn't something I can put into a subvi. The binary file data is read to a 3D chart and another loop with indicators on the main VI.

My only other idea is to add another event for this case. So at the start if the binary file path is found in the config file it'll change a boolean indicator which will then fire that event of code. The only trouble with this is the location. I have the config file code as the first frame of a sequence structure with the main program loops (including event loop) running in the frame after. So this wont' work :headbang: . AAAAHHHHHHH No wonder there are programming teams. Teams being the key word.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.