Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Driving a motor

Driving a motor

Scheduled Pinned Locked Moved Visual Basic
helpcsharpcom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Looping_Eagle
    wrote on last edited by
    #1

    High timer experts,:omg: I have a problem very similar to the "Help clock generate" thread. I want to control a stepper motor of an electrophoresis unit. The Motor should be driven with (only) 250 hz. The low precicion timers using the message que (windows.froms.timers) are not usefull for this purpose (Instantly I wandered why the motor does not perform all steps with the timer set to 50 Hz, but meassuring the intervals using the system performancecounter revealed, that about every 10th interval is only 203 ticks long -- for what ever reason) Looking for a solution, I came accross -Queue timers- which should be able to deal with this problem. Unfortunately, I am not familiar with C programming language and all the examples were written in C (e.g. here). Is there a possibility to run such a timer from VB.net? Thanks in advance Armin

    D 1 Reply Last reply
    0
    • L Looping_Eagle

      High timer experts,:omg: I have a problem very similar to the "Help clock generate" thread. I want to control a stepper motor of an electrophoresis unit. The Motor should be driven with (only) 250 hz. The low precicion timers using the message que (windows.froms.timers) are not usefull for this purpose (Instantly I wandered why the motor does not perform all steps with the timer set to 50 Hz, but meassuring the intervals using the system performancecounter revealed, that about every 10th interval is only 203 ticks long -- for what ever reason) Looking for a solution, I came accross -Queue timers- which should be able to deal with this problem. Unfortunately, I am not familiar with C programming language and all the examples were written in C (e.g. here). Is there a possibility to run such a timer from VB.net? Thanks in advance Armin

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If my math is right, at 250Hz, you need to fire the event every 4 milliseconds. The timers that your finding all have 1 millisecond resolution. At that low an interval, the millisecond timers are not really that accurate. They can be off by as much as a millisecond when your app receives the notification. I think that part of the problem is the priority that your process is running under. You might want to consider running your app and then, before you start the timer test, go into the Task Manager, click on the Processes tab, right-click on your app and bump the priority up to High or RealTime to see if the interval stabilizes for you. RageInTheMachine9532

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups