anacche Posted October 4, 2006 Report Posted October 4, 2006 I am reading a device with a rs232 interface 4800 baud 8/1/n/1 no handshake control By a probe on bytes at serial port it says 600 - 700 bytes, but the instruction VISA read serial port, with the output of Bytes At Serial Port connected, returns 6-10 bytes and sometimes hangs. Hyperterminal works correctly, bytes not read are in the serial buffer anyone who can help me with some hints? thanks anacche Quote
crelf Posted October 4, 2006 Report Posted October 4, 2006 By a probe on bytes at serial port it says 600 - 700 bytes, but the instruction VISA read serial port, with the output of Bytes At Serial Port connected, returns 6-10 bytes and sometimes hangs. Can you post your code or at least a screen shot so we can diagnose your issue? Quote
AnalogKid2DigitalMan Posted October 4, 2006 Report Posted October 4, 2006 Are you using the correct termination character upon read to correctly parse the data? The instrument manual should define what character(s) are required. Usually \r\n Quote
Donald Posted October 5, 2006 Report Posted October 5, 2006 VISA serial read terminates when one of following conditions is true - there is a time-out - the end-of-message character is found (default this is a linefeed) - the requested number of bytes is available I guess you should turn off the end-of-message character detection or redefine the character. You shoud do this when you initialise the serial port (VISA config serial port.vi) or before the read action with a property node of class Serial Comm. Good luck. Quote
anacche Posted October 5, 2006 Author Report Posted October 5, 2006 GOT IT!!! It was the termination character!!! Thanks... I used serial & visa before but this never happened. Just setting it to "false" in VISA config serial port.vi solved the problem Thanks a lot again Massimo VISA serial read terminates when one of following conditions is true- there is a time-out - the end-of-message character is found (default this is a linefeed) - the requested number of bytes is available I guess you should turn off the end-of-message character detection or redefine the character. You shoud do this when you initialise the serial port (VISA config serial port.vi) or before the read action with a property node of class Serial Comm. Good luck. Quote
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.