03-23-2006 11:51 PM
03-24-2006 03:14 AM - edited 03-24-2006 03:14 AM
Message Edited by LuI on 03-24-2006 10:22 AM
03-24-2006 11:47 AM
Uwe,
Thanks for your response. I am using a 2.2GHz Pentium 4 machine running Windows 2k, programming in a LabView 7.1 environment. Looks like my assumption that everybody else must also be using the same programming environment was invalid. 😉
The three suggestions you provided are good ones, and I've actually already tried them. There are some finicky timing considerations which I think I have captured; I am currently sending the entire command as a single string; and I have implemented termination character identification. These three implements have dramatically improved stability over the previous version of this code. What happens now is that the code will run for hours and hours, happily communicating with the T502 once every 3 seconds, but then eventually - and intermittently - the write string will be sent, and nothing will be received. Communication is entirely lost from that point on (aside from an occasional XON signal from the chiller).
I will try increasing the UART buffer size - that sounds like it may be the best option. If that doesn't fix the problem, I'll try your suggestion about sending a single character at a time.
Incidentally, if transmission is too fast, why not just use a lower baud rate?
Thanks, Tom
P.S. Where in Germany are you located? I was there many years ago. Pretty country, Deutschland...
03-24-2006 02:01 PM
03-26-2006 12:28 PM
Thanks for the suggestions. I've tried a few different things:
1. Sent characters individually with 1ms timing between each. This satisfied (in the absence of any major timing glitches) the <10ms transmission delay between characters, but I still encountered an unrecoverable loss of communication. I unfortunately didn't have a log set up to measure the actual intervals, but based on data mentioned below, I'm inclined to think long delays are not the root cause.
2. Set the UART I/O buffers to the max (32764?); still encountered an unrecoverable communication loss.
3. Set the baud rate to 19200; this resulted in an immediate _recoverable_ loss of communication.
4. Set the baud rate to 4800; this resulted in an immediate _unrecoverable_ loss of communication.
5. Repeating #1 above, but am using a 100ms interval between each character. It's running smoothly so far, but it's too early to tell; I usually have to wait some number of hours before communication craps out.
If this last item doesn't work for preventing the problem, I'm pretty much out of options for preventing the problem. Automatic recovery would also be acceptable, however. Does anyone have any suggestions on how to re-establish communication with the chiller via software? I have tried some things like closing and re-opening the serial port, but none have been successful and thus far there's really not much method to my madness.
Regards, Tom
03-27-2006 01:10 AM
The baud rate limits the maximum transmission rate on a channel, but
must fit on both sides of the channel. So you cannot change it in your
VI and leave it at the device...
04-04-2006 02:27 PM
Just wanted to say thanks belatedly to those who offered their inputs ... I think I've got the problem fixed. Ended up sending one character at a time with a 50ms pause in between each send, and I haven't seen a comm failure since I made that change. All the insight was much appreciated.
Tom
04-10-2006 06:36 AM