• Content count

  • Joined

  • Last visited

About spri

  • Rank

Recent Profile Visitors

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

  1. Thanks @attila. I did not think to use funcSquare to create a DC offset for a specified duration.
  2. I am trying to do something similar, with an idle offset value and then switch to a different DC offset value after a trigger. However, with the code below, I am getting the FuncDC/NodeOffset value immediately when I configure the channel, instead of the idle value prior to the trigger. It only goes to the idle value after the RunSet duration. Could you please explain how to get it to idle at a low value prior to the trigger?
  3. For the analog discovery 2 SDK, when using the AnalogOutWaitSet command, is there a function which will tell me how long until the trigger/device start? I am looking for something similar to AnalogOutRunStatus, but which will tell me the remaining wait time. Thank you.
  4. Thanks, I got it working!
  5. Thanks, this helps a lot with the pulsed outputs. Is it possible to also do this with the Constant output-type also? For example, in the setup below I want DIO-2 to switch from idle to constant at t=30ms (20ms delay after the 10ms wait-set), but there are obviously not options for the counter-init and divider-init for this output type. I am ultimately interested in doing this within the python sdk, not in waveforms (but waveforms is a good place to start to visualize what I'm doing). In the SDK and dwf.h file it is also not clear how to set the output type to PP+constant or control the FSM/value -- how do I do that?
  6. On the Discovery2, is it possible to set a different trigger wait-set (Analog/ DigitalOutWaitSet) for each individual channel index, rather than one trigger delay for the whole instrument?
  7. Apologies for asking dumb questions, but that table is definitely not in the version of the SDK reference manual I have been using. I'm using the May 8 2017 version -- is there an update, or is this from an older version and somehow got cut? My version doesn't even have a section 11.3...
  8. Waveforms allows the user to turn the power supplies on and off, and set the voltage for the Analog Discovery 2. How do you do this with the SDK? Also, what is the default setting? I cannot find anything in the documentation. Thanks!
  9. I am using an external trigger pulse to start outputs on AnalogOut and DigitalOut pins using the python SDK. The Trigger Pins on the AD2 are so sensitive that they interpret slight jostles of the wire as a trigger pulse -- so my outputs start unexpectedly. There are functions to qualify the trigger on AnalogIn (hysterisis, lengthcondition, etc) to wait for the right signal -- how do I do something similar for the Analog and Digital Out Triggers (because they seem to only have SlopeSet functions)? Also, is it possible to have the same external trigger line act as both a 'Start' and 'Stop' for a pin?
  10. spri

    AnalogOut Triggers

    Hi @jpeyron, I've been struggling to get my alternate implementation to do everything it needs to do. So, I am revisiting this idea. An answer to the original question would be most helpful! Thanks!
  11. One more question, for clarification: why do you use (1<<5) and not (0<<5) to disable the pin?
  12. Thank you for that clarification -- your solution works. You may want to emphasize the D-Out and D-IO prioritization and function in future versions the SDK reference manual -- since many of those commands take a channel index as an argument, it seemed logical that they would only apply to the specified channel(s).
  13. I have built a fairly involved GUI which allows user control of multiple analog and digital output signals on the AD2 with various triggers, timers, and on/off toggles controlling multiple systems. When I try to turn off pulses on a SINGLE digital pin using the DigitalOutOutputSet command, ALL the digital pins switch to zero. But, I need the rest of them to keep running. This section of my code is trivial -- there's not a lot I can do to troubleshoot with something so minimal. What am I missing? def Stop(self): if (self.State == 1 or self.State == 2): ### do some unrelated stuff else: self.StopX() ###reset output on pin5 to 0 self.dwf.FDwfDigitalOutOutputSet(hdwf, c_int(5), c_int(0)) ###(hdwf, idxChannel, v) def StopX(self): try: ###turn off/reset x-ray pulses to zero self.dwf.FDwfAnalogOutReset(hdwf, c_int(-1)) ###ANY CHANCE THIS IS THE CULPRIT?
  14. The AnalogDiscovery2 has functions AnalogOutRunSet and DigitalOutRunSet which set the run length for the entire instrument. Is it possible to set run-times for individual pins, instead of for the instrument as a whole? For example, to have certain pins turn off after an exact duration specified while the other pins continue running uninterrupted?
  15. spri

    AnalogOut Triggers

    I configured my program slightly differently so I don't need to do this anymore. Thanks for checking!