<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to for samab20 overview of your program</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/130e3648c5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/130e3648c5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/130e3648c5/</id><updated>2020-02-27T23:19:54.884000Z</updated><subtitle>Recent posts to for samab20 overview of your program</subtitle><entry><title>for samab20 overview of your program</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/130e3648c5/?limit=25#afe8" rel="alternate"/><published>2020-02-27T23:19:54.884000Z</published><updated>2020-02-27T23:19:54.884000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com31a752a723b7a322a876dc9044379cda2ecf6efa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;did have a look at the program:&lt;br/&gt;
what is target? as this is lost when loading in my software (normal as i can not have all models software. or include target please&lt;br/&gt;
same for several libraries as these are also not included, see window library manager&lt;br/&gt;
so i can not simulate the program due to missing libs.&lt;/p&gt;
&lt;p&gt;PLC_PRG&lt;br/&gt;
0001 always_on define it in global var by Always_on :BOOL:=TRUE;&lt;br/&gt;
0002 i can not find declaration but probably it is in configuration.&lt;br/&gt;
scaling is not correct as the module has the lowest bits as alarm, see oscat or first convert the word to correct dependent of the inputmodule some are only 10 bits most are 12 bits but bit0,1,2 are used for alarm and overflow. this is done with shifting the word right 3 places and your inmax will be 2^10. look for AIN in oscat&lt;br/&gt;
make all these numbers variable like -50 32765 0 50 etc. now you can make a visualisation to change it, helping in calibration and simulation.&lt;br/&gt;
0003 same as above&lt;br/&gt;
0004 toggle_FB is simple done with SR look on iconbar rightside. watch the sequence as now the highest number is highest priority.&lt;br/&gt;
0005 where is switch off?&lt;br/&gt;
0006 this means the time is always resetted make this a variable, no outputs are used so block is not needed. It does work i think.&lt;br/&gt;
0007 first why not going up it was disorienting for me, but seems to work&lt;/p&gt;
&lt;p&gt;why first calculating the a and b&lt;br/&gt;
you can also use y=(x-x1)/(x1-x2)*(y1-y2)+y1 as it is a straight line&lt;/p&gt;
&lt;p&gt;in oscat it is called LINEAR_INT&lt;br/&gt;
hugo uses a array&lt;br/&gt;
have also a look at POLYNOM_INT it works with a 5 point polynom&lt;br/&gt;
check his comment on the polynom.&lt;br/&gt;
my comment is that this needs to be set by an expert and should be changeable on a separate screen.&lt;/p&gt;
&lt;p&gt;0008 this is done with SEL from standard lib&lt;br/&gt;
why asking for if it is different just do it&lt;br/&gt;
0009 also SEL&lt;br/&gt;
0010 see LIMITALARM in util.lib high is setpoint+tolerance etc.&lt;/p&gt;
&lt;p&gt;0011 do not have this block so no comment on it.&lt;br/&gt;
here same make all numbers like 0.1 etc VARiables so they are changeable without changing program.&lt;/p&gt;
&lt;p&gt;0012 do this with same scale as used above&lt;br/&gt;
0013 you can do this in one go with toggle on the visualisation&lt;br/&gt;
0014 0015 see comment 0002&lt;br/&gt;
0016 see 0010&lt;br/&gt;
0017 what is this?&lt;br/&gt;
0018 see 0011&lt;br/&gt;
0019 see 0012&lt;br/&gt;
rest looks oke&lt;/p&gt;
&lt;p&gt;I see you have done all in one program&lt;br/&gt;
use an init program to set everything. see in resources tasks&lt;br/&gt;
you can also call programs from within PLC_PRG&lt;br/&gt;
this makes maintenance easier as the main is not to big.&lt;br/&gt;
i tend to keep this very small and let it call all others.&lt;/p&gt;
&lt;p&gt;visualisations&lt;br/&gt;
can not read aika have a look at languages or put a english below it so anybody can have a look, is good when international is oimportant.&lt;br/&gt;
lampokuva looks nice, i do not know what all the KL LV means but diagram is good.&lt;br/&gt;
both valves could be put in a visualisation with placeholders&lt;br/&gt;
If it is this small make yourself a rectangle and have the scale with a move of the upper right corner. (just try it)&lt;br/&gt;
color the lines with red and blue&lt;br/&gt;
is this all tempsensors available?&lt;br/&gt;
Main why not put the actual temps and their conversion on this screen.&lt;br/&gt;
have the lampokuva also as a visu on this screen, and when tapped jump _ to visu . no need to do in program&lt;br/&gt;
PID_Tv1 put it in top left easier to input in another screen.&lt;br/&gt;
also possible to do this with placeholders (forst insert two same visualisations in one screen and then you can set the placeholders.&lt;br/&gt;
for two vis not important but when using more it is faster.&lt;/p&gt;
&lt;p&gt;General&lt;br/&gt;
No arrays are used nor data types.&lt;/p&gt;
&lt;p&gt;good enough for today&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=464" rel="nofollow"&gt;LJH_1.pro &lt;span&gt;&lt;span&gt;[288.01 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>