11-30-2012 10:22 PM
Hi ,
I am doing an ANTI BREAK-IN in Labview.
My concept:
1.Password 5791a
2.after the password is accepted, only 5 secs, the alarm is armed, so that the user can leave the house.
3.When the user comes thorught the front door( Zone 1), he/she has 5 secs to enter the password, else alarm will go off.
4. Every time the alarm goes off (the pareticular zone LED blinks), siren also sounds.
My problems:
1. When the switch is turned off, the alarm also goes off. I want the alarm to be on once it is on.( did what you suggested in my previous post, but did not seem to work)
2. When the RESET button is pressed after typing in the passowrd to disarm, I want the program to run, but all switches and LEDS back to its original state.
NOTE:You can delete the sound VI, if its doesnt work.
11-30-2012 10:48 PM - edited 11-30-2012 10:49 PM
Right click on the initializer for the feedback node and choose: "Move Initializer One Loop Out". It will be put on the border of your while loop. Wire the False to it. The LED works then, except I assume you will use a switch instead of another LED to turn it on.
Did you intend that the zone LEDs blink after the 5 seconds and the alarm goes off?
11-30-2012 10:53 PM
Yeah I intented that.
5 secs after ZONE 1 switch is triggered, if the correct password is not entered till then, the alarm goes off.
11-30-2012 10:59 PM
Oh yeah, even after the correct passowrd is enetered , the alarm still goes off for like 2 secs. I am guessing thats what you meant. Well i would prefer alarm not going off once the correct password is entered. So i did not intent that. Sorry, misunderstood earlier.
11-30-2012 11:08 PM
Plz tell what is to be done from this vi.
what i need is : to keep the led blinking and the siren going once the switched is triggered on. the led should keep blinking with the siren even if the switch is turned off.
11-30-2012 11:18 PM
Mathew999 wrote:
Plz tell what is to be done from this vi.
what i need is : to keep the led blinking and the siren going once the switched is triggered on. the led should keep blinking with the siren even if the switch is turned off.
Which switch are you talking about?
12-01-2012 08:24 AM
There are 4 switches: Zone 1, Zone 2, Zone 3 , Zone4
Zone 1 switch when triggered, Zone 1 LED should start blinking with the siren after 5 secs ( this is because if the owner of the house is coming in from the front door, he can disarm the alarm within 5 secs).
Zone2 , Zone 3, Zone 4 : as soon as any switch (Z1, Z2, Z3)is triggered, the respective LED should start blinking with siren.
I almost did all that. But what i cannot do is and need help is that:
once when the siren and the led starts blinking , it must not stop untill the password is again entered.
(in my current VI, once the switch is turned off, blinking of led and siren also stops)
12-01-2012 12:18 PM
Can you include your latest code if you have updated since the last post?
Last time I looked, the alarm and LEDs would go on 5 seconds after entering the code to "arm" the system, which is not what I think you wanted. Normally, after a correct code and some time period, the zones would all be "armed" without the alarm sounding or LEDs flashing.
Also, your architecture needs to be reworked in order to transition through the various states cleanly. Look at the queued state machine example. This application would be a fun learning experience using the right design pattern.
12-01-2012 12:31 PM
This is the latest.
Here, after a correct code and 5 secs time period, the alarm would all be "armed" without any alarm sounding or LEDs flashing.
I am going to take a look at the exmaple you mentioned. Will let you know if i can fix this.
12-01-2012 02:09 PM - edited 12-01-2012 02:10 PM
How are you setting the four zone switches? they default to FALSE which means the alarms will sound after 5 seconds. If you want a FALSE zone switch to fire the alarm, then make the zone switches to be TRUE by default (although it seems more logical if a TRUE triggers the alram).
Some other things:
You didn't wire the logic correctly to keep the alarms on once a zone is tripped.
Reinitialize all your controls and indicators to defaults as the first thing you do when the VI runs (VI invoke node...Default Values).
And you need to use a standard design pattern to clean up the whole architecture.