LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program sometimes runs when PC just turned on, the rest of the time I get VISA Timeout error.

Hello!

I'm currently trying to control a custom built machine for acoustic testing, whose interface runs on LabVIEW, however, this machine was built by someone else around 6 years ago, and he has since lost the source code, leaving me only with an executable file.

I've built the machine and installed what I believe is all the necessary software (LV Runtime Engine, Visa, NI 488), corresponding with the versions used by the machine's builder and programmer, however, after connecting all the ncessary cables and running the control program, most of the time (90%) I get a VISA Read timeout error.

The few times that the program has run and the machine started working has been after just turning on the computer and power supply for the machine, if I exit the program and try to run it again, I get the error.

I'm a mechanical engineering student with very little LV knowledge (really only that which I've acquired so far in trying to get this thing to work) so I apologize in advance if I've said anything completely wrong or am missing any obvious pitfalls.

I've attached screen captures of the programs interface and the error, as well as the NI MAX test suggested in another forum post to test communication.

 

Thanks in advance, hopeful Faust.

 

2 Error Timeout.png5 Debug.png

0 Kudos
Message 1 of 6
(2,954 Views)

Without code, there really isn't much to do, since it's mostly guesswork and blind shots. You mention it runs when you have just booted it, do you know if any other software that uses the COM port auto-starts at boot? If the .exe "wins" the race for the COM port, that might be the problem. Since you mention it works a few times, we can assume baud rate, parity and the such are correct. Have you tried starting windows in fail-safe mode and see if it works?

0 Kudos
Message 2 of 6
(2,929 Views)

hi,

   First of all check whether you have installed proper device drivers for effective communication.if device drivers are not properly installed or if some dll's are missing then you may get this error.  these error may occur if you have windows firewall restrictions and antivirus. Add full permission to your device and check whether you get the same error.

 

It will be more helpfull if you specify the interface (USB or RS232 etc )

 

 

Kudos Welcome 🙂

 

Certified-LabVIEW-Associate-Dev_rgb (2).jpg 

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
0 Kudos
Message 3 of 6
(2,886 Views)

Hello! I hadn't had access to the machine since friday until today, I've now tried running in failsafe mode to no avail, the program couldn't communicate with either instrument needed for the measurements.

 

I also made sure to reassign the cable's COM port into one apparently not in use even after the computer had been on for a while, although I can't say for sure that would fix the race problem if that is the case, would this be a viable solution to that?

 

I am not aware of any other softwae that might be using the COM ports, and there's nothing else connected in the USB ports.

0 Kudos
Message 4 of 6
(2,850 Views)

I think I have installed the proper drivers, I'm trying to communicate with two instruments, a NORSONIC Nor840 Realtime Analyser, with which I've had no communication issues so far, and the purpose-built machine, which is the one producing the timeout error. Attached is a screen cap. of the software installed that shows up on MAX.

 

The control box (not sure what to call it) of the machine has a PIC microcontroller inside of it, of the model PIC16F876A, and to communicate between the machine and the computer I'm using a USB to RS232 serial cable, at first I thought it might my be the cable, so I replaced it, but the problem persisted, I've tried with drivers that came with the cable, and with drivers downloaded from the cable's chip manufacturer website, which are the ones installed as of now.

 

Could it maybe be the age of the PIC or some kind of false contact?

I've yet to try with adding full permisison, I do not know the admin password to change it and my user lacks admin priviliges, the boss should come into the lab later today and I'll try that then.

 

Thanks for the replies guys.

Salutations, Fausto

6 Software Instalado.png

0 Kudos
Message 5 of 6
(2,845 Views)

@Faustiño wrote:

I I'm using a USB to RS232 serial cable,


Is the USB to serial adaptor on the proper com port?

 

Check the devices and interface settings in MAX on the old computer and make sure the USB to Serial adaptor is on the same com port and using the same VISA alias if an alias is used.

 

Sometimes Windows will do stupid things like if you move a USB to Serial adaptor from one USB port to another Windows will put it on a different Com port.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(2,831 Views)