LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure's value change, not detecting changes when tabbing thru array of clusters

Using 7.1 and I am sure it does not respond to value chage while indexing the display.  Wrote program from scratch
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 11 of 21
(2,817 Views)
That may be because you are checking the output array and changing the input array.  Since the output is only touched in the first frame, it will never register a Value Change in the event structure.

The difference major difference between the example you posted and the one I was fiddling with is I had all numerics and you have a mix of numerics and strings.  I wondered if the mixture of strings and numberics was causing a problem.  Low and behold, tab does not register a Value Change... curious.  Two strings? Value Change does not register.

Bug?  I think so.
0 Kudos
Message 12 of 21
(2,803 Views)
I tried clusterEvent1.vi, the event structure can't detect a value change because out is an indicator and you can't change the value of it, therefore there is no value changes occurring.  Also, LabVIEW (at last in 8.0) doesn't seems to detect value changes changed by code (value changes are only detected when you change the values in the front panel)
 
altenbach,
if it works totally fine in LabVIEW 7, then I think it really is a "special feature" of LabVIEW 8 then.  I'll try supports and see what they say... 'coz it IS very strange... just seems totally buggy.  In my original vi (the one I posted is simplified), I used the old value and new value of the value change case to edit the array (on top of the changes), if I:
1. change an element, then tab out
2. change another element and click out (or press enter)
 
the old value of the array in the case turned out to be the old value before the 1st change, and the new value is the value after the 2nd change.  I guess the even structure uses memory to store the so-call old value somewhere.
 
'coz if i create an indicator, and set the indicator = the array's value in the timeout case, you can see changes in the indicator when you tab out of the cell you're changing, so the value of the array is definitely updated.  just that event structure doesn't see it the same way for some reason.
 
Thanks! I'll go bug support people now ^_^

Message Edited by Elsa Fung on 01-06-2006 01:24 PM

0 Kudos
Message 13 of 21
(2,803 Views)
There does not seem to be an easy workaround either.Robot Sad  You cannnot look for a TAB "Key Down" event, because clusters only return "Key Down" events when the cluster has keyboard focus, not the individual elements (dumb, imho).  If you set the string properties to "Update while typing", you do register value changes.  But you get a new event after each keystroke (frustrating if you want to put multiple characters in the field).

Robot Mad
0 Kudos
Message 14 of 21
(2,787 Views)

I thought about checking for a tab key press after every key stroke, but that's gonna slow my VI down (it's already kind of slow...).  Well, I sent the question to support, hopefully they'll answer over the weekend, otherwise, I'll have to bring a hammar to work on Monday, maybe beating up the computer will work, haha...

I'll post what support says after they respond ^_^

Message 15 of 21
(2,776 Views)

Hello,

I have created an identical example in versions 7.1 and 8.0, and indeed tabbing between elements of a cluster (in an array of clusters) DOES cause the value change event to occur in version 7.1, and DOES NOT cuase the value change event to occur in version 8.0. I have file a corrective action request to R&D to have them explore the issue, although unfortunately I cannot guarantee that a fix to this will be implemented for LabVIEW 8.0. If any additional information or justification for the new behavior is given I will be sure to let you know.

Thank you,
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
Message 16 of 21
(2,744 Views)
hmm... does anyone know another way to go around it?
i tried to disable tabbing on the array and cluster so that the user cannot tab out of the controls to cause the problem with value change, but disabling them only prevent the user from tabbing into the controls, not tabbing out...
0 Kudos
Message 17 of 21
(2,729 Views)
ok, I'm back.. I'm trying to go around the value change on event structure problem.
what I ultimately want is when I change one of the element (String called Channels) in an array of clusters (called Pressure Groups), the program will automatically use the element (String called Channels) to update a different array of clusters (called Channels, sorry about the namings...)
I tried to put the two array of clusters (Pressure Groups and Channels) in different tabs in a tab control container, and only update the array of clusters (Channels) when the tab is active.  However, I've been having troubles with tabs and event structures.  The VI "freezes" in tabs that have controls in ("freezes" as in it was in an infinite loop, but that the whole application or windows freezes). Is there any known problems with the two working together?  'coz this is not the first time it's happening...
Please help me Smiley Sad~~
 
** Some of the VIs in the folder might not be needed, I didn't separate what was used and what wasn't used yet... so just ignore the ones that are not... **
 
** Open "LT Drift.vi", that's the main VI, please ignore everything other than the loop inside the 2nd sequence **
 
Thank you.
0 Kudos
Message 18 of 21
(2,715 Views)
Removing the Event structure in the lower case structure seems to help. Generally it is best to have only one Event structure in your program. Multiple structures are possible, but care must be used to prevent one of them from "freezing" your program. Since the second event structure can never execute (it is in a case that will never execute), the events in it queue up. If "Lock front panel until event case completes" (the default), is selected, that may explain the behavior you are seeing.

Lynn
0 Kudos
Message 19 of 21
(2,709 Views)
I see.... Thank you so much!!  The bottom event structure was just a copy of the top one, I just needed a backup when I'm editing the top event structure, just in case I mess it up so bad...
 
Thanks again!!
0 Kudos
Message 20 of 21
(2,698 Views)