Jump to content
Fourth of July -- Digilent US offices closed ×

Hellsmoke

Members
  • Posts

    2
  • Joined

  • Last visited

Hellsmoke's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hi Attila Thank you for your answer. But it doesn't work for me. I tried everything to trigger an AnalogIn with a DigitalOut and I went through the examples. I think I don't get the principle of AnalogDiscovery triggering. I have a general question: It is possible to start automatically an AnalogIn signal recording at the moment when a DigitalOut pulse signal is going from High to Low? Regards
  2. Hi I use AnalogDiscovery2 and AnalogDiscovery3 SDK with C#. I want to record AnalogIn0 (+1) signal if DigitalOut1 (2) goes from low to high. I tried this but I never get a signal record. int dSamples = 8192 / 8; double sampleBuffer = new double[dSamples]; // Define and enable AnalogIn0 AnalogDiscovery.FDwfAnalogInChannelEnableSet(m_hdwf, 0, 1); AnalogDiscovery.FDwfAnalogInChannelRangeSet(m_hdwf, 0, 5.0); AnalogDiscovery.FDwfAnalogInChannelOffsetSet(m_hdwf, 0, 2.5); AnalogDiscovery.FDwfAnalogInAcquisitionModeSet(m_hdwf, AnalogDiscovery.acqmodeRecord); // Enable and set DigitalOut1 AnalogDiscovery.FDwfDigitalOutEnableSet(m_hdwf, 1, 1); AnalogDiscovery.FDwfDigitalOutIdleSet(m_hdwf, 1, AnalogDiscovery.DwfDigitalOutIdleLow); // DOUT low // Define and set Trigger AnalogDiscovery.FDwfDigitalOutTriggerSlopeSet(m_hdwf, 2); AnalogDiscovery.FDwfAnalogInTriggerSourceSet(m_hdwf, AnalogDiscovery.trigsrcDigitalOut); AnalogDiscovery.FDwfAnalogInTriggerConditionSet(m_hdwf, AnalogDiscovery.DwfTriggerSlopeRise); AnalogDiscovery.FDwfDigitalOutIdleSet(m_hdwf, 1, AnalogDiscovery.DwfDigitalOutIdleHigh); // DOUT high byte psts = 0; while (true) { AnalogDiscovery.FDwfAnalogInStatus(m_hdwf, 1, out psts); if (psts == AnalogDiscovery.DwfStateDone) { break; } } // get samples AnalogDiscovery.FDwfAnalogInStatusData(m_hdwf, 0, sampleBuffer, dSamples); What is wrong or what is missing?
×
×
  • Create New...