Servo motor does not work correct


Closed Thread
Results 1 to 38 of 38
  1. #1
    Join Date
    Aug 2008
    Posts
    81

    Angry Servo motor does not work correct

    Hello
    Can someone help me.
    I can not control a servo motor he is without direction.
    here's codgo I'm using.
    In the PC program I have a range between 700 a 2300.
    Thank you.
    RX VAR BYTE
    POS VAR BYTE
    X1 VAR BYTE

    PROG:
    serin2 RX_inp,16468,[wait("PC"),RX,POS]

    IF RX = "A" THEN FRE
    IF RX = "B" THEN TRA
    IF RX = "C" THEN ESQ
    IF RX = "D" THEN DIr
    if RX = "E" THEN PAR
    IF RX = "X" THEN SERV
    GOTO PROG

    FRE:
    PORTB.0 = 0
    PORTB.1 = 1
    PORTB.2 = 1
    PORTB.3 = 0
    GOTO PROG
    TRA:
    PORTB.0 = 1
    PORTB.1 = 0
    PORTB.2 = 0
    PORTB.3 = 1
    GOTO PROG
    ESQ:
    PORTB.0 = 1
    PORTB.1 = 0
    PORTB.2 = 1
    PORTB.3 = 0
    GOTO PROG
    DIR:
    PORTB.0 = 0
    PORTB.1 = 1
    PORTB.2 = 0
    PORTB.3 = 1
    GOTO PROG

    PAR:
    PORTB.0 = 0
    PORTB.1 = 0
    PORTB.2 = 0
    PORTB.3 = 0
    GOTO PROG

    SERV:
    high SERVO1
    pauseus X1*10:X1 = pos
    low SERVO1
    GOTO PROG

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Did you make port B digital?

    What PIC?

    What CONFIG settings?

    Do you want default oscillator settings?

    What is RX_inp and SERVO1?

    Do you want X1 to have initial value?

    Robert
    Last edited by Demon; - 15th June 2014 at 22:00.

  3. #3
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello all well
    I have a program on the PC that controls the motor ac
    I trackbar that for servo motor with avariaves 700-2300
    This half confused,

    @ DEVICE PIC16F876A
    @ DEVICE PIC16F876A,WDT_ON
    @ DEVICE PIC16F876A,PWRT_ON
    @ DEVICE PIC16F876A,PROTECT_off
    @ DEVICE PIC16F876A,XT_OSC
    define OCS 4
    ADCON1 = 7
    TRISC=%10000000:PORTC=%10000000
    TRISA=%11111111:PORTA=%11111111
    TRISB=%00000000:PORTB=%00000000
    SYMBOL SERVO1=PORTB.0 'SERVO1
    SYMBOL RX_INP=PORTC.7 'RF
    Last edited by cesar35; - 15th June 2014 at 22:18.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hi,
    A couple of issues of the bat:
    If, by servo, you mean your typical RC servo it's not enough to send it one pulse. If you want it to move you need to send it pulses, usually at around 50Hz repetition rate, for at least as long as it tkaes for the servo to move to the new position but ideally you send it pulses all the time so that it can keep its position. As far as I can see you're only sending a single pulse - I don't think that's going to work.

    You have POS declared as a BYTE but you're trying to store a value between 700 and 2300 - that's not going to work.

    pauseus X1*10:X1 = pos
    A typical RC servo want pulses with a width of 1-2ms. If you assign 2000 to POS (after changing it to a WORD) you're going to get a pulsewidth of 20000us or 20ms - I don't think that's going to work.

    If you change POS to a WORD check the documentation of SERIN to see if it can handle WORD variables directly or if you need to give it the high and low byte separately. And, finally, I'm not sure what the purpose of copying POX to X1 but if there's a specific reason for it make sure you change X1 to WORD as well.

    /Henrik.

  5. #5
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Thanks for the reply
    I made you the servant said he moved to the left and and stop.
    I cho I'm really confused.
    Could you tell me what is wrong in this program
    @ DEVICE PIC16F876A
    @ DEVICE PIC16F876A,WDT_ON
    @ DEVICE PIC16F876A,PWRT_ON
    @ DEVICE PIC16F876A,PROTECT_off
    @ DEVICE PIC16F876A,XT_OSC
    define OCS 4
    ADCON1 = 7
    TRISC=%10000000:PORTC=%10000000
    TRISA=%11111111:PORTA=%11111111
    TRISB=%00000000:PORTB=%00000000

    SYMBOL SERVO1=PORTC.0 'SERVO1
    SYMBOL RX_INP=PORTC.7 'RF

    RX VAR BYTE
    POS VAR word
    X1 VAR word

    PROG:
    serin2 RX_inp,16468,[wait("PC"),RX,POS]

    IF RX = "A" THEN FRE
    IF RX = "B" THEN TRA
    IF RX = "C" THEN ESQ
    IF RX = "D" THEN DIr
    if RX = "E" THEN PAR
    IF RX = "X" THEN SERV
    GOTO PROG

    FRE:
    PORTB.0 = 0
    PORTB.1 = 1
    PORTB.2 = 1
    PORTB.3 = 0
    GOTO PROG
    TRA:
    PORTB.0 = 1
    PORTB.1 = 0
    PORTB.2 = 0
    PORTB.3 = 1
    GOTO PROG
    ESQ:
    PORTB.0 = 1
    PORTB.1 = 0
    PORTB.2 = 1
    PORTB.3 = 0
    GOTO PROG
    DIR:
    PORTB.0 = 0
    PORTB.1 = 1
    PORTB.2 = 0
    PORTB.3 = 1
    GOTO PROG

    PAR:
    PORTB.0 = 0
    PORTB.1 = 0
    PORTB.2 = 0
    PORTB.3 = 0
    GOTO PROG

    SERV:
    high SERVO1
    pauseus X1*10:X1 = pos
    low SERVO1
    GOTO PROG

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hi,
    Could you tell me what is wrong in this program
    I thought I did bring up least a couple of things that might be wrong.
    You've corrected the variable size, that's good.

    But,
    * You are still doing the times 10 thing in the SERV subroutine, if the PC sends 700 you'll get a 7ms delay, what's the reason for it?
    * You are still only sending a single pulse to the servo
    * I took a brief look at the manual and as far as I can see SERIN2 can not directly handle WORDs, you need to split it, SERIN2 RX_inp,16468,[wait("PC"),RX,POS.HighByte, POS.LowByte] watch out for big vs little endian. Which brings me to the last thing...
    * How is the PC sending the data? If it's sending it as ASCII, ie "1","2","3","4" instead of two bytes 4,210 then you need to use the DEC modifier in the SERIN2 statement.

    /Henrik.

  7. #7
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello Henrik.
    As you said I have to send high and low along with varaves between 700 and 2300.
    did not know that controls a servo was a yes.
    I am very grateful to you.

  8. #8
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello Henrik
    And I do not know much about PicBasic Pro.
    To do piquenos project I do.
    I never did a project to control a servo motor by pc
    You can explain me better.
    I have change the vb.net program for this to work.
    thank you

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    It would help to know the specs of the motor, just to be sure.

    To some, a servo is used to unlock a car door, to others it can turn specific degrees.

    The more information you provide, the more people can help.

    (those 4 signals make me think of a bi-polar stepper motor)

    Robert

  10. #10
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    You could also post the vb.net program.

  11. #11
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello thank you guys for the help.
    Here is the data I'm sending to the pic
    With vb.net
    I control the camera using servo motor for movement



    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
    pos = CInt(TrackBar1.Value)
    Label8.Text = pos
    SerialPort1.Write("PC")
    SerialPort1.Write("X")
    SerialPort1.Write(pos)

    'POS MAX 2300
    'POS MIN 7000
    End Sub
    Last edited by cesar35; - 17th June 2014 at 14:43.

  12. #12
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    As far as I know, X1 will be 0 first time through, maybe. I always set variables to 0 at top of program.

    PAUSEUS will be nothing so SERVO1 will be turned OFF quite fast.

    Then the PIC will wait for the next SERIN from the PC, it won't emit more pulses until then.

    Assuming your MODE is configured properly.

    Robert
    Last edited by Demon; - 17th June 2014 at 15:23.

  13. #13
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello Robert okay
    you have to make an example as I do
    I think I'm losing myself in programming
    Between two pic I did worked.
    With pc always had the difficulty.
    Thank you.

  14. #14
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Last edited by cesar35; - 17th June 2014 at 18:15.

  15. #15
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    My VB is severly rusted but I think you've got a format mismatch between what VB is sending and what the PIC is expecting - as I suggested in a previous post.
    I think that SerialPort1.Write(pos) will send the content of variable pos as an ASCII string while the PIC is expecting two binary bytes, not an ASCII string.
    If that's the case you need to change the VB program or the PIC program, on the PIC side you can use the DEC modifier to recieve an ASCII string consisting of decimal digits and parse that into a value.

    Again, there's a big difference between sending a byte as binary, ie 123 and sending it as an ASCII string. If you loop the TX to RX on the PC and fire up a terminal program, what does the data look like?

    /Henrik.

  16. #16
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by cesar35 View Post
    Hello Robert okay
    you have to make an example as I do
    I think I'm losing myself in programming
    ...
    Sorry, have chores to do.

    You really should start small and add one thing at a time. I suggest you practice SERIN first, then add the pulses to the servo.

    Robert


    Edit: check out the PBP sample programs, they cover a LOT of material.

  17. #17
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by HenrikOlsson View Post
    Again, there's a big difference between sending a byte as binary, ie 123 and sending it as an ASCII string. If you loop the TX to RX on the PC and fire up a terminal program, what does the data look like?

    /Henrik.
    VB serialport.write defaults to ASCII characters so change PIC side and use DEC modifier.

  18. #18
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by cesar35
    Hello EarlyBird2
    I modified the program (dec pos)
    The servo move well.
    have problem
    I have no command (RX) not working AC motors
    Could you tell me why (RX) does not work.
    thank you
    Could you explain more "I have no command (RX) not working AC motors. Could you tell me why (RX) does not work."

    RX has the value "X" and the servo works so how is RX not working?

  19. #19
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello
    After modifying (DEC POS) The RX does not work
    I can send data to the rx ac motors not working.
    So the servant move
    I used (Servo gosub)
    The servant problem has already works better
    Thank you all.

    serin2 RX_inp,16468,500,PAR,[wait("PC"),RX,DEC POS]

    IF RX = "A" THEN FRE
    IF RX = "B" THEN TRA
    IF RX = "C" THEN ESQ
    IF RX = "D" THEN DIr
    GOSUB SERVO
    GOTO PROG

    SERVO:
    servo1 = 1
    PAUSEUS 1000 + pos
    servo1 = 0
    Pause 16
    RETURN

  20. #20
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    You are saying that POS is received and works but "X" is not received.

  21. #21
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    I noticed he changed HIGH/LOW to 1/0.

    Robert


    Edit: (if I'm awake) a bipolar motor needs the 4 inputs to vary in a specific order (one for CW, one for CCW).

    If you keep turning on the motor but these don't change state, I think you end up with the motor holding position.
    Last edited by Demon; - 20th June 2014 at 13:55.

  22. #22
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    As I said the command RX does not work.
    Here's a video made ​​in proteus.

  23. #23
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    The code you are running is not the code in #5 and #19.

    Please post the code you are using.

  24. #24
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    As I said the command RX does not work.
    RX is not a command. RX is a variable which is assigned an ASCII code when serin2 is executed.

    I see you changed IF THEN to SELECT CASE. SELECT CASE is for values and not ASCII characters like "A".

    Did it stop working when you made these changes?
    Did you make these changes because it did not work with IF THEN?
    Is the servo working if not has the servo ever worked?

  25. #25
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello all well
    Here is the code

    @ DEVICE PIC16F876A
    @ DEVICE PIC16F876A,WDT_ON
    @ DEVICE PIC16F876A,PWRT_ON
    @ DEVICE PIC16F876A,PROTECT_off
    @ DEVICE PIC16F876A,XT_OSC
    define OCS 4
    ADCON1 = 7
    TRISC=%10000000:PORTC=%10000000
    TRISA=%11111111:PORTA=%11111111
    TRISB=%00000000:PORTB=%00000000

    SYMBOL SERVO1=PORTB.0 'SERVO1
    SYMBOL RX_INP=PORTC.7 'RF

    RX VAR BYTE
    POS VAR word

    PROG:
    serin2 RX_inp,84,500,MODATA,[wait("PC"),RX,DEC POS]

    SELECT CASE RX
    CASE "1"
    GOSUB FRE
    CASE "2"
    GOSUB TRA
    CASE "3"
    GOSUB DIR
    CASE "4"
    GOSUB ESQ
    CASE "5"
    HIGH PORTB.0
    pauseus 1000 + pos
    LOW PORTB.0
    Pause 16
    END SELECT
    GOTO PROG

    FRE:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    TRA:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN
    ESQ:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    DIR:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN

    MODATA:

    PORTB.0 = 0
    PORTB.1 = 0
    PORTB.2 = 0
    PORTB.3 = 0
    GOTO PROG


  26. #26
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Here the right code.
    Please dis me if I'm on track.
    sorry

    @ DEVICE PIC16F876A
    @ DEVICE PIC16F876A,WDT_ON
    @ DEVICE PIC16F876A,PWRT_ON
    @ DEVICE PIC16F876A,PROTECT_off
    @ DEVICE PIC16F876A,XT_OSC
    define OCS 4
    ADCON1 = 7
    TRISC=%10000000:PORTC=%10000000
    TRISA=%11111111:PORTA=%11111111
    TRISB=%00000000:PORTB=%00000000

    SYMBOL SERVO1=PORTB.0 'SERVO1
    SYMBOL RX_INP=PORTC.7 'RF

    RX VAR BYTE
    POS VAR word

    PROG:
    serin2 RX_inp,84,500,MODATA,[wait("PC"),RX,DEC POS]

    SELECT CASE RX
    CASE "1"
    GOSUB FRE
    CASE "2"
    GOSUB TRA
    CASE "3"
    GOSUB DIR
    CASE "4"
    GOSUB ESQ
    CASE "5"
    HIGH PORTB.0
    pauseus 1000 + pos
    LOW PORTB.0
    Pause 16
    END SELECT
    GOTO PROG

    FRE:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    TRA:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN
    ESQ:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    DIR:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN

    MODATA:

    PORTC.0 = 0
    PORTC.1 = 0
    PORTC.2 = 0
    PORTC.3 = 0
    GOTO PROG


  27. #27
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by EarlyBird2 View Post
    RX is not a command. RX is a variable which is assigned an ASCII code when serin2 is executed.

    I see you changed IF THEN to SELECT CASE. SELECT CASE is for values and not ASCII characters like "A".

    Did it stop working when you made these changes?
    Did you make these changes because it did not work with IF THEN?
    Is the servo working if not has the servo ever worked?
    Thanks for the code but you have not answered the questions.

  28. #28
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Looking at the code "CASE "1" is saying CASE = "1" not CASE = 1 there is a big difference. "1" is a string with ASCII value of 49 and 1 is a value of 1.

    CASE works with a value and not with strings but you can use the ASCII value.
    So CASE "1" should be CASE 49
    and CASE "A" should be CASE 65

    for example.

  29. #29
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by EarlyBird2 View Post
    Looking at the code "CASE "1" is saying CASE = "1" not CASE = 1 there is a big difference. "1" is a string with ASCII value of 49 and 1 is a value of 1.

    CASE works with a value and not with strings but you can use the ASCII value.
    So CASE "1" should be CASE 49
    and CASE "A" should be CASE 65

    for example.
    Hello
    About your question
    I modified the program to SELECT CASE.para get better to understand the program.

  30. #30
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello
    Now already understand what you said.
    on the servo seems to me that something is missing he is without direction
    Here is the corrected code.
    thank you
    @ DEVICE PIC16F876A
    @ DEVICE PIC16F876A,WDT_OFF
    @ DEVICE PIC16F876A,PWRT_OFF
    @ DEVICE PIC16F876A,PROTECT_OFF
    @ DEVICE PIC16F876A,XT_OSC
    define OCS 4
    ADCON1 = 7
    TRISC=%10000000:PORTC=%10000000
    TRISA=%11111111:PORTA=%11111111
    TRISB=%00000000:PORTB=%00000000

    SYMBOL SERVO1=PORTB.0 'SERVO1
    SYMBOL RX_INP=PORTC.7 'RF

    RX VAR BYTE
    POS VAR word
    POS = 1500

    PROG:
    serin2 RX_inp,84,600,MODATA,[wait("PC"),RX,DEC POS]

    SELECT CASE RX
    CASE 65 'A
    GOSUB FRE
    CASE 66 'B
    GOSUB TRA
    CASE 67 'C
    GOSUB DIR
    CASE 68 'D
    GOSUB ESQ
    CASE 69 'E
    HIGH PORTB.0
    pauseus 1500 + pos
    LOW PORTB.0
    Pause 20
    END SELECT
    GOTO PROG

    FRE:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    TRA:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN
    ESQ:
    PORTC.0 = 1
    PORTC.1 = 0
    PORTC.2 = 1
    PORTC.3 = 0
    RETURN
    DIR:
    PORTC.0 = 0
    PORTC.1 = 1
    PORTC.2 = 0
    PORTC.3 = 1
    RETURN

    MODATA:
    PORTC.0 = 0
    PORTC.1 = 0
    PORTC.2 = 0
    PORTC.3 = 0
    GOTO PROG

  31. #31
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    If the PC is not sending A, B, C and D in the proper sequence, the motor will not turn, MODATA will hold the motor in place.

    Robert

  32. #32
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hi,
    CASE works with a value and not with strings but you can use the ASCII value.
    So CASE "1" should be CASE 49
    and CASE "A" should be CASE 65
    Both are equally fine.
    CASE "A", CASE 65, CASE $41, CASE %01000001 all works and does the exact same thing.

    /Henrik.

  33. #33
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by HenrikOlsson View Post
    Hi,


    Both are equally fine.
    CASE "A", CASE 65, CASE $41, CASE %01000001 all works and does the exact same thing.

    /Henrik.
    That is useful information.
    The mystery deepens then because the way CASE was written was not the problem. But CASE "A" did not work but CASE 65 does. Or does it? Is the question now. I need more feedback!
    Last edited by EarlyBird2; - 22nd June 2014 at 10:34.

  34. #34
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hi,
    But CASE "A" did not work but CASE 65 does. Or does it?
    I have no idea... All I can say is that CASE "A" works perfectly fine for me, I use it extensively in several applications, as an example, here's a snippet:
    Code:
    Select Case CmdBuffer[0]                     ' Decide what to do based on the first character in the buffer
    
    CASE "A", "a"                                ' Set accleration feedforward
     GOSUB ReadCmdBuffer
     If ValueReceived then pid_Acc_kFF = RxValue
       MenuLine = 6
       PrintLine = 1
    /Henrik.

  35. #35
    Join Date
    Aug 2008
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Hello friends
    Now I'm more confused
    For example I do not understand anything too advanced for min
    I do not know what else to mofificar my program
    To control DC motors all works fine
    I thank all of you for the tension
    sorry for your time.
    Thank you all for having me conpartilhado your knowledge at Pic basic pro
    Last edited by cesar35; - 22nd June 2014 at 14:57.

  36. #36
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Quote Originally Posted by cesar35 View Post
    Hello friends
    Now I'm more confused
    For example I do not understand anything too advanced for min
    I do not know what else to mofificar my program
    To control DC motors all works fine
    I thank all of you for the tension
    sorry for your time.
    Thank you all for having me conpartilhado your knowledge at Pic basic pro
    I am pleased it is working and no need to say sorry. I am here to help if I can.

  37. #37
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54


    Did you find this post helpful? Yes | No

    Lightbulb Re: Servo motor does not work correct

    Colega, você é do Brasil? Pelo programa (frente/tras/dir/esq) e pelo seu nome achei que sim! Se for fica mais fácil da gente trocar idéias pq meu inglês tá mto ruim, kkk!
    Manda um email privado confirmando que a gente troca uma idéia. Eu uso servo com sucesso e acho que posso te ajudar. Abraço
    Pimentel

  38. #38
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Servo motor does not work correct

    Google translate:

    Colleague, you are from Brazil? The program (front / rear / left / right) and his name thought so! If it is easier on us exchange ideas coz my english okay mto bad, kkk! Send a private email confirmation
    Not perfect but close enough.

    Robert

Similar Threads

  1. Servo motor control
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th July 2010, 23:44
  2. servo motor control??help
    By HYETİK in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th April 2009, 08:41
  3. servo/motor problem
    By griffin in forum mel PIC BASIC
    Replies: 10
    Last Post: - 10th February 2009, 21:07
  4. Servo motor problem
    By dboy in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th September 2008, 16:54
  5. contorlling servo motor
    By shirleyz in forum General
    Replies: 10
    Last Post: - 1st June 2008, 00:53

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts