LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Configure Serial Port takes too long to timeout

Hi,
I'm having an issue with the Visa Configure Serial Port VI hanging my porgram.   Here are the details:

I have a device that allows me to have remote "serial ports", (actually connected over ethernet).  As long as that device is powered on, there is no problem.  TWhen that device is off, obviously I am unable to initialize or write to any of those ports (I have them mapped to com 11-18).  The problem is, I when I call the Visa Configure Serial Port VI and the device is not powered, it hangs for 20 seconds before giving the following error:


Error -1073807360 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->HeaterSerialWriteRead.vi

Possible reason(s):

VISA:  (Hex 0xBFFF0000) Unknown system error (miscellaneous error).


I have 1000 (1 sec) wired to the timeout terminal, but even reducing this to say, 10ms makes no difference; it still takes 20 seconds for the error to occur and the program to continue.

Does anyone know why this might be?  Any ideas how I can work around it?

Thanks
Bjorn
0 Kudos
Message 1 of 11
(4,995 Views)
Create a property node for the VISA control and set the "Timeout" property to something like 1000ms.
 
That will take care of the hang up.
0 Kudos
Message 2 of 11
(4,989 Views)
I'm not finding any "Timeout" property for the VISA control.

Forgot to mention I'm running labvew 7.1
0 Kudos
Message 3 of 11
(4,982 Views)
That seems strange.  Perhaps it has something to do with the ethernet conversion down the road?

The Configure Serial Port vi is just a wrapper for a number of properties for the VISA resource you wire to it.  If you open it up, you can see all the properties used as the inputs to Configure Serial Port.

If you check out the context help for "General Settings: Timeout Value", it says:

"This property specifies the minimum timout value, in milliseconds, to use when addressing the device.  Note that the actual timeout used may be higher than the one requested."

I know this isn't much help to you, but maybe someone more knowledgable than myself could elaborate on why this is so.
0 Kudos
Message 4 of 11
(4,968 Views)
Ah, yea I had opened the Configure Serial Port vi, and noticed it was just a property node wrapper, but didn't read the help and realize it was a *minimum* timeout.  Bummer.
0 Kudos
Message 5 of 11
(4,962 Views)
Yeah, no kidding.  I'm hoping for your sake that we're missing something.

I'm still a bit mystified as to why the timout may not be what you tell it to be.  Does anyone have any idea why this might be so?
0 Kudos
Message 6 of 11
(4,952 Views)

Hi,

Unfortunately, there is no way for us to guarantee a maximum timeout. It can depend on the operating system, what is currently running on the machine, and the hardware. This is why we can only give a minimum value, because something else could be in control of the timeout, of how long until the driver stops trying to perform the current operation.

VISA may only have a timeout of a millisecond, but the driver for the ethernet-serial port probably has the 20 second timeout. Most likely because it tries to connect to the remote device several times before failing. Ethernet timeouts are usually in the seconds range. Possibly this timeout is configurable by the hardware driver.

I hope this helps!

Regards,

Missy S.
Project Engineer
RoviSys
0 Kudos
Message 7 of 11
(4,925 Views)
ah, thanks for the explaination of why the timeout is working this way.  I will look into the configuration of my device and see if there is a timeout parameter I can adjust.
0 Kudos
Message 8 of 11
(4,918 Views)
I don't have a way to test this right now but what about the VI "VISA Find Resource.vi".  If you specify the exact resource it should find it.  But I don't know if it just checks if the resource is in max, and it also might show the same delay if the device is not powered up.  But it may be worth a try.  If it can't find the resource there is no sense in tring to configure it.
0 Kudos
Message 9 of 11
(4,916 Views)

"I have a device that allows me to have remote "serial ports", (actually connected over ethernet).  As long as that device is powered on, there is no problem. "

If it is a remote device over ethernet, can you Ping it to see if it is on?

Message 10 of 11
(4,912 Views)