Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Bus triggering a Keithley 2000 impacting write to buffer?

Hello all,

 

I'm trying to work with a Keithley 2000 DMM via GPIB and send triggers over the bus to fill the buffer. However, in its current state, I'll run the program and can visibly see the readings being made via the display, but the buffer does not get filled. Querying after all triggers have been sent confirms that the buffer size is set at 30 data points, but there's nothing there. Peculiarly, if I set the sample count to n>1 (i.e. :SAMP:COUN n), it seems to write to the buffer, but then it seems to reset the buffer size to n. Any insights as to why this would be occurring and how to circumvent this issue?

 

I can do this operation manually by setting the buffer size from the front panel and then hitting the TRIG button to fill up the buffer one reading at a time. I'm surprised that the code in it's present form does not do the same thing.

 

Thanks in advance for any insight! 

0 Kudos
Message 1 of 2
(1,248 Views)

There are a number of things to do here that should help rectify your issues:

  1. Place a VISA Open before the VISA Write along with a VISA Close before Read Buffer 2 (Your vi may work the first time, but will end up with too many threads from opening the GPIB0::11:INSTR that it just will not work after that)
  2. Try adding a New Line character at the end of each write (I have found that the automated termination feature doesn't always work)
  3. You may wish to add a flat sequence around the wait and have that occur either before or after the trigger
  4. Try using the shift registers on the while loop just to clean things up a little
Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 2
(1,199 Views)