• Content Count

  • Joined

  • Last visited

  1. Attila, Is there a new .Impedance script object? The 3.6.8 docs don't show this. Craig
  2. Ahhh, so the impedance analyzer computation uses only the scope output available via the SDK (which calls the dwf). OK, I got it. Thanks for the clarification. BTW, I haven't had access to an impedance analyzer since 1988 with a HP4192. Having one again allows for an interesting and informative understanding of tube amplifier design. Thanks, love that AD2.
  3. Dear Digilent, I've been exploring the 3.6.8 features and love the impedance analyzer. What's the schedule for updating the Waveforms SDK and its Reference Manual? I'm very interested in automating some impedance measurements using python. If this has been done already, I apologize for not finding and asking this question. Thanks for the awesome tool. Craig ps. here's my video I created a couple days after 3.6.8 release, Analog Discovery 2 Impedance Analyzer, OPTs and What Tube Plates Really See!!!
  4. Thanks for reading all these, I figured out a lot in this single acq mode configuration. from the sdk doc, FDwfAnalogInTriggerPositionInfo returns the minimum and maximum values of the trigger position in seconds. The horizontal trigger position is used for Single acquisition mode and it is relative to the buffer middle point. From a GUI perspective I can see why this important, pre and post trigger data display. From a data analysis perspective this a little messy to figure out the position value exactly such that only post-trigger data is returned. Or is it? I mess around and post here with the solution.
  5. Now I'm back to figuring out why my data has the trigger point in the middle of my array.
  6. OK, I got it. I had to set FDwfAnalogInTriggerHysteresisSet to 0.01, this fixes the rise/fall inconsistency issue. Digilent, please add dwf.FDwfAnalogInTriggerHysteresisSet(hdwf,c_double(0.01)) to AnalogIn_Trigger.py example
  7. I discovered that calling dwf.FDwfAnalogInReset before I setup or acquired data was affecting the trigger performance. Removed that and the middle point in my array is now near the trigger level. Now my problem is trigger.condition = trigcondRisingPositive isn't consistent. I get both rising and falling values at the array mid-point.
  8. OK, I was looking at my same signal's data arrat in waveforms. I think the center value of the returned data array is the trigger point value. Is this true? If this is the case, how is the timestamp for data array values computed or acquired? Thanks.
  9. Folks, I'm looking at data from the example code, AnalogIn_Trigger.py. I made it simpler by removing the average loop, now just prints a single post-trigger dataset. I have the following 1KHz 2Vrms attached to ch1 dwf.FDwfAnalogInTriggerAutoTimeoutSet(hdwf, c_double(0)) #disable auto trigger dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcDetectorAnalogIn) #one of the analog in channels dwf.FDwfAnalogInTriggerTypeSet(hdwf, trigtypeEdge) dwf.FDwfAnalogInTriggerChannelSet(hdwf, c_int(0)) # first channel dwf.FDwfAnalogInTriggerLevelSet(hdwf, c_double(1.20)) # 1.2V dwf.FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive) when I print acquired data, I would expect the dataset[0] to start just above the triggerlevelset of 1.2v. My results are all over the place, here's output from 2 runs DWF Version: 3.5.4 Opening first device Preparing to read sample... 1.5915261256 1.5915261256 1.5911919716 1.58952120157 1.58918704757 1.58785043155 1.58818458555 1.58551135352 1.58684796954 1.58517719951 DWF Version: 3.5.4 Opening first device Preparing to read sample... 0.778195278362 0.779197740376 0.779197740376 0.780534356395 0.780534356395 0.782873434427 0.783541742436 0.784878358455 0.784878358455 0.785212512459 Any ideas? I've attached my code. Thanks, Craig AnalogIn_Trigger.py
  10. Folks, I'm writing a python object for the AD2 trigger, when I set the autotimeout value with dwf.FDwfAnalogInTriggerAutoTimeoutSet isn't returned with FDwfAnalogInTriggerAutoTimeoutGet. My unittest sets autotimeout value to 1.213, get returns 1.25494304. do autotimeout values have to be some subdivided range of values? @property def autotimeout(self): v = c_double() self.dwf.FDwfAnalogInTriggerAutoTimeoutGet(self.hdwf,byref(v)) return v.value @autotimeout.setter def autotimeout(self,value): self.dwf.FDwfAnalogInTriggerAutoTimeoutSet(self.hdwf,c_double(value)) def test_autotimeout(self): self.ad2.trigger.autotimeout = 1.213 print self.ad2.trigger.autotimeout self.assertEqual(1213,int(round(self.ad2.trigger.autotimeout*1000)),"trigger autotimeout incorrect") All the other trigger variables set and get correctly. Thanks, Craig
  11. does winpython help with python lib installs on cygwin?
  12. Attila, I'm sitting now in front of win7 waveforms. shift and ctrl zoom modifiers do have an effect but all three move the trigger position, not desired. When I set the trigger/horizontal position, it should stick regardless of timebase value like a scope. Neither of these modifiers step through the pop up menu selection. Does someone actually want a timebase of 348ms/div? If so, let them type it in. The alt modifier quickly will move the horizontal position back to its location, so that's nice. All this gripping applies to y axis mods as well. Do people actually want 366mV/div? if so, they should type it in. vertical zooming should also pick from popup menu defaults, the 1, 2, 5, 10 type of thing. This zoom should also not modify the offset value, like a scope. Sorry to be a pain. Craig ps. have you considered remote control of waveforms using an arduino or equivalent using optical encoded pots? You could load a serial module at start up and receive remote control commands, network commands would better actually. then user interfaces could use an esp8266, that would be killer.
  13. Attila, Sorry for the late reply. Thanks for the tips. I'll try out the shift and ctrl zooming and animation disabling as you mentioned. I'll see if I can zoom without moving the trigger point. I've worked with linux waveforms for hours in past couple weeks and will get back with more specific suggestion towards faster user interface. Oh, one quick thing that won't impact screen optimization much is adding scaling label for both channel 1 and 2 simultanously, I know you can switch the yaxis labels by clicking on a trace. Most of the time your comparing wave 1 to wave 2 and need to see both scales at the same Thanks again for answering here. Craig
  14. Folks, I'm forced to use a win7 host for something (I've been a desktop linux-only for about 15 years). I'm working with an analog discovery 2 kit and wanted to develop using vi on cygwin which is quite lovely. Start with this post, https://www.codefull.org/2015/12/installing-scipy-numpy-and-matplotlib-under-cygwin/ after you install numpy, pip exits without errors but continuing install results in a lapack error something like this from numpy.linalg import lapack_lite, _umath_linalg you need to add /usr/lib/lapack to your PATH. export PATH=$PATH:/usr/lib/lapack you have to get numpy running correctly for matplotlib install to happen, plus a bunch of other cygwin installs as mentioned in posting. Yes, you cygwin setup install a bunch of stuff, including g++, c compiler, fortran stuff, gtk stuff, etc etc etc. Here's a cygcheck -c dump, see below, sorry so long. After all this, I ran the AD2 AnalogIn_Acquisition.py script and a plot showed up in x, yay - see attached!!! Oh wait, one more thing sys.platform.startswith returns 'cygwin', so you here's how you get dwf instantiated under cygwin python dwf = CDLL('dwf.dll') Good luck fellow lazy Linux programmers like me! Craig Cygwin Package Information Package Version Status _autorebase 001005-1 OK adwaita-icon-theme 3.22.0-1 OK adwaita-themes 3.22.3-1 OK alternatives 1.3.30c-10 OK base-cygwin 3.8-1 OK base-files 4.2-4 OK bash 4.4.12-3 OK binutils 2.25-4 OK bzip2 1.0.6-3 OK ca-certificates 2.14-1 OK compositeproto 0.4.2-1 OK coreutils 8.26-2 OK csih 0.9.9-1 OK cygrunsrv 1.62-1 OK cygutils 1.4.16-2 OK cygwin 2.8.1-1 OK cygwin-devel 2.8.1-1 OK damageproto 1.2.1-1 OK dash OK dbus 1.10.18-1 OK dbus-x11 1.10.18-1 OK dejavu-fonts 2.37-1 OK desktop-file-utils 0.23-1 OK diffutils 3.5-2 OK dri-drivers 17.1.3-1 OK editrights 1.03-1 OK file 5.30-1 OK findutils 4.6.0-1 OK fixesproto 5.0-1 OK gamin 0.1.10-15 OK gawk 4.1.4-3 OK gcc-core 5.4.0-1 OK gcc-fortran 5.4.0-1 OK gcc-g++ 5.4.0-1 OK gdk-pixbuf2.0-svg 2.40.17-1 OK getent 2.18.90-4 OK girepository-Atk1.0 2.22.0-1 OK girepository-cairo1.0 1.50.0-1 OK girepository-GdkPixbuf2.0 2.36.6-2 OK girepository-GLib2.0 1.50.0-1 OK girepository-HarfBuzz0.0 1.3.4-1 OK girepository-Pango1.0 1.40.6-1 OK girepository-x11 1.50.0-1 OK gnome-menus 3.13.3-3 OK grep 3.0-2 OK groff 1.22.3-1 OK gsettings-desktop-schemas 3.22.0-1 OK gtk-update-icon-cache 3.22.15-1 OK gtk2.0-engines-pixmap 2.24.31-1 OK gzip 1.8-1 OK hicolor-icon-theme 0.15-1 OK hostname 3.13-1 OK info 6.4-1 OK inputproto 2.3.1-1 OK ipc-utils 1.0-2 OK kbproto 1.0.7-1 OK less 487-1 OK libargp 20110921-3 OK libatk1.0-devel 2.22.0-1 OK libatk1.0_0 2.22.0-1 OK libatomic1 5.4.0-1 OK libattr1 2.4.46-1 OK libblkid1 2.25.2-2 OK libbz2-devel 1.0.6-3 OK libbz2_1 1.0.6-3 OK libcairo-devel 1.14.8-1 OK libcairo2 1.14.8-1 OK libcom_err2 1.42.12-2 OK libcroco0.6_3 0.6.12-1 OK libcrypt0 1.4-1 OK libdatrie1 0.2.8-1 OK libdb5.3 5.3.28-1 OK libdbus1_3 1.10.18-1 OK libedit0 20130712-1 OK libEGL-devel 17.1.3-1 OK libEGL1 17.1.3-1 OK libexpat-devel 2.2.1-0 OK libexpat1 2.2.1-0 OK libfam0 0.1.10-15 OK libffi-devel 3.2.1-2 OK libffi6 3.2.1-2 OK libfontconfig-common 2.12.1-1 OK libfontconfig-devel 2.12.1-1 OK libfontconfig1 2.12.1-1 OK libfontenc1 1.1.3-1 OK libfreetype-devel 2.6.5-1 OK libfreetype6 2.6.5-1 OK libgcc1 5.4.0-1 OK libgcrypt20 1.7.6-1 OK libgdbm4 1.12-1 OK libgdk_pixbuf2.0-devel 2.36.6-2 OK libgdk_pixbuf2.0_0 2.36.6-2 OK libgfortran3 5.4.0-1 OK libGL-devel 17.1.3-1 OK libGL1 17.1.3-1 OK libglade2.0_0 2.6.4-2 OK libglapi0 17.1.3-1 OK libglib2.0-devel 2.50.3-1 OK libglib2.0_0 2.50.3-1 OK libgmp10 6.1.2-1 OK libgnome-menu3_0 3.13.3-3 OK libgomp1 5.4.0-1 OK libgpg-error0 1.27-1 OK libgraphite2-devel 1.3.8-1 OK libgraphite2_3 1.3.8-1 OK libgssapi_krb5_2 1.14.4-1 OK libgtk2.0-devel 2.24.31-1 OK libgtk2.0_0 2.24.31-1 OK libharfbuzz-devel 1.3.4-1 OK libharfbuzz-gobject0 1.3.4-1 OK libharfbuzz0 1.3.4-1 OK libICE6 1.0.9-1 OK libiconv 1.14-3 OK libiconv2 1.14-3 OK libintl-devel OK libintl8 OK libisl13 0.14.1-1 OK libjasper1 1.900.22-1 OK libjasper4 2.0.12-1 OK libjbig2 2.0-14 OK libjpeg8 1.5.0-1 OK libk5crypto3 1.14.4-1 OK libkrb5_3 1.14.4-1 OK libkrb5support0 1.14.4-1 OK liblapack-devel 3.7.0-1 OK liblapack0 3.7.0-1 OK libllvm3.9 3.9.1-1 OK libllvm4.0 4.0.1-1 OK liblzma5 5.2.3-1 OK liblzo2_2 2.08-1 OK libmcpp0 2.7.2-2 OK libmpc3 1.0.3-1 OK libmpfr4 3.1.5-1p2 OK libncursesw10 6.0-11.20170617 OK libopenblas 0.2.19-1 OK libopenssl100 1.0.2k-1 OK libp11-kit0 0.23.5-1 OK libpango1.0-devel 1.40.6-1 OK libpango1.0_0 1.40.6-1 OK libpcre-devel 8.40-3 OK libpcre1 8.40-3 OK libpcre16_0 8.40-3 OK libpcre32_0 8.40-3 OK libpcrecpp0 8.40-3 OK libpcreposix0 8.40-3 OK libpipeline1 1.4.0-1 OK libpixman1-devel 0.34.0-1 OK libpixman1_0 0.34.0-1 OK libpng-devel 1.6.28-1 OK libpng-tools 1.6.28-1 OK libpng16 1.6.28-1 OK libpng16-devel 1.6.28-1 OK libpopt-common 1.16-2 OK libpopt0 1.16-2 OK libquadmath0 5.4.0-1 OK libreadline7 7.0.3-3 OK librsvg2_2 2.40.17-1 OK libsigsegv2 2.10-2 OK libSM6 1.2.2-1 OK libsmartcols1 2.25.2-2 OK libsqlite3_0 3.18.0-1 OK libssp0 5.4.0-1 OK libstdc++6 5.4.0-1 OK libtasn1_6 4.12-1 OK libthai0 0.1.26-1 OK libtiff6 4.0.7-1 OK libtxc_dxtn 1.0-1.20151227gitf6ec862 OK libuuid-devel 2.25.2-2 OK libuuid1 2.25.2-2 OK libvtv0 5.4.0-1 OK libX11-devel 1.6.5-1 OK libX11-xcb-devel 1.6.5-1 OK libX11-xcb1 1.6.5-1 OK libX11_6 1.6.5-1 OK libXau-devel 1.0.8-1 OK libXau6 1.0.8-1 OK libXaw7 1.0.13-1 OK libxcb-composite0 1.12-1 OK libxcb-devel 1.12-1 OK libxcb-ewmh2 0.4.1-1 OK libxcb-glx-devel 1.12-1 OK libxcb-glx0 1.12-1 OK libxcb-icccm4 0.4.1-1 OK libxcb-image0 0.3.9-1 OK libxcb-render-devel 1.12-1 OK libxcb-render0 1.12-1 OK libxcb-shm-devel 1.12-1 OK libxcb-shm0 1.12-1 OK libxcb-util1 0.3.9-1 OK libxcb1 1.12-1 OK libXcomposite-devel 0.4.3-1 OK libXcomposite1 0.4.3-1 OK libXcursor-devel 1.1.14-1 OK libXcursor1 1.1.14-1 OK libXdamage-devel 1.1.4-1 OK libXdamage1 1.1.4-1 OK libXdmcp-devel 1.1.2-1 OK libXdmcp6 1.1.2-1 OK libXext-devel 1.3.3-1 OK libXext6 1.3.3-1 OK libXfixes-devel 5.0.3-1 OK libXfixes3 5.0.3-1 OK libXfont1 1.5.2-1 OK libXfont2_2 2.0.1-1 OK libXft-devel 2.3.2-1 OK libXft2 2.3.2-1 OK libXi-devel 1.7.9-1 OK libXi6 1.7.9-1 OK libXinerama-devel 1.1.3-1 OK libXinerama1 1.1.3-1 OK libxkbfile1 1.0.9-1 OK libxml2 2.9.4-2 OK libXmu6 1.1.2-1 OK libXmuu1 1.1.2-1 OK libXpm4 3.5.12-1 OK libXrandr-devel 1.5.1-1 OK libXrandr2 1.5.1-1 OK libXrender-devel 0.9.9-1 OK libXrender1 0.9.9-1 OK libxslt 1.1.29-1 OK libXss-devel 1.2.2-1 OK libXss1 1.2.2-1 OK libXt6 1.1.5-1 OK login 1.11-1 OK luit 20130217-1 OK man-db 2.7.5-2 OK mcpp 2.7.2-2 OK mingw64-x86_64-binutils OK mingw64-x86_64-blas 3.7.0-1 OK mingw64-x86_64-gcc-core 5.4.0-3 OK mingw64-x86_64-gcc-fortran 5.4.0-3 OK mingw64-x86_64-headers 5.0.2-1 OK mingw64-x86_64-lapack 3.7.0-1 OK mingw64-x86_64-pkg-config 0.29.1-1 OK mingw64-x86_64-runtime 5.0.2-1 OK mingw64-x86_64-windows-default-manifest 6.4-1 OK mingw64-x86_64-winpthreads 5.0.2-1 OK mintty 2.7.8-0 OK ncurses 6.0-11.20170617 OK openssh 7.5p1-1 OK openssl 1.0.2k-1 OK p11-kit 0.23.5-1 OK p11-kit-trust 0.23.5-1 OK perl 5.22.3-1 OK perl_autorebase 5.22.3-1 OK perl_base 5.22.3-1 OK pkg-config 0.29.1-1 OK python 2.7.13-1 OK python-cairo 1.12.0-1 OK python-gobject 2.28.6-5 OK python-gobject-devel 2.28.6-5 OK python-gtk2.0 2.24.0-3 OK python-gtk2.0-devel 2.24.0-3 OK python-numpy 1.11.2-1 OK python-setuptools 34.3.2-1 OK python2 2.7.13-1 OK python2-appdirs 1.4.3-1 OK python2-asn1crypto 0.22.0-1 OK python2-backports.ssl_match_hostname OK python2-cairo 1.12.0-1 OK python2-cffi 1.9.1-1 OK python2-chardet 2.3.0-1 OK python2-cryptography 1.8.1-1 OK python2-devel 2.7.13-1 OK python2-enum34 1.1.6-1 OK python2-idna 2.5-1 OK python2-ipaddress 1.0.18-1 OK python2-lockfile 0.12.2-1 OK python2-lxml 3.7.3-1 OK python2-numpy 1.11.2-1 Incomplete python2-openssl 16.2.0-1 OK python2-packaging 16.8-1 OK python2-pip 9.0.1-1 OK python2-ply 3.9-1 OK python2-pycparser 2.17-1 OK python2-pyparsing 2.1.10-1 OK python2-requests 2.13.0-1 OK python2-setuptools 34.3.2-1 OK python2-six 1.10.0-1 OK python2-urllib3 1.20-1 OK python2-wheel 0.30.0a0-1 OK randrproto 1.5.0-1 OK rebase 4.4.2-1 OK renderproto 0.11.1-1 OK rsync 3.1.2-1 OK run 1.3.4-2 OK scrnsaverproto 1.2.2-2 OK sed 4.4-1 OK setxkbmap 1.3.1-1 OK shared-mime-info 1.7-1 OK tar 1.29-1 OK tcl 8.6.6-1 OK tcl-devel 8.6.6-1 OK tcl-tk 8.6.6-1 OK tcl-tk-devel 8.6.6-1 OK terminfo 6.0-11.20170617 OK tzcode 2016j-1 OK tzdata 2017b-1 OK util-linux 2.25.2-2 OK vim-minimal 8.0.0647-1 OK w32api-headers 5.0.2-1 OK w32api-runtime 5.0.2-1 OK which 2.20-2 OK windows-default-manifest 6.4-1 OK xauth 1.0.10-1 OK xcursor-themes 1.0.4-1 OK xdg-user-dirs 0.15-1 OK xextproto 7.3.0-1 OK xf86-video-dummy 0.3.8-1 OK xf86-video-nested 0.1.0-8.20160719git OK xineramaproto 1.2.1-1 OK xinit 1.3.4-12 OK xkbcomp 1.4.0-1 OK xkeyboard-config 2.21-1 OK xmodmap 1.0.9-1 OK xorg-server 1.19.2-1 OK xorg-server-common 1.19.2-1 OK xorg-x11-fonts-dpi75 7.5-3 OK xorg-x11-fonts-misc 7.5-3 OK xproto 7.0.31-1 OK xrdb 1.1.0-1 OK xterm 330-1 OK xwin-xdg-menu 20170321-1 OK xz 5.2.3-1 OK zlib-devel 1.2.11-1 OK zlib0 1.2.11-1 OK