LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I lock the Labview program in runing mode?

Hello

I want lock my program in running mode. can you help me to know how it is possible?

when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?

 

thank you

Best Regards

 

0 Kudos
Message 1 of 14
(3,178 Views)

Can you please elaborate your use case?

 

Otherwise the answers might be very general like "Lock controls you don't want to be changed" or "Build an executable"

 

 

0 Kudos
Message 2 of 14
(3,173 Views)

@behzad1 wrote:

Hello

I want lock my program in running mode. can you help me to know how it is possible?

when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?

 

thank you

Best Regards

 


I have attached a primitive example, it should give you some idea, maybe it helps. Of course i put it together quick, so the style is not nice 🙂

The password is a string, visible on the block diagram, so password protect the block diagram via the "VI properties". Also, change the "Window appearance" to custom, where the closing "cross" is disabled ("Allow user to close window"), and you also hide the abort/pause buttons...

Of course if you build an exe, the story is different...

 

These steps should give a minimal protection against children and evil colleagues 🙂

 

 

Message 3 of 14
(3,147 Views)

Attached is a version that I think does what you want.  It gets a reference to all front panel controls and then uses those references to enable or disable controls.  I changed the window appearance to allow closing.  I thought it was pretty annoying when I ran the VI locked it, then couldn't unlock it because I didn't know the password. (it is 1111 by the way).  So now you can at least close when you can't unlock.

Message 4 of 14
(3,133 Views)

yes, sorry about that! 🙂

I forgot to write the password in the post...

And to get all the references in the VI is more sophisticated, as Hooovahh did. But be careful, since you do not want to disable that single button which prompts you the password input!

 

edit.: it is ok in Hooovahh's VI, he enables the unlock button back, after disabling all FP objects...

0 Kudos
Message 5 of 14
(3,126 Views)

Normally the way you'd solve this is to create an application from your VI, then it is absolutely impossible for the user to make changes. Do you have the application builder, or a version of LabVIEW that includes it?

0 Kudos
Message 6 of 14
(3,095 Views)

change the program or stop it, or change the value like an array

 

Even if you have an application the user can stop it, or change a control value. But an exe would be the best including password protection.

0 Kudos
Message 7 of 14
(3,086 Views)

Another way that might be easier, depending on the number of controls you want to disable, would be to use a transparent tab control as a shield.  Lock the panel by making the tabs "visible".  Clicking the pane would bring up a password prompt to turn it off.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 8 of 14
(3,055 Views)

also an elegant solution!

0 Kudos
Message 9 of 14
(3,044 Views)

thank you all friends

actually, I want monitor some water tank and temperature. but, these tanks have some properties like heigh,area, activation and so on...

some of them should be changeable by operator every time, like: is it active or not? and some of them shouldnt changeable by operator and need pasword or like this. your suggestion is very good but lock all of page. by the way, may be some of monitoring be unchangeable, but user should be click on to watch them(and not change it). have you new or complementary suggestion?

 

-> I want make an installer of my code in Labview program.

 

Best Regards

 

 

 

 

0 Kudos
Message 10 of 14
(3,018 Views)