LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview gpib timeout when calling cvi dll

Equipment used :
 
VXI Rack with Slot 0 controller
Labview V5.0.1
Lab Windows V5.0.1
GPIB controlled Power10 I63 PSU
 
We run an intermediate Labview driver which communicates with a low level CVI driver (dll) to control a PSU.  We recently tried to run the Labview driver on a Slot 0 controller and we get timeout errors when waiting for a response after commanding the PSU to switch off ( "CST OFF" is sent , and the driver waits on "ST OFF" being returned - it never does and times out).  Ni Spy is on when it fails.  In the same driver, a call to return the Instrument ID is carried out happily, with the ID being returned with no errors.
 
I can run the low level CVI driver with an interactive script and it works fine with no errors.
 
I can run the Labview driver with NI Spy switched off and it works ok too,  Our customer cannot get it to work even with Ni Spy switched off.  They have the same setup as us.
 
Any ideas?
0 Kudos
Message 1 of 8
(3,578 Views)
Hi,

Unfortunately, neither myself nor any of my colleagues have had experience with this PSU or its drivers. Additionally, I don't have access to version 5 of CVI as we don't support it any more (we currently support back to 7). Perhaps someone else on the forums can offer some assistance on this matter.

It might also be worth getting in touch with the manufacturer of the instrument to get some more information from them on what might be going wrong.

Sorry we can't be of more assistance at this time!

Regards,
Tom

Applications Engineering, NI UK
Message 2 of 8
(3,549 Views)
Thanks for the reply, but I think I solved the problem this afternoon.  I found another thread about the timeout error, and added a viClear command at the start of every function that carries out a viWrite then viRead, and this worked on all occasions even when NI Spy was running in the background.  I have sent the DLL to my customer for him to try out and hopefully this will fix it at his end too.
0 Kudos
Message 3 of 8
(3,543 Views)
That's great news! I hope it works out for your customer too!
Tom

Applications Engineering, NI UK
0 Kudos
Message 4 of 8
(3,532 Views)

The solution I had previously documented only partly worked.  It cleared the timeout error, but I am still experiencing various errors in testing the PSU with Labview (still no problems with running the functions with Labwindows directly).  Also, if NISpy is running I see no errors, which still leads me to believe its a timing problem.  I saw another thread on here from someone with similar problems and I tried all the recomendations in that, but it still did not fix it.  The last recomendation was to re-write the GPIB driver to slow down the message transfer to the instrument! 

 

A link to the thread with similar problems to mine.....

 

http://forums.ni.com/ni/board/message?board.id=140&message.id=20031

Message Edited by edinsofty1 on 09-09-2008 07:21 AM
Message Edited by edinsofty1 on 09-09-2008 07:21 AM
0 Kudos
Message 5 of 8
(3,457 Views)

Hi,

 

I have found a few occurances of this issue.  Unfortunately most of them aren't much more informative than saying add delays!  However one mentioned using IBCMD as this would let you delay the commands.  I don't know if this is of any use to you though if you have already written everything as this would also require a re-write.  I couldn't help notice the simplest looking solution on the other thread was to call the dll through another that introduced a delay into the system.  Did this not work either?

 

Regards,

James Mc
========
Ask me about Rust & NI Hardware
My writings are at https://www.wiresmithtech.com/devs/
Message 6 of 8
(3,434 Views)

I may have just found a solution this morning!  I tried one last thing before giving up and that was to add a delay before every VISA command which communicated with the instrument.  i set the delay to 100ms and it appeared to work.......time will tell!  I have sent the updated driver to my customer again and I am currently awaiting his feedback.

 

***UPDATE *** customer just phoned to say it appears to have fixed the failures on his Test Set!

 

Message Edited by edinsofty1 on 09-11-2008 05:39 AM
0 Kudos
Message 7 of 8
(3,430 Views)

Excellent!  Glad to hear that.  Lets hope thats it this time!

 

Regards,

James Mc
========
Ask me about Rust & NI Hardware
My writings are at https://www.wiresmithtech.com/devs/
0 Kudos
Message 8 of 8
(3,427 Views)