LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving data/images after user has inputted all file paths

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!

0 Kudos
Message 1 of 8
(2,291 Views)

Sounds like you could use Event Structure.

Do you have an example code to share?


Kudos are the best way to say thanks 🙂
0 Kudos
Message 2 of 8
(2,287 Views)

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 🙂

Download All
0 Kudos
Message 3 of 8
(2,255 Views)

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

 

 

 

 


Kudos are the best way to say thanks 🙂
Message 4 of 8
(2,234 Views)

can you make it for labview 2011 please 🙂

0 Kudos
Message 5 of 8
(2,232 Views)

@elac wrote:

can you make it for labview 2011 please 🙂


There you go !


Kudos are the best way to say thanks 🙂
0 Kudos
Message 6 of 8
(2,230 Views)

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?

0 Kudos
Message 7 of 8
(2,221 Views)

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


Kudos are the best way to say thanks 🙂
0 Kudos
Message 8 of 8
(2,216 Views)