Hello,
I have attached the jpg for a simple test I had carried out. I am writing a custom command to an external hardware and waiting for a response from the hardware.
As you may see in the block diagram, I am waiting for a response from the external hardware in the 4th frame. In the 5th frame I calculate the waiting time. The 4th frame also informs us that there is data in the serial port that has to be read. Yet I need to introduce an empirical delay (405 ms) befoer I can read the data. Does anyone have an explanation/theory why I need to add this delay while switching from Write to Read in the PDA ?
Similarly, I introduced a Case structure inside the WHILE loop of the 4th frame that was driven by the current lo
gic. Inside the TRUE case I inserted the 7th frame logic. This did not work either. Any explanations?
And lastly I ran this program multiple times at different time delays. If I reduced the time delay sufficiently, then after a few runs (approx 3-5), the program hangs. I am closing the serial port though it does not appear in the current diagram . Am I doing something wrong with the serial port handling ?
Thanks for all the help that you can provide. I am open to any explanation that you may have regarding WinCE/PocketPC etc.