0

Limit the number of run of a script

C. Drouaud 2 months ago in IQANscript • updated by Gustav Widén (System support) 1 week ago 2

Hello, 

I want to limit the number of times a script can be run on a machine. I want it to be run only once. 

I created a digital parameter in my project, set as false as default and when I run the script, it changes the value of the parameter to true. This parameter can only be changed through this script or by authorized technician. 

In my script, I want to check if the digital parameter is true or false. If it is false, it can run the fulll script and if it is true, the script does nothing. 

I didn't achieve to check this. I tried to use If(Parameter) but it doesn't work. 

Is it the correct way to do it ? Should it work with the If or can I use something else ?

Thanks in advance,

Hello and happy new year,

Anyone to help me please ?

Thanks in advance.

The idea you had for setting a Digital Parameter in the application after completing the script on a particular machine should have worked, not sure why it didn't. 

Perhaps there was a problem with where you placed the measure action to measure the Digital Parameter. 

Try something like this: 


See attached example:  

Script runs once per machine.issx