Quote Originally Posted by Robin Hewitt View Post
Absolutely, thanks for the heads up :D

I'm not sure he isn't introducing too many delays, that scale data gets very stale very quickly. I suppose it all depends on what he is trying to achieve.

I made the data input, scale reading and motor stepping completely interrupt driven. There is a sort of housekeeping program that looks for new devices and button presses, but all the vital stuff happens automatically in the background without the slightest intervention apart from Pause and Abort. It's as close to real time as I can possibly make it. I find PC's are a bit too handy at turning the interupts off.
Using a PC for anything truly real-time is hard - actually its not the PC of course, but Windows that is the issue. There are good real-time extensions for Linux and there used to be a pretty good real-time extension for Windows too but I don't know what happened to it - http://www.directinsight.co.uk/produ...urcom/rtx.html is something similar though. I've done projects in the past with single board and single chip solutions with tiny real-time kernels such as iRMX, embedded Linux as well as solutions based on WindowsCE, stuff you couldn't begin to make work reliably under Windows.