Belgium
Asked — Edited

Vb And Servospeed

Hi,

I use this line of code:

EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D9, 60, 10)

to control a servo. The last integer '10' is the speed setting. However this has no effect at all on the servo speed. I can use 1, 50, 100 etc... it makes no difference. I tried this with Windows XP with VB2005 and with Windows 7 with VB2008. There is no difference.

Suggestions anyone ?

Best regards,


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#1  

It works for me, can you post your code?

Belgium
#2  

Hi DJ,

Sorry it took so long to respond. I was on travel and had to catch up with work when I got back. So this is a little piece of the code:

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    EzB_Connect1.EZB.Joystick.RefreshState()
   
    'EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D9, SweepServoMin, 100)
    'EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D9, SweepServoMax, 100)

    If SweepStart Then

        PingRadarStatus = True

        EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D9, 10, 1)

        System.Threading.Thread.Sleep(1500)

        EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D9, 60, 10)

        System.Threading.Thread.Sleep(1500)

    End If

End Sub 

The lines commented out I sometimes use for testing with other parameters etc... The If/Then is refering to other code which has no influence. For testing I use the hardcoded values but working with variables has the same result.

Best regards, PhG