Re: [OT?] Reading hardware from thread
- From: r norman <r_s_norman@xxxxxxxxxxxx>
- Date: Wed, 18 Apr 2007 12:42:38 -0400
On Wed, 18 Apr 2007 18:06:12 +0200, Anders Eriksson
<andis59@xxxxxxxxx> wrote:
Hello,
This might be a slightly Off Topic question but I don't know where else to
put it.
I have a digital I/O PCI Card that I have to read at least once every 35 ms
(We are using the I/O card for communicating with an PLC that has about 35
ms cycle time.
I have tried using OnTimer() but it will not work with these small times.
So I was thinking that I maybe could start a thread that reads the I/O card
continuously in a loop and creates Events Messages when something changes.
Since I haven't done anything like this before I just want to check with
you guys and girls if it's a stupid idea or not!?
Any suggestion on how to solve the problem would be appreciated!
I have no trouble running a timer on a 50 msec cycle, doing things 20
times a second. The actual smallest time slice you can get depends
strongly on the operating system though. I believe it may also depend
on environmental factors, for example, whether a notebook computer is
running on AC power or on the battery. You cannot count on a specific
time because you don't have a true real-time operating system. So if
it absolutely essential that you MUST read the data every 35 msec,
come what may, no matter what the operating system is doing at the
time, then you will either have to write your own kernel level driver
or else get an "outboard" small embedded CPU system with its own
operating system that reads the data and stores it for transfer to
your Windows system.
.
- References:
- [OT?] Reading hardware from thread
- From: Anders Eriksson
- [OT?] Reading hardware from thread
- Prev by Date: Re: An array of structs
- Next by Date: Re: Are _T() and TEXT() macros equivalent?
- Previous by thread: [OT?] Reading hardware from thread
- Next by thread: Re: [OT?] Reading hardware from thread
- Index(es):
Relevant Pages
|