Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Output delay and trigger(falling edge) not works

KUSB and KPCI DAQ Data Acquisition Products
Post Reply
noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Output delay and trigger(falling edge) not works

Post by noahzhong » June 9th, 2014, 1:39 am

Hello everyone,

I am using the 2600 series now and I want to set the output on after a trigger is detected(rising edge )
and then turn off when a falling edge is detected.

I tried with the following code , but the delay is too much (about 4 ms), and the second trigger is not working .
Can anybody tell me that is it possible to reduce the delay to below 12 us?
And why the second trigger does not work?

Thanks a lot


function dioManualOutputIOnOff( IF, limitV )
local l_i
local current_on, voltage_on
local current_off, voltage_off

errorqueue.clear( )
reset( )

-- Configure the SMU
smua.reset( )
smua.source.offmode = smua.OUTPUT_ZERO
smua.sense = smua.SENSE_REMOTE
smua.source.func = smua.OUTPUT_DCAMPS
smua.source.limitv = math.abs( limitV )
smua.source.rangei = math.abs( IF )
smua.source.leveli = IF
--smua.measure.nplc = 0.001
--smua.measure.autozero = smua.AUTOZERO_OFF

digio.trigger[ 1 ].reset( )
digio.trigger[ 1 ].mode = digio.TRIG_RISING
digio.trigger[ 2 ].reset( )
digio.trigger[ 2 ].mode = digio.TRIG_FALLING


--digio.trigger[ 1 ].reset( )
--digio.trigger[ 1 ].mode = digio.TRIG_EITHER

triggered_rising = digio.trigger[ 1 ].wait( 5 )
smua.source.output = smua.OUTPUT_ON

-- Start the trigger model execution
-- digio.trigger[ 1 ].clear( )
-- print( smua.measure.iv( ) )
--current_on, voltage_on = smua.measure.iv( )
-- triggered_falling = digio.trigger[ 1 ].wait( 5 )


triggered_falling = digio.trigger[ 2 ].wait(1)
smua.source.output = smua.OUTPUT_OFF
-- print( smua.measure.iv( ) )
current_off, voltage_off = smua.measure.iv( )
digio.trigger[ 1 ].clear( )
digio.trigger[ 2 ].clear( )

print( current_on, voltage_on )
print( current_off, voltage_off )

end -- function dioOutputIOnOff
Attachments
2611A.xlsx
What I want to do
(12.08 KiB) Downloaded 1117 times
オシロ.png
oscilloscope image
オシロ.png (29.02 KiB) Viewed 29693 times

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Output delay and trigger(falling edge) not works

Post by Andrea C » June 11th, 2014, 3:23 am

Hello,
I am not too surprised by the 4msec to turn the output on. I do not think it will improve with this approach.

Can you clarify the model number? If it is one of the 2600A or 2600B models then you may be successful by using the trigger model. Have the first trigger edge be the smua.trigger.source.stimulus and the second trigger edge be the smua.trigger.endpulse.stimulus. The output will be on the entire time, but the sourcing would be controlled by the trigger stimuli.

Andrea

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 11th, 2014, 5:21 pm

Thank you for you reply.
The model is 2611A.
Did you mean that the response time can not be faster?
Is there any other way to make the response time shorter because we have a very strict requirements for the response time .
And we want the output to be ON after the rising edge is detected within 12us and turn off the output(voltage and current ) after
the falling edge is detected. Just like described in the excel file I have attached.

It will be a a great help to me if a sample is provided because I am not familiar with the API.
Thanks you a lot.

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Output delay and trigger(falling edge) not works

Post by Andrea C » June 12th, 2014, 2:19 pm

Hello,

It is good that you have 2611A. With both 2600A and 2600B versions, there is a trigger model state machine and we can do some complex timing.

I wrote a simple script to turn the output on, and when the rising edge of a trigger is detected the smua will start to source 1mA. I used a 1K-Ohm load. The 1mA is sourced until the falling edge trigger is detected.

Here is a scope shot showing the timing of the 5 volt gate signal and the resulting 1 volt source response of 1mA into 1K-Ohm:
TEK0000.JPG
source output coordinated with rising and falling edge of trigger/gate signal
TEK0000.JPG (85.91 KiB) Viewed 29655 times
Here is the TSP code:

Code: Select all

reset()
errorqueue.clear()
status.reset()

smu = node[1].smua
local amps = 0.001

-- configure a digital input trigger
digio.trigger[1].mode = digio.TRIG_RISINGA
digio.trigger[1].clear()

digio.trigger[2].mode = digio.TRIG_FALLING
digio.trigger[2].clear()


-- Configure source and measure settings.
    smu.source.func = smu.OUTPUT_DCAMPS
    smu.source.leveli = 0
    smu.source.rangei = math.abs(amps)
    smu.source.limitv = 10
    
    smu.measure.autozero = smu.AUTOZERO_OFF
    smu.measure.rangev = 20
    smu.measure.nplc = 0.1
    
    -- Setup a buffer to store the result(s) in and start testing.
    smu.nvbuffer1.clear()
    smu.nvbuffer1.appendmode = 1
    smu.nvbuffer1.collecttimestamps = 1
    smu.nvbuffer1.collectsourcevalues = 1

    -- Reset trigger model
    smu.trigger.arm.stimulus = 0
    smu.trigger.source.stimulus = digio.trigger[1].EVENT_ID
    smu.trigger.measure.stimulus = 0
    smu.trigger.endpulse.stimulus = digio.trigger[2].EVENT_ID
    smu.trigger.arm.count = 1
    smu.trigger.source.listi({amps})
    smu.trigger.source.action = smu.ENABLE
    smu.trigger.endpulse.action = smu.SOURCE_IDLE
    smu.trigger.endsweep.action = smu.SOURCE_IDLE
    -- Configure the measure action
    --smu.trigger.measure.i(smu.nvbuffer1)
    smu.trigger.measure.action = smu.DISABLE  --smu.ENABLE
    -- Configure the sweep count
    smu.trigger.count = 1 --points

    -- Run the sweep and then turn the output off.
    smu.source.output = smu.OUTPUT_ON
    
    
    smu.trigger.initiate()
    --waitcomplete()
I used a 2636B with firmware level 3.0.3, but I expect similar outcome for your 2611A.

You'll notice that I have disabled the measurements. They can be turned back on, but of course they need to finish before the falling edge occurs if you want the source durations to be controlled by the trigger.

Andrea

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 12th, 2014, 5:27 pm

Thank you very much .
I will try your script as soon as possible.

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 12th, 2014, 7:41 pm

Hello Andrea,

I have tried running your script. Here is the screen shot of the oscilloscope .
It seems that the output of is already ON before a rising edge is detected. And even the falling edge is detected ,
the output remains ON.

Perhaps model 2636B is different.
Can you help me to find out the reason?
Thanks again.
Attachments
20140613_112301.jpg
20140613_112301.jpg (1.76 MiB) Viewed 29649 times

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Output delay and trigger(falling edge) not works

Post by Andrea C » June 13th, 2014, 4:44 am

Hello,

The time required to turn the blue light on or off (smua.source.output = smua.OUTPUT_ON) will be several milliseconds. If you need a trigger latency of 12 microseconds or less, then you need an alternate approach.

With my approach, the blue light is turned on very early, but the smu is programmed for sourcing zero amps during this time. Only when the rising edge is detected will the smu apply the 1mA of source current. When the falling edge is detected, the smu resumes forcing zero amps. Even though the blue light is on, no stimulus is applied in this zero amp condition.

I do not know if this is suitable for your application, but it is my suggested approach in order to have good timing control of the sourcing action with the external trigger edges.

Andrea

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 15th, 2014, 7:32 pm

Hello Andrea ,

I use a LED to test the script and I cannot get the waveform that you have attached.
When the rising edge is detected, the LED is ON. But even the falling edge is detected, the LED is still ON, that means the
falling edge didn't work. And then I tried to run the script again , it comes with the message

5042, SMU A: Cannot perform requested action while an overlapped operation is in progress

Is there something wrong with the connection?

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Output delay and trigger(falling edge) not works

Post by Andrea C » June 17th, 2014, 5:55 pm

Hello,
The triggering signal should be connected to digital bits 1 and 2. It sounds like the falling edge detection for bit 2 is not working for some reason. Can you do some verification of just this part? For example, did your original approach detect the falling edge at bit 2?

What is the firmware version of the 2611A?

Andrea

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 17th, 2014, 7:21 pm

Hello ,

Thank you for helping .

I found that I connected the trigger is connected to digital bit 1 and bit 15(GND) . Is it OK that I connect the GND(trigger) to bit 2?
And the firmware version is 2.1.6.

noahzhong
Posts: 10
Joined: June 9th, 2014, 1:18 am
Country: Japan

Re: Output delay and trigger(falling edge) not works

Post by noahzhong » June 17th, 2014, 10:58 pm

Hello Andrea,

I connected the trigger to the bit 1 and 2 and if works .
Thanks you very much.
And I still have another question.
I found that the initial voltage output is different if the output current is different .
Also the time needed to set the current output is also different.
For example:
If smu.source.rangei= 0.001
then the initial output voltage is about 0 V, falling time is about 4ms.

But if smu.source.rangei= 0.02
then the initial output voltage becomes about 2.2 V, falling time is about 0.

Can you please tell me that why the levels are different?
Is there a way to make the voltage to a fixed level and make the falling time shorter?

In fact we want to take spectrum of the LED in a certain period (during the trigger period ),
and if the current is falling slowly then the result can be very different.
Attachments
tek00002.png
tek00002.png (21.66 KiB) Viewed 29605 times
tek00001.png
tek00001.png (21.18 KiB) Viewed 29605 times

Andrea C
Keithley Applications
Keithley Applications
Posts: 1263
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Output delay and trigger(falling edge) not works

Post by Andrea C » June 19th, 2014, 6:05 pm

Hello,

For the "smu.source.rangei= 0.02", the source range will be coerced to use the 100mA source range. Whereas for the other condition, it is using the 1mA range.

It is possible that a small amount of current is being sourced even when the programmed amount of current is zero. The source spec for the 100mA range is 0.03% + 30uA. The source spec for the 1mA range is 0.03% + 300nA.
So the 100mA range could be supplying as much as 30uA of current even when asking for zero amps and this might explain the increase in voltage to 2.2 volts before the current pulse is applied.

Can you evaluate how much current might be flowing? Even with a manual operation using the 100mA source range, have the 2611A measure the current when connected to your LED device. If you find it is a stable amount of offset, you might correct it by shifting the zero point down by this amount (smu.source.leveli = -1*Your_Offset).

When was your instrument last calibrated?

Before you finalize all your validation and testing, you might consider updating the firmware. Firmware 2.2.5 is posted to the support section of the web site for the 2600A series of instruments.
http://www.keithley.com/support/keidoc_ ... e=Firmware

Andrea

Post Reply

Return to “Keithley DAQ Data Aquisition Products”

Who is online

Users browsing this forum: No registered users and 4 guests