LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i use dynamic event reference from one VI to another

i created vi (channelarray.vi) with boolean reference of dynamic event(saveconfiguration) to use it in another vi(ex1.vi)..
the problem is i am unable to control saveconfiguration reference from ex1.vi...
please can anyone tellme the solution to sortout this problem...
i attached channelarray.zip which includes
1.channelarray.vi
2.ex1.vi

i mean the same operation of channelarray.vi to be carried out in ex1.vi

thanks in advance....
0 Kudos
Message 1 of 4
(2,862 Views)
This looks like you are making this more difficult than it has to be, but let me point out some issues.

The dynamic event that you are registering, is for the the save button on the FP of "channelarray.vi".

THe dynamic event is registerd when the VI runs and unregistered latter.

Your "chann..." has no timeout event so waits for the mouse down event of the control on the FP of "chann..."

When you run "chann..." it hangs until the mouse down event fires.

The key point is that the control on the FP of "chann..." has to fire AFTER "chann..." starts to run.

That is how "chann..." is currently coded to run.

When you call "chann..." from ex1.vi the state of the save button is set when "chann..." is called and the boolean cluster is passed, and THEN the vi is run.

There is NOTHING punching the save button.

It looks like all of the execution control code in "chann..." can be simplified by just using a "case structure".

If you are really trying to develop a stand-alone VI that runs in the background to handle saving configuration, then you will have to pass (or obtain) a reference to the control on the FP of teh calling VI (ex1.vi) and register the event to fire on that control.

Next thing;
If you get the event to register and fire the control on the FP on ex1.vi, the state of booleans written will be the state they were in when the vi is called.
If you are trying the do the "run in background thing" you will have to bring in (or obtain) refences fo rthe booleans, so you can read their CURRENT state when the event fires.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(2,854 Views)
Thank a million Ben for Giving Detailed Idea....
ur idea helped me a more..
i am new 4 this labview thats why i created in complicated way
i never forget this help...
can u give me ur mail id so that i contact u if i have any doubt
nothing further
bi 4 now

regards
jalal
my mail id is itjalal@yahoo.co.in
0 Kudos
Message 3 of 4
(2,837 Views)
Thank you for the compliment!


Re:
"can u give me ur mail id so that i contact u".

Sorry but I do not do that.

If you have follow-up questions, post them here!

1) I am a volunteer here. There no guarentee I will be available the next time you have questions.

2) Q & A's in this public forum helps more than those directly involved. (theoretically, my answer can be helping people long after I retire!)

3) I offer a time an materials Q answer service to my paying customers. I would be doing them a dis-service to give this service away free (i.e. I have a family to feed)!

Besides the above, "there is wisdom in a multitude of counsellors".

Keep posting questions!

Have fun!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,830 Views)