Jump to content

LabVIEW hang on VISA instr property


bbean

Recommended Posts

I have an issue where reading the VISA Instr Property "Intf Type" of a USB Instrument hangs for about 40 secs:

image.png.9ef44f592496f4f476e4283bf033758c.png

followed by an asynchronous VISA Write hang for 2+ minutes!  The timeout on the VISA instr session is set to 1000ms.   Here are the other details of the session:

image.png.0c236366c08bfbd8820d54a1e25b6be2.png

and here's a snip of the VI:

image.png.f9de46c68c64e8f869afdc453baee7a1.png

 

Any idea why these long timeouts are occurring?    or why the 1000ms timeout is being violated for both the Instr property call (no idea what goes on under the hood here) or the VISA write. 

 

Link to comment

I don't have anything to add other than I've seen this but not in any recent projects I've worked on.  It always frustrated me when I'd drill into some VI that was taking forever and it would be some property node or Read/Write/Open that was supposed to have a small timeout.

Link to comment
1 hour ago, bbean said:

I have an issue where reading the VISA Instr Property "Intf Type" of a USB Instrument hangs for about 40 secs:

image.png.9ef44f592496f4f476e4283bf033758c.png

followed by an asynchronous VISA Write hang for 2+ minutes!  The timeout on the VISA instr session is set to 1000ms.   Here are the other details of the session:

image.png.0c236366c08bfbd8820d54a1e25b6be2.png

and here's a snip of the VI:

image.png.f9de46c68c64e8f869afdc453baee7a1.png

Any idea why these long timeouts are occurring?    or why the 1000ms timeout is being violated for both the Instr property call (no idea what goes on under the hood here) or the VISA write. 

An USB device implementing the TMC class! That looks very much like the underlaying USB session itself somehow got borked. Once VISA calls into the Windows USB driver it can only hope that this driver will return within a reasonable time. If the driver detects some problem with the hardware resource it just can hang there and VISA only can wait until the Windows driver decides it wants to return. Unfortunately the fact that it is a Thorlabs device (from the VID and PID in the USB session name it must be a PM320E Optical Power and Energy Meter) doesn't increase my confidence in the actual hardware interface. Their physical hardware is amazing in what it can and does, their electronics and firmware is a lot less impressive.

Personally I guess some previous command you send hasn't been fully processed by the device, or you haven't read the entire response, or haven't reset a status flag in the device or something like that. These things all shouldn't be able to lock up the USB interface, but they can and sometimes do.

 

Edited by Rolf Kalbermatter
Link to comment
9 hours ago, hooovahh said:

I don't have anything to add other than I've seen this but not in any recent projects I've worked on.  It always frustrated me when I'd drill into some VI that was taking forever and it would be some property node or Read/Write/Open that was supposed to have a small timeout.

Thanks for the quick response.  its a rather annoying problem.

7 hours ago, Rolf Kalbermatter said:

Once VISA calls into the Windows USB driver it can only hope that this driver will return within a reasonable time. I

7 hours ago, Rolf Kalbermatter said:

Personally I guess some previous command you send hasn't been fully processed by the device, or you haven't read the entire response, or haven't reset a status flag in the device or something like that. These things all shouldn't be able to lock up the USB interface, but they can and sometimes do.

I think this may have been the problem but wont know until I test again on Monday.  You are correct that its a PM320E.  And so far their driver has been a pain.  The suspect command is the error query the parent class implements by default "SYST:ERR?" but PM320E requires ":SYST:ERR?".  A nuance (nuisance) that I failed to notice.

PS.  I think I may have borked the instrument up by upgrading the firmware too.  Oh well thats what you get for trying to get something done before a holiday weekend.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.