LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem solving methode for VISA read timeout error

Solved!
Go to solution

Hello everyone,

I'm doing an internship and got called to repair a broken stepping motor drive, which controls different covers for a luminous measurement.

After fixing this problem I run the LabView program to test the whole functionality and the program stopped before it got to the motor control part.

My laptop doesn't have an serial port and on the measurement PC is only LabView RT + it isn't connected to any network, so I don't know any possibility to debug it. Of course they said, everything ran fine before the motor problem.

After implementing Error Handler in the Code I got the error -1073807339 VISA read timeout (Hex0xBFFF0015).
It occurs when it tries to read the measurement data from an National Light Research Radiometer ILT 1700, here is the code.

VISA Read.JPG

 

I'm new to VISA programming but for me everything seems to be right (baud rate, data bits etc.), but here is the manual for the ILT1700. So I just increased the timeout to 30 sec. Of course, it doesn't solve the Error.
So here is my Question: How can narrow down the problem? Is it the Radiometer, the PC with the LV Code or event the Cable which connects both?

Regards,
Lucas

 

 

0 Kudos
Message 1 of 8
(3,834 Views)

Hi Lucas,

 

your device seems to use some very old RS232 communication style.

In the manual is talks about "RQS", while Wikipedia mentions "RTS"

Did you read chapters 2.2.5 and 6.1? Which settings do you use?

 

Do you have any other tool being able to talk with your device? Do you know how that other tool is setting up the COM port?

 

On your image:

Why don't you use AutoCleanup? There are hidden wires…

What's the point of the case structure? You can directly connect the error wire to the loop stop terminal, and you can switch the behaviour of that terminal…

You don't need to wire default values at SerialPortConfig.

The VISA reference is missing its label…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,817 Views)

Hello GerdW,

I use the DTE setting, but like in the manual mantioned I tried DCE and after no change of the Problem switched back to DTE.
No, unfortunately I don't have any other device.

I didn't write the code on the Image, it is from 2012 and written in LV 2010. It is what I found after looking the first time in the code.
AutoCleanup is a good Idea and I think there is no point in the case stucture, but I didn't dare to change anything, except the timeout.


0 Kudos
Message 3 of 8
(3,797 Views)

I measured the data transfer with an Oscilloscope, so the problem is in the program and not in the ILT1700.
I changed the "termination character" to "0xD" (carriage return), "use termination character" to "true" and the "stop bit" to "2.0",  like it's mentioned in 4.3.4 for the termination character and 4.3.2 for the stop bit of the ILT1700 manual.
But I still got the Error.

0 Kudos
Message 4 of 8
(3,762 Views)

Hi Lucas,

 

this device seems to use those old handshaking mechanisms with RTS, CTS and DSR lines: I'm not familiar with their use for handshaking (never used such an old device)…

 

Chapter 4.3.3 has a paragraph on RTS (RQS) usage: when you set that line to HIGH your device will send data (continuously). AFAIK you can manipulate the state of RTS using a property node on the COM port VISA reference:

check.png

You can also read/write to the other lines mentioned in this old manual…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(3,751 Views)

Hi GerdW,
thank you for your help.

When i looked at the singals with the Oscilloscope i saw that the RTS and DSR is set to HIGH, when the programm want to read and there is data at the TRD pin. So the handshake seems to work, I think the problem is to read the data proberly, but maybe I'm wrong.

 

Regards,
Lucas

0 Kudos
Message 6 of 8
(3,744 Views)
Solution
Accepted by topic author LucasWolf

Does your PC have MAX?  If so, you should use MAX to "play" with your VISA port, using information from your Product Manual.  It might, for example, have an "Initialize" command that gets a "Reply" back.  Try that -- do you get a Reply?  (You do a VISA Write with MAX, then a VISA Read, and see if anything comes back).  I don't remember whether MAX lets you see the individual RS-232 lines, but it might ...

 

Bob Schor

Message 7 of 8
(3,713 Views)
Solution
Accepted by topic author LucasWolf

Thank you,
 
The PC has MAX, I played with it and solved the problem. First of all there was the wrong Serial Port configured.
Than I switched to the DCE setting (the Printer Symbol) and set the flow control to Hardware DTR/DSR.
And it works even with the old (in my opinion wrong cofiured) code.

Regards
Lucas

0 Kudos
Message 8 of 8
(3,469 Views)