Autor Thema: LS-block limits  (Gelesen 190 mal)

Offline dmsque

  • Newbie
  • *
  • Beiträge: 9
LS-block limits
« am: Februar 21, 2026, 11:14:54 Vormittag »
Hello!
I try to scale the analog value from Analog Input with the LS-block. In this block, the output value is limited by Y1..Y2 range, even if the input value from AI is out of X1..X2 range.
To trick it, I created a user FB with mathematical relationships which are presented in documentation (Chapter 6.1.3.5), but it works correctly only in the case when the gradient "m" is an INTEGER.
In all other cases Gradient rounded and it takes the wrong scaled value.
Does enybody knows solutions to scale AI beyond ranges X1..X2,  Y1..Y2?

Offline Juergen__R

  • Full Member
  • ***
  • Beiträge: 311
  • I love easy-Forum.net
Antw:LS-block limits
« Antwort #1 am: Februar 21, 2026, 11:52:01 Vormittag »
Hallo,

bitte den Eingangs- oder Ausgangswert der LS-Skalierung mit einem VC-Baustein (Wertbegrenzung begrenzen.

Gruß, Jürgen

Offline dmsque

  • Newbie
  • *
  • Beiträge: 9
Antw:LS-block limits
« Antwort #2 am: Februar 21, 2026, 15:14:03 Nachmittag »
Maybe I described my task in a wrong way.
Example:
Source - AI in mA (4..20mA).
Output value - weight in kg.
LS module
X1 = 5mA
Y1= 0 kg
X2 = 10mA
Y2= 1000kg

If signal on AI is in the range 5..10mA, LS block would be scale correctly from 0 to 1000kg.
But in my case I need to scale lager weight, for example 2000kg. It correspond to input value ~15mA. Output walue from LS block whatever will be 1000kg.
It looks that LS-block has inbuild VC-limit)

Offline dmsque

  • Newbie
  • *
  • Beiträge: 9
Antw:LS-block limits
« Antwort #3 am: Februar 21, 2026, 21:33:23 Nachmittag »
I found a solution.
I multiplied Gradient "m" x1000, and devided it by 1000 at calculating scaled value.

Offline ELWMS

  • Full Member
  • ***
  • Beiträge: 134
  • 400er...500...800...e4...Galileo
Antw:LS-block limits
« Antwort #4 am: Februar 23, 2026, 10:41:53 Vormittag »
Hallo!

analoge Eingänge haben den Wertebereich 0....4095 entspricht 0-20mA bzw. 0-10V.
0mA = 0
4mA = 819
5mA = 1024
10mA = 2048
15mA = 3072
20mA = 4096

X1=1024  = 5mA
X2=2048  = 10mA

bzw. bei 15mA und 2000kg

X2=3072 = 15mA
Y2=2000

Gruß,

ELWMS


C64...ABB ACS100 bis 880...ABB SAL...EPLan P8...STEP7...300/400 & TIA... EASY E4... GALILEO... EATON SWD... SEW...STÖBER...AUTOSEN...IT...PROFIBUS...PROFINET

Offline dmsque

  • Newbie
  • *
  • Beiträge: 9
Antw:LS-block limits
« Antwort #5 am: Heute um 18:32:47 »
5mA = 1024
10mA = 2048
15mA = 3072
X1=1024  = 5mA
X2=2048  = 10mA
bzw. bei 15mA und 2000kg

X2=3072 = 15mA
Y2=2000
Hi!
I know how it works and can calculate it.
The task was to scale input value correctly when signal goes outside limits (X1, X2. Y1, Y2).
I use E4 for tower crane monitoring system and live-scaling analog signal from weight-axis is needed. It had to scale sensor with maximum allowable weight before, but it's not always applicable.