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.
06-12-2013 09:27 AM
We are creating a code in which on pressing set up button( present on main vi front panel ) we are calling one subvi as pop up window which further contains some boolean controls and every boolean control has further one subvi associated with it, when we press on that button a window comes that has several numeric and string control, what we want is after entering all values on numeric and string control and after pressing ok button, these val;ues should get updated to the sequence list present on main vi front panel, i have tried to do this using queue but what we want is that on pressing ok button( present inside subvi) we need to generate a event on main vi that it should dequeue elements to the list only when that ok button is pressed, i have tried to do it using value signalling property node but this is not working, i am not getting how to do this or there if there is any other better way to do this
I have attached the code for reference.
06-12-2013 09:33 AM
I am sorry tthe project file i attached is emtpy.
Attached Belw is the Zip file which contains the code.
06-12-2013 11:06 PM
waiting for reply....
06-13-2013 12:51 AM - edited 06-13-2013 12:54 AM
your constanly generating the signal value from the global,which caused an error.... write a false to the global once it generates...
then put the ok inside the e3646 loop wired to the stop...and as you can see, i was able to generate the elements on the front panel
06-13-2013 05:10 AM
Thanks apok
it's working this way, but one problem is still coming once after pressing ok button if i again want to update the values i need to stop the main vi and then run it again i know this is happening because we are using ok button to stop while loop, but after closing subvi window when we open again the sindow it's still not updating it.
one query here, why we are using this ok button to stop that while loop and when we are not wiring this ok button to stop the while loop, it's not updating the cluster, what is the reason for this.
one more thing is there any other way with which we can generate event on main vi using subvi control other than global variable approach.
06-13-2013 05:39 AM - edited 06-13-2013 05:40 AM
A better way to do this would be to enqueue the state that the event case is calling from the instrument state. Then you don't have to poll the global variable and worry about signaling the event.
06-13-2013 06:41 AM
Yes this is working fine
Thanks crossrulz
but one problem that is still there is that it is updating value only for once when ok is pressed , now again if i want to enter the values i need to stop the main vi and then run it again to enter the value again, what is happening is after entering all the values when i am pressing the ok buttpn values are updated and the subvi stops and then we close the subvi now if again i want to upadet values for that subvi i need to stop the main vi and then run it again.i dont know why this is happening.
06-13-2013 08:44 AM
06-13-2013 08:54 AM
Ritu wrote:
but one problem that is still there is that it is updating value only for once when ok is pressed , now again if i want to enter the values i need to stop the main vi and then run it again to enter the value again, what is happening is after entering all the values when i am pressing the ok buttpn values are updated and the subvi stops and then we close the subvi now if again i want to upadet values for that subvi i need to stop the main vi and then run it again.i dont know why this is happening.
That is probably because you are constantly reading a TRUE from the global and the event is piling up. I'm actually surprised you can cleanly exit your program. If you go back to my advice above and delete the global variable, it should work fine.
06-13-2013 09:43 AM
i have deleted the global variable but still the same problem is coming and one more issue that is coming is it is updating the subvi values to tha main vi in next cycle means ehen i am calling the subvi and entering values logically it should update those values to the main vi as soon as we press the ok button in subvi but what is happening is it is updating those values when after stopping the main vi i am running it again it updates the list with the previous values.
Below i am attaching the new program with all those changes as you told.