SCALE_R: Expression too complex with ARM and Twincat 2.11.2223

Begonnen von TOllikainen, 29. Juni 2012, 11:48:47

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

TOllikainen

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