LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event - value change of indicator => bug?!!!

Solved!
Go to solution

Hi,

I want to detect the change in value in my indicator, I managed to do it with this solution that you see in the photo below.

example.pngBut my HMI bug when i do that. wath's the problem? and do you have an other solutions for detect change of value of indicator.

Thank you for your help.

0 Kudos
Message 1 of 5
(2,524 Views)
Solution
Accepted by topic author Sarah_LAB

Hello,

Event structure will not respond to change of value because it is software generated event,It will respond to any user events such as click of mouse etc.

One way to detect the change in indicator value is to use shift registrar(to store previous value) and a compare with new value. (not sure this will suits for your application or not)

Expand.Evolve.Influence
0 Kudos
Message 2 of 5
(2,499 Views)
Solution
Accepted by topic author Sarah_LAB

If you don't put a Wait (ms) in the right side loop, events will be generated at an incredibly high rate (maybe millions of times per second). Try with a 1000 ms wait or more.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 5
(2,492 Views)

it works, but I hope there will be no problems if I add others events,

Thank youuuu very much.

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

@Sarah_LAB wrote:

I want to detect the change in value in my indicator, I managed to do it with this solution that you see in the photo below.


Can you take a step back and explain what you really want to do. What should happen based on values, value changes, and operator interactions. Your current code makes no sense, so please explain in detail what you want to do.

 

Let's look at your snippet.

  • The outer loop and stop button serves no purpose. The code would work exactly the same if you would delete them both.
  • Your right loop generates value changes at an incredible rate (so please put a wait in it) and all you seem to want is update another indicator with the same value. Why not branch the wires from each "dice" to the two indicator, eliminating the event loop entirely?
  • What is the purpose of the tank?

In summary, your current code could be written as follows.

 

NewCode.png

 

Obviously, you probably want to do something much more interesting and elaborate, so please enlighten us what you really need. I am sure there is a simple solution for that too! 😄

 

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