Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Tek MSO4104 - Programatically display Automatic Measurements

Solved!
Go to solution

@crossrulz wrote:

I was able to dig up some of my code for the TDS scope.  Looks like the commands are the same.  Here's an example for setting up a Pk-to-Pk measurement on channel 1.

:MEASU:MEAS1:TYP PK2PK;SOURCE1 CH1;:MEASU:MEAS1:STATE ON;

 


Yeah. That's essentialy the same thing that is in the driver.

0 Kudos
Message 11 of 15
(1,774 Views)

@Dennis_Knutson wrote:

@crossrulz wrote:

I was able to dig up some of my code for the TDS scope.  Looks like the commands are the same.  Here's an example for setting up a Pk-to-Pk measurement on channel 1.

:MEASU:MEAS1:TYP PK2PK;SOURCE1 CH1;:MEASU:MEAS1:STATE ON;

 


Yeah. That's essentialy the same thing that is in the driver.


I didn't know he had the driver.  Looking through his history, I see that we helped him already with a screen capture.  My bad.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 15
(1,770 Views)

Thanks for all the input guys. I am doing remote, automated screen-captures of a waveform, and as such, need the measurement displayed on the scope screen. Yes I am aware that I can read the waveform data and process it in LabVIEW. However, that is not what we are doing...perhaps down the road we will utilize that functionality.

 

I have the programmers manual. Here are the strings that I am currently sending to the scope (and fuctionally performs the function I need, but is obviously cumbersome from a code standpoint...specifically referring to the FP commands):

 

//This gets me the peak to peak measurement in labview

MEASU:IMM: SOU1 CH%d

MEASU:IMM: TYP PK2PK

MEASU:IMM: VAL?

 

//This actually displays the measurement on the scope screen by simulating front panel interaction

FPAnel: PRESS MEASurement

FPAnel: PRESS BMENU1

FPAnel: TURN GPKNOB2,50 //simulates spinning the knob, to reset it to the "zero" position

FPAnel: TURN GPKNOB2,-12

FPAnel: PRESS RMENU5

FPAnel: PRESS MENUOff

FPAnel: PRESS MENUOff

 

I tried a few different "measure/state" commands with no luck.

 

I will be calling Tek today and see if they can offer anything useful...

Message 13 of 15
(1,766 Views)

From what you've told, you do not want the MEASU:IMM functions.  These are just immediate measurements that you can get.  It is not displayed on the scope.  You need the MEASU:MEAS%d functions, where %d is the measurement number.  These are the ones displayed on the scope's screen.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 14 of 15
(1,756 Views)
Solution
Accepted by topic author Ryan_G_EE

Thank youi crossrulz!

 

The following commands perform what I needed:

 

MEASUrement:MEAS1: SOUrce1 CH%d

MEASUrement:MEAS1: TYPe PK2PK

MEASUrement:MEAS1: STATE ON

 

Quote from programmers manual: "For a measurement to display, you must have selected a source waveform and defined the measurement you want to take and display. You select the measurement using the MEASUrement: MEAS<x>: SOUrce<x> command. You define the measurement type using the MEASUrement: MEAS<x>:TYPe command."

 

Apparently when I tried this last night, I must not have done everything in order or something...

 

Anyway, for future reference, the IMMED sub-commands can be used to send the measurement to LabVIEW, whereas the MEAS<x> sub-commands are used to display the info on the scope screen. They also have to be entered in the proper sequence, or it won't work.

 

Thanks for the help everone...there is so much info in the manual, sometimes it's easy to miss something.

0 Kudos
Message 15 of 15
(1,752 Views)