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: 

how can i put the alarm system that after login it shows up.? help

Hi 

i have designed my own alarm system long time ago and now i want to put it inside my project 

 

how the alarm should work.. 
1- after login page it shows up on the main Master page File : [untitled 1.vi]

2- a light should be added on the house map [untitled 4.vi]

alarm vi file :[alarmclock.vi]

so when the alarm is ON the light in the house turns on as well.

 

i'm tottally lost on how to do can someone place it up for me. or guide me if not possible.

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

Oh my...is this really used for home automation?  It looks like you have a decent amount of LabVIEW knowledge, but there are quite a few tricks that could help simplify your code.  

 

Things like control references, and functional globals, that would allow you to change the value, or state of a bunch of controls in one subVI instead of having a hundred local variables and property nodes.  

 

Also use the control terminals when you can.  You often leave them unwired when that is the prefered way of updating indicators, or reading control values.

 

Never wire a false to a while loop, when on something non-embedded.  This forces you to abort your VI which will stop it.  But also you can stop your car by crashing it into a tree.  A safer way is to use the brake.  And a safer way to stop a VI is to go through a clean up procedure.  

 

You have some while loops that run with no wait in them.  This starves the CPU when it is necessary.

 

You are using the type cast in scary ways that is error prone.  You may want to put in some error checking.

 

Wires go backwards a lot and make troubleshooting difficult.

 

You have many cases in that event structure, many can be combined to simplify the code.

 

You have multiple controls with the same name, making debugging difficult.

 

No documentation in the source.

 

 

If you are asking about how to pass data around between two running subVIs you can look into Queues, User Events, DVRs, global variables, functional globals, shared variables, and a bunch of other technologies.  I'd say start with Queues, and functional global variables.

 

Here are some free tutorials if you are interested.

 

NI Learning Center

NI Getting Started

-Hardware Basics

-LabVEW Basics

-DAQ Application Tutorials

 

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

0 Kudos
Message 2 of 2
(2,319 Views)