LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompting for password

Hello everyone,

This is my first post here so please bear with me.

I'm designing my graduation project using labview. Part of this project involves a couple of motion sensors, which trigger a buzzer, led, etc.

 

I would like to program the outputs so that they are disactivated if a password has been inserted (e.g. outputs are trigerred only if the sensor is triggered AND a password was not inserted...or maybe inserting a password deactivates the sensors all together).

I have self taught my way throughout this project through the getting started guide and a lot of searching around the forums. Most of my work is with express VI,howeverI've attached a simple program in which inserting a correct password will enable a boolean using a "Match True/False String", but I still havent fulfilled some requirements.

1) After the correct password is entered, the boolean should remain on, staying so until it is disabled by entering the correct password another time. This should simulate activating/deactivating the security system

2) There should be an indication if an incorrect password has been inserted. Not sure how to do it.

3)After inserting a correct or incorrect password, the input string should automatically return to its default value. I've set this value to an empty string

I believe that any problems with this software are usually easily resolvable, so hoping this one is the same. It might be that I'm inexperienved with regular VIs. Ive attached both the main VI file and the test VI that contains the password prompt

Thanks in advance and sorry for the terribly long post.

K.Sadek

Download All
0 Kudos
Message 1 of 13
(3,719 Views)

This problem screams State Machine.  Look at the design patterns when creating a new VI.

aputman
0 Kudos
Message 2 of 13
(3,703 Views)

Hi thanks for your reply. As I've said I self taught myself throughout this project so I might be missing some really basic stuff. This is the first time in fact that I've heard of state machines so I'll check some tutorials and update.
Just in case anyone intends to check the project.vi, the boolean at the very top of the VI is where the password setup should go.

0 Kudos
Message 3 of 13
(3,655 Views)

Hi K.,

 

so your "password" VI needs some connections in it's connector pane. You should output the "Password is correct?" state here as boolean value and then simply replace you "boolean" control by the subVI.

 

There is so much more to change, you should go through all those free online resources offered by NI. I already suggested this to a different user today…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(3,650 Views)

For those that are looking to learn I usually post these set of links:

 

3 Hour Introduction http://www.ni.com/white-paper/5243/en/

6 Hour Introduction http://www.ni.com/white-paper/5241/en/

LabVEW Basics http://www.ni.com/gettingstarted/labviewbasics/

Self Paced training for students http://www.ni.com/academic/students/learn/

Self Paced training beginner to advanced, SSP Required http://sine.ni.com/myni/self-paced-training/app/main.xhtml

LabVIEW Wiki on Training http://labviewwiki.org/LabVIEW_tutorial#External_Links

 

But since the topic is on state machines here are a few links on that.

 

http://www.ni.com/white-paper/3024/en/

http://www.ni.com/white-paper/7595/en/

http://www.ni.com/white-paper/7532/en/

Message 5 of 13
(3,631 Views)

Thanks everyone for your reply,

 

I've searched a lot on state machine based on your recommendations and completed some tutorials. I'll make some attempts and come back with the results.

One more thing: is it possible to prevent someone from aborting the VI using a password ? I'm implementing a home automation and security system and someone simply aborting the VI will make my work much less credible.

Thanks Again,

 

K. Sadek

0 Kudos
Message 6 of 13
(3,611 Views)

You can remove the abort button from the toolbar, which you should be doing anyway whether it is a logged in person or not.  It is a Window Appearance setting in VI properties.

 

Of course there is nothing you can do to prevent someone from using Windows Task Manager from killing your application unless you use the Windows security features to prevent the user from doing that.

 

Message 7 of 13
(3,603 Views)

Thanks for posting this set of links!  With your permission, I'll include this information as part of my final slides in my "Introduction to LabVIEW" talk to our BME students.

 

Bob Schor

0 Kudos
Message 8 of 13
(3,566 Views)

@Bob_Schor wrote:

Thanks for posting this set of links!  With your permission, I'll include this information as part of my final slides in my "Introduction to LabVIEW" talk to our BME students.


Please do.  No need for permission this is all publicly available tutorials found by using google.

0 Kudos
Message 9 of 13
(3,525 Views)

Sorry that I didn't update the thread in such a long time,

 

So I've looked and looked into state machines and did numerous tutorials but none gave me the resul that I wanted. I'm sure many people who use labview will appreciate a working model of a password prompt that can be used practically.

 

My system basically consisits of a group of sensors that are active all the time, coupled with some other that are part of a security system and should only work when triggered. What I need is the following:

 

1) The user should enter the password and press a button to clear the string and send a signal. This signal should remain until the password is entered again. (to simulate activation/deactivation of the system)

2) if possible, a seperate signal should be generated if the password is incorrect. I kno that the more realistic thing to do would be for the signal to be generated after several wrong entries but I'm not even sure how to do the first part. Again, this requirement is optional.

 

I would really appreciate it if someone could offer me any working example of even the first requirement  to build on. I've tried all types of loops and strucutres but my lack of experience and lack of time until my presentation are really working against me as I still have to take care of the actual hardware.

Regards

0 Kudos
Message 10 of 13
(3,410 Views)