Re: [OT?] Reading hardware from thread

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.



.



Relevant Pages

  • Re: how can a bit be off in memory?
    ... I am fairly certain you had a corrupt transfer off the disk. ... Into maybe ECC memory. ... On an Intel style I/O bus you have e.g another line which toggles between 'address space' and I/O space..and typically a read/write line and a clock. ... The delay in LOSING the memory address from inside the peripheral was enough, so that when the bus had actually put a new address on for the I/O read, the nasty card still thought it was being addressed..so any time the lower bits of the target RAM address last accessed matched the I/O address of the card, the very next I/O read instruction would access the card as well as what it was trying to access. ...
    (comp.os.linux.misc)
  • Re: Recording stream from the desktop - program
    ... THE MOMENT OF STARTING OPERATING SYSTEM? ... to the "TV out" of his video card, then setting it up to clone ... main display, without need for OS intervention, just a ... Of course if your Vidcard has a spare VGA output, ...
    (rec.video.desktop)
  • Sound Driver for 82801FB
    ... Audio Controller CardVendor 0x1734 card 0x107c (Fujitsu Siemens ... Card unknown) STATUS 0x2010 COMMAND 0x0006 ... BASE4 0x0000e481 addr 0x0000e480 I/O ...
    (freebsd-current)
  • Re: Recording stream from the desktop - program
    ... THE MOMENT OF STARTING OPERATING SYSTEM? ... to the "TV out" of his video card, then setting it up to clone ... main display, without need for OS intervention, just a ... Of course if your Vidcard has a spare VGA output, ...
    (rec.video.desktop)
  • Re: trouble with "eth1"
    ... expects the PCI region 0 of the device to be an I/O zone when the module ... As I thought, for whatever reasons, the manufacturer of your card swapped the PCI I/O and memory regions. ...
    (comp.os.linux.networking)