11-24-2014 12:42 PM - edited 11-24-2014 12:54 PM
In my application I need to read an instrument via a USB serial COM (an Heidenhain ND 280).
When I run a VI alone that just Write and Read the needed data it works fine (see attached). But when the main Vi runs and this runsin a SubVi it always gives a Timeout error on the VISA read after some time.I don't get what causes that.
EDIT : In fact even alone it will give a timeout error after some time. I just let it run for 30 minutes and it gave one. It just seems longer to appen than when the full program runs.
Thank you,
Solved! Go to Solution.
11-24-2014 01:39 PM
You should use the VISA Resource out of the Configure Serial Port in your loop. That would also make sure the read and write happen after the serial port is configured.
Since you are using a USB-Serial adapter, go check your USB power settings in the Windows Device Manager. Windows 7 introduced this "feature" where the USB hub will be randomly powered off. Make sure that is disabled.
11-24-2014 02:33 PM
I have had many bad experiences with the USB to serial adapters. Especially the ones that use the Prolithic drivers. The drivers randomly lock up. This could also be the case for you.
11-24-2014 02:46 PM - edited 11-24-2014 02:51 PM
I do not have an adapter. My instrument can be pluggued serial or USB with a usb driver :
Found the driver on the manufacturer website.
I wasnt really clear, see as writen is the manual of the device :
'The ND 280 features two serial interfaces : RS_232 and USB (UART, X32)'
I did the Windows device manager thing just in case.
11-24-2014 02:56 PM
11-24-2014 03:04 PM
So be it if it is. I'm just telling you what i'm using and that I don't have a physical adapter between my device and my computer.
11-24-2014 08:31 PM - edited 11-24-2014 08:33 PM
This is best USB to serial adapter I ever worked on. This error has nothing to do with timeout error. Yes its true it goes to sleep to save power. In control panel uncheck the sleep option from power management.
Main reason you are getting timeout is only have following reason
1. Number of bytes not comes within timeout.
2. Implementation of your VI.(The way you write your logic based on your appearing data)
11-26-2014 08:03 AM
Is there a way to change the timeout time of the VISA read?
Or could it be because I'm trying to read too fast?
Thank you,
11-26-2014 08:26 AM
11-26-2014 09:07 AM - edited 11-26-2014 09:08 AM
I went back to just testing it alone until it works for now :
The graph is just for me to know when the error occured.