LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure: Problem with data transfer

Solved!
Go to solution

The event structure allows you to create an event that triggers on value change of any of the elements inside of the cluster.  And the new value of the cluster is available from the event node on the left side of the structure.  Simple.

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 11 of 19
(2,806 Views)

Hello,

 

thank you for your advice - sorry, it's not easy as a beginner. Please, please. Be kind and patient to us newbies. I know how hard it is as a professional to read all that dumb stuff. But everyone has to start somewhere and take all of the hits, too, until they know better.

 

All of your solutions - using shift registers, using the CtrlRef, using the NewVal, OldVal or other elements of the event structure - i already checked them out long before and took them in for a reflection on how to solve the problem.

 

I think (maybe it's just me who doesn't know better) that using multiple cases such as "All Elements Value Changed" won't help me out here. I've tried that already - and the only information i get from the "CtrlRef" element is "Cluster ###" - but i need the ref of the specific single control element from inside the cluster. That's why i needed to prepare the event structure to react on all those single elements. This leads inevitably to the fact that i can't use "OldVal" or "NewVal" either, because when using event cases reacting on single control elements within a cluster, easily to follow i only get only one specific value (the one that was changed last). However i need the whole cluster data to feed that SubVI. Surely i could disassemble and re-write it so it would loop simultanely instead of being executed once upon request, keeping constant data in internal shift registers and only registering changed data, but the use would not compensate the efforts, this is not speed relevant and it would get more complex for third party users with little experience to understand what's going on in that - really - tiny application.

 

And, to relax flared tempers, i already arranged a little conversation to learn more about local variables, property nodes and efficient design soon. So at least , no more dumb questions about this topic, at least not from me. At least i hope so.

 

Thanks.

Message 12 of 19
(2,803 Views)

@michaelboiger91 wrote:

Hello,

 

thank you for your advice - sorry, it's not easy as a beginner. Please, please. Be kind and patient to us newbies. I know how hard it is as a professional to read all that dumb stuff. But everyone has to start somewhere and take all of the hits, too, until they know better.

 [...]

Thanks.


For being that nice (and self-aware) please review attached VI (LV 2015). It should answer your needs....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 13 of 19
(2,794 Views)

Wow, you give up so easy....

This should work.  I haven't tested it.  You'll need one case like this for every cluster.  You can put all of the value changes in the same event but it will need a small modification to pull the proper array of cluster controls depending on the cluster that changed.

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 14 of 19
(2,790 Views)

If you want it all in one event..... (again, untested but should work)

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 15 of 19
(2,785 Views)

Dear,

        I have an issue putting variable in the event loop.

        As shown in the attached VI, when I change the input and then click the middle button, the output does not change. It only change only after I click twice.

 

       How can I use mouse down event and only click once?

 

       Yes, by using mouse up it works but I do not want to use mouse up event.

 

Thank you so much for your help.

0 Kudos
Message 16 of 19
(2,227 Views)

A few things:

 

  1. You should probably start a new thread.
  2. I am not sure what your model VI is trying to accomplish, it is structured strangely.

Anyway, I can get the value to change on one click provided that the change in the input is registered. I'll try to better explain: If I change the value in the input, then click anywhere on the screen or hit enter, then when I click the boolean the Output changes. However, if I change the value in Input and leave the cursor blinking inside of the input control, then click the boolean directly, it takes two clicks to register.

 

Maybe you can explain better what you really want to do.

 

mcduff

 

PS Using LabVIEW 2017

0 Kudos
Message 17 of 19
(2,217 Views)

Thank you so much for your fast response.

Yes, you describe exactly what I experience.

What I want to achieve is to use mouse down event to register input with one click.

Currently I have to click somewhere else or click twice to register the input and make output same as input.

 

Is there anyway to use mouse down event to achieve one click to register input?

0 Kudos
Message 18 of 19
(2,212 Views)