11-22-2010 08:51 AM
I'm working on a student project in 3rd year undergrad, we are setting up a mock security and control system for a nuclear reactor. We've had about two months (3hours a week) of using Labview for experience,
and a semester of using Matlab in first year: I know very little about programming, and I'm taking chemical engineering. Essentially, I'm trying to set a login and a password to access the controls, if you get it wrong it sets off an alarm.
I need to know how to block the controls (Power level, control rod height, etc) until someone writes the right password. I'm also trying to get an mp4 file to play a video showing the processing of a finger print scan when you touch a touch sensor, and get a .wav file to play an alarm sound when the alarm is set off. An answer in simple and detailed instructions to do one or many of these things would be extremely useful, thank you
11-22-2010 09:33 AM
Have you started your code already?
I want to adapt a solution to your existing architecture.
I would suggest using an Event Structure (Producer) with a Consumer Loop. You would start with an initial event which would prompt for a password (and maybe allow three trials) that upon a bad password would trigger an alarm. You could pass the alarm trigger and reason for the alarm using a queue to the consumer loop that would wait for an event in order to proceed with anything (including a new command). That way, commands would automatically be locked out since it would require a login to allow changing states in the producer loop. Oh yeah, the consumer loop would have a state machine.
Using an Event Structure would allow to code a solution that allows to "log out" thus locking out any other command attempts.
11-22-2010 09:56 AM
There is actually an example that ships with LabVIEW that is a login dialog. If you open the Example Finder (Help -> Find Examples and search for "login" you can find it. It employs a simple event structure. The login authentication is done by a subVI and the passwords are stored in a control on the front panel of the VI. In real life you wouldn't do it this way, but I suspect that for this project it's probably adequate. Based on the outcome of the authentication you can enable/disable controls using property nodes. You can use the Disabled property to programmatically enable/disable controls. There are also examples on how to use property nodes that ship with LabVIEW. Just search for "property" in the Example Finder. Try to look over that stuff and then come back with what you've put together and we can further provide tips.