gjones54 Posted February 9, 2006 Report Posted February 9, 2006 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? Quote
yonatan.tidhar Posted February 9, 2006 Report Posted February 9, 2006 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 Quote
gjones54 Posted February 9, 2006 Author Report Posted February 9, 2006 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. 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.