LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command structure error

Well I work on a project with arduino and labview, currently I develop an interface but it does not work as agreed.
In fact as soon as you start the Vi the pumps start what is not desirable.
I have a problem with my structure and my loops.
here is the file try to see my diagram and tell me what you think .. !!
the sequence of operation is described as follows:
- Press on the bp Marche
* Ignition Test Indicators, Pump 1,2 and 3
- After the press on the running gear, you can start the engine at a precise speed (painting 1,2 and 3)
- When the V1 true turn off pump1
- When V2 true turn off pump2
- When V3 true turn off pump3

NB: when a pump stops others can continue to work .. !!

thank you, my VI under Labview 2016
open Order and supervision

0 Kudos
Message 1 of 3
(1,853 Views)

Hello,

 

How are you initializing the program?

Also, typically the logic LabVIEW follows is through error wires and different event structures.  Within the code, it appears that there isn't a set order or logic for LabVIEW to follow.  Is there a reson for why the whole code is inside of a while loop?

Niki Budgell | Product Planner - SW Management | NI
0 Kudos
Message 2 of 3
(1,782 Views)

Hi Ernest,

 

Thank you for uploading the code - this at least gives a possibility of troubleshooting your program.

I haven't closely examined all of your code, but I will give my initial comments. Perhaps that will allow you to make some progress, and then we could repeat. I've numbered points to make it easier if you want to refer to them in a reply, not to give any specific ordering or importance

  1. You're using several Event Structures in separate While loops, inside another While loop. If any of these things don't iterate, then your other loops won't progress. In particular, your top (grey) EvStr will run until "MO" changes value, and the bottom (green) until "stop" is pressed. Until both of these happen, the outer loop won't iterate (there are also other things that need to happen, including with the elapsed time loop.
  2. Both EvStrs use the Timeout case, but have -1 wired to the value and although this is passed through each case, it is never changed. As a result, they won't ever timeout. Is this intentional (and if so, it's clearer to not wire them at all, -1 is the default)
  3. The colour scheme makes it more difficult to understand in my opinion. This is perhaps more opinion than anything else, but none-the-less, I find it harder to mentally process and I expect others would/will too. Generally you might find it easier to get help (and to compare your code with examples, etc) if you use the default colours (yellow for EvStr, grey for While loop, no background colours, etc).

GCentral
0 Kudos
Message 3 of 3
(1,763 Views)