Re: Semi-multithreaded application in VB6
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Mon, 19 Dec 2005 13:06:23 -0800
"Matthias Julius" <jnews@xxxxxxxxxxxxxx> wrote in message
news:uzmmxqfpp.fsf@xxxxxxxxxxxxxxxxx
> "Steve Gerrard" <mynamehere@xxxxxxxxxxx> writes:
>
>
> Those libraries control a motion system and wait most of their time
> for that to finish its motion. I would hope they don't do busy
> waiting. But, I don't know.
>
IF they are doing I/O, they probably do yield to the OS and allowing messaging,
etc. so your events can probably get processed.
>
> The software is contolling a machine. The cycle takes about 30 s to
> complete. Most of this time are wait times, either waiting for
> external hardware or programmed delays. So, wasted CPU cycles for
> checking are probably not an issue.
>
> But, I need the operator to be able to abort the cycle at virtually
> any time. And there are also events from the hardware where the cycle
> needs to stop. Some conditions allow the cycle to be continued after
> they go away. So, I need to do the checking and handling for those
> events in each sub that might have break points in it to be able to
> coninue at the same spot.
>
The picture becomes clearer. I am reading between the lines here, but it sounds
like your code is generating a series of instructions to the external machine.
I am thinking that you could adopt a model where you first generated a sequence
of instructions and stored them in an array, then went to a loop that send each
instruction in turn, with checks for cancel, etc. in between.
If part of the code is responding to feedback from the machine to generate
further instructions, this may still be worth while. Just regenerate the rest of
the list of instructions, then go back to the send-each-instruction loop.
I would bet that generating the list of steps, without other interaction, would
be plenty fast enough.
Is something like this a possible approach?
.
- References:
- Semi-multithreaded application in VB6
- From: Matthias Julius
- Re: Semi-multithreaded application in VB6
- From: J French
- Re: Semi-multithreaded application in VB6
- From: Matthias Julius
- Re: Semi-multithreaded application in VB6
- From: J French
- Re: Semi-multithreaded application in VB6
- From: Matthias Julius
- Re: Semi-multithreaded application in VB6
- From: Steve Gerrard
- Re: Semi-multithreaded application in VB6
- From: Matthias Julius
- Re: Semi-multithreaded application in VB6
- From: Steve Gerrard
- Re: Semi-multithreaded application in VB6
- From: Matthias Julius
- Semi-multithreaded application in VB6
- Prev by Date: BAD DLL calling convention - won't work in VB IDE
- Next by Date: Re: Fastest Date Sort
- Previous by thread: Re: Semi-multithreaded application in VB6
- Next by thread: Re: Semi-multithreaded application in VB6
- Index(es):
Relevant Pages
|