Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Error 1073807339

Hi everyone,

 

I haven't been able to fix this error problem that I have seen a lot of people post in this forum:

 

Error -1073807339 occurred at VISA Read in Serial Read with Timeout.vi->Serial Communication.vi->TestLoops.vi

 

Possible reason(s):

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

It lists that the problem is in my VISA Read.  I've gone onto the site below in hopes of trying to fix the problem:

 

http://digital.ni.com/public.nsf/allkb/E6DFA2B8D7E99F9886256C14005E82F7?OpenDocument

 

Even when I narrow it down to reading only 1 byte while debugging it is still giving me the same error.  I tried to see if I could see the number of bytes in the Serial Port by following the above site's instruction but I don't believe it's the right version since I couldn't follow along with their:

 

"Right-click the Property Node and select Select VISA Class»I/O Session»Serial Instr. Then right-click the Property Node and select Properties»Serial Settings»Number of Bytes at Serial Port"

 

I also tried to increase the timeout value to the best of my knowledge.  I have attached the appropriate VIs from which the error is occuring.  Thanks!

 

Jon

0 Kudos
Message 1 of 12
(4,289 Views)

Most of the time, the cause of a timeout is with the write. You could have the wrong com settings, wrong type of serial cable, the wrong command, or the wrong termination character. Any of these will cause the instrument to not respond. Ypu have not mentioned the make and model of the instrument. You have not provided the manual. You have not provided the VI called TestLoops. The only command that I can see is thewrite string of 'Jon'.  Are you actually sending that to an instrument? Also, you have a '>' for a read termination character but you are sending a carriage return as the write termination character.

0 Kudos
Message 2 of 12
(4,283 Views)

Hi Dennis,

 

Thanks for the note.  I'm using a New Focus Picomotor model 8751-C.  Attached is the TestLoops VI.  The write string 'Jon' (Enable Joystick Control), I believe, is the syntax for Joystick Control Command (I'm using a Picomotor control command not a joystick control commands).

 

Thanks,

Jon

0 Kudos
Message 3 of 12
(4,279 Views)

I had the same problem with serial control of my DUT. All I had to do to fix it was to go to the Open Serial Visa and increase the timeout time to something longer than it took for the device to respond, when the command was issued manually. In my case the device took 6 seconds to respond to a query and the serial timeout was set to 2 sec. try increasing the serial timeout and see if that fixes the problem.

0 Kudos
Message 4 of 12
(4,276 Views)

Hi SunshineDesign,

 

Thanks for the reply.  I'm new at this so bear with me here.  When you mean 'increasing the serial timeout' does that mean in my Serial Read with Timeout VI?  I attached a .JPG file where I tried to change the time there.  Did I have that correct?  If so, then increasing the timeout did not affect it.  I even went up to 12 seconds with no success. 

 

Jon

0 Kudos
Message 5 of 12
(4,272 Views)

It may be the same as with the Visa Serial Port Configuration, which has the timeout wired on top. Have you tried the command manually to see how the unit actually responds. When I have serial comm issues, I check everything manually to validate my assumptions about how the interface works. I assume nothing. In another case it won't respond unless the port gets only hex chars, others ASCII only. Terminations for command and queries don't always have common terminators. If the write command is not terminated properly, the read will never work. The serial "bytes at port" is a property node in the VISA Serial port section of the controls.

0 Kudos
Message 6 of 12
(4,266 Views)

Hi Dennis,

 

I'm trying to understand these termination characters and carriage returns.  So since I am using windows would I need to change these to \r\n instead of '>' for the termination character and carriage returns for my write term char for both of my Serial Communication.VI and VISA Configure Serial Port.VI?  And yes the commands are being sent to the instrument.  Thanks.

 

Jon

0 Kudos
Message 7 of 12
(4,256 Views)

The write and read termination characters are defined by the instrument vendor and have nothing to do with windows. It should be defined in the manual.

 

How do you know the commands are being sent to the instrument? If it is just because you don't get an error on the write, that is meaningless.

0 Kudos
Message 8 of 12
(4,253 Views)

I am using a program that was being used before on the same instrument.  So I have been able to send commands to the instruments.  What I've had to do was just reconfigure the user inputs and movements in the TestLoops.vi.  I hope that makes sense.  Thanks.

0 Kudos
Message 9 of 12
(4,248 Views)

Sorry, I don't have the hardware or the manual so I can't really provide more specific help. Have you tried using a terminal emulation program such as Hyperterminal/Procomm/Putty? Since you say you inherited the program, at one time it must have done reads as well as writes. What changed since you took over? Same instrument, same cabling, same pc?

 

p.s. That top level test program called TestLoops is somewhat poorly written. No error checking except the automatic type and of course your execute button does nothing once the VI starts. In your subVI, you also reconfigure the serial port and close it. This should only be done once - at the top level VI.

0 Kudos
Message 10 of 12
(4,244 Views)

Thanks for the help again.  I'll look into the terminal emulation program...I'm new in LabView so please bear with me while I'm trying to understand these terms.  Everything worked and everything is the same, the only thing that changed was that it kept giving me the same error when I was running TestLoops.vi step by step via 'Highlight Execution'.  The motor will still move if I ignore the error but it stops and gives me the error at every Serial Communication Port in my TestLoops.vi so I obviously need to get it fixed.  Thanks.

0 Kudos
Message 11 of 12
(648 Views)

Hi Dennis,

 

I didn't notice you 'p.s.' until now.  I had known that the execute button does nothing and was trying to think of a solution where it doesn't run until I hit the 'Execute'.  Do I need to put that in a loop of sorts in order to run it the way I want?

 

'In your subVI, you also reconfigure the serial port and close it.'  I'm not quite understanding this but I'll take a look around and see what info I can find online.  Thanks.

 

Jon

0 Kudos
Message 12 of 12
(641 Views)