LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/Disable button property and file read dialog box problem

I am trying to modify a data collection program so that it can play back previously recorded files.  I have playback "start" and "stop"  buttons, and I use the button's property nodes to alternately enable/disable the appropriate buttons (example: disable the Start button after it has been pressed, re-enable it after Stop has been pressed, etc.).

 

I've run into two problems:

 

1.) If I cancel out of the dialog box when prompted to select a file (after clicking "Start"), the start button still becomes disabled and grayed, despite it sitting in a case structure which is controlled by the Open/Create/Replace File function's 'cancelled' terminal.  The True case just runs the error line across

 

2)  If I cancel out of the first dialog box, I am unable to receive any other dialog box pop-ups for subsequent clicks of "playback start".

 

I've been fighting with this one for a while and am not sure why itisn't working.  Any  advice is welcome.

 

jimmy

 

 

Attached are pictures of a playback "start" and "Stop" event structure implementation.  the open and close file

0 Kudos
Message 1 of 2
(3,714 Views)

Does the File dialog box also have a cancelled?  output?  If so, you may want to make sure the case structure only executes false, by OR' ing together both cancelled booleans.  If you cancel the first dialog box that is fine, but the file open function doesn't send out a cancelled.  I think the first dialog catches the cancel button, the error gets passed to open.  You have an error 43 on the dialog box causing the open not to execute, but since you didn't actually cancel on the file open, it sends out a false and thus the case structure executes.

 

You may want to rethink out you handle the dialog boxes.  You may need to handle an error 43 coming out of your open VI based on the dialog being cancelled. 

 

0 Kudos
Message 2 of 2
(3,710 Views)