| General > General Technical Chat |
| Review: Hantek DDS 3X25. Anyone own one? |
| << < (105/108) > >> |
| Mechatrommer:
--- Quote from: zibadun on July 20, 2013, 02:23:19 pm ---For example I might want to send ten different test signals at a 2.5 second interval. Can't do this with Gui. --- End quote --- if you cant develop yourself, goltek can save 12 different waves in memory keys (shortcut e+number) and then recall or send signal later (shortcut c+number). you can make a simple timer that beeps every 2.5secs and then you press "c+number" when you hear it. yes its manual and clumsy but thats the best goltek can do ;) and if you know goltek (or the hardware?) is not very good at transitting from one signal to another signal (glitches) which can corrupt your measurement (or maybe not, depending on what you want to do). short help manual here http://www.soasystem.com/eng/goltek/control.htm hope it helps. |
| Mechatrommer:
--- Quote from: Mechatrommer on June 14, 2013, 09:35:05 pm --- --- Quote from: marabut on June 14, 2013, 09:04:49 pm ---but I wonder if implementation e.g. SPI or I2C on digital I/O is possible that way... --- End quote --- ...whats come out of 12bits digital IO is the same as what is feed to the DAC inside. so calling the API and sending data points will do both feeding the analog signal and digital output at the same time. but i'm not 100% since i havent tested it --- End quote --- --- Quote from: marabut on June 15, 2013, 10:58:29 am ---Mechatrommer, I hope you're wrong ;) ... --- End quote --- --- Quote from: marmad on June 15, 2013, 11:48:03 am ---This is wrong - at least for the DDS-3X25. You can use the Hantek software (or download my software from somewhere in this thread) and control all the digital IO pins independently of the DAC (or output the generator values - it's switchable)... (next post) There is one DLL command for switching between programmable or generator output: DDSSetDIOMode / Description: Switch the mode of DDS / 1: Programmable output 0: Generator output --- End quote --- i just happened to dig back some of my doc. the striked statement above is corrected, i actually made a test and have proof on 3x25 long time ago on generator output + io output (well, Output port 8bit HSB O4-O11) at the same time. i havent set any DDSSetDIOMode in goltek nor i have studied it, he's probably right on "Programmable output" mode, but by default, which i suspect is the "Generator output" mode (as picture shown below), both signal output and digital output are producing analog and correspondent digital signal respectively... complete report here http://www.soasystem.com/eng/amla/ what this means, i still believe, designing an analog waveshape in some fashion or specialized SW, save CSV and load to goltek and device will produce some sensible digital output at the same time. FWIW. |
| Sebi11:
Sorry for coming back again but my problem related to synch is not solved. I do the following: set frequency to 10 KHz and give this frequency in 10 repetitions. I read the waveform in my DAQ card. However, in each repetition I get different phase shift (or different time shift if you prefer). Why is that? Is there any possibility to reset Hantek each time before sending the new frequency? |
| tymm:
I just got one of these for a good price on ebay & found a little bit of time to start playing with it... though since I'm not a Windows person, it's a little harder :/ sadly probably not going to get much time in the next several weeks to do anything decent with this, so figured I'd share the little bit i've been able to get to (apologies for the really crappy code; just dumping this in case someone wants to play with it) So far I'm able to set the digital outputs... (testing from OSX). Don't think it'll be too hard to get the other functionality done. Example setting O3, O5 high: $ python Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from Hantek_3X25 import * >>> d = DDS() >>> >>> c = Config() >>> c.CounterMode = True >>> c.ProgrammableOutput = True >>> c.DigitalPins = 0x22 >>> d.configure(c) Requires pyusb. based on example in pyusb tutorial at http://pyusb.sourceforge.net/docs/1.0/tutorial.html using SigRok documentation @ http://sigrok.org/wiki/Hantek_DDS-3X25 as basis for USB comms. Hantek_3X25.py: --- Code: ---#!/usr/bin/env python import usb.core import usb.util import struct Falling = 0 Rising = 1 class Config(object): ResetExtTrigger = False ExtTrigger = False ExtTriggerEdge = Falling ContinuousOutput = False ResetCounter = False CounterMode = False ProgrammableOutput = False DigitalPins = 0x0000 ClockDivider = 1 class DDS(object): def __init__(self, idVendor=0x0483, idProduct=0x5721): # find our device dev = usb.core.find(idVendor=idVendor, idProduct=idProduct) # was it found? if dev is None: raise ValueError('Device not found') # set the active configuration. With no arguments, the first # configuration will be the active one dev.set_configuration() # get an endpoint instance cfg = dev.get_active_configuration() interface_number = cfg[(0,0)].bInterfaceNumber alternate_setting = usb.control.get_interface(dev, interface_number) intf = usb.util.find_descriptor( \ cfg, bInterfaceNumber = interface_number, \ bAlternateSetting = alternate_setting \ ) self.out_ep = usb.util.find_descriptor( intf, # match the first OUT endpoint custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_OUT ) assert self.out_ep is not None self.in_ep = usb.util.find_descriptor( intf, # match the first IN endpoint custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN ) assert self.in_ep is not None def configure(self, config): b0 = 0x00 b1 = 0x00 b2 = config.DigitalPins & 0xff b3 = (config.DigitalPins >> 8) & 0x0f b4 = config.ClockDivider b5 = 0 if config.ResetExtTrigger: b0 |= 0x20 if config.ExtTrigger: b0 |= 0x10 if config.ExtTriggerEdge: b0 |= 0x08 if config.ContinuousOutput: b0 |= 0x04 if config.ResetCounter: b0 |= 0x02 if config.CounterMode: b0 |= 0x01 if config.ProgrammableOutput: b1 = 0x01 cval = struct.pack('>BBBBBBB', 0xa0, b0, b1, b2, b3, b4, b5) self.out_ep.write(cval) --- End code --- |
| vfperri:
Hi "tymm" I'm also trying to use this generator whith Python and I'm very interested in knowing how far have you get with the python code for command the device. |
| Navigation |
| Message Index |
| Next page |
| Previous page |