LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Design Flow Strategies Involving Modes and File Close

I am taking over a pre-exsisting Labview  (ver 7.1) project which was gone through probably never rigidly structures from the get go. I have a two queastions queastions.
 
1.) Queastion1:  I'm trying to introduce more structure in the code as per written requirments involving software flow in terms of  state transition between modes. There are a total of six (6) modes defined and depending on what mode you're in specific functionalty or behaviors are allowed. None of this strict controlhas been implemented yet. The basic structure of the current program consist of Tack Seqeunce Structure as the highest outter level followed by a nested while loop and a mix bag of cases, while llops and stack sequence within the inner nested while loop.
 
My objective is to at the launch of the program initilize some variable or data object representing the current mode state and resigned the this data object as the modes changes as a way of tracking the current mode. I also plan to use this mode state to enable, disable or trigger other functions within the program. What is the best data type or mechanism to use? I was thinking about using some sort of enum object.     
 
 
2.) Queastion 2:
We have a Close File function at the outter while loop. We are able to close file after hitting a button but not able to read file with another utility application untill we actually exit the Labview program.  We can see the number of bytes being updated in the file listing in Windows XP but Labview not releasing file until we exit.
 
          a.) How do fix this?  
        
0 Kudos
Message 11 of 13
(598 Views)
I am taking over a pre-exsisting Labview  (ver 7.1) project which was gone through probably never rigidly structures from the get go. I have a two queastions queastions.
 
1.) Queastion1:  I'm trying to introduce more structure in the code as per written requirments involving software flow in terms of  state transition between modes. There are a total of six (6) modes defined and depending on what mode you're in specific functionalty or behaviors are allowed. None of this strict controlhas been implemented yet. The basic structure of the current program consist of Tack Seqeunce Structure as the highest outter level followed by a nested while loop and a mix bag of cases, while llops and stack sequence within the inner nested while loop.
 
My objective is to at the launch of the program initilize some variable or data object representing the current mode state and resigned the this data object as the modes changes as a way of tracking the current mode. I also plan to use this mode state to enable, disable or trigger other functions within the program. What is the best data type or mechanism to use? I was thinking about using some sort of enum object.     
 
 
2.) Queastion 2:
We have a Close File function at the outter while loop. We are able to close file after hitting a button but not able to read file with another utility application untill we actually exit the Labview program.  We can see the number of bytes being updated in the file listing in Windows XP but Labview not releasing file until we exit.
 
          a.) How do fix this?  
         
0 Kudos
Message 12 of 13
(598 Views)
Hmmm... got a bit of a hiccup there. Must be using Internet Explorer.

My comment regarding the state machine still holds for your primary question.

For you second question, can you show us the code? Your description about an outer while loop and pressing a button don't really provide enough to be able to understand what the code is doing.
0 Kudos
Message 13 of 13
(592 Views)