LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switch problem

Hi,

 

I made a program for my system, and inside that i put a switch inside a timed Loop, 

 

It just don't seem to work on that system but work pretty fine on a simple system ! 

 

Could You just tell me what I did wrong plz ?

 

Regards,


Sebastien G. 

0 Kudos
Message 1 of 6
(2,316 Views)

What switch?  Are you referring to the case structure?  What is it doing or not doing and what should it do?

 

You don't need all of that conversion for your Digital Output.  Just use Build Array for all of your buttons and wire the resulting array into the DAQ Assistant.

 

You also have a race condition with your Dry 2.  Data Flow dictates that everything inside of a function must complete before any of its outputs are made available.  Therefore your read value for Dry 2 will not be made availabe until that entire case structure is complete.

 

What EXACTLY are you trying to do?  There is likely a better way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,304 Views)

What does "It just doesn't seem to work" mean?  You can't press it?  It doesn't get read?

 

Which switch are you talking about?

 

Can you clean up your code so you don't have backwards running wires and we can tell which wires go where?

0 Kudos
Message 3 of 6
(2,302 Views)

Thank You for the amazing quick answer ! 

 

I am sorry, i will put more information : 

 

- I am trying to send a value to a switch link to the DAQ Assistant.(NI9481).

- So that my flow pass by one point and sometime after by one other point. It seems like at the moment, the only thing happening is the flow set himself to the Steam Flow and don't do much starting from there. 

 

I am linking the full diagram block for a better understanding. 

 

Regards,

 

Sebastien G. 

 

0 Kudos
Message 4 of 6
(2,287 Views)

You have only 1 DAQ assistant in that loop which means it is only going to execute once per iteration.  You also only have one case structure that includes that sequence which means it is also only going to execute once per iteration.  You may be changing a boolean within that sequence multiple times using local variables, but that isn't going to magically cause the DAQ assistant to execute multiple times per iteration.

 

Turn on HIghlight Execution and watch how LabVIEW code executes. I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

What you need to do is use a state machine.

0 Kudos
Message 5 of 6
(2,279 Views)

Not trying to magically doing anything. Just trying to do my best on a system that had no national instrument on it.

 

Passing from ``never use it`` to ``an almost fully automated system.``

 

I will look at those course,

 

Thank you,

 

Sébastien G.  

0 Kudos
Message 6 of 6
(2,276 Views)