<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/</id><updated>2025-11-21T09:48:54.768000Z</updated><subtitle>Recent posts to OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</subtitle><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#6019" rel="alternate"/><published>2025-11-21T09:48:54.768000Z</published><updated>2025-11-21T09:48:54.768000Z</updated><author><name>AntonZ</name><uri>https://forge.codesys.com/u/antonz/</uri></author><id>https://forge.codesys.com733b0bd8bb05d05b8518115a4e3aeae7c9c8adfa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;That's what I found as well Shaun. I have seen it at least in versions 3.5.21.1 and 3.5.21.3. There seems to be an issue with the FBD/LD package v4.6.0.0. The workaround proposed by Tim works but needs to be done manually on every code change/addition. &lt;/p&gt;
&lt;p&gt;For now we manually downgrade the FBD/LD package from v4.6.0.0 down to v4.5.0.0 after installation of CoDeSys. Same as you did. I hope this gets fixed on a next patch. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#0075" rel="alternate"/><published>2025-11-17T08:08:08.817000Z</published><updated>2025-11-17T08:08:08.817000Z</updated><author><name>shaunvdm</name><uri>https://forge.codesys.com/u/shaunvdm/</uri></author><id>https://forge.codesys.com683691f3eadae229b9dc408b643130d56878f796</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;We downgraded Codesys LAD/FB in the IDE to version 4.5 and it works. Codesys Version 4.6 lad/fb not working.&lt;/p&gt;
&lt;p&gt;Was the way we fixed this.&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt;Shaun&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#10f9" rel="alternate"/><published>2025-10-26T10:56:24.644000Z</published><updated>2025-10-26T10:56:24.644000Z</updated><author><name>kishan</name><uri>https://forge.codesys.com/u/kishan/</uri></author><id>https://forge.codesys.come821d26ef318ce4ad713d2bc8530f1bf88a5540c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;here is formula for scale function you can impliment your own scale function&lt;/p&gt;
&lt;p&gt;Output=OutMin+(Input−InMin)×(InMax−InMin)(OutMax−OutMin)&lt;/p&gt;
&lt;p&gt;FUNCTION_BLOCK FB_Scale&lt;br/&gt;
VAR_INPUT&lt;br/&gt;
    xIn       : REAL;  // Input value (e.g., raw sensor)&lt;br/&gt;
    xInMin    : REAL;  // Input range minimum&lt;br/&gt;
    xInMax    : REAL;  // Input range maximum&lt;br/&gt;
    xOutMin   : REAL;  // Output range minimum&lt;br/&gt;
    xOutMax   : REAL;  // Output range maximum&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;VAR_OUTPUT&lt;br/&gt;
    xOut      : REAL;  // Scaled output&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;VAR&lt;br/&gt;
    xGain     : REAL;&lt;br/&gt;
    xOffset   : REAL;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;// Implementation&lt;br/&gt;
xGain := (xOutMax - xOutMin) / (xInMax - xInMin);&lt;br/&gt;
xOffset := xOutMin - xGain * xInMin;&lt;br/&gt;
xOut := xGain * xIn + xOffset;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#a8bf" rel="alternate"/><published>2025-10-26T10:46:34.913000Z</published><updated>2025-10-26T10:46:34.913000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com355d84df35af06ef8a199553c2e882ea93ef5a90</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It seems like a bug in FBD. Work-around:&lt;br/&gt;
If you click on the small line between the box and the output variable and delete this, the variable is removed. When you then assign a variable again (Ctrl-A), then you will see that the line will be a bit longer. If you then select the previous variable, you will see that it works.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#7606/7fa1" rel="alternate"/><published>2025-10-24T10:43:41.853000Z</published><updated>2025-10-24T10:43:41.853000Z</updated><author><name>shaunvdm</name><uri>https://forge.codesys.com/u/shaunvdm/</uri></author><id>https://forge.codesys.comcb785732f134685f1b71a2a3c8dc53b617cdf3cf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes it is called&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#7606" rel="alternate"/><published>2025-10-23T10:41:11.317000Z</published><updated>2025-10-23T10:41:11.317000Z</updated><author><name>ph0010421</name><uri>https://forge.codesys.com/u/ph0010421/</uri></author><id>https://forge.codesys.coma5989b0356cd7ebd5b600f6da8325e29e9f93e21</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is that rung definitely being executed? Is the POU called?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>OSCAT Scale_r function not working in LD 4.60 works in LAD2 on 3.5.21sp3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8980db9dc1/?limit=25#b17e" rel="alternate"/><published>2025-10-23T09:57:06.263000Z</published><updated>2025-10-23T09:57:06.263000Z</updated><author><name>shaunvdm</name><uri>https://forge.codesys.com/u/shaunvdm/</uri></author><id>https://forge.codesys.coma463d42da23c3f12e77f48dc0d60dd42827bf2ef</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi We have picked up an issue&lt;br/&gt;
OSCAT_BASIC.Scale_r function call not working in the old lad and FBD version 4.60. &lt;br/&gt;
Gives no output on the function call. When we convert this to LAD2 it works.&lt;/p&gt;
&lt;p&gt;As can be see by the two screenshot in normal LD not working in LAD2 it works.&lt;/p&gt;
&lt;p&gt;Please confirm if this is an issue with Oscat or with LAD in 3.5.21sp3, is there an workaround.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Shaun&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>