06-17-2010 12:42 PM
It is possible to update a type def or strict type def constant during runtime?
06-17-2010 12:58 PM
no
That's effectively asking an application to change its own code.
06-17-2010 01:16 PM
Baji wrote:It is possible to update a type def or strict type def constant during runtime?
I am on the same side a Saverio but I have to ask,
"What is the Use case that you want to use that technique to solve?"
Tell us what your challenge is and we may be able to give you some hints.
Ben
06-18-2010 12:50 PM - edited 06-18-2010 12:51 PM
Thanks Ben and Saverio for the reply.
I Have a parameters list and its limits in a file. I want to access the particular parameter limits (I tried to use Ring menu and populate the parameters list from the file). I wired a menu constant in my block diagram to get the parameter Index, If I modify the file I want to automatically update the menu constants. Here I got struck.
06-18-2010 12:59 PM
Do you need it to update when you edit the file or the next time that you open the program? Is it ok to push a button after the file is updated or do you need it to be automated?
06-18-2010 01:06 PM - edited 06-18-2010 01:08 PM
I dont want to have any manual intervensions. I want to update the type def control with the latest parameters available in the file.
I want to have a function global with the cases Update Limit parameter table and get parameter Limit, so during lauching my programme i will update the parameters and keep all the datas in the shift register. when ever the user wants the particular parameter limit, i will get by wiring a ring constant in the block diagram.
06-18-2010 01:13 PM
The "ring" requirement is an issue. The strings in a ring are just fancy labels used the GUI but they don't come along with the ring.
A "Type def'd Enum" will cary the values and the text but sparse enums are not allowed.
Are there gaps in you data or could you use an enum?
Ben
06-18-2010 01:14 PM
@Baji wrote:
I want to update the type def control with the latest parameters available in the file.
Well, you can't do this, so let's move along, shall we?
From what you're describing it sounds like you need to use strings, and not an enum.
06-18-2010 01:45 PM
@smercurio_fc wrote:
@Baji wrote:
I want to update the type def control with the latest parameters available in the file.
Well, you can't do this, so let's move along, shall we?
From what you're describing it sounds like you need to use strings, and not an enum.
After thinking yes I agree.
Create an Action engine to allow the updates and get the value. If you create a sized-down wrapper for each value you want, it can look very similar to a ring in the code.
THe Read operation could use an enum to select which value you want from an array populated at Init time.
Ben
06-18-2010 01:53 PM - edited 06-18-2010 01:56 PM
Thanks for the reply. Do you have any Ideas or sugessions achieve the task. I attached the snapshot for better understanding of my requirements.