Jump to content

Serial read problem in LV 7.1


anacche

Recommended Posts

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

:)

Link to comment
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?

Link to comment

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.

Link to comment

GOT IT!!!

It was the termination character!!! :D

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.