LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xcontrol asked to save in the execution !

Hi !
 
I have used some Xcontrol in a project and my program work well in development system but ...
I have made executable file and when it is running and I want to Exit from this (using Exit labview function ) ,
SAVE CHANGES window opens and want to save data changes in " Data.ctl " and " State.ctl " files of all Xcontrols !
Why it happend and how can I do to fix it ?
 
Thanks and sorry for my broaken English . 
0 Kudos
Message 1 of 10
(6,255 Views)
What version of LabVIEW are you using? Many XControls problems in 8.0 where resolved in 8.2.1.

Regards,

Wiebe.
0 Kudos
Message 2 of 10
(6,236 Views)
Hi !
 
I use 8.2.1 version with DSC Module 8.2.1 .
I got another problem with Xcontrol.
I want to bind an Xcontrol including some Control and Indicators to a shared variable that I have defined it's type to Data.ctl control of my Xcontrol .
I want when the value of control inside of an Xcontrol changes then the value of a same control of a same another  Xcontrol that is binded to same shared variable changes so.
What can I do for this ?
I have tried some ways but there is no result !
 
Thanks very much
0 Kudos
Message 3 of 10
(6,221 Views)
What code do you have in your "Unint" ability?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 10
(6,208 Views)

It is optional and i have not used of uninit.vi ability .I searched ni.com for more information about "convert state for save" and "uninit "abilities but I found nothing about them.How can I use of them ?

Thanks for your answers

0 Kudos
Message 5 of 10
(6,190 Views)
The code is not important becuase I tried it with a new xcontrol without any changes and got same results.

 

Message Edited by brightest on 08-22-2007 06:35 PM

0 Kudos
Message 6 of 10
(6,191 Views)
Maybe an idea.
Use a master typedef, let the data ability of the XControl contain that master typedef and have the Shared variable contain that master typedef.

I know the data ability stores some special things that are not really related inside it's ctl.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 10
(6,164 Views)

Hi brightest,

I hope you are doing well today! I tried to build an executable on my own machine with a very basic project which uses a XControl and did not see any problems when closing the executable. Is it possible for you to post a stripped down version of your code which highlights the issues you are facing? Include both the executable issue and the shared variable issue. I am asking for your code so as to see what exact steps you have taken to create and run your executable as well as how you have bound to the shared variable. As mentioned above, we released XControls with LabVIEW 8.0. Any feedback and help on this feature is greatly appreciated!

Uninit Ability:
This is an optional ability and is used to release any resources that you have allocated for the XControl. Typically such resources are allocated in the Init VI, although they can also be allocated in the Facade. Open resource references should be stored in the State so that the Init, Facade, and Uninit VIs can access them.


Convert State for Save Ability:
Also an optional ability and is used to modify the state information that LabVIEW stores with a VI. The most common use case is to remove non-persistent data, such as references, from the state. Removing non-persistent data reduces the disk footprint of VIs using the XControl.
Because most modern computers have large storage disks, reducing the disk footprint does not often justify the additional programming effort and processor time required to remove non-persistent items. You should primarily use Convert State for Save to remove large arrays of non-persistent data. Reducing the disk footprint may be important for applications which are targeted to non-desktop targets; however, these targets rarely implement complex user interfaces which would benefit from XControls.
To convert the state before saving, save a copy of the state cluster and remove any non-persistent items. Use the Cluster functions to convert the full state cluster to the save state cluster, and then wire the save cluster into the variant output. Type define the save state cluster, because you also need to use it in the Init ability.
When you use the Convert State for Save ability you must also modify the Init ability to convert the Save State back to the full state. Failing to properly convert the state results in an error in the Variant to Data function, which causes the Init VI to use the default state values, thus losing any saved information. Use the same Save State type definition you used in the Uninit ability to convert the variant to a cluster. Use the cluster to set persistent information in the full state, and then initialize non-persistent items normally.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 8 of 10
(6,140 Views)

Thank you Adnan Z for your answer

 

I'm so sorry because I have been so busy today and had not enough time for working on it and just now , I must go somewhere in out of my city for 3 days,anyway.

I send a code here after my come back but I don't think that It could be usefull .

I created an empty Xcontrol without any changes on it and got that problem .

Could be my problem for the application builder settings ?  what do you think about it ?

Can you send that your simple tested project or it's setting here ?

 

Best regards and thanks again

0 Kudos
Message 9 of 10
(6,088 Views)
I am not sure if its your application builder settings. Post the stripped down version of your code; and we should be able to debug it better. Here is the basic code I created.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Download All
0 Kudos
Message 10 of 10
(6,053 Views)