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.

Cannot set trigger level from matlab command. Everything else works fine

Post Reply
kampianakis
Posts: 2
Joined: November 14th, 2018, 8:57 am
Country: United States

Cannot set trigger level from matlab command. Everything else works fine

Post by kampianakis » November 14th, 2018, 9:12 am

Hello forum,

I am trying to write some code to interface my matlab script with my DPO 4034 Oscilloscope. So far everything works well except for setting the trigger. I am using:

fprintf(myScope,'TRIGger:A SETLevel -450.0000E-3'); % THIS DOESN'T WORK
and
query(myScope,('TRIGger:A?')) returns

'AUTO;EDGE;0.0000;0.0000;0.0000;0.0000;0.0000;1.4000;1.4000;800.0000E-3;800.0000E-3;0.0000;0.0000;0.0000;0.0000;0.0000;20.0000E-9;CH1;DC;RISE;LOGIC;AND;0.0000;0.0000;0.0000;0.0000;X;X;X;X;NONE;RISE;TRUE;8.0000E-9;8.0000E-9;8.0000E-9;CH1;RISE;0.0000;CH2;0.0000;8.0000E-9;8.0000E-9;WIDTH;POSITIVE;LESSTHAN;8.0000E-9;POSITIVE;OCCURS;8.0000E-9;POSITIVE;SLOWER;8.0000E-9;NTSC;ALLLINES;1'

In other words, the trigger is still set to 0 and I can verify that manually on the scope as well.

The rest of my code works really well, i.e. connecting to the oscilloscope, setting horizontal/vertical scales etc.
fprintf(myScope,'ID?'); returns
ID TEK/DPO4034,CF:91.1CT,FV:v2.01
and
fprintf(myScope,'*IDN?'); returns
TEKTRONIX,DPO4034,C012284,CF:91.1CT FV:v2.01

Any ideas?

Thanks!
Lefteris

David N
Tektronix Applications
Tektronix Applications
Posts: 547
Joined: July 31st, 2008, 8:26 am

Re: Cannot set trigger level from matlab command. Everything else works fine

Post by David N » November 14th, 2018, 3:34 pm

You cannot set a specific trigger value.

In the programmers manual it says "The trigger Sets the A trigger level automatically to 50% of the range of the minimum and maximum values of the trigger input signal. The query returns current A trigger parameters.

The trigger level is the voltage threshold through which the trigger source signal must pass to generate a trigger event.

This command works for the following cases: Edge Trigger (when source is Not Line), Logic Trigger (when Clock Source is not Off or Logic Pattern is Don’t Care), and Pulse Width Trigger.

kampianakis
Posts: 2
Joined: November 14th, 2018, 8:57 am
Country: United States

Re: Cannot set trigger level from matlab command. Everything else works fine

Post by kampianakis » December 3rd, 2018, 3:07 pm

Hey David, thanks for the reply.
Yea I discovered that my commands where wrong. Now I send this:
fprintf(scope_object,'TRIGger:A:EDGE:SOUrce AUX');
fprintf(scope_object,'TRIGger:A:LEVEL 1000e-3');

And I can set the level properly.
Thanks!

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: No registered users and 16 guests