|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Relay program?
i was thinking i needed to set my x value to say (pwm 1) if i wanted it to work with my pwm. But i tried using pwm control with the x variable inside it and it just makes my pwm continually run is there something i'm missing
|
|
#2
|
|||||
|
|||||
|
Re: Relay program?
Show us the code you're trying to make work. Tell us exactly what you want it to do, and we can tell you what to change to make it do that.
|
|
#3
|
||||
|
||||
|
here is our code you asked for....
|
|
#4
|
||||
|
||||
|
Re: Relay program?
where are you setting the value of x?
|
|
#5
|
||||
|
||||
|
Re: Relay program?
Where is this file in the overall scheme of the robot? I don't know how to look at easy C to intuitively know what is going on, but it could be you are calling the function in the wrong place. Is the function called in user_routines.c? It should probably called somewhere from within Default_Routines(). I am assuming the easy C version of the code is organized the same way as just regular code.
|
|
#6
|
|||||
|
|||||
|
Re: Relay program?
Quote:
(Is there a reason you posted it as a Word document containing a picture, instead of just copying the text? I don't use Word, and it was inconvenient to convert your file to a readable form.) |
|
#7
|
||||
|
||||
|
Re: Relay program?
the Setpwm (1, x) is a window that you put your variable in so "x" is set to the value of pwm 1
|
|
#8
|
|||||
|
|||||
|
Re: Relay program?
Quote:
So where in your program do you actually control the pwm output that you want to use as the trigger for your relay? |
|
#9
|
|||||
|
|||||
|
Re: Relay program?
Normal operation would be to:
1) Get the desired drive value from the driver--GetOIAInput() 2) Do your tests on when you want your relay to be active--if () else 3) Output your relay command--SetRelay() 4) Set your PWM Output--SetPWM() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Instance relay | Team_486 | Programming | 0 | 28-03-2007 09:56 |
| Relay Commands | Matt Krass | Programming | 6 | 18-02-2006 23:03 |
| Relay Assignments | MulletFish | Programming | 9 | 27-01-2005 14:15 |
| Relay fault | archiver | 2000 | 2 | 23-06-2002 23:36 |
| Relay Outputs | OddOne | Technical Discussion | 3 | 01-02-2002 19:52 |