LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Structure advice required

As a newbie to LabVIEW programming Smiley Happy, I need some help on the structure of my application as I can't get the programme to work in the sequence I'd like. I seem to have trouble understanding how the programme's sequence should be controlled.

 

Sequence of operation:

 

1. Operator presses NEW button

2. Dialog appears prompting for the filename to save the Chart image to.

3. User enters the file name and clicks OK on the dialogue.

4. The VI then starts to read an analogue value and plots it on a strip chart, 1 record every 10 seconds (might be for up to 24 hours).

5, Then VI now wait fro the user to press the END button.

6. The END button is pressed and the chart's image is saved to a JPEG file.

7. The chart if cleared.

8. VI now returns to the start and waits for the NEW button to be pressed.

 

Any help with this will be much appreciated.

 

Thanks,

 

Harry

0 Kudos
Message 1 of 7
(2,968 Views)

Your structure warrants the usage of the Event-based State Machine architecture.

Search the LabVIEW help & NI Example Finder inside it to get started.

You can search  these forums also in the above titles.

- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 7
(2,950 Views)

use Queued message handler vi for this purpose.

 

0 Kudos
Message 3 of 7
(2,945 Views)
There is an event based state machine template at the bottom of http://www.bloomy.com/resources/ that I've been playing around with in my attempt to learn how to develope a good user interface. It has a little more detail than the templates that come with LabVIEW.
0 Kudos
Message 4 of 7
(2,942 Views)
See the attached VIs to get a grip.
- Partha ( CLD until Oct 2027 🙂 )
Download All
Message 5 of 7
(2,940 Views)
Thanks for the useful information, links and the example. I can see from the example how the states are used to control the sequence. Can I disable the 'NEW' state when the 'RUN' is active?
0 Kudos
Message 6 of 7
(2,929 Views)
If you are using LabVIEW 8.5, I have a complete queued message statemachine template in my samples, see link below.  It is pretty well documented, and in use at many companies.  15 years in development with many contributions from the outside.  Just another option for you.  Good luck.

Paul
Message 7 of 7
(2,927 Views)