LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Respond to an applescript event in LabView 2009 (Mac OSX) VI

Solved!
Go to solution

I have a LabView VI that runs constantly, acquiring data at a remote location.  I recently purchased a UPS to handle power failures, and I would like to be notified by LabView through email that an event has occurred.  I can have the UPS software launch an executable when there is a power failure, so my question is this:

 

How can I run an executable (preferably AppleScript) and have it trigger an event in LabView 2009?

 

The main VI is always running, and I would like it to respond to an event and send an email/text to the appropriate personnel, so they can respond accordingly to the power failure.  Also, if power goes out, I can then shut down the experiment "nicely".

 

It seems like all the pieces should exist to do this, but I am unable to find a way to make this happen.  Thanks in advance, this will make a lot of people happy! 

 

Info: Mac OS X 10.5.8, LabView 2009 

0 Kudos
Message 1 of 4
(3,206 Views)
Solution
Accepted by topic author jumpman junior

Hi jumpman junior,

 

When you say the UPS software can run an executable, does that mean it can run a LabVIEW executable? If so, you can write a small LabVIEW executable to send an email to a specified address. As far as notifying the main VI that is running, you can try to communicate between the executable and the VI using the normal VI to VI communication methods, i.e. global variables, functional global variables, network published shared variables, or even notifiers or queues. Then you can safely exit your main VI.

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

Message 2 of 4
(3,182 Views)
Excellent idea!  I have written a "power alert.vi" and it accomplishes what I need to do.  Thanks!
0 Kudos
Message 3 of 4
(3,163 Views)

Can I get a copy of your vi?  I have the exact same issue, trying to notify us in the event of a power failure.

 

Thanks in advance!

 

Doug

 

0 Kudos
Message 4 of 4
(3,052 Views)