07-08-2013 06:03 PM
Hi guys I was wondering if there was a simple way to hold a vi from running until all file paths have been designated by the user. As of right now the VI will only save specific data or images if the button is turned on. What I am trying to do is that if multiple buttons are on, have the VI wait till the last button has prompted the user to define a filepath and then start saving. Any ideas? Thanks!
07-08-2013 07:30 PM
Sounds like you could use Event Structure.
Do you have an example code to share?
07-09-2013 09:35 AM
The cod is a little big if need be I'll post it but here are two screen shots of two of the saving spots. Let me know if you need anything else 🙂
07-09-2013 01:08 PM
@elac wrote:
The cod is a little big if need be I'll post it but here are two screen shots of two of the saving spots. Let me know if you need anything else 🙂
Hello Elac
I suggest you reorganize your code. It would be more efficient if you use Event structures to capture all the paths, and then have a seperate button to indicate all buttons have been pressed (OR) programmatically do that. Please see the attached code (LV12). "Write Image to File" control will indicate that the last button has been pressed (in some sense). If you want to automate it, use the Value (Signaling) property node to programmatically generate an event.
07-09-2013 01:29 PM
can you make it for labview 2011 please 🙂
07-09-2013 01:31 PM
@elac wrote:
can you make it for labview 2011 please 🙂
There you go !
07-09-2013 03:11 PM
Ok I understand how the event structure works, I am still having some difficulty understanding how if I change the case structures that the buttons are currently wired to, I will be able to programatically control when the to start saving?
07-09-2013 03:51 PM
@elac wrote:
Ok I understand how the event structure works, I am still having some difficulty understanding how if I change the case structures that the buttons are currently wired to, I will be able to programatically control when the to start saving?
Please look at the event structure. I've added a new event which simulates the condition to write the image to the file. You can insert you code here that will simulate LV to write. The Val(Sgnl) will trigger the event to execute the "Write Image to File" Value change event. I hope this helps.