<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Issues with Analog Conversion using a FB</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae34c2c1be/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae34c2c1be/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ae34c2c1be/</id><updated>2023-04-17T02:42:36.272000Z</updated><subtitle>Recent posts to Issues with Analog Conversion using a FB</subtitle><entry><title>Issues with Analog Conversion using a FB</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae34c2c1be/?limit=25#f975" rel="alternate"/><published>2023-04-17T02:42:36.272000Z</published><updated>2023-04-17T02:42:36.272000Z</updated><author><name>ben1</name><uri>https://forge.codesys.com/u/ben1/</uri></author><id>https://forge.codesys.com10596d4f3f19e5e3fe34a99f7f5c981f4e62c0c1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey pal.&lt;/p&gt;
&lt;p&gt;I think it is working - I believe your use of INT's is causing it to 0 out when you divide with the Max_Input, and therefore the result of 0 is in fact correct.&lt;/p&gt;
&lt;p&gt;Convert to REAL's before you do the math instead of after and see if that fixes the issue.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Analog Conversion using a FB</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae34c2c1be/?limit=25#40b9" rel="alternate"/><published>2023-04-16T08:59:21.641000Z</published><updated>2023-04-16T08:59:21.641000Z</updated><author><name>slogannz</name><uri>https://forge.codesys.com/u/slogannz/</uri></author><id>https://forge.codesys.comdbb0c7f5947bed03e816b7742d88d30eeae6d837</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey everyone, I was hoping I could get some help. I am somewhat new to automation and have been programming on SE M221 PLC's for a few years. I now work for a company and have a license for Machine Expert and have been playing around with trying to teach myself structured text. I have been playing around with function blocks and have a few running but have been running into issues with this one. It is a basic analog scaling FB. Image_1 shows the program that calls the function block, Image_2 is the function block and Image_3 is it running. You can see the variables are getting written into the function block but it is not doing the calculation. Can anyone shed any light on what I might be doing wrong?&lt;/p&gt;
&lt;p&gt;Cheers&lt;br/&gt;
Sam&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>