LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event order LabVIEW 2012 SP1f5 not deterministic

Solved!
Go to solution

The attached VI can be used to demonstrate that the order that events are handled by the event structure is not deterministic. (i.e. it can't be deducted from the order in which they are generated). Placing the user event generation at different locations in the sequence renders unexpected results. In LabVIEW 2013 however the behaviour is deterministic (i.e. it follows the logic that I always apply, events are handled in the order that they are generated.

 

My question:

Can anybody confirm this in LV 2012 (wrong behaviour, IMO) and LV 2013 (expected behaviour, IMO)?

 

We need to make a choice to move a large project to LV 2013 asap or postphone it a little.

 

Many thanks for people that try.

 

VI is saved in LV 2012.

Regards,
André (CLA, CLED)
0 Kudos
Message 1 of 10
(3,442 Views)

The given VI works as expected in LabVIEW 2012 and 2013. Do you have a sequence order that does not give the expected result?

 

Attached is a slightly more comfortable testing version.

Message 2 of 10
(3,438 Views)
I changed the order of the user and value signalling events, and more than once the user event was handled after the value signalling events despite it being fired before. In LV 2013, the order is always the fire order, in LV 2012 it's not.
Regards,
André (CLA, CLED)
0 Kudos
Message 3 of 10
(3,419 Views)

Hi,

 

I tested with you modified version and it still doesn't work as expected, as expected. But I have some test results that I can share now. In the attached zip file you can find 4 images: "LV12_N1_UE_N2_wrong.png", "LV12_UE_N1_N2_wrong.png", "LV13_N1_UE_N2_OK.png" and "LV13_UE_N1_N2_OK.png".

 

LV12.0.1f5 ad LV13.0f2.

 

LV12_N1_UE_N2_wrong.png: expected order of event handling -> "LV13_N1_UE_N2_OK.png".

LV12_UE_N1_N2_wrong.png: expected order of event handling -> "LV13_UE_N1_N2_OK.png".

 

LV12_UE_N1_N2_wrong.png: Results between single run and continuous run differ, single runs seems OK.

 

IMO it looks like a race-condition between control events and user events.

Regards,
André (CLA, CLED)
0 Kudos
Message 4 of 10
(3,379 Views)

Hello Mr. Buurman,

 

I'm not able to reproduce this on a LabVIEW 12.0.1f5 pc.

That's really unusual and I haven't seen that before.

Do you have any other PC at your disposal where you can reproduce this behavior?

 

Can you share a MAX Report with me?

 

General question: Can anyone else on the forum reproduce this?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 5 of 10
(3,365 Views)

Here's my screen capture:

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 10
(3,359 Views)
Solution
Accepted by topic author andre.buurman@carya

I can't look at the code, but based on the description it sounds like what was discussed in this thread - http://lavag.org/topic/9986-out-of-order-events-is-not-a-bug-sort-of/

 

The good news is that the changes made to events in 2013 also included the fix for this issue, so I would say that you should upgrade (or use one of the workarounds described in that thread).


___________________
Try to take over the world!
Message 7 of 10
(3,354 Views)

Thank you for posting this link, it explains the behaviour I see and validates my own conclusions. At least it is now a known problem with work-arounds.

 

Regards,
André (CLA, CLED)
Message 8 of 10
(3,346 Views)

What Tst said.

 

I have also seen this problem in the past (and had trouble convincing others the problem was real) and the changes in LV 2013 are a very welcome fix to this annoying behaviour.

 

Shane.

Message 9 of 10
(3,285 Views)

Thanks to everyone for the feedback!

 

I had not yet experienced this myself, so thanks for making me aware of it!

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 10 of 10
(3,233 Views)