取消
显示结果 
搜索替代 
您的意思是: 

Opening different files within the same loop

Hi folks,

I am currently trying to automate a testing procedure using LabVIEW
that requires the user to select the test from a drop down menu (Ring)
and then clicks a button to start the test. When the button is pressed
an 'open file' window appears asking for a name to save the file as.
This all works fine the first time it is run, but i need to be able to
stop the current test, select a new one, and then choose a different
filename to save it as, without having to restart the program.

I am currently using a timed loop (as the test is time specific) and
case statements for each individual test routine. I can only think of 2
ways to implement this, the first works only once (asking for a
fliename when the program is first run), the second repeatedly asks for
the filename each time the loop frame executes.

So the process is: select test - click button - chose filename - stop
test - select new test - click button - choose new filename -
etc.......

Thanks in advance,

Darren.

0 项奖励
1 条消息(共 3 条)
2,571 次查看

There can be many ways to do this

One way would be, to keep the file read operation inside a seperate case stucture ( inside the while loop itself)

and use a boolean switch ( mechanical action>> Latch) and read a new file at each click of this button

look at attached VI, probably you can build on its logic

 

 

0 项奖励
2 条消息(共 3 条)
2,564 次查看
Cheers mate, got it working and also managed to clear up the block
diagram as well! Double bonus!

Thanks again!!

0 项奖励
3 条消息(共 3 条)
2,556 次查看