guest

Creating on/off button with a 2 hours timer

Recommended Posts

Hello,

I am a new to DAQFACTORY and I want to control a fan by using an on/off button. Also, i want the button to turn off after 2 hrs (using a timer). Please help if you can

Note: I am using DAQFACTORY with LabJack u3

Share this post


Link to post
Share on other sites

I recommend going through the DAQFactory - LabJack application guide and the Guided Tour.  Its a PDF installed with DAQFactory.  

That will guide you through most of what you need.  Making something turn off after two hours is a basic sequence script that you would run when the button is clicked.  But NOT in the Action of the button, it has to be a sequence that gets started on its own.  The script is something like:

fan = 1 // turn fan on
delay(7200)  // wait 2 hours
fan = 0  // turn fan off

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now