ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

security system solution

I posted a solution a few days ago to the example CLD question "security system". Thanks everyone for giving me your comments.  NI should let people cash in kudos for upgrades!

Based on comments I updated and fixed a few things.  Attached below are three versions of my solution:  

Alarm0 - the original post

AlarmI - a better version

AlarmII - a "better" version using an event structure.

 

Looking for more feedback + answers to the following: 

Aside from the possibility of "false triggers" is the event structure in "alarm II" preferable and why?

Is there too much processing going on inside the visible event structure frame?

I only have two event frames, one for "pushed one of the buttons" and the other which stops the program.  Should there be a timeout frame?

Should I be doing something different with propagating the error clusters?  

Is there a better or cleaner way to build the security file - concatonate looks messy.

 

Download All
0 Kudos
Message 1 of 2
(2,608 Views)

> Is there a better or cleaner way to build the security file - concatonate looks messy.

 

I someimes use the Build Text Express VI. It's the only Express VI I like. Another option is the format to text Vi. You can grow it to several inputs. The format specifier for text is %s. So it would be %s\t%s\t%d\t%s\r\n with the '\'-display on.

 

> I only have two event frames, one for "pushed one of the buttons" and the other which stops the program.  Should there be a timeout frame?

 

No timeout frame. But place the stop button inside the coresponding frame. And also catch the Panel Close? Filter Event.

 

> Should I be doing something different with propagating the error clusters?

 

Yes. I would trap the errors in an error case around the event loop. Furthermore have the error cluster in a shift register, placed somewhere near the bottom of the while loop. I also dislike the write to file Vi, because it doesn't give you the error at all. At least place a general error handler at the end of the error wire.

 

Felix

Message 2 of 2
(2,571 Views)