• Not Answered

DI as Pulse Input (PIN) for belt speed

I'm using M-Series DI card (because we don't have multi-function cards) and trying to roughly measure belt speed.  However, the PIN function block output looks like it's accumulating instead of giving me the rate, regardless of the PV. It doesn't matter what I set the scaling to.  So what could I be missing or what needs to be done?

Process Control Technician
Intrepid Potash

2 Replies

  • Just a few suggestions. I'm sure you've checked everything before.

    Have you double checked your Pulse Value, Time Units, Out Scale?
    Is there any filtering on your signal?

    Have you enabled Simulation to verify output?

    You might set up a DI point and counter module to verify you are receiving the signal.
    You could use an integrator block for time / pulse as verification of actual rate.

    If that is working then you can address possible issues with the PIN block configuration.

    Best of Luck.
  • The standard DI card supports a pulse count, with a maximum frequency of about 75 Hz. When configured as PCI, this card's channel will provide a "COUNTER_IN parameter, which is a 16 bit unsigned integer that rolls over to 0 at 65535. The Multifunction card channel, when configured as PCI will provide "COUTNER_IN", "FREQUENCY" and a "RESET_COUNT" parameter.

    The PIN IO block was designed to work with the M-series Multifunction Card, and allows you to configure Engineering Units per pulse among other things. When bound to the Mulitfunction card PCI, the block uses the Frequency parameter, not the Counter_IN.

    You can use a Deadtime block set to 1 second and subtract the Out value from the IN value to get the number of pulses per second, and scale this to give you speed. Note that you have to check for the invalid negative value when the register rolls over. So I would use a CALC block:

    IF ('^/DT1/IN' - '^/DT1/OUT') >= 0 THEN
    OUT1 := ('^/DT1/IN' - '^/DT1/OUT') ;
    ELSE;
    OUT1 := ( '^/DT1/IN' - '^/DT1/OUT') + 65535;
    ENDIF;

    OUT2 := OUT1 * IN1;

    If you leave the "ELSE" statement blank, OUT1 will hold the last value for one scan on the register roll over.

    IN1 can be a scalar to convert the pulses to revolutions per sec, min etc.

    Andre Dicaire