05-15-2010 09:15 AM
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
Solved! Go to Solution.
05-15-2010 06:22 PM
05-15-2010 06:24 PM
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.
05-17-2010 11:02 AM
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.
05-17-2010 04:28 PM
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!
05-17-2010 04:47 PM
Check out NI Shipped Example: Pen Attributes and Image subsetting.vi. That's an example of terrible (unnecessary) overuse of local variables!
05-17-2010 05:04 PM - edited 05-17-2010 05:05 PM
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.
05-18-2010 04:41 AM
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
05-18-2010 06:20 AM
Ha Ha Ha
Which of the 2 "MEASUREMENTS" Indicators does the local variable connect to?
James
05-18-2010 06:38 AM
Zaxos,
It's dangerous to not give the full picture. You said something like, "Value won't update, why?"
And we're all trying to help, then you give up more of the block diagram an we see:
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