Digout Impluse per Minute not working on EasyV3

Hello there,

I’m currently playing with the DigOut of an EasyV3. Every other mode of the DigOut is working fine, except the Impulse per Minute feature.

It’s configured followed way:

DigOut_Init(DIGOUT_CHANNEL1,DIGOUT_IMPULSE_PER_MINUTE,500,-1);
DigOut_SetValue(DIGOUT_CHANNEL1,30);

I’m not receiving a single pulse, did I miss something?

Greetings
stegmaf

Hello @stegmaf,

the following code worked for me:

  new iResult;
  
  iResult = UI_SetSampleRate(UI_SAMPLE_RATE_64);
  #log("UI_Samplerate()= %d", iResult);
 
  iResult = DigOut_Init(DIGOUT_CHANNEL1, DIGOUT_IMPULSE_PER_MINUTE, 500, -1);
  #log("DigOut_Init()= %d", iResult);
 
  iResult = DigOut_SetValue(DIGOUT_CHANNEL1, 30);
  #log("DigOut_SetValue()= %d", iResult);

However, I tested the code on a myDatalogEASY IoT. The digital output on the myDatalogEASY V3 and the myDatalogEASY IoT are the same. Which firmware version is installed on your myDatalogEASY V3?

Please note that only a multiple of the sample rate for the universal inputs selected via the "UI_SetSampleRate()"function can be set for the pulse duration in “Pulse/min.” mode. The actual pulse duration is calculated as follows:

Pulse duration = (cfg1/sample rateUI + 1) x sample rateUI

For more information see Device API -> System -> myDatalogEASY V3 EasyV3 and Device API -> Universal inputs -> myDatalogEASY V3 Universal inputs
Kind regards
Josef

Hello Josef,

thanks a lot. Your code works and I found out why my don’t:

It seems when you are not using the UIs the SampleRate is disabled and so my Switch Output didn’t blink. I added this code line in front and now it works! :smile:

Greetings
stegmaf