LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Long run front panel bugs

Thanks for advice!

 

I use Value property to imitate user input. For example. User set some experimental parameters and turned systen on. Say, he knows, he needs to change this parameters to other values after system reaches 150°C. But system reaches this state not early then midnight. So the user sets trigger (if T > 150°C >> then turn pump on, set oscillation intervals to 50)  and leaves home. I can't work out better solution, because I need to change the state of VI controls.

 

Ok. I really didn't clearfy, what race conditions means. But in fact, inspite of lots of Local Variables, race conditions in VI are avoided. What I wanted to say, was that I have some data losses due to desync.

 

Unfortunatly, I don't have access to online course. Otherwise I would read it already.

 

0 Kudos
Message 11 of 14
(1,091 Views)

Say, he knows, he needs to change this parameters to other values after system reaches 150°C. But system reaches this state not early then midnight. So the user sets trigger (if T > 150°C >> then turn pump on, set oscillation intervals to 50)  and leaves home. I can't work out better solution, because I need to change the state of VI controls.

 

You cannot work out better solution, because you miss many LabVIEW concepts. If you used a State machine, the above task would be very simple.

 

Even if you cannot access the Self paced online courses, you can find lots of free resources to learn LabVIEW programming (google for it, also lots of free things on youtube).

About state machines:

https://www.ni.com/en/support/documentation/supplemental/16/simple-state-machine-template-documentat...

 

Good stuff about Events (and user events):

http://www.walkingthewires.com/2015/07/20/something-happened-events-in-labview/

 

 

 

0 Kudos
Message 12 of 14
(1,084 Views)

Ok. I can implement state machines to the vi as whole and for many subtasks (and I should). I can make a state "as it was running before, except parametres user wants to change when trigger occures (150°C)". But if user wants to, say, turn pump off at night, when he comes at the mornings he needs to find that pump switch  in "off" state. Is there way to do this without Value Node? Controls operate the states of State Machine anyway, is there need to create additional states?

0 Kudos
Message 13 of 14
(1,076 Views)

@RustyWraith wrote:

Ok. I can implement state machines to the vi as whole and for many subtasks (and I should). I can make a state "as it was running before, except parametres user wants to change when trigger occures (150°C)". But if user wants to, say, turn pump off at night, when he comes at the mornings he needs to find that pump switch  in "off" state. Is there way to do this without Value Node? Controls operate the states of State Machine anyway, is there need to create additional states?


Of course, you have to create a kind of scheduling or a timer. This is very simple, but first you have to learn some more basic things in LabVIEW, like FGVs, and of course State Machines... Do not try to solve everything in one day, learning requires time and practice. That is why you should google for learning resources, and this forum is also useful, just use the built-in search. You know how many times similar questions emerged here? 🙂 You just need to filter out the useful info, specially look for posts written by pro LabVIEW programmers (not like me 🙂 ).

 

Just as a very primitive example, I attach here a project file (hmm, you should also learn why it is recommended to use a LV project to maintain your main VI, subVIs, and control Type Definitions, documentation files, etc...). Open the lvprj file first after unzipping to discover the different type of files...This example was created for educational purpose and not as a real application, but can give you some idea about a state machine (but this particular example does not use Event structure, which is really really useful thing...).

 

0 Kudos
Message 14 of 14
(1,059 Views)