Jump to content

Another Serial Read Issue


gjones54

Recommended Posts

I can write to the serial port but cannot read using Labview. I've tried the various example VIs but still no luck. I keep getting a timeout error (left at default of 10 seconds)

I verified that NI-MAX can read and write to the serial ports I am using. It opens a VISA session fine, and all is well in NI-MAX.

I also verified that I can perform a write in Labview and in NI-MAX I succesfully read the buffer. However, when I tried the reverse (write in NI-MAX; read in Labview), I still get the timeout error code.

I'm using Labview 7.0. I have a null modem cable (verified both by ohming it out to verify the wires were crossed and looked up part number (RS232 61601)). The null modem cable is going between two serial ports on the same system. These serial ports are part of a PCI add-in card (only one port on the motherboard which is already being used). Per a comment in another post, I upgraded to the latest version of NI-VISA (3.4), and that did not help.

In the example VIs, I am not changing any of the settings from the default (9600 baud; 8 bits; 1 stop bit; no parity; no flow control). My settings in Device Manager and NI-MAX match these settings.

Any ideas on what could be causing my read error in Labview but not NI-MAX?

Link to comment

did you read any byte at all?

if you try to read more bytes than you write you will get timeout error

what example are you using?

try to use "C:\Program Files\National Instruments\LabVIEW 7.1\examples\instr\smplserl.llb\Basic Serial Write and Read.vi" example

and see if you get any results

i think you cant use the same serial port together at MAX and LabVIEW

Link to comment

No byte at all when using their basic example.

However, I did try a VI I found on the web (full duplex bandwidth tester; forgot the source link), and it was returning code and had the timeout issue after I removed the looping code. However, your comment explains why. What I cannot explain is why that code worked since it looks very similar.

I'll take a closer look since there has to be some difference however small. Thanks for the tip.

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.