LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure, case structure, iteration number

Solved!
Go to solution

Hi

 

I am trying one example about Event Structure from the book,  LabVIEW for Everyone: Graphical Programming Made Easy and Fun. 

 

The example in the book looks like this:

The number of 'work done' equals 'iteration number'.

do some work.png

 

But when I build a Vi and try this example, I got this:

iteration number is two times the 'work done'.

my do some work.PNG

 

I have attached my Vi. Does anybody know what's wrong with my Vi

 

Thanks

 

Bing

0 Kudos
Message 1 of 4
(2,310 Views)

Most likely, your button is configured for the "wrong behavior".

The example your screenshot shows expect the button to be "latch when released".

I think your button is "switch when pressed"...

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,308 Views)
Solution
Accepted by topic author liubingxy

Both Activation and Deactivateion of the boolean causes Value Change events, but you only add 1 when it's activated. If you set the booleans mechanical action to Latch instead of Switch they should be the same.

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,306 Views)

Thank you both! problem solved.

0 Kudos
Message 4 of 4
(2,301 Views)