Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

How to make a ram pulse distance using vb6

Options
  • 07-08-2011 8:22pm
    #1
    Closed Accounts Posts: 5


    Hi,

    I am currently trying to control an electro mechanicial actuator using vb6. I have the program talking to the motor and i can move it at any speed i want in either direction using a servo amplifier. However i wish the motor to turn on for 1 second, and then stop and wait for another second before starting again. Anyone have any ideas or code as to how to do this?
    Any suggestions are greatly welcomed. Thanks.


Comments

  • Registered Users Posts: 7,157 ✭✭✭srsly78


    I found in the past that VB6 timing functions don't let you do high precision timing very well. You could work around this by calling the win32 QueryPerformanceCounter api maybe.


  • Closed Accounts Posts: 5 ocelot83


    Hey, thanks for the responce. Since posting i have used two timers, one that gives an output that will cause the ram to move and a second timer that gives an output that wont move the ram and offset the two timers. it has provided me with pulsing movement. Not exactly sure if its providing me with exactly what i want tho. If it hasnt worked ill definatly investigate your suggestion. Thanks .


  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Oh it will work, but your seconds won't be very precise is all.


Advertisement