LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to protect a list of VIs

Hello,

i have an instrument and for each function (for example on/off, configure power) a separate VI which is used in TestStand.

Now i have aseparate copy protection programm which i want to us to protect my VIs.

For this i  can call a DLL-funtion "check_licence" which returns a 1 for OK or 0 for fail.

 

Now the question is how can i use this returnvalue to protect all VIs? I can´t call it each time because of timing problems. And i cant use a global-vi because everyone could change the value in  the global.

 

Any ideas what i can do ?

 

Thanks for your help

0 Kudos
Message 1 of 7
(3,399 Views)

Place all the VI's in a .llb or LabVIEW library?

 

This really sounds more like a question you should be asking the vendor of the 3rd party copy protection program.

0 Kudos
Message 2 of 7
(3,396 Views)

Ravens Fan wrote:

Place all the VI's in a .llb or LabVIEW library?

 

...


Building on Ravens Fan's suggestion...

 

I would create an Action Engine  (AE) that has actions for each operation performed by the driver.

 

The Action Engine should use the "First Call" function to determine the first time it is called and when this happens invoke the check utility. If it is OK then set a flag in a shift register of the AE indicating every thing is OK. The AE's action should be set-up such that they do not execute when the check flag is false.

 

Now put the AE in a library along with all of the other VIs you want to restrict access to.

 

Mark the AE as public so user are forced to use the AE if they want to use the driver.

Mark all of the other VI's as private so they are accessale by the AE but not by other LV code.

Password protect your library.

 

With this scheme they would either have to know the password, or are restircted to using the AE which has the built in check.

 

Just trying to help,

 

Ben

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

Ben: If I develope driver wrappers, I found it inconvinient to place all access to the driver inside an AE because of the amount of parameters passed there and forth. Is theresmoe tricks?

 

But my suggestion would be to place the copy protection code inside an AE/LV2FG which is called by eachVI in your library, but only checks for the external code on first call. Other than a global, it can't be written.

 

Felix

0 Kudos
Message 4 of 7
(3,345 Views)

F. Schubert wrote:

Ben: If I develope driver wrappers, I found it inconvinient to place all access to the driver inside an AE because of the amount of parameters passed there and forth. Is theresmoe tricks?

 

But my suggestion would be to place the copy protection code inside an AE/LV2FG which is called by eachVI in your library, but only checks for the external code on first call. Other than a global, it can't be written.

 

Felix


 

Good alterantive!

 

Re:Trick

 

For function sets that contain a lot of parameters there differnet approach that can help. One way would use a cluster as input to the AE that has all of the possible inputs used fro all types of calls. Then write a wrapper VI for each type of call where the wrapper only has the inputs (marked as required) required for that type of call. Each wrpper bundles the associated parameters and then calls the AE.

 

In this scheme the AE would be marked as private and the wrappers would be public.

 

This approach lets you put code in each of your wrappers that ensure the AE is being invoked correctly. If not return an error letting them know what they did wrong.

 

Ben

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

Thanks for your ideas.

 

>...place the copy protection code inside an AE/LV2FG which is called by eachVI in your library,

> but only checks for the external code on first call. Other than a global, it can't be written.

 

What do you mean with AE/LV2FG?

 

It would work what you describe, but for me i want to check only in one VI. The check need about 100ms and if i would execute the check in each vi then there could occur timing-problems. So i need any construct to pass a variable from one vi (checklicence.vi) to another vi. And as far as i know i cant password-protect global-variables.

The vis are later used as Teststand-teststeps.

 

0 Kudos
Message 6 of 7
(3,264 Views)

Ok, using Bens AE works fine 🙂

But:

 

>Mark the AE as public so user are forced to use the AE if they want to use the driver.

>Mark all of the other VI's as private so they are accessale by the AE but not by other LV code.

>Password protect your library.

 

How can i mark files in a llb as public or private?

0 Kudos
Message 7 of 7
(3,257 Views)