Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Alarm control

Hello,

I really want to ask about the alarm control. I have a hydraulic cylinder which will move and two limit switch ae attached to the Cylinder up and down position.

Limit switch EM1 and EM2

The cylinder range for the motion is Minimum is 20mm and Maximum is 80mm. If the range cross these limits I want to genearte some alarm. Please let me know how can I do that?

or How can I use DSC alarm logging? Please see the attached file.

0 Kudos
Message 1 of 20
(4,335 Views)

What ever you do here you will have to put the code together. If you want it to send an actual signal to an alarm then you will have to write code that outputs to a digital or analog line that can turn on a realy to activate an alarm or light. If you simply want to log when an alarm happens then you will have to make the code look for the alarm condition (i.e. not within the 2mm-80mm range) and have it write to a file or control with what ever information that you generate for this condition.

Tim
GHSP
0 Kudos
Message 2 of 20
(4,326 Views)

Hello Tim,

Please can you explain in more details. Is there any example program? I want to save all the events in a file and generate an alarm pop signal if some emergency arise.

Thanks

0 Kudos
Message 3 of 20
(4,314 Views)

Hi Kraze4lv

 

Can you explain in more detail what you want to happen?

 

I will show you some examples that may get you started.  Go to LabVIEW help >> Example Finder, then follow the links I will provide.

 

For Creating a digital output, check out Hardware Input and Output >> DAQmx >> Digital Generation >> Write Dig Chan.vi

 

For Writing data to a file, check out Fundamentals >> File Input and Output >> Write to Text File.vi

 

For Creating a pop up. check out Building User Interfaces >> Designing Dialog Boxes >> Dialog Box Demo.vi

 

Hope this gives you some direction!

Applications Engineer
National Instruments
0 Kudos
Message 4 of 20
(4,308 Views)

Hello Ryan,

Thanks!

I have to do many fault, alarm, emergency, buzzer reset and logging.

Well I have three system running simultaneously,

S1

S2

S3

If some error occurs in the system, the buzzer should run, if there is no error then the normal lamp should be ON and otherwise Emergency and the Buzzer.

If the error has been checked then I need a buzzer reset button.

S1    S2   S3  Normal Led  Emergency LED

0        0     0     0                  1

0        0     1     0                1

0        1      0     0                1

so if any S1, S2, S3 is 1 then Emergency is one otherwise in normal operation all are zero......so what logic gate can be used.

If emergency arise then, then automatically one pop message arrive fo emergency.

Also I need to log the alarm logs and save to the table seen on the screen and save the file as excel,.

Please see the attached and let me know.

0 Kudos
Message 5 of 20
(4,288 Views)

Also if someone push the emergency switch manually the Vi should recognize that condition....

0 Kudos
Message 6 of 20
(4,286 Views)

Modified file.

0 Kudos
Message 7 of 20
(4,284 Views)

So there is a lot going on in your subvi and it is difficult for me to follow without following all the logic really closely. From what I understand you have three process running.  If any one of them causes an error you would like for there to be a notification (turning on an emergancy LED).  The appropriate logic would be no OR operation.  You can wire multiple inputs so it will eliminate a lot of your logical operators.  I cannot decifer what you are trying to log.  If all you are trying to log is whether there is an alarm or not you have way to much going on.  I would recommned stripping down your program and building it slowly as you verify funtionality.  I find support works best on the forums if we tackle code in small chunks.  First I recommend you get the alarm LEDs flashing when you want them too, and then you tackle logging that data.

 

If you need more assistance, please strip down your VI to address smaller parts of the problem.

 

Have a good day!

 

Ryan

Applications Engineer
National Instruments
0 Kudos
Message 8 of 20
(4,263 Views)

Hello Ryan,

Thank you for your reply.

As usggested I have broken the code in small chunks.

I am posting two VIs:

1. One Vi check the status of the motor available and if not then it gives a buzzer and emergeency. Then log the data about the status, which I couldnt do and also I want to pop and diaglogue message that motor is not available.

2. Second VI checks the sttaus of the PT which is at different levels, Lo, LoLo, Hi,HiHi, if HiHI and LolO I want to emergency button and buzzer with pop message come. Also the status of the PT should be logged in the table with date, time and status, if lo, Hi, HiHi, LolLo etc.

Please see the attached.

Download All
0 Kudos
Message 9 of 20
(4,259 Views)

Hi,

 

So I am looking at your Alarm-buzz3.vi, here are some of my thoughts as I see them:

 

-What is the purpose of the Current File indicator.  You have it listed as n indicator, then your read from it to build your array

-Why do you initialize an array that is 10x4, then run your for loop 50 times and your inner for loop 10 times?

-What are you trying to accomplish with each loop iteration?  Do you want to read from your alarm status and write that to a file?  If that is the case then you need to be reading from those controls inside your loops.  Right now it just seems like you create an entry in your table if there is an alarm, without any further relevant information.

-What is the purpose of having a Boolean 2, Emergency, and Buzzer indicator, they all seem to be displaying the same information

 

The second VI with more added:

 

-What is the PT?

-What do hihi, hi, lo, lolo mean, it looks like you just iterate through those each time, but using the same numeric control to check.

-To create a pop up notification, use the "One Button Dialogue" function

 

Let me know how this goes!

Applications Engineer
National Instruments
0 Kudos
Message 10 of 20
(4,245 Views)