# SCALE\_R: Expression too complex with ARM and Twincat 2.11.2223

**URL:** <https://oscat.discourse.group/t/scale-r-expression-too-complex-with-arm-and-twincat-2-11-2223/1387>\
**Category:** Bestehende Module / Existing Modules\
**Created:** [29. Juni 2012 um 09:48 UTC](https://oscat.discourse.group/t/scale-r-expression-too-complex-with-arm-and-twincat-2-11-2223/1387 "2012-06-29T09:48:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/oscat/original/1X/2efdfb9c592ff9a666c94dff124ee84fa863dae5.jpeg) [@system](https://oscat.discourse.group/u/system)\
**Post date:** [29. Juni 2012 um 09:48 UTC](https://oscat.discourse.group/t/scale-r-expression-too-complex-with-arm-and-twincat-2-11-2223/1387/1 "2012-06-29T09:48:47Z")

</div>

Hello,

The expression:  
SCALE\_R := (O\_HI - O\_LO) / (I\_HI - I\_LO) \* (LIMIT(I\_LO, X, I\_HI) - I\_LO) + O\_LO;  
is too complex for new Twincat versions (also tried with Twincat 2.11.2224). This happens if target system type is ARM. With x86-based systems there is no problem.  
Trying to compile a project with oscat311.lib or oscat \_basic\_333.lib will result in error message (function is not used in the project):  
Error 3117: _???_ (-1): Expression too complex. No more registers available.

By using interim variables to calculate the result everything works fine. I don’t know if it is a bug in the Twincat release, but what do you think: Should it be changed to use interim variables for better functionality across variety of programming tools and systems?

-TOllikainen
