Quantcast
Channel: Measurement Studio for VC++ topics
Viewing all articles
Browse latest Browse all 654

Can I Control the Pulse offset using the Counter Out?

$
0
0

Hello Everyone.

I am trying to generate the Pulse as below;

 

PWM PULSE.PNG

 

I have seen and understood an example to generate a pulse waveform "GenDigPulseTrain_Continuous".

However, I can not control the offset of the pulse train.

Although the function gives me "initial delay(The amount of time in seconds to wait before generating the first pulse)",

I can not shift "t_dead" cycle.

 

/*01.Frequency Control*/
 // The units to use to define pulse frequency.
  m_pTaskWrite->COChannels.CreatePulseChannelFrequency(vecstrings[0]/*LPCTSTR counter*/,
   "PWM_C0_CH_HIGH"/*LPCTSTR nameToAssignChannel*/,
   DAQmxCOPulseFrequencyUnitsHertz,
   DAQmxCOPulseIdleStateHigh,
   dDeadTime, 
   m_nFncFrequency/*frequency*/,
   prDuty.second/*dutyCycle*/);
    
  // The units to use to define pulse frequency.
   m_pTaskWrite->COChannels.CreatePulseChannelFrequency(vecstrings[1]/*LPCTSTR counter*/,
    "PWM_C0_CH_LOW"/*LPCTSTR nameToAssignChannel*/,
    DAQmxCOPulseFrequencyUnitsHertz,
    DAQmxCOPulseIdleStateLow,
    dDeadTime/**2 + (prDuty.second *dCycleTime)*/, 

    m_nFncFrequency/*frequency*/,
    prDuty.second/*dutyCycle*/);

 

Please let me know how I solve this problem.

Thank you


Viewing all articles
Browse latest Browse all 654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>