{"id":86,"date":"2017-12-11T20:57:27","date_gmt":"2017-12-11T18:57:27","guid":{"rendered":"https:\/\/flprog.ru\/?p=86"},"modified":"2018-02-12T07:05:17","modified_gmt":"2018-02-12T05:05:17","slug":"flprog-urok-vtoroj-rabota-s-analogovymi-s","status":"publish","type":"post","link":"https:\/\/flprog.ru\/en\/uchebnyj-centr\/articles\/znakomstvo-s-flprog\/flprog-urok-vtoroj-rabota-s-analogovymi-s\/","title":{"rendered":"FLProg \u2013 Lesson two: Working with analogue signals"},"content":{"rendered":"<p><span data-index=\"70-0\" data-translation=\"In the previous \" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \">In the previous <\/span><a href=\"https:\/\/flprog.ru\/en\/uchebnyj-centr\/articles\/pervyj-urok-po-rabote-s-programmoj-flprog\/\" target=\"_blank\" rel=\"noopener\"><span data-index=\"70-0\" data-translation=\"lesson \" data-type=\"trSpan\" data-value=\"\u0443\u0440\u043e\u043a\u0435 \">lesson <\/span><\/a><span data-index=\"70-0\" data-translation=\", was told the basic principles of working with the program FLProg and work with discrete signals. \" data-type=\"trSpan\" data-value=\", \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 FLProg, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438. \">, was told the basic principles of working with the program FLProg and work with discrete signals. <\/span><span data-index=\"70-1\" data-translation=\"In this lesson you will learn the possibilities FLProg to work with analog signals.\" data-type=\"trSpan\" data-value=\"\u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 FLProg \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c\u0438.\">In this lesson you will learn the possibilities FLProg to work with analog signals.<\/span><br \/>\n<span data-index=\"70-2\" data-translation=\"During the lesson, you will create the program control led indicator shows and adjusts the brightness of the led using PWM output.\" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0440\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0445\u043e\u0434\u0430 \u0428\u0418\u041c.\">During the lesson, you will create the program control led indicator shows and adjusts the brightness of the led using PWM output.<\/span><br \/>\n<span data-index=\"70-3\" data-translation=\"Scheme of the test stand.\" data-type=\"trSpan\" data-value=\"\u0421\u0445\u0435\u043c\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430.\">Scheme of the test stand.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/266\/9d3\/0eb\/2669d30ebf05496cb635a209c7a4eab3.PNG\" \/><\/p>\n<p><span data-index=\"70-4\" data-translation=\"As in the last tutorial, the project will create in two languages FBD and LAD. \" data-type=\"trSpan\" data-value=\"\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0443\u0440\u043e\u043a\u0435, \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0432\u0443\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 FBD \u0438 LAD. \">As in the last tutorial, the project will create in two languages FBD and LAD. <\/span><span data-index=\"70-5\" data-translation=\"Only now it will be done in parallel.\" data-type=\"trSpan\" data-value=\"\u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.\">Only now it will be done in parallel.<\/span><\/p>\n<p><span data-index=\"70-6\" data-translation=\"Create a new project.\" data-type=\"trSpan\" data-value=\"\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.\">Create a new project.<\/span><\/p>\n<p><span data-index=\"70-7\" data-translation=\"For language LAD\" data-type=\"trSpan\" data-value=\"\u0414\u043b\u044f \u044f\u0437\u044b\u043a\u0430 LAD\">For language LAD<\/span><\/p>\n<ul>\n<li><span data-index=\"71-0\" data-translation=\"The first way is dragged onto the diagram the analog input A0 of the tree of the installed equipment\" data-type=\"trSpan\" data-value=\"\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u0442\u044c \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0441\u0445\u0435\u043c\u0443 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 A0 \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f\">The first way is dragged onto the diagram the analog input A0 of the tree of the installed equipment<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4d0\/240\/b4b\/4d0240b4be5847d79bc6f588a86a5a40.PNG\" \/><\/li>\n<li><span data-index=\"72-0\" data-translation=\"The second way \u2014 drag a block &quot;Analog input controller&quot; from the library of elements, then making the new block double click, tie him to a zero analog input Board\" data-type=\"trSpan\" data-value=\"\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c \u2014 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0431\u043b\u043e\u043a \u00ab\u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u00bb \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0432 \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a, \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043a \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u0432\u0445\u043e\u0434\u0443 \u043f\u043b\u0430\u0442\u044b\">The second way \u2014 drag a block &#8220;Analog input controller&#8221; from the library of elements, then making the new block double click, tie him to a zero analog input Board<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d6f\/f96\/3aa\/d6ff963aa14c488a96ff6ebc6207773d.PNG\" \/><\/li>\n<\/ul>\n<p><span data-index=\"73-0\" data-translation=\"\nLanguage FBD creating a new analog input by double-clicking on the &quot;Add entry&quot; tree tags or clicking the appropriate button\" data-type=\"trSpan\" data-value=\"\n\u0414\u043b\u044f \u044f\u0437\u044b\u043a\u0430 FBD \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434, \u0434\u0432\u0430\u0436\u0434\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430 \u043f\u0443\u043d\u043a\u0442\u0435 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u00bb \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u044d\u0433\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443\">Language FBD creating a new analog input by double-clicking on the &#8220;Add entry&#8221; tree tags or clicking the appropriate button<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/550\/96b\/b2d\/55096bb2dc0d413cb1e2659087928cdd.PNG\" \/><\/p>\n<p><span data-index=\"73-1\" data-translation=\"In the properties window, login to enter your login, choose the analog type and contact number 0\" data-type=\"trSpan\" data-value=\"\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u0445\u043e\u0434\u0430 \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u0432\u0445\u043e\u0434\u0430, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430 0\">In the properties window, login to enter your login, choose the analog type and contact number 0<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a1f\/706\/edb\/a1f706edb74e49449eaa09ea809af721.PNG\" \/><\/p>\n<p><span data-index=\"73-2\" data-translation=\"Then drag a new entrance from the tree tag to the diagram pane.\" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u044d\u0433\u043e\u0432 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u044b.\">Then drag a new entrance from the tree tag to the diagram pane.<\/span><\/p>\n<blockquote><p><span data-index=\"74-0\" data-translation=\"The analog input block in FLProg on the give magnitude is proportional to the voltage attached to them real entrance fee. \" data-type=\"trSpan\" data-value=\"\u0411\u043b\u043e\u043a\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u0432 FLProg \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u044b\u0434\u0430\u044e\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e \u043d\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u043c \u043a \u043d\u0438\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u043f\u043b\u0430\u0442\u044b. \">The analog input block in FLProg on the give magnitude is proportional to the voltage attached to them real entrance fee. <\/span><span data-index=\"74-1\" data-translation=\"With 0V on the input port, the output block is 0, while 5V on the Board input, the output block will be the value 1023.\" data-type=\"trSpan\" data-value=\"\u041f\u0440\u0438 0\u0412 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u043b\u0430\u0442\u044b, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0, \u0430 \u043f\u0440\u0438 5V \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u043b\u0430\u0442\u044b, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1023.\">With 0V on the input port, the output block is 0, while 5V on the Board input, the output block will be the value 1023.<\/span><\/p><\/blockquote>\n<p><span data-index=\"75-0\" data-translation=\"\nThen create the analog output.\" data-type=\"trSpan\" data-value=\"\n\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u044b\u0445\u043e\u0434.\">Then create the analog output.<\/span><\/p>\n<p><span data-index=\"75-1\" data-translation=\"For the language of the LAD drag a block &quot;Analog controller outputs&quot; from the library blocks, and in the properties editor, block (double click on the block) attach it to the output Board D3\" data-type=\"trSpan\" data-value=\"\u0414\u043b\u044f \u044f\u0437\u044b\u043a\u0430 LAD \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0431\u043b\u043e\u043a \u00ab\u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u00bb \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0431\u043b\u043e\u043a\u043e\u0432, \u0438 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0431\u043b\u043e\u043a\u0430 (\u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u0431\u043b\u043e\u043a\u0435) \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043f\u043b\u0430\u0442\u044b D3\">For the language of the LAD drag a block &#8220;Analog controller outputs&#8221; from the library blocks, and in the properties editor, block (double click on the block) attach it to the output Board D3<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/122\/847\/f5a\/122847f5a6bb4f579d0410de06cf4677.PNG\" \/><\/p>\n<p><span data-index=\"75-2\" data-translation=\"In FBD to create the analog output you need to double-click an &quot;Add output&quot; tree tags or click the corresponding button.\" data-type=\"trSpan\" data-value=\"\u0412 \u044f\u0437\u044b\u043a\u0435 FBD \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0432\u0430\u0436\u0434\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043f\u0443\u043d\u043a\u0442\u0435 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u00bb \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u044d\u0433\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443.\">In FBD to create the analog output you need to double-click an &#8220;Add output&#8221; tree tags or click the corresponding button.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6ad\/82c\/150\/6ad82c150d694984a05ebda9aec3a013.PNG\" \/><\/p>\n<p><span data-index=\"75-3\" data-translation=\"In the properties window, output fill output name, select the type of PWM and the number of D3\" data-type=\"trSpan\" data-value=\"\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u0430, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f \u0428\u0418\u041c, \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0445\u043e\u0434\u0430 D3\">In the properties window, output fill output name, select the type of PWM and the number of D3<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/da7\/0e8\/413\/da70e841305e4a84aa059a89dd79b893.PNG\" \/><\/p>\n<p><span data-index=\"75-4\" data-translation=\"Then drag the new entry into the scheme.\" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u044b.\">Then drag the new entry into the scheme.<\/span><\/p>\n<p><span data-index=\"76-0\" data-translation=\"\nIn fact, the real Arduino boards have analog outputs (not counting the Arduino Duo, but while these boards FLProg program are not supported). \" data-type=\"trSpan\" data-value=\"\n\u0412\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u0443 \u043f\u043b\u0430\u0442 Arduino \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043d\u0435\u0442 (\u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f Arduino Duo, \u043d\u043e \u043f\u043e\u043a\u0430 \u044d\u0442\u0438 \u043f\u043b\u0430\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 FLProg \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f). \">In fact, the real Arduino boards have analog outputs (not counting the Arduino Duo, but while these boards FLProg program are not supported). <\/span><span data-index=\"76-1\" data-translation=\"Analog outputs Board working in PWM mode\" data-type=\"trSpan\" data-value=\"\u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0432\u044b\u0445\u043e\u0434\u044b \u043f\u043b\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0428\u0418\u041c\">Analog outputs Board working in PWM mode<\/span><\/p>\n<blockquote><p><span data-index=\"77-0\" data-translation=\"Pulse width modulation (PWM, eng. \" data-type=\"trSpan\" data-value=\"\u0428\u0438\u0440\u043e\u0442\u043d\u043e-\u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u0446\u0438\u044f (\u0428\u0418\u041c, \u0430\u043d\u0433\u043b. \">Pulse width modulation (PWM, eng. <\/span><span data-index=\"77-1\" data-translation=\"pulse-width modulation (PWM)) is the process of controlling the power fed to the load by varying the duty cycle of pulses at a constant frequency. \" data-type=\"trSpan\" data-value=\"pulse-width modulation (PWM)) \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u043e\u0434\u0432\u043e\u0434\u0438\u043c\u043e\u0439 \u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435, \u043f\u0443\u0442\u0451\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0435. \">pulse-width modulation (PWM)) is the process of controlling the power fed to the load by varying the duty cycle of pulses at a constant frequency. <\/span><span data-index=\"77-2\" data-translation=\"For example, the load use led.\" data-type=\"trSpan\" data-value=\"\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434.\">For example, the load use led.<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3be\/fb4\/8c0\/3befb48c061146bab8565e0fa18d3cab.png\" \/><br \/>\n<span data-index=\"79-0\" data-translation=\"Frequency is the number of periods in one second. \" data-type=\"trSpan\" data-value=\"\u0427\u0430\u0441\u0442\u043e\u0442\u0430, \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0437\u0430 \u043e\u0434\u043d\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \">Frequency is the number of periods in one second. <\/span><span data-index=\"79-1\" data-translation=\"Duty cycle \u2014 ratio of pulse duration to the duration of the period. \" data-type=\"trSpan\" data-value=\"\u0421\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u2014 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043a \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430. \">Duty cycle \u2014 ratio of pulse duration to the duration of the period. <\/span><span data-index=\"79-2\" data-translation=\"You can change both, but to control the LEDs, it is sufficient to control the duty cycle. \" data-type=\"trSpan\" data-value=\"\u041c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u043e\u0435, \u043d\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \">You can change both, but to control the LEDs, it is sufficient to control the duty cycle. <\/span><span data-index=\"79-3\" data-translation=\"In the picture above we see a PWM signal with a duty ratio of 50 %, as the pulse duration (pulse width) is exactly half of the period. \" data-type=\"trSpan\" data-value=\"\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0428\u0418\u041c \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u043e \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e 50 %, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 (\u0448\u0438\u0440\u0438\u043d\u0430 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430) \u0440\u043e\u0432\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0430. \">In the picture above we see a PWM signal with a duty ratio of 50 %, as the pulse duration (pulse width) is exactly half of the period. <\/span><span data-index=\"79-4\" data-translation=\"Accordingly, the led light will be exactly half the time on half off.\" data-type=\"trSpan\" data-value=\"\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0438 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0432 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c.\">Accordingly, the led light will be exactly half the time on half off.<\/span><span data-index=\"80-0\" data-translation=\"The PWM frequency is very large and the eye will not notice the flickering of the led due to persistence of our vision, so we may feel that the led glows at half brightness. \" data-type=\"trSpan\" data-value=\"\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0428\u0418\u041c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438 \u0433\u043b\u0430\u0437 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442 \u043c\u0435\u0440\u0446\u0430\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0438\u0437-\u0437\u0430 \u0438\u043d\u0435\u0440\u0446\u0438\u043e\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u044f\u0440\u043a\u043e\u0441\u0442\u0438. \">The PWM frequency is very large and the eye will not notice the flickering of the led due to persistence of our vision, so we may feel that the led glows at half brightness. <\/span><span data-index=\"80-1\" data-translation=\"If we change the duty cycle to 75%, the brightness of the led will be 3 quarters full, and the graph will look like this:\" data-type=\"trSpan\" data-value=\"\u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 75%, \u0442\u043e \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 3 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u043d\u043e\u0439, \u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:\">If we change the duty cycle to 75%, the brightness of the led will be 3 quarters full, and the graph will look like this:<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/10f\/55c\/930\/10f55c930f4c4767a12908bae3e8f60d.png\" \/><br \/>\n<span data-index=\"81-0\" data-translation=\"\nIt turns out that we can adjust the brightness of the led from 0 to 100 %. \" data-type=\"trSpan\" data-value=\"\n\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043e\u0442 0 \u0434\u043e 100 %. \">It turns out that we can adjust the brightness of the led from 0 to 100 %. <\/span><span data-index=\"81-1\" data-translation=\"Now let's talk about the setting of the PWM as a solution. \" data-type=\"trSpan\" data-value=\"\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u0430\u043a\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0428\u0418\u041c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435. \">Now let&#8217;s talk about the setting of the PWM as a solution. <\/span><span data-index=\"81-2\" data-translation=\"The resolution is the number of gradations (steps) adjust the duty cycle. \" data-type=\"trSpan\" data-value=\"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0439 (\u0448\u0430\u0433\u043e\u0432) \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438. \">The resolution is the number of gradations (steps) adjust the duty cycle. <\/span><span data-index=\"81-3\" data-translation=\"In the Arduino resolution is 256 steps.\" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u043b\u0430\u0442\u0430\u0445 Arduino \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 256 \u0448\u0430\u0433\u043e\u0432.\">In the Arduino resolution is 256 steps.<\/span><br \/>\n<span data-index=\"81-4\" data-translation=\"The program FLProg unit analog output controls the duty cycle of the PWM attached to it of output. \" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 FLProg \u0431\u043b\u043e\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0428\u0418\u041c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a \u043d\u0435\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0430. \">The program FLProg unit analog output controls the duty cycle of the PWM attached to it of output. <\/span><span data-index=\"81-5\" data-translation=\"When applying to the input sides of the value 0 at the output of PATA, the duty cycle will be 0%, and when applying the values 255 \u2013 100%.\" data-type=\"trSpan\" data-value=\"\u041f\u0440\u0438 \u043f\u043e\u0434\u0430\u0447\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0431\u043e\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 0 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u0430\u0442\u044b \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c 0%, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0434\u0430\u0447\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 255 \u2013 100%.\">When applying to the input sides of the value 0 at the output of PATA, the duty cycle will be 0%, and when applying the values 255 \u2013 100%.<\/span><br \/>\n<span data-index=\"82-0\" data-translation=\"\nBased on the fact that the limits of the output signal of the analog input block of the controller is 0 \u2014 1023 and the limits of the input signal unit analog output of the controller is 0 \u2013 255 raises the question about the necessity of bringing them to the same values. \" data-type=\"trSpan\" data-value=\"\n\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 0 \u2014 1023 \u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 0 \u2013 255 \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0445 \u043a \u043e\u0434\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c. \">Based on the fact that the limits of the output signal of the analog input block of the controller is 0 \u2014 1023 and the limits of the input signal unit analog output of the controller is 0 \u2013 255 raises the question about the necessity of bringing them to the same values. <\/span><span data-index=\"82-1\" data-translation=\"This will help the unit scale.\" data-type=\"trSpan\" data-value=\"\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u043b\u043e\u043a \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\">This will help the unit scale.<\/span><\/p><\/blockquote>\n<p><span data-index=\"83-0\" data-translation=\"\nIn the language of the LAD he is in the folder &quot;Analog&quot; library elements.\" data-type=\"trSpan\" data-value=\"\n\u0412 \u044f\u0437\u044b\u043a\u0435 LAD \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 \u00ab\u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438\u00bb \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.\">In the language of the LAD he is in the folder &#8220;Analog&#8221; library elements.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c55\/653\/b5d\/c55653b5d83c4fd5b6206ea463ee811f.PNG\" \/><\/p>\n<p><span data-index=\"83-1\" data-translation=\"In FBD the same unit located in the folder &quot;Special blocks&quot; of the library elements.\" data-type=\"trSpan\" data-value=\"\u0412 \u044f\u0437\u044b\u043a\u0435 FBD \u0442\u043e\u0442 \u0436\u0435 \u0431\u043b\u043e\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 \u00ab\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438\u00bb \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.\">In FBD the same unit located in the folder &#8220;Special blocks&#8221; of the library elements.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3cf\/830\/017\/3cf8300179c6480ebf821c9c2a54fcbf.PNG\" \/><\/p>\n<p><span data-index=\"83-2\" data-translation=\"The power scaling in proportion to the value of transfers received on the entry in another range of values and outputs this value to the output. \" data-type=\"trSpan\" data-value=\"\u0411\u043b\u043e\u043a \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434, \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434. \">The power scaling in proportion to the value of transfers received on the entry in another range of values and outputs this value to the output. <\/span><span data-index=\"83-3\" data-translation=\"Parameters of input and output ranges are set in the properties block. \" data-type=\"trSpan\" data-value=\"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0431\u043b\u043e\u043a\u0430. \">Parameters of input and output ranges are set in the properties block. <\/span><span data-index=\"83-4\" data-translation=\"Double-clicking on the block, we can open the editor settings block and set these values.\" data-type=\"trSpan\" data-value=\"\u0414\u0432\u0430\u0436\u0434\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430 \u0431\u043b\u043e\u043a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u043b\u043e\u043a\u0430 \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.\">Double-clicking on the block, we can open the editor settings block and set these values.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6a1\/066\/2de\/6a10662de1774174ad934ac59d29f61a.PNG\" \/><\/p>\n<p><span data-index=\"83-5\" data-translation=\"The calculation in the block is performed according to the following formula\" data-type=\"trSpan\" data-value=\"\u0420\u0430\u0441\u0447\u0435\u0442 \u0432 \u0431\u043b\u043e\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435\">The calculation in the block is performed according to the following formula<\/span><br \/>\n<b><span data-index=\"83-5\" data-translation=\"Q = (I \u2013 I_min)*(Q_max \u2013 Q_min)\/(I_max \u2013 I_min)+Q_min\" data-type=\"trSpan\" data-value=\"Q = (I \u2013 I_min)*(Q_max \u2013 Q_min)\/(I_max \u2013 I_min)+Q_min\">Q = (I \u2013 I_min)*(Q_max \u2013 Q_min)\/(I_max \u2013 I_min)+Q_min<\/span><\/b><br \/>\n<span data-index=\"83-6\" data-translation=\"Where:\" data-type=\"trSpan\" data-value=\"\u0413\u0434\u0435:\">Where:<\/span><\/p>\n<ul>\n<li><span data-index=\"84-0\" data-translation=\"Q \u2013 value output unit\" data-type=\"trSpan\" data-value=\"Q \u2013 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430\">Q \u2013 value output unit<\/span><\/li>\n<li><span data-index=\"85-0\" data-translation=\"I \u2013 value input block\" data-type=\"trSpan\" data-value=\"I \u2013 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430\">I \u2013 value input block<\/span><\/li>\n<li><span data-index=\"86-0\" data-translation=\"I_max \u2013 the upper limit of the input value\" data-type=\"trSpan\" data-value=\"I_max \u2013 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\">I_max \u2013 the upper limit of the input value<\/span><\/li>\n<li><span data-index=\"87-0\" data-translation=\"I_min \u2013 the lower limit of the input value\" data-type=\"trSpan\" data-value=\"I_min \u2013 \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\">I_min \u2013 the lower limit of the input value<\/span><\/li>\n<li><span data-index=\"88-0\" data-translation=\"Q_max is the upper limit of the output value\" data-type=\"trSpan\" data-value=\"Q_max \u2013 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\">Q_max is the upper limit of the output value<\/span><\/li>\n<li><span data-index=\"89-0\" data-translation=\"Q_min \u2013 lower limit output value\" data-type=\"trSpan\" data-value=\"Q_min \u2013 \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\">Q_min \u2013 lower limit output value<\/span><\/li>\n<\/ul>\n<p><span data-index=\"90-0\" data-translation=\"\nThe result is shown in the screenshot of the block settings when you change the value on the input unit from 0 to 1023, the output value will be proportional to vary from 0 to 255. \" data-type=\"trSpan\" data-value=\"\n\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u043b\u043e\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0431\u043b\u043e\u043a\u0430 \u043e\u0442 0 \u0434\u043e 1023 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 0 \u0434\u043e 255, \u0447\u0442\u043e \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \">The result is shown in the screenshot of the block settings when you change the value on the input unit from 0 to 1023, the output value will be proportional to vary from 0 to 255. <\/span><span data-index=\"90-1\" data-translation=\"Now you must connect all of the blocks in accordance with the scheme.\" data-type=\"trSpan\" data-value=\"\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u043b\u043e\u043a\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0445\u0435\u043c\u043e\u0439.\">Now you must connect all of the blocks in accordance with the scheme.<\/span><\/p>\n<p><span data-index=\"90-2\" data-translation=\"LAD\" data-type=\"trSpan\" data-value=\"LAD\">LAD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e00\/72f\/ab3\/e0072fab3d5241a386e866316aedeb99.PNG\" \/><\/p>\n<p><span data-index=\"90-3\" data-translation=\"FBD\" data-type=\"trSpan\" data-value=\"FBD\">FBD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f32\/781\/6e9\/f327816e91e149a091be7bb592a79c43.PNG\" \/><\/p>\n<p><span data-index=\"90-4\" data-translation=\"The first Board is almost ready. \" data-type=\"trSpan\" data-value=\"\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u0430. \">The first Board is almost ready. <\/span><span data-index=\"90-5\" data-translation=\"Let's call it &quot;brightness Control&quot; and create new, once calling it a &quot;level Indicator&quot;\" data-type=\"trSpan\" data-value=\"\u041d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0451 \u00ab\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044f\u0440\u043a\u043e\u0441\u0442\u044c\u044e\u00bb \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e, \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0437\u0432\u0430\u0432 \u0435\u0451 \u00ab\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0440\u043e\u0432\u043d\u044f\u00bb\">Let&#8217;s call it &#8220;brightness Control&#8221; and create new, once calling it a &#8220;level Indicator&#8221;<\/span><br \/>\n<span data-index=\"91-0\" data-translation=\"\nThe second Board we also need the value from controller input. \" data-type=\"trSpan\" data-value=\"\n\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u0442\u0435 \u043d\u0430\u043c \u0442\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0432\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \">The second Board we also need the value from controller input. <\/span><span data-index=\"91-1\" data-translation=\"In principle, it is possible to remove the entrance block to the second charge, and use it. \" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u0440\u0430\u0437 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0445\u043e\u0434 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \">In principle, it is possible to remove the entrance block to the second charge, and use it. <\/span><span data-index=\"91-2\" data-translation=\"But this leads to the fact that in the process of program execution in the controller will re-read the value from input. \" data-type=\"trSpan\" data-value=\"\u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0432\u0445\u043e\u0434\u0430. \">But this leads to the fact that in the process of program execution in the controller will re-read the value from input. <\/span><span data-index=\"91-3\" data-translation=\"A procedure for reading an analog signal of entrance is quite expensive and lengthy. \" data-type=\"trSpan\" data-value=\"\u0410 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0441 \u0432\u0445\u043e\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0451\u043c\u043a\u0430\u044f \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f. \">A procedure for reading an analog signal of entrance is quite expensive and lengthy. <\/span><span data-index=\"91-4\" data-translation=\"Therefore, we use in the case of a LAD analog connector, and in the case of FBD \u2013 variable.\" data-type=\"trSpan\" data-value=\"\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 LAD \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044c, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 FBD \u2013 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e.\">Therefore, we use in the case of a LAD analog connector, and in the case of FBD \u2013 variable.<\/span><\/p>\n<blockquote><p><span data-index=\"92-0\" data-translation=\"In FLProg variables and analog connectors can be represented as the terminal connections on the Board. \" data-type=\"trSpan\" data-value=\"\u0412 FLProg \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043a\u043b\u0435\u043c\u043c\u043d\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0435. \">In FLProg variables and analog connectors can be represented as the terminal connections on the Board. <\/span><span data-index=\"92-1\" data-translation=\"With them Board exchange values and connected to each other.\" data-type=\"trSpan\" data-value=\"\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0438\u0445 \u043f\u043b\u0430\u0442\u044b \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439.\">With them Board exchange values and connected to each other.<\/span><\/p><\/blockquote>\n<p><span data-index=\"93-0\" data-translation=\"\nIn the project in the language of the LAD drag a block &quot;analog Input connector&quot; on the FIRST cost of the project.\" data-type=\"trSpan\" data-value=\"\n\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 LAD \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u043c \u0431\u043b\u043e\u043a \u00ab\u0412\u0445\u043e\u0434 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044f\u00bb \u043d\u0430 \u041f\u0415\u0420\u0412\u0423\u042e \u043f\u043b\u0430\u0442\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.\">In the project in the language of the LAD drag a block &#8220;analog Input connector&#8221; on the FIRST cost of the project.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/098\/ecf\/ea2\/098ecfea26f44b6c8ec7db596a4af476.PNG\" \/><\/p>\n<p><span data-index=\"93-1\" data-translation=\"It is automatically assigned the name of AC1. \" data-type=\"trSpan\" data-value=\"\u0415\u043c\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u0410\u04211. \">It is automatically assigned the name of AC1. <\/span><span data-index=\"93-2\" data-translation=\"Then connect its input to the output of the analog input block.\" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u0435\u0433\u043e \u0432\u0445\u043e\u0434 \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430.\">Then connect its input to the output of the analog input block.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/416\/384\/ade\/416384ade1834eee8a1b4484d0e524cc.PNG\" \/><\/p>\n<p><span data-index=\"93-3\" data-translation=\"And on the second charge, drag the block &quot;analogue Output connector&quot;.\" data-type=\"trSpan\" data-value=\"\u0410 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443 \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u043c \u0431\u043b\u043e\u043a \u00ab\u0412\u044b\u0445\u043e\u0434 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044f\u00bb.\">And on the second charge, drag the block &#8220;analogue Output connector&#8221;.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ba5\/b7c\/ed2\/ba5b7ced2b854b239b6bf43df1b8a809.PNG\" \/><\/p>\n<p><span data-index=\"93-4\" data-translation=\"Do it double click and the editor of the block will bind it to the connector AC1\" data-type=\"trSpan\" data-value=\"\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430 \u043d\u0451\u043c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u0438 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0431\u043b\u043e\u043a\u0430 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u0435\u0433\u043e \u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044e AC1\">Do it double click and the editor of the block will bind it to the connector AC1<\/span><\/p>\n<p><span data-index=\"93-5\" data-translation=\"In the project in FBD will create a new variable by clicking on the appropriate button or by double click on the &quot;Add variable&quot; in the tree tag.\" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 FBD \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0432 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u043f\u0443\u043d\u043a\u0442\u0435 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e\u00bb \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0442\u044d\u0433\u043e\u0432.\">In the project in FBD will create a new variable by clicking on the appropriate button or by double click on the &#8220;Add variable&#8221; in the tree tag.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1f1\/354\/310\/1f1354310e144cc3a1efd8192227de60.PNG\" \/><\/p>\n<p><span data-index=\"94-0\" data-translation=\"\nIn the editor window, the block will fill in the variable name, select type (Integer), and set the default value of 0\" data-type=\"trSpan\" data-value=\"\n\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0442\u0438\u043f (Integer), \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 0\">In the editor window, the block will fill in the variable name, select type (Integer), and set the default value of 0<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fb3\/ca4\/4d2\/fb3ca44d21a248eb93c02866f590869d.PNG\" \/><\/p>\n<p><span data-index=\"94-1\" data-translation=\"Then drag a new variable first, one cost, and then the other. \" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043e\u0434\u043d\u0443 \u043f\u043b\u0430\u0442\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u0443\u044e. \">Then drag a new variable first, one cost, and then the other. <\/span><span data-index=\"94-2\" data-translation=\"Also connect the first circuit Board AC input with the output of the analog input block of the controller.\" data-type=\"trSpan\" data-value=\"\u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0435 \u0432\u0445\u043e\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.\">Also connect the first circuit Board AC input with the output of the analog input block of the controller.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/84b\/2a7\/524\/84b2a7524cf34d8db45efbc7c1add69f.PNG\" \/><\/p>\n<p><span data-index=\"94-3\" data-translation=\"Since the level indicator 10 values, you need to change the value from zero to the maximum control value has changed from zero to 10. \" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430 10 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u043e\u0442 \u043d\u0443\u043b\u044f \u0434\u043e 10. \">Since the level indicator 10 values, you need to change the value from zero to the maximum control value has changed from zero to 10. <\/span><span data-index=\"94-4\" data-translation=\"This again will help a scaler. \" data-type=\"trSpan\" data-value=\"\u0412 \u044d\u0442\u043e\u043c \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u043b\u043e\u043a \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \">This again will help a scaler. <\/span><span data-index=\"94-5\" data-translation=\"Get him on the second charge and adjust as follows.\" data-type=\"trSpan\" data-value=\"\u0412\u044b\u0442\u0430\u0449\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.\">Get him on the second charge and adjust as follows.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1d8\/4c4\/e30\/1d84c4e30bc7497da53d3e62276ebb80.PNG\" \/><\/p>\n<p><span data-index=\"95-0\" data-translation=\"\nNow connect the input in the case of the LAD-and to the unit analog outputs connector, and in the case of the FBD to the output variable.\" data-type=\"trSpan\" data-value=\"\n\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0432\u0445\u043e\u0434 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 LAD-\u0430 \u043a \u0431\u043b\u043e\u043a\u0443 \u0432\u044b\u0445\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435\u043b\u044f, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 FBD \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\">Now connect the input in the case of the LAD-and to the unit analog outputs connector, and in the case of the FBD to the output variable.<\/span><\/p>\n<p><span data-index=\"95-1\" data-translation=\"LAD\" data-type=\"trSpan\" data-value=\"LAD\">LAD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d7c\/831\/513\/d7c831513aaa42859ea712930dee3c48.PNG\" \/><\/p>\n<p><span data-index=\"95-2\" data-translation=\"FBD\" data-type=\"trSpan\" data-value=\"FBD\">FBD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/846\/6e4\/5ea\/8466e45ea78e478492cea9292364f5d4.PNG\" \/><\/p>\n<p><span data-index=\"95-3\" data-translation=\"Consider a logic level indicator.\" data-type=\"trSpan\" data-value=\"\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0443\u0440\u043e\u0432\u043d\u044f.\">Consider a logic level indicator.<\/span><\/p>\n<ul>\n<li><span data-index=\"96-0\" data-translation=\"The led &quot;Level 1&quot; should light up if the signal value is greater than 0\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 1\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 0\">The led &#8220;Level 1&#8221; should light up if the signal value is greater than 0<\/span><\/li>\n<li><span data-index=\"97-0\" data-translation=\"The led &quot;Level 2&quot; should light up if the signal value is greater than 1\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 2\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 1\">The led &#8220;Level 2&#8221; should light up if the signal value is greater than 1<\/span><\/li>\n<li><span data-index=\"98-0\" data-translation=\"The led &quot;Level 3&quot; should light up if the signal value is greater than 2\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 3\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 2\">The led &#8220;Level 3&#8221; should light up if the signal value is greater than 2<\/span><\/li>\n<li><span data-index=\"99-0\" data-translation=\"The led &quot;Level 4&quot; should light up if the signal value is greater than 3\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 4\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 3\">The led &#8220;Level 4&#8221; should light up if the signal value is greater than 3<\/span><\/li>\n<li><span data-index=\"100-0\" data-translation=\"The led &quot;Level 5&quot; should light up if the signal value is greater than 4\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 5\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 4\">The led &#8220;Level 5&#8221; should light up if the signal value is greater than 4<\/span><\/li>\n<li><span data-index=\"101-0\" data-translation=\"The led &quot;Level 6&quot; should light up if the signal value is greater than 5\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 6\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 5\">The led &#8220;Level 6&#8221; should light up if the signal value is greater than 5<\/span><\/li>\n<li><span data-index=\"102-0\" data-translation=\"The led &quot;Level 7&quot; should light up if the signal value is greater than 6\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 7\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 6\">The led &#8220;Level 7&#8221; should light up if the signal value is greater than 6<\/span><\/li>\n<li><span data-index=\"103-0\" data-translation=\"Led &quot;8&quot; should light up if the signal value is greater than 7\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 8\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 7\">Led &#8220;8&#8221; should light up if the signal value is greater than 7<\/span><\/li>\n<li><span data-index=\"104-0\" data-translation=\"Led &quot;9&quot; should light up if the signal value is greater than 8\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 9\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 8\">Led &#8220;9&#8221; should light up if the signal value is greater than 8<\/span><\/li>\n<li><span data-index=\"105-0\" data-translation=\"Led &quot;10&quot; light should illuminate if the signal value is greater than 9\" data-type=\"trSpan\" data-value=\"\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u00ab\u0423\u0440\u043e\u0432\u0435\u043d\u044c 10\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0433\u043e\u0440\u0435\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 9\">Led &#8220;10&#8221; light should illuminate if the signal value is greater than 9<\/span><\/li>\n<\/ul>\n<p><span data-index=\"106-0\" data-translation=\"\nTo implement this logic we use in the case of language LAD relay comparison, in the case of the FBD language of the comparator.\" data-type=\"trSpan\" data-value=\"\n\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0437\u044b\u043a\u0430 LAD \u0440\u0435\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0437\u044b\u043a\u0430 FBD \u2013 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440.\">To implement this logic we use in the case of language LAD relay comparison, in the case of the FBD language of the comparator.<\/span><\/p>\n<p><span data-index=\"106-1\" data-translation=\"LAD\" data-type=\"trSpan\" data-value=\"LAD\">LAD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c21\/8cf\/1fc\/c218cf1fc9cc44a284113cd08e6fb520.PNG\" \/><\/p>\n<p><span data-index=\"106-2\" data-translation=\"FBD\" data-type=\"trSpan\" data-value=\"FBD\">FBD<\/span><br \/>\n<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6f3\/352\/bf9\/6f3352bf90f64932920a0fe0f3a5d894.PNG\" \/><\/p>\n<p><span data-index=\"106-3\" data-translation=\"In the project in the language of the LAD pull on the second charge, 10 relay of the comparison and bind their outputs connected to the level meter ( \" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 LAD \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443 10 \u0440\u0435\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u0430\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u0435\u043b\u044c \u0443\u0440\u043e\u0432\u043d\u044f ( \">In the project in the language of the LAD pull on the second charge, 10 relay of the comparison and bind their outputs connected to the level meter ( <\/span><a href=\"https:\/\/z5h64q92x9.net\/proxy_u\/ru-en.ru\/flprog.ru\/index\/pervyj_urok_po_rabote_s_programmoj_flprog\/0-11\" target=\"_blank\" rel=\"noopener\"><span data-index=\"106-3\" data-translation=\"see first lesson\" data-type=\"trSpan\" data-value=\"\u0441\u043c\u043e\u0442\u0440\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u043a\">see first lesson<\/span><\/a><span data-index=\"106-3\" data-translation=\") and set the comparison type &quot;Greater than&quot;.\" data-type=\"trSpan\" data-value=\") \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0438\u043f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u00ab\u0411\u043e\u043b\u044c\u0448\u0435\u00bb.\">) and set the comparison type &#8220;Greater than&#8221;.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9cb\/7b4\/183\/9cb7b4183b314243baaa72e555a07f8d.PNG\" \/><\/p>\n<p><span data-index=\"106-4\" data-translation=\"Right click on the input &quot;In&quot; of each relay unit of comparison will open the context menu and select &quot;Insert constant&quot;. \" data-type=\"trSpan\" data-value=\"\u041a\u043b\u0438\u043a\u043d\u0443\u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u00ab\u0412\u00bb \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0440\u0435\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043d\u043a\u0442 \u00ab\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443\u00bb. \">Right click on the input &#8220;In&#8221; of each relay unit of comparison will open the context menu and select &#8220;Insert constant&#8221;. <\/span><span data-index=\"106-5\" data-translation=\"In the opened window edit constants leave type \u201cInteger\u201d and enter for each output value corresponding to a logic indicator.\" data-type=\"trSpan\" data-value=\"\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0438\u043f \u201cInteger\u201d \u0438 \u0432\u0432\u0435\u0434\u0451\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u043e\u0433\u0438\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430.\">In the opened window edit constants leave type \u201cInteger\u201d and enter for each output value corresponding to a logic indicator.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/892\/ac5\/7bc\/892ac57bc78e49239b3c9595a663c0b8.PNG\" \/><\/p>\n<p><span data-index=\"107-0\" data-translation=\"\nInputs &quot;A&quot; all relay modules connect comparison with the output of the scaler. \" data-type=\"trSpan\" data-value=\"\n\u0412\u0445\u043e\u0434\u044b \u00ab\u0410\u00bb \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0440\u0435\u043b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \">Inputs &#8220;A&#8221; all relay modules connect comparison with the output of the scaler. <\/span><span data-index=\"107-1\" data-translation=\"Should turn out such a scheme.\" data-type=\"trSpan\" data-value=\"\u0414\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430.\">Should turn out such a scheme.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2f6\/b6b\/4dd\/2f6b6b4dd2dc4a5c8dc306fb423ca7f3.PNG\" \/><\/p>\n<p><span data-index=\"107-2\" data-translation=\"In the project in FBD get to the second charge, 10 units of &quot;Comparator&quot; in the same set up for the kind of comparison &quot;More&quot; (double click on the block to invoke the block editor). \" data-type=\"trSpan\" data-value=\"\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 FBD \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443 10 \u0431\u043b\u043e\u043a\u043e\u0432 \u00abComparator\u00bb \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430 \u0432\u0438\u0434 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u00ab\u0411\u043e\u043b\u044c\u0448\u0435\u00bb (\u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u0431\u043b\u043e\u043a\u0435 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u043e\u0432). \">In the project in FBD get to the second charge, 10 units of &#8220;Comparator&#8221; in the same set up for the kind of comparison &#8220;More&#8221; (double click on the block to invoke the block editor). <\/span><span data-index=\"107-3\" data-translation=\"As in LAD-e insert the constants to the inputs I2 of the blocks and the inputs I1 combine with the output of the scaler.\" data-type=\"trSpan\" data-value=\"\u0422\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 LAD-e \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043d\u0430 \u0432\u0445\u043e\u0434\u044b I2 \u0431\u043b\u043e\u043a\u043e\u0432, \u0430 \u0432\u0445\u043e\u0434\u044b I1 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\">As in LAD-e insert the constants to the inputs I2 of the blocks and the inputs I1 combine with the output of the scaler.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d4e\/68f\/7ef\/d4e68f7ef5684afa875535855753b2cf.PNG\" \/><\/p>\n<p><span data-index=\"107-4\" data-translation=\"Then we will create 10 digital outputs tied to the pay outs which are connected to a level meter (see first lesson) and get them on the second charge. \" data-type=\"trSpan\" data-value=\"\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c 10 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a \u0432\u044b\u0445\u043e\u0434\u0430\u043c \u043f\u043b\u0430\u0442\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u0435\u043b\u044c \u0443\u0440\u043e\u0432\u043d\u044f (\u0441\u043c\u043e\u0442\u0440\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u043a) \u0438 \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u0438\u0445 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043b\u0430\u0442\u0443. \">Then we will create 10 digital outputs tied to the pay outs which are connected to a level meter (see first lesson) and get them on the second charge. <\/span><span data-index=\"107-5\" data-translation=\"And join each with their own comparator.\" data-type=\"trSpan\" data-value=\"\u0418 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u043e\u043c.\">And join each with their own comparator.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9e4\/212\/fdb\/9e4212fdb04d4b48a45b12d3f1a3addd.PNG\" \/><\/p>\n<p><span data-index=\"108-0\" data-translation=\"\nAll programs ready, you can compile and install the controller (\" data-type=\"trSpan\" data-value=\"\n\u0412\u0441\u0451 \u2013 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (\">All programs ready, you can compile and install the controller (<\/span><a href=\"https:\/\/flprog.ru\/en\/uchebnyj-centr\/articles\/pervyj-urok-po-rabote-s-programmoj-flprog\/\" target=\"_blank\" rel=\"noopener\"><span data-index=\"108-0\" data-translation=\"see first lesson\" data-type=\"trSpan\" data-value=\"\u0441\u043c\u043e\u0442\u0440\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u043a\">see first lesson<\/span><\/a><span data-index=\"108-0\" data-translation=\")\" data-type=\"trSpan\" data-value=\")\">)<\/span><\/p>\n<div class=\"rcl-rating-box rating-type-post box-default\"><div class=\"rating-wrapper\"><span class=\"vote-heart\"><i class=\"rcli fa-heartbeat\" aria-hidden=\"true\"><\/i><\/span><span class=\"rating-value rating-value-view\" title=\"See history\" data-rating=\"b2JqZWN0X2lkOjg2LG9iamVjdF9hdXRob3I6OTE3NyxyYXRpbmdfdHlwZTpwb3N0LHJhdGluZ19zdGF0dXM6dmlldw==\" onclick=\"rcl_view_list_votes(this);\"><span class=\"rating-plus\">2<\/span><\/span><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>In the previous lesson , was told the basic principles of working with the program FLProg and work with discrete signals. In this lesson you will learn the possibilities FLProg to work with analog signals. During the lesson, you will create the program control led indicator shows and adjusts the brightness of the led using &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"FLProg \u2013 Lesson two: Working with analogue signals\" class=\"read-more button\" href=\"https:\/\/flprog.ru\/en\/uchebnyj-centr\/articles\/znakomstvo-s-flprog\/flprog-urok-vtoroj-rabota-s-analogovymi-s\/#more-86\">\u0414\u0430\u043b\u0435\u0435&#8230;<span class=\"screen-reader-text\">FLProg \u2013 Lesson two: Working with analogue signals<\/span><\/a><\/p>\n<div class=\"rcl-rating-box rating-type-post box-default\"><div class=\"rating-wrapper\"><span class=\"vote-heart\"><i class=\"rcli fa-heartbeat\" aria-hidden=\"true\"><\/i><\/span><span class=\"rating-value rating-value-view\" title=\"See history\" data-rating=\"b2JqZWN0X2lkOjg2LG9iamVjdF9hdXRob3I6OTE3NyxyYXRpbmdfdHlwZTpwb3N0LHJhdGluZ19zdGF0dXM6dmlldw==\" onclick=\"rcl_view_list_votes(this);\"><span class=\"rating-plus\">2<\/span><\/span><\/div><\/div>","protected":false},"author":9177,"featured_media":87,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"telegram_tosend":false,"telegram_tosend_message":"","telegram_tosend_target":0,"generate_page_header":"","footnotes":""},"categories":[48],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-znakomstvo-s-flprog"],"translation":{"provider":"WPGlobus","version":"3.0.3","language":"en","enabled_languages":["ru","en","uk"],"languages":{"ru":{"title":true,"content":true,"excerpt":false},"en":{"title":true,"content":true,"excerpt":false},"uk":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/users\/9177"}],"replies":[{"embeddable":true,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":3,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":2292,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/posts\/86\/revisions\/2292"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/media\/87"}],"wp:attachment":[{"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flprog.ru\/en\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}