LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incrementing

This program attached is for taking screen shots for an E4440a Spectrum Analyzer. I am trying to take multiple screen shot every few ms, sec, and min based on my menu selection. Also Im trying to increment  the file name every time it saves with out me manually going in an changing it. Also I would like for the program not to prompt the user to enter a file name it should be incremented automatically. For example psa_screen, psa_screen1, psa_screen2.

 

Can anyone help?

0 Kudos
Message 1 of 12
(3,765 Views)

Hi E,

 

why do you use the FileDialog vi when you don't want to prompt the user?

 

Use that instead:

check.png(Numeric is connected to iterator terminal of the loop!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 12
(3,757 Views)

Thanks GerdW i will try that. I was just using a pre build program i found that would already do what i needed it to do and just try editing it.

0 Kudos
Message 3 of 12
(3,754 Views)

Gerd,

Is this what you were explaining? if not can you clarify pls. Also  i attached the vi with the error.

Thanks

 

0 Kudos
Message 4 of 12
(3,742 Views)

Here is what I would do.

Tim
GHSP
0 Kudos
Message 5 of 12
(3,738 Views)

Thanks Tim for your reply. I'm currently using labview 2009 can you save it in that version so I can open it please?

0 Kudos
Message 6 of 12
(3,734 Views)

Here is an 8.0 version

Tim
GHSP
0 Kudos
Message 7 of 12
(3,722 Views)

@aeastet wrote:

Here is what I would do.


The File Dialog is not necessary, as Gerd pointed out.

 


@*E* wrote:

Is this what you were explaining? if not can you clarify pls. Also  i attached the vi with the error..


What error? Also:

  • Ddo not place the Open and Close inside the loop. Those should be outside the loop. Same thing with the timeout setting.
  • You don't really need to use a Timed Loop structure. A simple while loop will suffice. You can use the Elapsed Time Express VI to see if it's time to take a picture.

 

0 Kudos
Message 8 of 12
(3,716 Views)

Tim,

Thanks i was able to open it. When I selected the time and ran the program it gave an error.

Error 43 occurred at file dialog -> SAVEVI2-1.vi

Labview : operation cancelled by user

0 Kudos
Message 9 of 12
(3,709 Views)

@*E* wrote:

Tim,

Thanks i was able to open it. When I selected the time and ran the program it gave an error.

Error 43 occurred at file dialog -> SAVEVI2-1.vi

Labview : operation cancelled by user


It gave that error because it's supposed to give that error if you cancel the operation. As noted before, you do not need to use the File Dialog. Gerd's example has a path constant for the base path. You can change this to a control, and before you run your loop you can check for the existence of this path. If it exists, you can use. Otherwise, pop a File Dialog to ask the user where to save the files. Then feed this into the Build Path function. Don't overcomplicate this.

0 Kudos
Message 10 of 12
(3,706 Views)