nightdweller Posted August 13, 2004 Report Share Posted August 13, 2004 Hello Everyone, I currently have 3 parallel processes. 1) handles the user interface. 2) Make calls to the device, and writes it's data to a file. 3) Acquires the sense voltage. 1 & 2 are correlated in some way(same devices), and I would like to synchronize it's task so that it does not do read and writes concurrently. I used a Semophore to seperate the task. However, the problem is that I am not writing to the file at precisely one second, it is off by +15ms every 5 seconds or so. I am considering using a Rendevous instead of a Semaphore, is this the right approach? Thanks in advance. Vince Quote Link to comment
nightdweller Posted August 16, 2004 Author Report Share Posted August 16, 2004 Hey nevermind. The problem I had was that I set the timeout for event structure to be 100ms. Once I changed that to 99ms it was pretty accurate. I am still using a semaphore. The main problem I have now is that I don't have access to the hardware we are using, so I've been running in simulation mode. I am quite sure the timing will be influenced by the hardware, and other processes that utilize window's resources. What methods are there to make sure that I write the file at appropriate times. :question: I would hate to recompensate the timeout everytime there is a hardware change. Thanks Again, Vince Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.