Author Topic: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy  (Read 31932 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #150 on: May 02, 2019, 10:27:17 am »
Here's some more information on offscreen voltages.

At the examples I start zooming in from 1000 mV./Div until 100 mV/Div. At 100 mV/div it should go offscreen but it becomes in view again.

This something that happens when there's a larger "area" (duty of square changes the effect) of voltages are "above the screen".
This:



Exceeds the channel voltage offset range as listed in the datasheet, that's all you're seeing.
There’s more to it. I will do some test to show how much offscreen voltage is allowed, without getting the measurements wrong. To agagerate:
If we had a -1V to 10V square wave, there will probably be troubles zooming in (100mV/div) on the -1V bottom,  which is within offset range. I hope my AWG support the ranges needed to get an idea of the effects. I’m working on it.
« Last Edit: May 02, 2019, 10:34:33 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #151 on: May 02, 2019, 10:31:08 am »
I suspect its gain stage saturation, as things are charged above the specified input range it takes some time to bleed off the parasitic capacitances in the amplifier

before the ADC is the channel VGA (Variable Gain Amplifier), https://www.analog.com/media/en/technical-documentation/data-sheets/ad8370.pdf

you would have to check what the VGAC code is, but you could probably work that back to figure out how close to the limits of the input range you are at,

Pretty sure the ADC has a 200mV input range.
Nice info!

The practical consequences I will try to measure. As said before, I think it had its influence without me knowing about it.
« Last Edit: May 02, 2019, 10:35:38 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #152 on: May 02, 2019, 11:21:28 am »
I measured the following waves:
Code: [Select]
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.60000000000000013,OFST,0.30000000000000006,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.7,OFST,0.35,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.8,OFST,0.4,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1,OFST,0.5,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.2000000000000002,OFST,0.60000000000000013,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.3999999999999998,OFST,0.7,DUTY,50
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.6,OFST,0.8,DUTY,50
The bottoms should all be at the V-centre, but when having more voltage offscreen, the center voltage "rises". This happens with even small voltages like 300mv. 3 times the V/div. Because there is almost 1 division of digital margin offscreen it is almost nothing beyond that.
Maybe I made a mistake, so I posted the AWG commands.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #153 on: May 02, 2019, 11:27:12 am »
Different duty:
Code: [Select]
Siglent Technologies,SDS1204X-E,SDSMMDBQ2R3764,8.1.6.1.26
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.60000000000000013,OFST,0.30000000000000006,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.7,OFST,0.35,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,0.8,OFST,0.4,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1,OFST,0.5,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.2000000000000002,OFST,0.60000000000000013,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.3999999999999998,OFST,0.7,DUTY,1
C1:BSWV WVTP,SQUARE,FRQ,500,AMP,1.6,OFST,0.8,DUTY,1
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #154 on: May 02, 2019, 11:42:10 am »
As can be seen, even small pulses (1%)  affect the quality of the signal and a non existing rise of voltage.

However because of the differences in duty %, I’m not putting the AWG under investigation regarding offsets and amplitudes. I’ve also seen similar behavior of the scopes with it’s test signal.

I’ve read this about it:
https://electronics.stackexchange.com/questions/287515/is-it-bad-to-let-an-oscilloscope-trace-go-off-screen

But I don’t think with my/this scope one can say that there’re multiple screens of headroom.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #155 on: May 02, 2019, 11:48:46 am »
Its not always 1 division off screen, its more like 0.5, its mainly to eat up the steps between VGA codes to allow for ideal scaling, the measure UI gives a good idea of where this limit is, as it just works off the raw data points,

Equally yeah things will start misbehaving if you go a large amount outside the common mode range, you can use fine gain control to shift things in your favor, I suspect when you exceed the top of the ADC's true capture range it has some hardware protection, and by shunting current is causing your offset.

I suspect this protection is after the VGA, as there is no idiot proof way that it could not be set to a bad code and send a volt into the ADC,
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #156 on: May 02, 2019, 12:05:03 pm »
Its not always 1 division off screen, its more like 0.5, its mainly to eat up the steps between VGA codes to allow for ideal scaling, the measure UI gives a good idea of where this limit is, as it just works off the raw data points,

Equally yeah things will start misbehaving if you go a large amount outside the common mode range, you can use fine gain control to shift things in your favor, I suspect when you exceed the top of the ADC's true capture range it has some hardware protection, and by shunting current is causing your offset.

I suspect this protection is after the VGA, as there is no idiot proof way that it could not be set to a bad code and send a volt into the ADC,
To my understanding 200 steps of the ADC are on screen, the other 56 steps are off. That’s why I thought there’s one division of digital headroom, below and above.
I don’t know how to compare the found analog headroom to other scopes, but reading the stackexchange answer, I’m a bit surprised that is so low.

Anyway it is a good thing to know about one’s scope.

My technique of creating signal samples is then also too disruptive, will use a calculated (time) range instead. But will first check how accurate that will be.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #157 on: May 02, 2019, 01:59:20 pm »
One technique I will test is having for instance 500 blocks of alternating values in a wave. And then getting those values measured in the DSO (without using signal values). When mapping is perfect all samples in the DSO could be used for that. But that is not doable. Because of inaccuracies of the trigger delay and difference between sample rates and stuff.
As the drawing shows I will create a test wave to examine the usability.
The start / end block can be identified separately for validating the start and end.
Each block in between also alternates. The question that will be answered is this:
How many DSO samples within each block can be used, without a single wrong value.
For instance, when a block has a width of 100 DSO samples and we take only the (calculated) middle one, the prediction could be 48 samples off and we still get a good value. But the more we try to use, to more accuracy is needed.
If we get a minimal of 70 correct middle ones for all blocks, then we know that taking just 50 middle ones is on the safe side and without any worries in a comparable situation.
« Last Edit: May 02, 2019, 02:35:57 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline genghisnico13

  • Regular Contributor
  • *
  • Posts: 56
  • Country: cl
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #158 on: May 02, 2019, 03:09:16 pm »
I recently replicated some of rigol's comparisons about overload recovery in a RTB2000 https://www.eevblog.com/forum/testgear/rigols-view-on-rtb2000/msg2378664/#msg2378664.
As you can see the signal gets distorted for 1-2ms after coming back to the screen, this distortion started to appear at 50mV/Div when the signal goes above +2.2V.
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #159 on: May 02, 2019, 03:52:30 pm »
Seems like great scope, nice high res screenshots also.

(I will have to tune my gridlines colors in mine a bit better.)

Also nice to know after reading the thread I was a misuser of the vertical offset.  :-+

Once I asked my self the question whether it would be ok to use it as a zoom centerer. Having had “good” results with it, it became something to do without further thinking about it. Sometimes even with a vague sense that is was magically handy.

Damn, another illusion gone. But better to know of it, so a bit of knowledge richer.
« Last Edit: May 02, 2019, 06:22:37 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #160 on: May 02, 2019, 09:50:32 pm »
From Rerouter, I got to understand the AWG also has amplitude ranges (attenuator). From changing some values and hearing the relais clicking I know their max values are:
A: 63mV >= Ampl  < 64 mV
B: 632mV >= Ampl  < 633 mV
C: 6V >= Ampl  < ??

I may try more values to get an exact number, but this could be a way to guess/determine the unscaled step value of the highest range:
0.1x: 63.2mV >= Ampl  < 63.3 mV
1x: 632mV >= Ampl  < 633 mV
10x: 6.32V >= Ampl  < 6.33 V

It does not need to be this way, but sometimes verifying one value is easier than getting the right one. So I post it here as a reminder.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #161 on: May 03, 2019, 12:49:46 am »
I'm trying to restrict the number of samples via the SCPI command WAVEFORM_SETUP / WFSU in the form:
WFSU SP,0,NP,1024

if I query WAVEFORM_SETUP? it even returns: SP,0,NP,1024,FP,0
But it does not limit the downloaded samples.

Am I missing something?
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #162 on: May 03, 2019, 10:54:03 am »
Did the limiting after downloading myself.

This graph shows (if one zooms in) 100 alternating input blocks at 300 hz acquired in 33333 samples x 378 frames by the DSO. The yellow line represents the averaged values (of 50%). The red dots the maximum value, the blue dots the minimal value of all the frames. (How well frames are aligned also determines the usefulness of centre samples.)

In this test a centre value would be considered valid is both the minimal and maximum value match the blocks expected value(range).

As can be seen the triggering delay might need a slight adjustment. But overall think this might give good results, but with 500 blocks things might get a bit tight. This partly because the DSO sample cannot be matched nicely with the freq. (Only 33% samples are used)
« Last Edit: May 03, 2019, 11:07:45 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #163 on: May 03, 2019, 11:54:39 am »
What can be seen on the first screen shots, is that the signal has an offset of around 56mV.

I did 2 offsets to check whether it is a scope measurement issue, or an AWG issue.

Both the lower and higher part of the square wave are off about that amount. So it is an AWG problem.

Yes, it was zero adjusted. But I think that is adjusting the offset DAC. It seems that the other DAC needs adjusting much more!

56 mV on a 1300 mV amplitude. (It's a build in square, so there should be troubles with the wave itself. Also other waves seem to have the same offset.)

The lesson that can be learned from this is: do the zero adjusting with an active wave in mind!
« Last Edit: May 03, 2019, 12:01:02 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #164 on: May 03, 2019, 12:12:38 pm »
If I setup a wave, with an offset of 0 via SCPI cmd:
Code: [Select]
C1:BSWV WVTP,ARB,FRQ,300,AMP,1.3,OFST,0

It's offset gets added by -1.0 x zero balance offset!!

What could be a valid reason for that? Now the signal is still off!!
« Last Edit: May 03, 2019, 12:19:34 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #165 on: May 03, 2019, 01:53:18 pm »
So the DSO value ranges cannot be accurately “predicted” because of the very high offset. But it can be determined by searching for the highest and lowest value. And than determining:
Offset = (High + Low) / 2
Amplitude = High - Low

The valid valid range for a
Start would be: MinSampleValue - Offset > 0.95 * 0.5 * Amplitude
High would be: (MinSampleValue - Offset > 0.45 * 0.5 * Amplitude) and (MaxSampleValue - Offset < 0.55 * 0.5 * Amplitude)
Low would be: (MinSampleValue - Offset > -0.55 * 0.5 * Amplitude) and (MaxSampleValue - Offset < -0.45 * 0.5 * Amplitude)
End would be: MaxSampleValue - Offset < -0.95 * 0.5 * Amplitude

Or a bit more efficient in calculating stuff that does not change per sample.

Start would be: MinSampleValue > 0.95 * 0.5 * Amplitude + Offset
High would be: (MinSampleValue > 0.45 * 0.5 * Amplitude + Offset) and (MaxSampleValue < 0.55 * 0.5 * Amplitude + Offset)
Low would be: (MinSampleValue  > -0.55 * 0.5 * Amplitude + Offset) and (MaxSampleValue  < -0.45 * 0.5 * Amplitude + Offset)
End would be: MaxSampleValue < -0.95 * 0.5 * Amplitude + Offset
« Last Edit: May 03, 2019, 09:29:56 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #166 on: May 03, 2019, 08:09:37 pm »
I think the scpi offset does not have the awg offset applied to it. I will have a look today if there is any easy way to read that offset via command
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #167 on: May 03, 2019, 08:40:56 pm »
I think the scpi offset does not have the awg offset applied to it. I will have a look today if there is any easy way to read that offset via command
If you can find it, great!

I looked for it for a short while. It is for example also missing in the WFSU? message.

In the UI it is "shown" in the Amplitude / Offset setting, but not in the LowLevel / HighLevel setting.

“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #168 on: May 03, 2019, 10:13:54 pm »
So here are my DSO values again, but now with the validation bands drawn as well. Red lines mean red dots (max value in all frames) may not cross, blue lines means blue dots (min value in all frames) may not cross.

So to remind:
This is a test to determine how well we can find blocks of AWG samples back as blocks in the DSO samples. And how much middle values within a DSO block should only have values of the same AWG block.
For now were have looked at the vertical part to determine a range to validate a DSO sample to.

The next step is to determine the DSO output blocks, by dividing the samples evenly (thus without using vertical data for that). And then to validate each DSO sample whether is has gotten in the correct DSO block.
We are only interested in continuous valid samples in the middle of each. Here's where we extract and average the data from each block in a real situation. The other samples are misalignment margins. The purpose of this test dataset is to determine how much margin is needed.
The margin is determined by the block with the least valid samples in the middle.
While it may all look nice in the graph, the determination of how much middle values can be used is very strict. In a real situation, we don't want to average "middle values" that belong to different input samples. So the usable values range may become a lot smaller when using more than 100 sample blocks.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #169 on: May 03, 2019, 10:35:43 pm »
Because it may be so that the AWG has scaling problems, which will be further tested, it might be informative to show how I calculated the range values without using floating point calculations, but with proper rounding. (It know it rounds a 1/2 down, but technically it is just as close to the below and above value, so I don't mind)
It's about moving divides to a single one and adding half of the divider before doing so.
Code: [Select]
            <Variable Identifier="SummedOffsetX2X100" Type="Int32" Init="(HighestValue + LowestValue) * 100"/>
            <Variable Identifier="SummedAmplitude" Type="Int32" Init="(HighestValue - LowestValue)"/>
            <Variable Identifier="Divider" Type="Int32" Init="100 * 2 * Count"/>
            <Variable Identifier="HalfXDivider" Type="Int32" Init="Divider div 2"/>
            <Execute Statement="StartRangeLow:= (95 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
            <Execute Statement="HighRangeHigh:= (55 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
            <Execute Statement="HighRangeLow:= (45 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
            <Execute Statement="LowRangeHigh:= (-45 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
            <Execute Statement="LowRangeLow:= (-55 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
            <Execute Statement="EndRangeHigh:= (-95 * SummedAmplitude + SummedOffsetX2X100 + HalfXDivider) div Divider"/>
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #170 on: May 03, 2019, 10:49:09 pm »
The waveform setup only applies when you use "<trace>:WF? ALL" for what ever reason its ignored for "<trace>:WF? DAT2"

for the channel calibration, the "PRINTCALI" command may interest you.

And finally for the AWG offset, I suspect your going to need to make use of manual button navigation to run the auto offset at startup, then when you read back with BSWV? it will then have the offset you will have to use, that or just run it manually before hand to grab the value. also you can use key "14" as a beep if you wish to have the script notify you.

Code: [Select]
Command syntax:
SY_FP <key>, <value>
For buttons, any integer is a press,
For knobs, a value of -1 is decrement, 0 is the button, 1 is increment, higher numbers correspond to moving that amount, e.g. 200 would be 200 clicks

keys:
0 - Menu Clear Button
1 - Function 1 (left most key on bottom of screen)
2 - Function 2
3 - Function 3
4 - Function 4
5 - Function 5
6 - Function 6
7 - Timebase (Decrease -1/ 0 Button / Increase 1)
10 - Timebase Offset (Decrease -1/ 0 Button / Increase 1)
11 - Autosetup Button
12 - Run / Stop Button
13 - Default Button
15 - Intensity (Decrease -1/ 0 Button / Increase 1)
16 - Trigger Level (Decrease -1/ 0 Button / Increase 1)
17 - Auto Trigger Button
18 - Trigger Button
19 - Normal Trigger Button
20 - Single Trigger Button
22 - Cursors Button
23 - Display / Persist button
24 - Utility Button
25 - Print Button
26 - Measure Button
27 - Aqcuire Button
28 - Save/Recall Button
29 - Decode Button
30 - Digital Button
31 - Math Button
32 - Reference Button
35 - Channel 1 VDIV (Decrease -1/ 0 Button / Increase 1)
36 - Channel 2 VDIV (Decrease -1/ 0 Button / Increase 1)
37 - Channel 3 VDIV (Decrease -1/ 0 Button / Increase 1)
38 - Channel 4 VDIV (Decrease -1/ 0 Button / Increase 1)
39 - Channel 1 Button
40 - Channel 2 Button
41 - Channel 3 Button
42 - Channel 4 Button
43 - Channel 1 Offset (Decrease -1/ 0 Button / Increase 1)
44 - Channel 2 Offset (Decrease -1/ 0 Button / Increase 1)
45 - Channel 3 Offset (Decrease -1/ 0 Button / Increase 1)
46 - Channel 4 Offset (Decrease -1/ 0 Button / Increase 1)
47 - Clear Sweeps Button
48 - History Button
49 - Roll Button
50 - Search Button
51 - Navigate Button
52 - Left Navigation Button
53 - Stop Navigate Button
54 - Right Navigate Button
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #171 on: May 03, 2019, 11:27:46 pm »
The waveform setup only applies when you use "<trace>:WF? ALL" for what ever reason its ignored for "<trace>:WF? DAT2"
That’s good to know. Maybe it is also possible to grab one at a time segment/frame this way. I guess segment and frame are the same thing. This would be a step more robust then changing the active frame.
Using ALL I’ll need to do some more parsing. It would be nice if the documentation was better in this regard.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #172 on: May 03, 2019, 11:36:16 pm »
I can share what I have documented, but its mainly lifted from other manuals

Code: [Select]
:WaveForm | :WF
Query Syntax

<channel>:WaveForm?

Description

A WAVEFORM? Query transfers a waveform from the oscilloscope to the controller. A waveform consists of several distinct entities:
1. the descriptor (DESC)
2. the auxiliary data (DAT1) block3. the main data (DAT2) block
The WAVEFORM? Query instructs the oscilloscope to transmit a waveform to the controller. The entities may be queried independently. If the “ALL” parameter is specified,all four or five entities are transmitted in one block in the order enumerated above.
Note:1. The format of the waveform data depends on the current settings specified by the last WAVEFORM_SETUP command.
2.The format of the waveform data can be seen by the TEMPLATE? Query.

Parameter

Name

Type

Range

Default

 
<channel>

Discrete

{C1|C2|C3|C4|DI|D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15|MATH}

 
Query Example

C1:WF? /*Returns the waveform data block of Channel 1*/

Code: [Select]
WaveForm_SetUp | WFSU
Command Syntax

WaveForm_SetUp FP, <first point>,NP,<num of points>,SP,<spacing>

Query Syntax

WaveForm_SetUp?

Description

The WAVEFORM_SETUP command specifies the amount of data in a waveform to be transmitted to the controller. The command controls the settings of the parameters listed below.

Parameter

Name

Type

Range

Default

 
<first point>

Numeric

First Data Point

 
 
<num of points>

Numeric

0 is all, above is maximum amount of points

 
 
<spacing>

Numeric

0:1 is all, above sends only Nth point

 
Command Example

WFSU FP,200 /* Sets the first point to 200.*/

Query Example

WFSU?    /* */
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #173 on: May 03, 2019, 11:40:02 pm »

And finally for the AWG offset, I suspect your going to need to make use of manual button navigation to run the auto offset at startup, then when you read back with BSWV? it will then have the offset you will have to use, that or just run it manually before hand to grab the value. also you can use key "14" as a beep if you wish to have the script notify you.
Thanks for the keys!

For this, I won’t use UI automation. These things can easily go wrong, if the UI is in a unexpected state, or something in it has changed. Also the offset I need cannot be created with the automatic zero function. Waves need a different offset value (a lot higher).
PS
I did test the BSWV? before, but there was no offset in it.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Using a AWG and a Scope -> Automated exploring the wavedata
« Reply #174 on: May 03, 2019, 11:45:47 pm »
I can share what I have documented, but its mainly lifted from other manuals
I’m shopping out of other manuals too, thanks to Google. But a descent description of the returning data I’ve not yet seen. These things I don’t get. If one implements this stuff, it needs documentation as well, why not share it? That’s what you’re supposed to do with interfaces...
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf