PDA

View Full Version : Time Delay to event



farrokh747
02-18-2010, 12:19 AM
Hi All / Alan -

I was looking for a way to add a delay to an event - for eg, trigger a relay 2 secs after squat switch in "on" .... is there any way to do this via the fs2p editor/ini file/configure function? Couldn't find this..

FS2P V = 4.3.15

Thanks in advance!

Farrokh.

CocnutAir
02-19-2010, 03:49 AM
Farrokh,

Haven't fogotten about you. Just finishing up correcting bugs that folks reported.
I can make up a circuit post here. Could also make a sample project available for download.
As I recall the trick is to use the integrator component.

Regards,
Alan

CocnutAir
02-19-2010, 03:54 AM
Not sure you can do a delay with 4.3.15.
Haven't played with that version in ages.
Don't think I have that anymore on my system.

farrokh747
02-19-2010, 04:59 AM
Hi Alan - I suspected it couldn't be done with 4.xx -- no hurry, will also play around with v5 - still getting the hang of it..

Thanks!

Farrokh.

CocnutAir
02-24-2010, 01:35 AM
Download fs2phidget 5.0.16 (is still in approval status).
Product manual is no longer in the installer.

To create circuit with 2 sec time delay:

Start FS.
Start FS2Phidget516.
Open favorite project.
Create a new circuit.
Answer "No" to all "Create parallel circuit?" prompts, unless specfied otherwise.
Add Digital Input component, set label to "TEST".
Add FS Output component, assign to AUTOPILOT_MASTER_SWITCH Variable (so we can test on ground).
Add Fixed Value component, set InitialValue property to 1.
Add Integrator component, set MinValue to 1, MaxValue to 15, set Wrap to false and set Reset to True.
Add Valve component, set MinValue and MaxValue both to 15, set Shutoff to true.
Add Digital Output component, set Text to "DONE!".
Add Connector component (later another circuit will be added to connector - timer will control this circuit).
Click on the Valve component.
Add another Digital Output, Answer "Y" to "Add Parallel Circuit?", set text to "TIMER RUNNING".

To Test:
Either click on the Digital Input labelled "TEST".
or
Click on autopilot master switch in FS.

Now create a another new circuit.
Add Fixed Value component, set InitialValue to 16383 (Spoiler fully extended value).
Add Digital Input, set Controlled to true.
Note the name of this componentt (hover cursor over component to show name).
Add FS Input component, assign to FS Variable SPOILER_HANDLE.

On the first circuit, click on the Connector component.
Set ChildComponent to name you noted for Digital Input.

Test again.
When timer reaches 15 (approx 2 seconds on my lap top)
the Spoiler should deploy in FS.

Hope this helps.

Regards,
Alan

farrokh747
02-24-2010, 01:49 AM
Thank you alan! Will try this - I guess you'll be uploading .16 when ready

where would we be without you... :-)

Farrokh.

CocnutAir
02-24-2010, 02:06 AM
Is already uploaded.
Awaiting approval by admins.
Admins prefer to scrutinize and approve files before exposing to ya'll.
This is for our protection.

giosue
02-24-2010, 08:47 AM
Thanks for all Alan
Giosuč

farrokh747
03-03-2010, 04:12 AM
Hi Alan -


Tried it on v .16 and it works like a dream...! Increased the number to 20 to get a slightly longer delay -

Thanks!


Farrokh

CocnutAir
03-03-2010, 09:24 PM
Farrokh,

Cool. Thanks for trying this out.

Regards,
Alan.