From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controller different Input in the same time in a real Scenario...(SIMULATION IN 2 TANKS CONTROLLER BY PCB BOARD)

Hi! I really need help....

 

I´m doing a simulation where I can controller the input and output with one external PCB, all is working properly (the communication) but my problem is, I can´t open where ever I want the different valves...I mean, I must wait until the process is finish...

 

The program is working with diferents process like this:

 

§Process 0:
    Programinitialization. Tanks and pipes in zero state. Control for this state with  “pump on” button.
§Process 1:
    §State:
         “ Pump on ” button istrue: Pump 1 isrunning, andTank 1 starts to be filled with water.
         “ Pump on ” button is false: nothing happen, go to the next process
§Process 2:
     This process is controlled from the “Control 1”button with is who control “Valve 1” for the discharge of water from tank 1 to tank 2.
§Process 3:
      This processiscontrolledfromthe “Control 2button with is who control “Valve 2” for the discharge of water from tank 1 to tank 2 if “Control 3 button is close or if “Control 3button is open the water go out from the loop.
§Process 4:
      This processgiveyoutheoptiontocome back totheprocess 1 ortotheprocess 2 dependingofthestate in process 3.
 

 

 

 

simulation

 

 

So my problem is I want  run different processes in the same time, without having to wait out the current process is running....

 

this look like this:

 

 

diagram

diagram2

 

and with the differents states...so I was trying to use a Statechart for try to improve the simulation....

 

like this:

statecharts

But when I was tried to implement in labview with the statechart module i can't find the way to interconexión with this new module...

 

StatechartLV

Because i need two differents regions...but i can't use the connexion between them....

 

Some new idea, help....all is welcome!!!

 

Thanks in advance.

 

 

Elena

0 Kudos
Message 1 of 5
(2,519 Views)

Buenos días Elena,

 

Si no te importa, te voy a escribir en español para que nos entendamos mejor.

 

Creo que tu problema es que tienes una serie de pasos y los tienes que ejecutar uno por uno en el mismo orden siempre y que te gustaría poder alterar el orden según la lógica que deseés. En ese caso deberías implementar una máquina de estados.

 

Dime si te he entendido mal y en ese caso dime a que te referías.

 

Un saludo

0 Kudos
Message 2 of 5
(2,477 Views)

Además, para paralelizar operaciones lo que tienes que hacer es usar dos bucles While

0 Kudos
Message 3 of 5
(2,476 Views)

Buenos días Alvaro,

 

Si, mejor en español 🙂

 

Si, me has entendido bien, exactamente es lo que me gustaria. 

 

Empece por mi cuenta con labview y hay muchas cosas que se me escapan... Voy a implementar la máquina de estados a ver si asi soluciono el problema.

 

Muchas gracias!

 

Un saludo!

0 Kudos
Message 4 of 5
(2,471 Views)

Well, I was trying with state machine...but I can´t controller my inputs now...I don´t know what I´m doing wrong....

 

now, look like this:

 

 

dp simulationwith state machine.jpg

0 Kudos
Message 5 of 5
(2,430 Views)