01-17-2008 12:36 PM
01-17-2008 01:10 PM
01-17-2008 01:22 PM
Yes I agree with all your comments. All the case structures are the same. But the lines I am reading and writing to are different. If you see the writes they are made as global variables using MAX. I could not think of any other way to do it. Any suggestion for improvement will be appreciated.
johnsold wrote:
2. For what you want to do you will need to have an overall loop structure. I highly recommend that you look into state machine architectures. The VI will start to run when opened and will be idle except for a Digital Input from your DAQ card which will be read often enough to detect the button operation. Mechanical switches take 10s of milliseconds to operate and if it is a big industrial pushbutton, it will likely be closed for 100s of milliseconds, so 100 samples per second is probably fast enough to scan the digital inputs.
Lynn
What exactly do you mean I should do with this?
johnsold wrote:
3. Once the button has been detected, go the the operating states of the program while watching the digital inputs for the stop button.Lynn
johnsold wrote:
4. The Digital Input driver should probably run in a parallel loop which communicates the status of the Start and Stop buttons with the main program via queues or an Action Engine.
01-18-2008 02:25 AM
01-18-2008 06:09 AM
GerdW wrote:
- put same structures into subvis (using just one additional input to select the needed DAQ channel)
Which frame are you talking about?
GerdW wrote:
- delete unneccessary frames (like the first one of the biggest sequence)
01-18-2008 09:41 AM
01-18-2008 12:37 PM
01-18-2008 03:26 PM
01-18-2008 03:42 PM
Hello,
The first post by johnsold is extremely helpful to the future structure of your program. However, I also agree that the code needs to cleaned up and made to it can be viewed on one screen. It seems you are currently having issues creating sub vis.
I would suggest using the LabVIEW Help to read the following articles. Each of these titles is a “How-To” document so it should help you through the process. Please note that the “Concept” articles will aisd the “How-To” pages.
Creating SubVIs from Selections
Avoiding SubVI Selections That Contain Front Panel Terminals
Icon and Connector Pane Overview
Selection a Connector Pane Pattern
Avoid SubVI Selections That Create Cycles
01-31-2008 08:26 AM