Supported platforms: CODESYS 2.3, CODESYS 3.5
This function takes care of the attenuation functionality.
When i_AttenuationOn input is true, the return value is limited with i_AttenuationAmount input.
Normally this functionality is used as end attenuation for cylinders. The cylinder's end limit sensor is connected
to i_AttenuationOn input and when the cylinder closes to the end limit it’s speed is limited to the given percentage of the maximum
value of i_Control input. This prevents the cylinder from crashing to the end at full speed.
For example, if i_AttenuationAmount is 70% and i_AttenuationOn is true, then the return value is limited to 0,7*32767=22937.
If i_Control value exceeds 22937, the return value is limited to 22937, but if i_Control value is below 22937 it is not limited.
The function takes care of one direction’s (0…32767) attenuation.
This function is primarily intended for ProportionalValveControl library's internal use. |
Input variable name |
Data type |
Range |
Description |
i_Control |
INT |
0..32767 |
Control signal |
i_AttenuationOn |
BOOL |
FALSE/TRUE |
If input is true, return value is limited to given percentage of max control. |
i_AttenuationAmount |
BYTE |
0..100% |
Amount of attenuation |
Return value |
Data type |
Range |
Description |
|
INT |
0..32767 |
Limited control signal |
-
Source file Topic000331.htm
Last updated 21-Feb-2025