Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain


Reply
 
Share Thread Tools Display Modes
Old 02-18-2009, 05:16 PM   #1
Low Bitrate
 
GadgetBandit's Avatar
 
Join Date: Oct 2008
Posts: 87
GadgetBandit is an unknown quantity at this point
I need help!

I need to fire a relay for ~1 min. ~ every 20 min.

I'm assumming one function would increment a variable. Another function would fire the relay(with another incrementing variable) and reset the variable. I don't know. Would someone please help?

GabgetBandit.
GadgetBandit is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 02-18-2009, 05:32 PM   #2
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 2,197
greenman100 is on a distinguished road
yup.

What are your 4 timers set at?
greenman100 is offline   Reply With Quote
Old 02-18-2009, 05:46 PM   #3
Variable Bitrate
 
bratnetwork's Avatar
 
Join Date: Oct 2007
Location: Haledon, NJ
Posts: 314
bratnetwork is an unknown quantity at this point
Set your logic timer for 100 so that way your logic will run 10 times every second

If you want to trigger this sequence from a button make a button that will set set a variable to 600.

Code:
<button id="OneMinuteEnable" enabled="yes" function="change variable" functionTargetID="OneMinuteVariable" vote_opinion="600" vote_priority="High"> <images imagePrimary="content\images\button_images\button_down.png" imageSecondary="content\images\button_images\button.png" imageDisabled="content\images\button_images\button.png" imagePushed="content\images\button_images\button_down.png"></images> <display size="230,70" location="287,75" page="0" z_order="0.9"></display> <vote_options minimum_delta_vote_time_down="20"></vote_options> <text font="verdana" font_size="25"></text> <text colourPrimaryARGB="255,255,255,255" textPrimary="Windows Down"></text> <text colourSecondaryARGB="255,255,255,255" textSecondary="Windows Down"></text> </button>

Then in your logic code it to something like this:

Code:
<if fire_on="logic" minimum_delta_vote_time="100" id="one_minute_logic"> <boolean_operation type="greater than"> <parameter1> <variable do="get" name="OneMinuteVariable"></variable> </parameter1> <parameter2> <number>0</number> </parameter2> </boolean_operation> <then> <do function="Trigger Output" functionTargetID="Digital Output 5" vote_opinion="On" vote_priority="Medium"></do> <do function="Change Variable" functionTargetID="OneMinuteVariable" vote_opinion="d-1" vote_priority="Medium"></do> </then> </if>

That will trigger the output on for 1 minute but then you need a logic like this to turn it off:

Code:
<if fire_on="logic" minimum_delta_vote_time="100" id="one_minute_stop_logic"> <boolean_operation type="equal to"> <parameter1> <variable do="get" name="OneMinuteVariable"></variable> </parameter1> <parameter2> <number>0</number> </parameter2> </boolean_operation> <then> <do function="Trigger Output" functionTargetID="Digital Output 5" vote_opinion="Off" vote_priority="low"></do> </then> </if>

Now you would add to that the logic for the 20 minute rest using the same concept as above then after the 20 minuted it would set the variable back to 600 starting the whole process over again...

Hope this gets you on the right track and hopefully my logics work properly... i used them once before and they worked but i modified them a bit to fit what you wanted,
bratnetwork is offline   Reply With Quote
Old 02-18-2009, 11:38 PM   #4
Low Bitrate
 
GadgetBandit's Avatar
 
Join Date: Oct 2008
Posts: 87
GadgetBandit is an unknown quantity at this point
What an excellent example!! Worked great. By the time I got done with my part . . . it didn't work, but I'm close. I didn't realize when I asked today, but the samples you put up, moved my greenhouse to the next level. If the MDX can count to 864000, I've got DAILY cycles!!! Thank you.

GadgetBandit
GadgetBandit is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 09:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics