torstai 24. lokakuuta 2019

ARB waveform generation


I've had GWInstek AFG-2005 pulse generator for a while, but so far I haven't needed to arbitrary function generator part of it. Now, however, I ran onto a case where it would be useful so I downloaded the PC software to see how difficult it would be to generate sequence I need.

Knowing that many of these manufacturers' software is, shall we say, of dubious quality, I kinda expected at least some amount of frustration, although GW's reputation isn't even close to worst.


First troublesome thing is that it uses memory points as horizontal axis, instead of time. I don't care about points! Give me time axis! Going through menus quickly, there is "period or number" selection but that doesn't seem to change anything. Figures. (pun intended)
 
On vertical axis; generator has 10-bit (so 1024-level) output, so values go from -511 to 511. -512 is not apparently there (so 1023 levels, not 1024), which doesn't bother me too much actually. Again, I'd prefer voltage, but meh, this works for me, at least for now.

(later note: actual output level can be set via generator itself, and -511..511 matches set full peak-to-peak range.)

I wanted to start with simple square wave, and there is handy dialog for this.


There was output rate selection when opening the software, and I think I selected 100 samples/s there. I wanted 10 pulses over 1 second, and it took me a while to figure this out. Points, period and freq here indicate same thing; total length of generated sequence. Below those, 'cycle' indicates how many cycles of signal to create. A bit confusing but okay-ish...

So after this I got the first screen. My signal is kinda tiny there, on right hand corner, right? Okay, let's zoom in and ... What?!?

Why is this zooming also vertical axis (so with some zooming vertical is reduced to 500), I wanted to keep my whole signal range on view? And why is there that brief period of inactivity in start? And why is there some 12 cycles instead of 10? What?

(later note: after some more fiddling around, it seems that this generate button is "apply more data to end" and not "generate signal", so I guess there was something already from what I did before getting here.)

But okay, let's try this. Send to instument.. I don't feel like taking another picture anymore, but why is this suggesting some random range by default (start 0, length 20), instead of the entire signal I just generated here? Sending worked well enough with USB and generator switched to it automatically. And yes, generated output is same as here, with that unwanted blank period in there as well. Although I had to set frequency on the generator itself to 1 to return this signal to the length I actually wanted.

The waveform is saved with CSV extension, but unfortunately it isn't CSV as in Comma Separated Values file generated by for example Excel. It is text file nevertheless so if (I think that's "when") needed I can generate it manually. Why is there that comma between "Start:" and value though?

Start:,0,
Length:,100,
Sample Rate:,20000000,
511,
511,
511,
511,
511,
...


...All in all, this thing is not great, but I can work with this.

Edit a bit later: After turning the signal generator power off and back on the next day, I was pleasantly surprised that it had previous mode set; ARB with frequency I set. After some puzzled testing I was somewhat less pleased to find out that this was effectively a lie; it was not outputting the waveform I used last time but some basic square wave instead. Not nice.






Ei kommentteja:

Lähetä kommentti