Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   How do you control relays (http://www.chiefdelphi.com/forums/showthread.php?t=1941)

BinaryBob0001 21-01-2002 04:41

How do you control relays
 
I've been reading about all of the commands on the bs2sx and there seems to be now way to control the relays, is there any way to do this? Thanks.

Joe Johnson 21-01-2002 06:46

MOST Pbasic commands are of no use to the FIRST community because you have very little direct access to the outside world.

To turn on or off a relay, all you have to do is change the appropriate bit of the byte RelayA or RelayB prior to outputting the data to the Master CPU at the bottom of your control loop.

It is not that hard once you look closely at the Default Code.

Innovation First has aliased all the bits to things that make sense so for example you simply put
relay1_fwd = 1
to turn relay 1 on in the forward direction
relay1_fwd = 0
turns it back off.

Try it and get back to us with questions if you run into problems

Good luck,


Joe J.

Jordan A. 21-01-2002 08:42

Joe, I am still thrown off by your new pic :)


All times are GMT -5. The time now is 01:22.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi