darth458

Members
  • Content Count

    18
  • Joined

  • Last visited

About darth458

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, This is a bit exotic. Has anyone hacked the hardware in order to lock the 100 MHz clocks of two or more AD2? Seems like maybe the simplest thing might be to feed the PLL because the frequency going in is lower so the signal handling to get it in there would be easier. However you may get a fixed phase offset at 100 MHz that is unpredictable. Has anyone tried this? thanks
  2. This code requires you to connect the outputs to their respective inputs with same length cables and you need a jumper between trig1 and D0 which is easy to do on the header. It produces two quadrature phase channels which are both FM modulated with high index. I was impressed by the performance of the AD2 in the sense that FM is accomplished in a robust way by mathematical phase manipulation so that the output that is received by the ADC conforms well to the desired waveform. There's only one problem which is that the code doesn't always work. Sometimes channel two is just a straight line a 1 Volt, I invoke the code over and over and the internal state changes and the AD2 acts differently. At least mine does. I don't need help with this because I have moved on to another method but it might be worth a look at Digilent headquarters to see what's up. About the code: this is hackware, ugly stuff with no error checking, use at your own risk, etc. With a device like this a lot of the time you want is just an example of how to do something. The code is properly constructed only in the sense that it drives the API to do a particular thing. If no one objects I will offer up a few more examples. I like the platform a lot and would like it to thrive and evolve which is why I'm taking a stab at contributing. setup.cpp swoop_1.cpp
  3. darth458

    AD2 Ehnacement Milliohmeter Version 2

    So are you saying that you have no code development environment? You want to script the thing using digilent supplied tools then save the scope output to a file?
  4. Hi, After some initial problems we are doing well with this device, but one thing we would like is more options for ADC buffer, maybe one where one channel is expanded at the expense of another. Could we get a 32K ADC buffer one one channel for instance? What is the maximum ADC buffer on one channel if all other considerations are sacrificed? Are there any tricks for more continuous throughput in continuous record mode? We are only managing about 1 MHZ sample rates that way. thanks, Steve
  5. darth458

    AD2 Ehnacement Milliohmeter Version 2

    I'm not volunteering but it would seem that you can use the two DAC outputs instead and they ought to be well behaved. Also you don't need the bipolar to unipolar converter. I will try to throw together an acquisition code in the next few days for you but you haven't said anything about your software environment. This project involves some post-processing. Are you able to do that once you have the ADC data?
  6. darth458

    sporadic external triggered output

    Hi Attila, thanks I'll try that. I'm puzzled that you need to set a run length (RunSet) if you have a clock and a known buffer length. It seems redundant. If my clock is 100 MHz and my buffer is 1000 points it will take 10 microseconds to play that buffer. Why would I need to add a running time? Of course I don't mind doing it. If the time I choose for RunSet is longer than the buffer at the specified clock rate what does it play out?
  7. Hello, I need to accept an external trigger on T1, for instance, and play out 1 waveform that lasts 1000 samples at the full clock speed. After it plays this it needs to be prepared to accept another trigger sometime later, but maybe just 20-50 nS later or an hour later. I cannot seem to do this with either custom or play mode. I don't think it is possible. Also how do I get output on D8, which is next to T2 on the header? thanks
  8. darth458

    simultaneous acquisition python averaging

    Hi Attila, I have a later post in which I tried to use the pattern generator to create a trigger for both channels by jumpering DIO pin 0 to T1. That is where my interest lies now. That didn't work either although the pattern generator was putting out a signal and connected to T1. thanks, Steve
  9. At this point I have given up on trying to trigger one instrument from another. Finally I decided to trigger two instruments from the pattern generator. I placed a jumper from T1 to D0 on the BNC adapter board header and with the code below I do get a 10 khz digital drive at pin d0. But I get no triggering of either channel. Here is the code: hdwf = c_int() sts = c_int() hzSys = c_double() dwf.FDwfDeviceOpen(c_int(0), byref(hdwf)) if hdwf.value == hdwfNone.value: print "failed to open device" quit() dwf.FDwfDigitalOutInternalClockInfo(hdwf, byref(hzSys)) ##********************************************************************************************* ##setup pattern # 10kHz pulse on IO pin 0 dwf.FDwfDigitalOutEnableSet(hdwf, c_int(0), c_int(1)) # prescaler to 2kHz, SystemFrequency/1kHz/2 dwf.FDwfDigitalOutDividerSet(hdwf, c_int(0), c_int(int(hzSys.value/1e4/2))) # 1 tick low, 1 tick high dwf.FDwfDigitalOutCounterSet(hdwf, c_int(0), c_int(1), c_int(1)) dwf.FDwfDigitalOutConfigure(hdwf, c_bool(True)) ## starts the pattern generator forever ##********************************************************************************************* ##setup analog OUT dwf.FDwfAnalogOutNodeEnableSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), AnalogOutNodeCarrier, funcCustom) dwf.FDwfAnalogOutNodeDataSet(hdwf, c_int(0), AnalogOutNodeCarrier, rgdSamples, c_int(1000)) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(100000000.0)) dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(0.5)) dwf.FDwfAnalogOutTriggerSourceSet(hdwf, c_int(0), trigsrcExternal1) ##external trig 1 ##********************************************************************************************* ##setup analog IN dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0), c_bool(True)) dwf.FDwfAnalogInFrequencySet(hdwf, c_double(100000000)) dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(4)) dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(1000)) dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcExternal1) ##external trig 1 print "sleeping 2 sec" time.sleep(2) ##********************************************************************************************* ## START THEM UP this should run forever dwf.FDwfAnalogOutConfigure(hdwf, c_bool(False), c_bool(True) dwf.FDwfAnalogInConfigure(hdwf, c_bool(False), c_bool(True)
  10. darth458

    simultaneous acquisition python averaging

    Hello Attila, I tried to do this with a repeating custom waveform but it doesn't work. A repeating waveform comes out but it doesn't trigger the input? dwf.FDwfAnalogOutNodeEnableSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_bool(True)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), AnalogOutNodeCarrier, funcCustom) dwf.FDwfAnalogOutNodeDataSet(hdwf, c_int(0), AnalogOutNodeCarrier, rgdSamples, c_int(1000)) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(100000.0)) dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(0.5)) dwf.FDwfAnalogOutRepeatSet(hdwf, c_int(0), c_int(0)) # repeat forever dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0), c_bool(True)) dwf.FDwfAnalogInFrequencySet(hdwf, c_double(100000000)) dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(4)) dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(1000)) dwf.FDwfAnalogInTriggerAutoTimeoutSet(hdwf, c_double(0)) #disable auto trigger dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcAnalogOut1) #source analog 1 dwf.FDwfAnalogOutConfigure(hdwf, c_int(0), c_bool(True) dwf.FDwfAnalogInConfigure(hdwf, c_int(0), c_bool(True) BELOW, loop on anaalog in done to take data
  11. Any chance for more detail on the trigger bus? There's a little diagram in the reference manual but it doesn't give clarity about how many lines there are. There's a PC trigger line and they say that it puts out a "short pulse" but nothing about its height in volts. Do I need to concern myself with the details of that pulse or does it suffice to say trigsrcPC? Can I assume that it will trigger the AnalogIn with no other parameter information or do I need to connect the analog in to a particular wire in order to see it? What does it mean to say that a device trigger is set to high impedance? There are two lines on the connector that are marked as triggers. Are they always inputs and what levels are required? There is a lot of necessary circuit detail about the analog input but the documentation about the triggering has to be inferred and interpolated from a combination of the documentation and the examples. thanks
  12. darth458

    simultaneous acquisition python averaging

    Hello Attila, I'm not using the GUI. In the example I mention (analoginoutsync.txt) the method is to set the output to trigger off of PC, start the input, and in the next line of code in the cpp subroutine ...StartAll... it calls the PC trigger. So the time relationship there is vulnerable to the host program timing unless there is a command fifo. Superficially, I would think that if you set both output and input to trigger off the PC, then when you invoke the PC trigger you could reasonably expect that the two channels would have a constant time relationship if you set the ADC sample rate to 100MHz. But I don't see that in the examples code. I don't expect uniform timing of acquisitions from using PC trigger but I do need the out vs in timing to stay the same in clock cycles if I trigger them with srcPC. Is that true? thanks
  13. Hello, I have transcribed the macro analoginoutsync.txt into python by tracing the parser activity to SDK calls in DWFCMD. To my knowledge this capability was not in the python examples. My concern in general is that I would like to do program-directed signal averaging since that is not built into the API. Should I be worried about jitter in the delay between starting the analog input channel and putting out a PC trigger pulse to start the analog output? Is there a reason why this ordinary and useful capability was only represented in one macro example and not in cpp or python examples? Also can I ask for a builtin capability to output a user waveform and take data with a time offset while synchronously signal averaging? In other words, an impulse response which is synchronized to the system clock for averaging that is stationary? thanks