Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering multiple Keithley 2600's for voltage measurement

Hi,

 I was trying to trigger the measurement for finding the forward voltage of the  3 LEDs, 2 of which is connected to channel A and B of SMU (2602B - which is set as node 1)  and another to channel A of the second SMU ( 2612B-set as node 2) . I have connected the 2 SMUs using   TSP link cable and connected to the PC using GPIB interface .I am able to see the forward voltage values in the SMU screen. But i couldnt read it from the buffer using the labview driver VI, as the error "-420, query unterminated" occured. I have executed it using lua script which is given below. Also attached the labview code that i used. Kindly help me to find the error.


The code used is :

local smua = node[1].smua
local smub = node[1].smub
local smuc = node[2].smua

-- Configuring basic settings for all SMUs
local function configureSMU(smu)
    smu.reset()
    smu.source.func = smu.OUTPUT_DCAMPS
    smu.source.limitv = 3  
    smu.source.leveli = 0.01
    smu.source.output = smu.OUTPUT_ON
    smu.measure.autorangev = smu.AUTORANGE_ON
end

-- Configure all SMUs
configureSMU(smua)
configureSMU(smub)
configureSMU(smuc)

-- Clearing buffers before starting measurements
smua.nvbuffer1.clear()
smub.nvbuffer1.clear()
smuc.nvbuffer1.clear()

-- Function to perform measurement
local function performMeasurement(smu, buffer)
    smu.measure.count = 1 
    smu.trigger.source.action = smu.ENABLE  
    smu.trigger.measure.v(smu.nvbuffer1)
    smu.trigger.measure.action = smu.ENABLE  
    smu.trigger.source.stimulus = smu.trigger.SOURCE_COMPLETE_EVENT_ID  
    smu.trigger.measure.stimulus = smu.trigger.MEASURE_COMPLETE_EVENT_ID 
  end

smua.trigger.initiate()
smub.trigger.initiate()
smuc.trigger.initiate()

-- Perform measurements
performMeasurement(smua, smua.nvbuffer1)
performMeasurement(smub, smub.nvbuffer2)
performMeasurement(smuc, smuc.nvbuffer1)

delay(1)

smua.measure.v(smua.nvbuffer1)
smub.measure.v(smub.nvbuffer1)
smuc.measure.v(smuc.nvbuffer1)

waitcomplete()

0 Kudos
Message 1 of 5
(1,110 Views)

Is this a script you wrote and you know works? When in the code does the error appear? 

 

At the very least, I believe you have an error with your buffer names.

 

You use both smub.nvbuffer1 and smub.nvbuffer2 in your code.  But you only use "performMeasurement(smub, smub.nvbuffer2)".

 

Your LabVIEW photo shows reading smub.nvbuffer1, which should be empty.

 

Craig

0 Kudos
Message 2 of 5
(1,071 Views)

Thank you for your reply.

 

Yes,you are right that I might have posted the script that i tried with different buffers and finally when i posted it here, i mixed it up. But i have tried with "nvbuffer1" for smub and it worked(like forward voltage was seen on the SMU screen but not read by buffer VI in labview).This was the case while using 3 SMUs.

 

Then I tried using single SMU , measuring voltage from channel A and B of SMU 2602B and it is working good and values were read by buffer VI to labview aswell. But while including 2nd SMU(2612B) the problem occured.

 

0 Kudos
Message 3 of 5
(1,062 Views)

I would try giving each buffer a unique name.  I think you are overwriting a single buffer then trying to read an empty buffer.

 

smua.bufA

smub.bufB

smuc.bufC

 

I'm not very familiar with the 2600 node setup or Lua language features.  Are you sure that the way your script is written you  have things setup that the second instrument triggers?  If it does, try reading the data from that instrument first.  I'd also suggest looking in the 2600 manual for examples, or call Tektronix and getting their help to get the Lua script working fist, then come back if the LabVIEW implementation doesn't work.

 

Finally, please attach your code, not a picture of your code, so people can examin it for errors.  A snippet (special PNG image that can be imported into a VI to generate the code) is also acceptable.

 

Craig

0 Kudos
Message 4 of 5
(1,042 Views)

Hi,

 

I don't know if this applies. I used a 260 and C#. To read the data I used the printbuffer command.

Is there a similar function in the LabView driver?

 

//current is in buffer 1
m_gpibsession.Write("printbuffer(1, smua.nvbuffer1.n, smua.nvbuffer1)");
sCurrent = m_gpibsession.ReadString(2048);
//voltage is in buffer 2
m_gpibsession.Write("printbuffer(1, smua.nvbuffer2.n, smua.nvbuffer2)");
sVoltage = m_gpibsession.ReadString(2048);

 

the strings are the arrays of data.

 

Hope this helps

 

Curt

0 Kudos
Message 5 of 5
(1,034 Views)