From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-29-2011 06:48 AM
In an event structure is there a way to determined which numbered event was executed when the button is hit?? I've noticed at the top of the event structure there is a number 0-....can you can access to this value some how?
Solved! Go to Solution.
12-29-2011 07:26 AM
Can you tell the necessity of accessing that number? May be it can be done by some other way
12-29-2011 07:45 AM
Each event runs a test (20 of them) that logs the result to an array. if the user re-runs the test I want to replace the old value w the old new one. The test run happens to correspond to the event number I have each test in. I thought I could use "replace array subset " and the row value would be the event number.
12-29-2011 07:59 AM - edited 12-29-2011 08:00 AM
Hi,
I'm afraid you can't do that.
With scripting you can get the number of event frame in your even structure there is not much more that you can access (it's been discussed here).
But anyway what is your use case? Maybe something much simpler could help you anyway.
Hope this helps
EDIT: oops comin' in a bit late... sorry!
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
12-29-2011 08:07 AM
Mark,
You can't get the event number , the other way is changing caption of those controls to number in on order and read the caption when event is occured.
Refer the attached VI..(LV2010)
Regards
GK
12-29-2011 08:09 AM
can the 20 tests be run in any order or is the order always the same?
here's a suggestion that will work if the order is not always the same.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
12-29-2011 08:12 AM
Quick & Dirty solution.
Put a constant in each event and wire the constant to the Row Index.
12-29-2011 08:29 AM
If I couldn't get to the event number I was going to do what Spectre Dave suggested. I found out the hard way after hard coding something 20 x's the user ALWAYS wanted to make a change and it affected 20 places. So I'll try the quick and dirty method suggested by TiTou. If not its bite the bullet and hard code a number per event. Thanks to everyone for thier suggestions AND quick replys
12-29-2011 01:06 PM
Can anyone figure out why this only works for col zero???????????????????????
12-29-2011 01:25 PM
You can only replace cell if the cell is there.
Your start array has only one column, therefor only column 0 will work.
Try to put any value in the next column in the start array.