From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit interaction to a specific VI

Solved!
Go to solution

I am developing user login software which I would like people to use so that I can monitor when they are using a piece of equipment attached to the computer.  Currently I have everything written; it checks the username vs an encrypted password, it log people out if they are inactive for too long, and of course it logs the time in and time out of each user. 

 

The problem that I am having is that I would like the program to prevent any interaction with anything other than itself until someone has logged in, and then restore normal control after they have logged in.  How might one do this?

 

Thanks,

Adam

0 Kudos
Message 1 of 6
(2,497 Views)

Adam,

 

Are you talking about limiting interaction to one VI within the LabVIEW environment or preventing access to other applications or the OS?  If LV only, then make the password VI modal. VI Properties >> Window Appearance  >> Customize: Select Modal.

 

Lynn

0 Kudos
Message 2 of 6
(2,491 Views)

Sounds like you could use a state machine. At a minimum you need a state variable. When no one is logged in don't run any code except the login. When someone is successfully logged in run the code. A state machine would certainly allow this. A single state variable may work as well.

 

What is your basic architecture now?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 6
(2,489 Views)

My current architecture is actually a state machine, and I do want to limit access to other programs running on the OS, not just LabVIEW.

0 Kudos
Message 4 of 6
(2,485 Views)

Access to the hardware or access to your application? Access to the hardware is a bit more challenging and I am not sure if it will be possible.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 6
(2,478 Views)
Solution
Accepted by topic author Adman

I wound up solving my issues by using the following:

 

http://zone.ni.com/devzone/cda/epd/p/id/1539 which allowed me to keep the cursor only within the bounds of the front panel, and

 

http://forums.ni.com/t5/LabVIEW/Disable-Win2k-keys-Alt-Tab/td-p/53164  which keeps one from tabbing away from the application.  

 

Together these allow me to control whether or not one can interact with other applications.  CTRL+ALT+DEL still works so the program can also be shut down if it ever needs to be.

 

Thanks,

Adam

0 Kudos
Message 6 of 6
(2,470 Views)