LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermitent VISA Write error - Pulling hair out

Solved!
Go to solution
Solution
Accepted by dacad
Sorry, I looked at the VI and did not notice the image.

I don't think I've ever had a timeout on a write. Getting any sort of error on a write is next to impossible. Since enabling the termination character only affects a read, I can't see how this will make a difference. Besides doing the configure only once, you could see if there's an updated driver for the serial card.

I just thought of a reason to get a write timeout. I'm using a phone right now so I can't look at the VI and I don't remember but are you using handshaking? A problem there could cause a timeout.
Message 11 of 28
(1,369 Views)

Will check for a newer driver. Hadn't thought of that.

 

No Handshaking,   9600 Baud, 8 Data bits, No Parity, 1 Stop Bit, No Flow Control.

 

Have tried swapping ports one more time to see if that affects it.  I have had some devices that are not as stable on higher port numbers, by that I mean anything above Com 1 or Com 2.

 

--------

 

Just looked, there is indeed a newer driver.  WIll install it shortly and hope and hope and hope that it will resolve the issue.

 

Thanks for that thought......

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 12 of 28
(1,355 Views)
Another thought is to turn on NI-Trace/Spy. As I said, it's next to impossible to get a write timeout. Typically, you can do writes all day long even without an instrument connected.
0 Kudos
Message 13 of 28
(1,348 Views)

Try increasing the VISA timeout:

 

http://digital.ni.com/public.nsf/websearch/E4F90AD24DEC9CC786256F4300605C02?OpenDocument

http://www.medicollector.com
0 Kudos
Message 14 of 28
(1,335 Views)

Glad I have figured out how to do the next to impossible and create these write timeouts.  Not the superpower I was hoping for though.

 

Installed the updated driver and the system just started back up.  Crossing my fingers.

 

Am not familiar with using NI-Trace/Spy so will have to look at that and figure out how to use it and then figure out what it is going to tell me.

 

Timeout is already at 5 full seconds.  Was at 10 but I reduced it several debugging steps ago thinking that it may have been intruding on itself (one of those outside the box thoughts)

 

I have watched it error out.  Takes a small fraction of a second to working correctly to error on screen so I don't believe increasing it back is going to impact it.

 

I hear what you are saying about it being hard to generate a write timeout which makes all the more frustraating.  Am pinning all my hopes on the driver update at this point.  If that doesn't work, am going to order a different IO card.

 

No thoughts on adding the Clear Buffer before the Write ?

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 15 of 28
(1,320 Views)

Looking at the datasheet (for whatever its really worth) the 128byte buffer seems like a possible source for a write tmo error.

 

Try setting the VISA buffer to 128

try writing in chunks no larger that 128 bytes (encluding term chars which, you will need to do manually since you don't want them every 128th char of tx)

Try better hardware

let us know what you find


"Should be" isn't "Is" -Jay
0 Kudos
Message 16 of 28
(1,306 Views)