MSComm control array
- From: "Theo" <hgfhfghf@xxxxxxxxxxx>
- Date: Fri, 15 Apr 2005 15:46:24 +0300
Hi,
I am working on a project where a timer loops through an mscomm control
array every 500 milliseconds. On each serial port is connected a plc and the
software is querying the plc status by sending a special character to the
serial port and then enables an other 400 millisecond timer (this is
probably the timeout limit) that reads the port for incoming data. This
whole cycle takes about 16 seconds (for 16 plc) to complete.
The new scenario is that the plc makes a request to the pc and the pc
replies with some data. The problem is the delay that may occur before the
pc is aware of this request (which will not happen until the loop goes back
to that plc to read the serial port). I thought to use the OnComm event to
capture the incoming request but for some reason the event is not fired at
all! I looked through the code but i could not see any obvious reasons why
that should happen. I also simulated the control array in a new project and
the event works fine.
What can it be that disables the OnComm event? (if it can be disabled...)
Shouldn't the event be fired even if the incoming data is read instantly
from the port?
Unfortunately i am not allowed to make any changes to the program apart from
the necessary parts so there is no chance to rewrite or optimise it in any
way. I can only add new bits of code to achieve this extra functionality.
Any advice on this problem or the project in general is much appreciated.
Kind regards,
Theo
.
- Follow-Ups:
- Re: MSComm control array
- From: Dick Grier
- Re: MSComm control array
- From: J French
- Re: MSComm control array
- From: Chris Kusmierz
- Re: MSComm control array
- Prev by Date: Re: Scalemode
- Next by Date: Re: RS 232 port data capture
- Previous by thread: The scope of user-defined Collections
- Next by thread: Re: MSComm control array
- Index(es):
Relevant Pages
|