I am doing the following thing.
is there an object signaled
yes, send a frame on the CAN
//the time is measured between the signalling of the
object and the sending of the frame
check if is there any timeout
}while(!timeout && !finished)
This is the function briefly. My problem is I have onlyQuote:}
limited time to send out that frame. In the most of the
times that is sent after 600usec, but sometimes it takes
more than 25msec (etc. once in 10'000 execution) and the
other side will abort the communication, because it's a
How I can see two problem what can happen.
1. My program is running and at once my program loses the
CPU and the windows will execute an other task and my
program will get the back the control too late.
2. The card what is responsible for the communication
doesn't handle the receiveng properly, sometimes it
notices the program too late.
My opinion is I have the first situation.
My question is: Is there any possibility to not let to
stop the execution of my program in special cases or
control the time when I will get it back. For me it seems
to be not possible.
If it's not possible then is there any other way to make
sure my program will get the control back before a certain
Until this I tried to change the priorities, but if I
increased the system was much more more instable. My
program was running more for certain time, but the
execution of other tasks was bigger too, so the program
The program was written on C++ Builder, console mode.
The program was tested on different platforms, but most
stable platform was the XP.
For the communication a CanCard2 is used. (produced by
It would be really urgent!