Rate Limited Output - Un-tether from Dynamic Acquisition Rate

  • Software
  • Rate Limited Output - Un-tether from Dynamic Acquisition Rate
Nick Rawson

Posted on 19.06.2018 15:38

Hi,

I need to rate limit an output to avoid applying a sudden transient to a motor. I have created a math formula to do this (also see attached file)

if('NEW_SP'> prev, prev+('RATE_RPM-S'/20),if('NEW_SP'<prev, prev-('RATE_RPM-S'/20),prev))

Note: RATE_RPM is divided by 20 because I have a DAQ rate of 20,000Hz.

The math channel is set to sync with a sample rate divider set to the maximum 1000.

I'm concerned that the technicians / engineers might change the Dynamic Acquisition Rate without understanding that it could affect the iteration rate of the above formula, and consequently end up ramping at the wrong rate. Is there a way to iterate the math channel formula at a fixed rate independently of the Dynamic Acquisition Rate?

Alternatively, is there an easier/better way to achieve what I'm trying to do with ramp rates?


Attached files:
Aljaž Kropivšek
Application Engineer for Control and Automation
Posted on 06.07.2018 17:38

To assure that the formula always uses the current Dynamic Acquisition Rate you could used the "sr" function which returns the formula's sample rate without the sample rate divider and this sample rate is always the same as the Dynamic Acquisition Rate.


To use this in your formula you need to replace the "20" with "sr/1000":


if('NEW_SP'> prev, prev+('RATE_RPM-S'/(sr/1000)),if('NEW_SP'<prev, prev-('RATE_RPM-S'/(sr/1000)),prev))

Login to reply to this topic. If you don't have account yet, you can signup for free account .