#28 [PyParallel] bit-bang timing


I'm writing code to control 2 robotic arms, one directly stepping to motors, the other receiving ASCII commands.

With both pieces of code, I'm just using time.sleep to time my commands, which works, but I'm running into a speed barrier. If I lower the sleep duration, it becomes unreliable. This gets even worse when other threads join the fight for processor time.

Would it be possible for PyParallel to do something to help in that area?

One thing that might work is a C loop that calls into the Python code at a given interval, but maybe there are better ideas?


  • Chris Liechti

    Chris Liechti - 2013-10-11
    • status: open --> pending
    • assigned_to: Chris Liechti
    • Group: --> Next Release (example)
  • Chris Liechti

    Chris Liechti - 2013-10-11

    I do not think that pyParallel can be of any help here. Not i a cross platform manner anyways.

    You'll probably only achieve very good results by using external hardware that does the timing.

    On the PC itself, the timing heavily depends on the OS and the "load" on the computer. You may be able to mark a process as "realtime" or change the scheduler which distributes the computing time across the processes differently.

    Some OS may allow you to write drivers with realtime capabilities, though that is not something where pyParallel could help.

  • Chris Liechti

    Chris Liechti - 2014-08-04
    • status: pending --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks