LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

It is possible to update a type def or strict type def constant during runtime?

It is possible to update a type def or strict type def constant during runtime?

 

 

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 1 of 19
(3,275 Views)

no

 

That's effectively asking an application to change its own code. 

0 Kudos
Message 2 of 19
(3,269 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 19
(3,259 Views)

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.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 4 of 19
(3,197 Views)

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?

Tim
GHSP
0 Kudos
Message 5 of 19
(3,188 Views)

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.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 6 of 19
(3,183 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 19
(3,176 Views)

 


@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? Smiley Wink

 

 

From what you're describing it sounds like you need to use strings, and not an enum.

0 Kudos
Message 8 of 19
(3,175 Views)

@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? Smiley Wink

 

 

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 19
(3,162 Views)

Thanks for the reply. Do you have any Ideas or sugessions achieve the task. I attached the snapshot for better understanding of my requirements.

 

16979iE4DCDD5769843924

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 10 of 19
(3,154 Views)