Hi,

I've created a unit that has a thread that has a TTimer object that runs
periodically to access an A/D converter.

      AtoDThread := TAcquisitionThread.Create(FALSE);
        AtoDThread.Priority := tpHigher;
        AtoDThread.Resume; // now run the thread

Inside the AtoDThread the Execute

    DLPortIO :=  TDLPortIO.Create(nil);
    DLPortIO.DriverPath := 'c:\DMT\Plotter'; // This is where we've
installed it.

    AtoDState := RESET_HARDWARE_STATE;
    while not Terminated do
        ;       // Do nothing but ideally suspend somehow while leaving
the timer running.

What I'd like to do is just have the Execute thread do nothing else other
than let the timer fire which then gathers the data and fills appropriate
variables etc.

If I suspend the thread I believe it will also suspend the timer won't it?
What's a better way to block the execute part of the thread while leaving
the timer active?

Thanks
John


Automation Artisans Inc.
http://www.autoartisans.com/ELS/
Ph. 1 250 544 4950

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to