I have two vi. main.vi has a button which I press. Information is send to LL(subVI).vi and cause change of the value of the button in sub vi. Everything is working fine. But then I have added event structure and code stopped working. No change is detected. Will appreciate if somebody can look at the code and tell me what is the issue:(.
Thank you for your help,
Solved! Go to Solution.
You forgot to post the code.
Only guessing but maybe you need to set the timeout event to run???
Still no attached code. Make sure you don't edit your post after attaching a file. Sometimes it will disappear before you hit the post button.
EDIT: Ahh sorry, you added it to the original post.
Well I'm not sure where you are going with this code but if you just want to light the Value boolean in your subVI from main you can just add a timeout to the event loop like I mentioned earlier. Right-click the hourglass at the top-left of the event structure and create a small time constant (10ms is good).
Your event structure in the subVI will block the subVI from running until one of its events is triggered. As you will see you can add a timeout to let the subVI execute but normally you would have your event structure in the main VI where you intend the user interactions to occur and pass data by reference to a subVI to do work.
Your design is wrong.
1) Move the LL(Sub vi) out of the loop
2) add timeout to the event structure
3) add shift register to LL sub-vi to show that your sub-vi button is actually working