LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numbered events

Solved!
Go to solution

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?

0 Kudos
Message 1 of 12
(2,987 Views)

Can you tell the necessity of accessing that number? May be it can be done by some other way

0 Kudos
Message 2 of 12
(2,980 Views)

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. 

 

 

0 Kudos
Message 3 of 12
(2,973 Views)

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

Antoine Chalons

0 Kudos
Message 4 of 12
(2,970 Views)

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

Message 5 of 12
(2,962 Views)
Solution
Accepted by MarkDavid

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

Antoine Chalons

Message 6 of 12
(2,960 Views)

Quick & Dirty solution.

 

Put a constant in each event and wire the constant to the Row Index.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 7 of 12
(2,957 Views)

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

0 Kudos
Message 8 of 12
(2,947 Views)

Can anyone figure out why this only works for col zero???????????????????????

0 Kudos
Message 9 of 12
(2,921 Views)

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.

Message 10 of 12
(2,914 Views)