Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

realtime i/O by serial or parallell port ?

0 views
Skip to first unread message

Tecos Textile Automation

unread,
Oct 5, 1999, 3:00:00 AM10/5/99
to
Hi !

Does anyone has a hint on how to find information
on how to build realtime I/O controller software to control machines
(under Win2000, Delphi 3, 4 or 5 ) ?

With the Windows software, I should be able to respond realtime on
serial or parallell input ?

Many thank for every incoming hint.
Jurgen De Block,
BELGIUM

Jon Jacobs

unread,
Oct 5, 1999, 3:00:00 AM10/5/99
to
There are serial port packages; free ones such as AsyncFree, among others.
But for rock-solid reliability I ended up buying Async Pro for Delphi from
Turbo Power.

While some devices can be controlled through Com Ports (usually RS485/422
rather than RS232), and I have done so, using special communications
protocols, there is typically a noticiable latency involved. Using serial
communications is mostly for reading certain kinds of instuments;
controlling equipment this way is rarer (but is done some).

For truly real-time control (or even real-time reading of sensors) you
typically use special digital I/O cards. By reading and writing to pins on
the chip with assembly instructions (IN and OUT) you open and close relays
that allow larger currents to flow, turning machinery on and off. Also
relays are opened or closed by external voltages, allowing you to read
sensors. There are also Anolog I/O cards for reading or setting voltages (or
currents when you use the appropriate resistors) that can control machinery
or read values. These typically would use 8 or 12 pins at a time (plus more
for configuring the card) for digital values of 0 to 255 or 0 to 4095 that
translate to or from analog voltages. Of course under Windows NT/2000, you
could not address hardware so directly; you would have to use drivers.

Jon

Tecos Textile Automation wrote in message
<37FA65F2...@pophost.eunet.be>...

Jon Jacobs

unread,
Oct 5, 1999, 3:00:00 AM10/5/99
to
Under Windows 95/98 I have the Application.OnIdle event fire hundreds of
times per second (and that is with older/slower Pentiums) and perform logic
inside the event handler as well as access my I/O cards. Yes, you can also
run a tight loop in a thread and set high priorites. I used this to good
effect. Be sure to have LOTS of RAM so you don't ever dip into virtual
memory, as this produces substantial delays when it occurs. You can still
get an occasional hit of about 10 milliseconds (on older Pentiums) when
Windows decides to take inventory of what is connected. Oh, yes, make sure
your controller/monitor app is the only one allowed to run on the computer.
If someone launches a word processor, spreadsheet, money manager, game, etc.
on your controller system, its safety/reliability will suffer.

With NT/2000, going through drivers, the response time for the cards is a
little slower.


Jon


>- when communicating with drivers (eg. DLL's) , would windows react
realtime
>(Windows has an EVENT driven approach, isn't it ?)
>- eg. I have some sensor input in the extarnal controller, the driver
mentions
>me this fact, and before sending some output to another electrical device
via
>the driver,
> I do some logical operations in programming code : is this possible ?
>- am I ight if I need to think at "Threads" and "Thread priorities" in
windows ?
>Or would it take me too far ?


Tecos Textile Automation

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
> For truly real-time control (or even real-time reading of sensors) you
> typically use special digital I/O cards. By reading and writing to pins on
> the chip with assembly instructions (IN and OUT) you open and close relays
> that allow larger currents to flow, turning machinery on and off. Also
> relays are opened or closed by external voltages, allowing you to read
> sensors. There are also Anolog I/O cards for reading or setting voltages (or
> currents when you use the appropriate resistors) that can control machinery
> or read values. These typically would use 8 or 12 pins at a time (plus more
> for configuring the card) for digital values of 0 to 255 or 0 to 4095 that
> translate to or from analog voltages. Of course under Windows NT/2000, you
> could not address hardware so directly; you would have to use drivers.
>
> Jon
>

Thank you for your interestng reply Jon.
You resumed EXACTLY what I was mentioning with I/O cards.
In your opinion...


- when communicating with drivers (eg. DLL's) , would windows react realtime
(Windows has an EVENT driven approach, isn't it ?)
- eg. I have some sensor input in the extarnal controller, the driver mentions
me this fact, and before sending some output to another electrical device via
the driver,
I do some logical operations in programming code : is this possible ?
- am I ight if I need to think at "Threads" and "Thread priorities" in windows ?
Or would it take me too far ?

Thank your froo you rcontribution to my questions, JON

Best regards, JURGEN De Block, BELGIUM


0 new messages