spri

Members
  • Content Count

    31
  • Joined

  • Last visited

About spri

  • Rank
    Frequent Visitor

Recent Profile Visitors

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

  1. Thank you, that worked perfectly! But, I'm a little confused still as to why my solution didn't work. When using -1 to configure the master run time, does that override individual channel settings on the wait time?
  2. Thanks for that pointer, but I had already tried that - when I replace the AnalogOutWaitSet with these two lines of code, both channels trigger at the same time using whatever delay period is specified for channel 0. Is there some additional argument (node?) which is required to make this work when using the SDK and not the Waveforms software?
  3. I am trying to create two square wave signals on the AD2 Analog instrument. Both signals should start at 5v, one should drop to 0v at the trigger, and the other should go to 0v after a certain delay time after the trigger (delay time = self.d/1000). Both signals should return to 5v at the same time (end of RunSet). I think I have to do this using the 'funcCustom' output, at least for the delayed signal. However, I am not able to get the funcCustom signal to give me the desired output. It just outputs 5v constantly after the trigger signal. (The funcSquare signal does what is expected). Is there an easier way to create this delay between two analog channels without using funcCustom? Or is there something wrong in my syntax for getting the funcCustom signal to work? Thank you!
  4. Thanks @attila. I did not think to use funcSquare to create a DC offset for a specified duration.
  5. 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?
  6. 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.
  7. Thanks, I got it working!
  8. 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?
  9. 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?
  10. 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...
  11. 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!
  12. 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?
  13. 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!
  14. One more question, for clarification: why do you use (1<<5) and not (0<<5) to disable the pin?
  15. 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).