LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Logic Through Blocks

Hello, I am very very new to LabVIEW. I am working in a university lab on a system that has a pump, multiple heaters, flow detectors, etc. I have encountered a problem with sending logic through blocks. I am measuring flow rate in one block, and trying to control heaters in another block based on the output logic of the Boolean gate arrangement measuring flow rate. When I wire the logic into the gates that I am trying to control, the wire is green and gives no errors. When I run the program and try to turn the pump on, nothing happens. The pump will not turn on. 

0 Kudos
Message 1 of 12
(1,794 Views)

You need to post your code for us to have a reasonable chance of assisting you.

 

Best would be to post all of your code (.vi files) as a zip file, or if there's not many VIs, post each individually.  It would be best to back-save them a few versions (3 back is usually enough, so 2017ish) because not everyone uses the most recent version.

 

It would also be good to post a screenshot of the offending code, but the actual code would be 10x better to have.  Posting a screenshot AND the code would be even better, still.

 

 

 

 

0 Kudos
Message 2 of 12
(1,790 Views)
0 Kudos
Message 3 of 12
(1,775 Views)

This is a LabVIEW forum and we don't even know what you mean by words like "block", "gate", etc. These are typically not a programming terms. If you talk about a green wire, do you mean a boolean on the block diagram or something physical? Are you talking about an error wire?

 

In summary, be specific and try to avoid ambiguous words. Seeing some code always helps! 

How are things connected? How much current do these devices draw and how much do you provide?

0 Kudos
Message 4 of 12
(1,771 Views)

Best guess is what you're talking about is somewhere inside of this code?  Since that's the part that leads to a "DAQmx Write"?

Kyle97330_0-1625596678491.png

 

If so, then your biggest problem there is the absolute mess of wires you have there.  Clean all of that up so you can actually see what leads to where and I bet your problem becomes more apparent.

 

I would also advise getting rid of those Boolean constants you have going into logic gates because they're silly.   For instance, in the middle there you have a True wired into an And node... which you can just replace with a straight wire.  

0 Kudos
Message 5 of 12
(1,749 Views)

@Kyle97330 wrote:

Best guess is what you're talking about is somewhere inside of this code?  Since that's the part that leads to a "DAQmx Write"?

Kyle97330_0-1625596678491.png

 

If so, then your biggest problem there is the absolute mess of wires you have there.  Clean all of that up so you can actually see what leads to where and I bet your problem becomes more apparent.

 

I would also advise getting rid of those Boolean constants you have going into logic gates because they're silly.   For instance, in the middle there you have a True wired into an And node... which you can just replace with a straight wire.  


One quick question. Are your indicators lighting up on screen? If not then I recommend starting at the indicator and working backward with probes until you find the culprit. If the indicators are coming on then your task could be set up wrong, your wiring could be wrong, or you could have a bad card or relays.

0 Kudos
Message 6 of 12
(1,737 Views)

The constants are necessary for for the system being controlled. I can unwire the Boolean gate and the pump comes back on. If I had to guess, the issue lies within getting the true false logic across the border of the panel.

0 Kudos
Message 7 of 12
(1,645 Views)

@AMMART wrote:

The constants are necessary for for the system being controlled.


The constants do nothing TRUE AND TRUE/FALSE will always  be the value of TRUE/FALSE. FALSE OR TRUE/FALSE will always be the value of TRUE/FALSE. Aside from that, have you done anything the check your logic? Are you familiar with probes? They are very convenient for this kind of thing. Follow the logic back to see where the problem is located. Make sure that what you are sending to the DO is correct. You have not said what the data going into the DO needs to look like, nor have you attached a vi that we can run. A picture is worth a thousand words, but a vi is worth 10,000 pictures.

0 Kudos
Message 8 of 12
(1,635 Views)
  1. Throw that entire hideous mess into the trash
  2. Take the LabVIEW tutorials
  3. Start over
"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 12
(1,626 Views)

Jesus christ, how do you even read this thing?

 

EDIT:

Why is there an empty loop, why are there 5 loops, just one big why?

 

Also let me guess, you end the program by pressing "Abort execution" right? Since all the Loop conditions are wired as "Continue if true".

0 Kudos
Message 10 of 12
(1,593 Views)