LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean operation

Solved!
Go to solution

Hello

measurements here is a local variable. Is going to be true only 1hour per day but i want to behave like the boolean button whith operation latch when released. for this example because this is in a while loop I want everytime the measurements become true to send a message only one time not every loop iteration.

I think I have to add some logic before between the local variable and to the input of the case structure, but i can't find anything until now. Could you please help me?

Regards

 bolean.jpg

 

 

 

0 Kudos
Message 1 of 18
(3,314 Views)
First, eliminate the local variables. Second, look at how you would use a shift register.
Message 2 of 18
(3,282 Views)

If I understand correctly...

 

Place another MEASUREMENTS local variable inside the TRUE case of the Case Structure and set MEASUREMENTS=FALSE.  That means it will only happen on the first (1) iteration.

0 Kudos
Message 3 of 18
(3,279 Views)

This is funny.  Dennis is trying to discourage the use of Local variables and battler is telling him to use more.  What a diverse group we have here.  I think most of us here would want to discourage the use of local variables in favor of using wires.

 

Zaxos.  Please try to better explain what it is you want.  You explanation is very vague.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 18
(3,225 Views)

I'm just trying to help him to get him a quick solution.  Whether he uses local variables is secondary. 

 

It may be that he needs to use them, I don't know.  At least he's not using Property Node-Value, that's a good start!

0 Kudos
Message 5 of 18
(3,200 Views)

Check out NI Shipped Example: Pen Attributes and Image subsetting.vi.  That's an example of terrible (unnecessary) overuse of local variables!

 

Clipboard01.jpg

Clipboard02.jpg

0 Kudos
Message 6 of 18
(3,192 Views)

I've found that many NI examples leave a lot to be desired.  Mainly I find hidden wires, some icons on top of others, backwards wiring, poor documentation, and others.  You think NI would adhere to their style guidelines when making examples and subvi's in vi.lib.

 

Still waiting for Zaxos to give a better explanation of what his problem is.

 

Message Edited by tbob on 05-17-2010 03:05 PM
- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 18
(3,182 Views)

Hello again

I will try to explain better that time.

I have two different while loops which are responsible for taking and sending measurements respectively

I want to sent my measurements to mobile, the boolean MEASUREMENTS become true once every 24 hour is stay true for one hour in the while loop which is responsible for taking measurement, the operation is up to a counter that I use.

My problem is every time the MEASUREMENTS become true my device is sending msg at every iteration of the "sending" while loop and I don't want that, I want to send only once.

I think battler understand what I want to do, the solution that he said seems very logic but when I am trying it is not working, maybe is conflicting.

Regards

0 Kudos
Message 8 of 18
(3,140 Views)

Ha Ha HaSmiley Very Happy

 

Which of the 2 "MEASUREMENTS" Indicators does the local variable connect to?

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 9 of 18
(3,125 Views)

Zaxos,

 

It's dangerous to not give the full picture. You said something like, "Value won't update, why?"

update_value.PNG 

 

And we're all trying to help, then you give up more of the block diagram an we see:

 

update_value-2.PNG 

 

Do you think you could post the VI?

Then we can really see what is going on

 - someone might even modify it for you with comments if you are lucky.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 10 of 18
(3,107 Views)