Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to communicate with equipment using GPIB-USB-HS

Solved!
Go to solution

Hi nitad54448,

 

Maybe you posted the wrong file? Maybe you don't have the same Keithley 181?

 

What you posted has no instrument specific commands related to the Keithley 181.  At fi In the 5 message in this thread is a screen shot of the only commands that the K181 understands.  None of those are anywhere in the "driver" you posted.

 

A driver should support a big whack of all instrument features, and the examples should work.  If you open an instrument drivers VI tree, you would expect the VIs contained inside to do what they claim.  Try any of the VIs in file you posted and not one of them does anything remotely relevant to the K181. They all contain IEEE 488.2 and SCPI commands for a voltmeter, but  not commands for the K181 specifically.  So its not a K181 driver IMHO.

 

no_a_driver_vi_tree.jpg

 Keithley-181_L.png

 

 

 

 

0 Kudos
Message 11 of 16
(1,465 Views)

oops, yes I might have posted a wrong file.

the original file is here

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/keithley-181/td-p/650373

(I am using for 9 years now 🙂 )

 

0 Kudos
Message 12 of 16
(1,459 Views)

Hi everyone,

 

Last night I discovered the problem with my kei181. Once a timeout erro occurs for some reason the equipment will not accept commands any more. I checked the status byte and it's fine. Something makes the kei181 trapped in a "limbo". I had to restart the equipment (turn on and off ) and with the "X" in the end of the commands I could communicate successfully with the instrument. You see, when I was clicking "Communicate with instrument" in NI-MAX it sends the *IDN? right away and created the whole problem. Thanks  cstorey

 

Regarding the driver, I wasn't able to use it yet. Seems some internal VIs are missing . But looking inside the VIs have given me a pretty good notion of how to treat data and implement other functions. Thanks Nitad. 

 

Now I think I can start controlling this kei181

This was very helpful, Thank you all. 

0 Kudos
Message 13 of 16
(1,449 Views)

Great! 

 

Good luck with the rest of the programming.  If you need help post your questions with code to a new thread.

0 Kudos
Message 14 of 16
(1,443 Views)

I did confirm that the 181 does read instructions and

output data... It looks like this, with the uV reading buried

in a bunch of stuff...

 

<- NDCV+0.204843E-3«x0D»

 

I'm glad that it did work and that the 181 isn't the problem!
I'll watch here for more clues on how to get it fully working...

THANKS!

0 Kudos
Message 15 of 16
(1,381 Views)

Right, the 181 has a very specific return string format.  So once you read data from the 181 you need to parse the return string to get the reading into a numeric value.  There are plenty of ways to do that, here's one..

 

181_reading_disect.png

 

 

You should probably add some of your own error handling in case the string you read is not formatted properly.

 

Hope that helps.

 

PS - Rather than post to old threads, start a new thread with your specific questions, a descriptions of your problem and what you've tried.  To get good help, be very specific and post your code.  Then keep all updates to that thread rather than spreading things out over many threads   Just adding comments at the end of another thread without context doesn't help other people looking for solutions in the future.

 

 

0 Kudos
Message 16 of 16
(1,371 Views)