• Content Count

  • Joined

  • Last visited

  1. Here are a few other cases with Anaconda I tried that also fail: 1. Anaconda 2.0.0, Python 2.7.6, IPython 2.1.0 2. Anaconda 2.1.0, Python 2.7.8, IPython 2.2.0 I couldn't install IPython 2.3.1 with Python 2.7.6 under Anaconda using the conda package manager, which apparently updates python to 2.7.9 from 2.7.6 when you try to update ipython from 2.1.0 to 2.3.1.
  2. Ok, I just installed Canopy and have the following results when running the code from in an ipython notebook in the following python installations on my laptop (mac os 10.9.4): 1. Anaconda 2.1.0 (python version 2.7.9, ipython version 2.3.1): can't talk to Analog Discovery 2. Fresh installation of python using homebrew, and then install ipython with all of its dependencies for ipython notebook (python version 2.7.9, ipython version 2.3.1): same result as with Anaconda - fails 3. Canopy 1.5.1 64 bit (python version 2.7.6, ipython version 2.3.1): works just fine The only difference I see between these is that Canopy uses python 2.7.6 rather than 2.7.9. In all cases the ipython version is the same.
  3. Sorry--renaming the file had nothing to do with its success. I just mentioned it because I happened to have renamed the file for a different (unimportant) reason.
  4. Apparently it's not such a good idea to use the default mac installation for the test above so tonight I installed homebrew, python 2.7.9, virtualenv, and ipython & ipython notebook with all of its dependencies. Using this installation, I then tried to connect to the Analog Discovery from within an ipython notebook, but got the same negative result. Running a re-named version of was successful in communicating with the Analog Discovery. I'll email you the ipython notebook I used which contains more information.
  5. I have no problem accessing an Analog Discovery from ipython notebook from within Windows running on VMware with the SDK that comes with Waveforms2 (which I've been doing for several months) so it sounds like there is something wrong with the ipython server on the mac. I suppose it would make sense to install ipython into the default mac os x python package and test again to determine if it's the ipython server on the mac or the Anaconda implementation of the ipython server.
  6. Thank you very much for the links to Doug Mercer's code. This is exactly the kind of thing I've been looking for. However, I could never find such examples by googling for them. Perhaps it would be better to put such code on a mainstream site such as github or its equivalents in addition to a more specialized site like Are you aware of any other code examples people have made available?
  7. Here is my set up: I have installed the Anaconda python package (python 2.7.8) on my mac. The mac os x default python is also present on my mac (python 2.7.5). The problem in my original post occurs when I use the Anaconda Launcher to start ipython in my browser (Safari) and then create a notebook and paste the code from into an input cell and run it. This returns: DWF Version: 2.8.6 Number of Devices: 0 On the other hand, runs just fine and sees the Analog Discovery for the following two scenarios: 1. From Terminal, execute "which python" which returns "/Users/nordin/anaconda/bin/python", just to confirm which python is being used. I then execute and it works fine. 2. Edit .bash_profile to remove the anaconda/bin directory from my PATH. Start a new Terminal window, "which python" now returns "/usr/bin/python". I then execute and again it works fine. So it appears that both python installations can see the Analog Discovery when run from the terminal. The problem is running the code from within an ipython notebook. This is a serious issue for me as I am evaluating using ipython notebooks from an Anaconda installation (which is a convenient scientific python distribution available for all platforms) and Analog Discoveries in undergraduate courses and labs.
  8. I installed the mac version of Waveforms3 (I'm running os x 10.9.4 on a mac book pro retina). When I start the Waveforms3 application it finds my Analog Discovery just fine and seems to be functional. When I select the menu item "Waveforms->About Waveforms" I get a dialog box that shows me the version number is 3.0.16, which is what I installed. However, when I copy the code from into a cell in an IPython notebook running on my mac, I get the following output: DWF Version: 2.8.6 Number of Devices: 0 Shouldn't the dwf version number be 3.0.16? Also, why isn't the attached Analog Discovery found? I ran the ipython notebook code immediately after opening & then closing Waveforms3 (which successfully found the Analog Discovery).
  9. Would you like to have more examples or embedded in the documentation? or both? I understand the desire to break out the code to leave the manual text uncluttered. Perhaps at a minimum including the file name(s) of the relevant examples in the manual text would help so that a new user has some idea where to go. My problem has been that the manual is ok as a reference, but it's difficult to learn from it how to do things. You have to kind of search through many or most of the commands and logically try to figure it out, and without the code examples there's not enough information to do that. On the other hand, the code examples show only the most stripped down functionality (at least, that's my impression) so the new user is left to guess how to do more involved things. Perhaps this could be addressed by adding some more code examples that do somewhat more complex tasks. As I contemplate how to incorporate the Analog Discovery into our course offerings, it seems like a lot of this would need to be worked out so that students have adequate resources from which to learn. Thanks again for your feedback and help.
  10. Thanks, attila! Your example code is very useful and works great. My key misunderstanding was that indexing of devices starts at 0. I really appreciate the clarification and example. If I could make a suggestion. The SDK documentation (Waveforms SDK Reference Manual.pdf) is helpful, as are the simple python example files that ship with Waveforms 2 SDK. It would be much more useful if there were more examples that illustrates each of the library calls in the reference manual and how they are intended to be used. I think this is the main thing that is lacking so that individuals such as myself could get up to speed quickly. Thanks again for your very timely help and clarification!
  11. We recently started accessing our Analog Discoveries with custom python scripts. We used to use matlab with direct dwf library calls using matlab's calllib() function, but are finding python to be a much more convenient option. Here is my question: while I can cause the waveform generator to output custom or predefined waveforms and can read them with single shot, PC-triggered acquisitions, I can't retrieve Analog Discovery information such as device type, name, and serial number. Here is some sample code: from __future__ import division from __future__ import print_function from ctypes import * from dwfconstants import * import collections #load dwf library and declare ctype variables if sys.platform.startswith("win"): dwf = cdll.dwf DADinfo['sysplatform'] = sys.platform #print(sys.platform) else: print("THIS IS NOT A WINDOWS SYSTEM") #print DWF version version = create_string_buffer(32) dwf.FDwfGetVersion(version) DADinfo['dwfversion'] = version.value print("DWF Version: "+version.value) #make sure any attached Analog Discovery is in a known state dwf.FDwfDeviceCloseAll() nDevice = c_int() result = dwf.FDwfEnum(enumfilterDiscovery, byref(nDevice)) print("Enum:", result, nDevice.value) isUsed = c_int() result = dwf.FDwfEnumDeviceIsOpened(c_int(1), byref(isUsed)) print("DeviceIsOpened:", result, isUsed.value) hdwf = c_int() result = dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) print("DeviceOpen:",result, hdwf.value) result = dwf.FDwfEnumDeviceIsOpened(hdwf, byref(isUsed)) print("DeviceIsOpened:", result, isUsed.value) sn = create_string_buffer(32) result = dwf.FDwfEnumSN(hdwf,sn) print("Serial number:", result, sn.value) dn = create_string_buffer(32) dwf.FDwfEnumDeviceName(hdwf,dn) print("Device name:", result, dn.value) deviceID = c_int() devicerevision = c_int() result = dwf.FDwfEnumDeviceType(hdwf, byref(deviceID), byref(devicerevision)) print("Device type:", result, deviceID.value, devicerevision.value) And here is the output I get when I run this code: DWF Version: 2.7.5 Enum: 1 1 DeviceIsOpened: 0 0 DeviceOpen: 1 1 DeviceIsOpened: 0 0 Serial number: 0 Device name: 0 Device type: 0 0 0 Note that none of the requested information is returned. Any suggestions?
  12. I too am very interested in a cross platform version of WaveForms. I personally use a mac laptop most of the time, but my undergraduate and graduate students in the lab use Windows PCs. We have also used linux boxes in the past and probably will again in the future. In any case, it would be very helpful to be able to access Waveforms from any of the computers we use. We have also started doing custom python scripts using the Waveforms SDK. Will the SDK also be available on all 3 platforms? This would really simplify our python development efforts. As a final thought, another faculty member and I have seriously considered replacing a lot of our undergraduate lab equipment with an Analog Discovery for each student. Lack of cross platform support has been a big hindrance in moving this forward since our student population uses all 3 platforms.