{"id":33824,"date":"2025-04-18T13:04:13","date_gmt":"2025-04-18T11:04:13","guid":{"rendered":"https:\/\/sklep-plcspace.pl\/?p=33824"},"modified":"2025-04-22T12:46:42","modified_gmt":"2025-04-22T10:46:42","slug":"dodawanie-wartosci-plc-siemens-instrukcja-add","status":"publish","type":"post","link":"https:\/\/sklep-plcspace.pl\/en\/blog\/dodawanie-wartosci-plc-siemens-instrukcja-add\/","title":{"rendered":"Instrukcja 'Add&#8217; w Programowaniu"},"content":{"rendered":"<p>Mo\u017cesz u\u017cy\u0107 instrukcji &#8222;Add&#8221;, aby doda\u0107 warto\u015b\u0107 z wej\u015bcia IN1 i warto\u015b\u0107 z wej\u015bcia IN2 oraz zapyta\u0107 o sum\u0119 na wyj\u015bciu OUT (OUT := IN1 + IN2).<\/p>\n\n\n\n<p>W swoim pocz\u0105tkowym stanie, pole instrukcji zawiera co najmniej 2 wej\u015bcia (IN1 i IN2). Liczba wej\u015b\u0107 mo\u017ce by\u0107 rozszerzona. Wstawione wej\u015bcia s\u0105 numerowane w porz\u0105dku rosn\u0105cym w polu. Gdy instrukcja jest wykonywana, warto\u015bci wszystkich dost\u0119pnych parametr\u00f3w wej\u015bciowych s\u0105 dodawane. Suma jest przechowywana na wyj\u015bciu OUT.<\/p>\n\n\n\n<p>Wyj\u015bcie ENO ma stan sygna\u0142u &#8222;0&#8221;, je\u015bli spe\u0142niony jest jeden z nast\u0119puj\u0105cych warunk\u00f3w:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Wej\u015bcie EN ma stan sygna\u0142u &#8222;0&#8221;.<\/li>\n\n\n\n<li>Wynik instrukcji znajduje si\u0119 poza dozwolonym zakresem dla okre\u015blonego typu danych na wyj\u015bciu OUT.<\/li>\n\n\n\n<li>Liczba zmiennoprzecinkowa ma nieprawid\u0142ow\u0105 warto\u015b\u0107.<\/li>\n<\/ul>\n\n\n\n<p>W poni\u017cszej tabeli przedstawiono parametry instrukcji &#8222;Add&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Parametry<\/strong><\/td><td><strong>Deklaracja<\/strong><\/td><td><strong>Typ danych<\/strong><\/td><td><strong>Obszar pami\u0119ci<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>EN<\/td><td>Wej\u015bcie<\/td><td>BOOL<\/td><td>I, Q, M, D, L lub sta\u0142a<\/td><td>Wej\u015bcie w\u0142\u0105czaj\u0105ce<\/td><\/tr><tr><td>ENO<\/td><td>Wyj\u015bcie<\/td><td>BOOL<\/td><td>I, Q, M, D, L<\/td><td>Wyj\u015bcie w\u0142\u0105czaj\u0105ce<\/td><\/tr><tr><td>IN1<\/td><td>Wej\u015bcie<\/td><td>Ca\u0142kowite, liczby zmiennoprzecinkowe<\/td><td>I, Q, M, D, L, P lub sta\u0142a<\/td><td>Pierwsza liczba do dodania<\/td><\/tr><tr><td>IN2<\/td><td>Wej\u015bcie<\/td><td>Ca\u0142kowite, liczby zmiennoprzecinkowe<\/td><td>I, Q, M, D, L, P lub sta\u0142a<\/td><td>Druga liczba do dodania<\/td><\/tr><tr><td>INn<\/td><td>Wej\u015bcie<\/td><td>Ca\u0142kowite, liczby zmiennoprzecinkowe<\/td><td>I, Q, M, D, L, P lub sta\u0142a<\/td><td>Opcjonalne warto\u015bci wej\u015bciowe, kt\u00f3re s\u0105 dodawane.<\/td><\/tr><tr><td>OUT<\/td><td>Wyj\u015bcie<\/td><td>Ca\u0142kowite, liczby zmiennoprzecinkowe<\/td><td>I, Q, M, D, L, P<\/td><td>Suma<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Mo\u017cesz wybra\u0107 typ danych instrukcji z rozwijanej listy &#8222;???&#8221; w polu instrukcji.<\/p>\n\n\n\n<p>Dla dodatkowych informacji na temat prawid\u0142owych typ\u00f3w danych, zobacz &#8222;Zobacz tak\u017ce&#8221;:<\/p>\n\n\n\n<p>Przyk\u0142ad: Poni\u017cszy przyk\u0142ad pokazuje, jak dzia\u0142a instrukcja:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfYk7VpdD9wunRXMXDWaljUY1RifdC7lxAvy-L6uBt6MMkXJjjDXHYqAB7j-0JGJeNuJveHHpl7-UPeZyvQvQqPOiybEoM826lZop9Ufeesrekfq8OPuPZBtA6uTrtzfAg0g7O3I1KF6qWubr2vWLg?key=GaXYr0L8Y-luDh-c4w4cCSlM\" alt=\"\"><\/figure>\n\n\n\n<p>Je\u015bli operand &#8222;TagIn&#8221; ma stan sygna\u0142u &#8222;1&#8221;, instrukcja &#8222;Add&#8221; jest wykonywana. Warto\u015b\u0107 operandu &#8222;Tag_Value1&#8221; jest dodawana do warto\u015bci operandu &#8222;Tag_Value2&#8221;. Wynik dodawania jest przechowywany w operandu &#8222;Tag_Result&#8221;. Je\u015bli instrukcja jest wykonywana bez b\u0142\u0119d\u00f3w, wyj\u015bcie ENO ma stan sygna\u0142u &#8222;1&#8221; i wyj\u015bcie &#8222;TagOut&#8221; jest ustawione.<\/p>\n\n\n\n<p>If you would like to enhance your knowledge and skills in programming and configuration of automation systems, we recommend enrolling in the<a href=\"https:\/\/sklep-plcspace.pl\/en\/thank-you-for-placing-the-order-9\/?wmc-currency=EUR\"> <\/a><strong><a href=\"https:\/\/sklep-plcspace.pl\/en\/siemens\/simatic-s7-in-action\/?wmc-currency=EUR\" target=\"_blank\" rel=\"noreferrer noopener\">free PLC course<\/a><\/strong>! Sprawd\u017a r\u00f3wnie\u017c nasz\u0105 instrukcj\u0119 wideo:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"ast-oembed-container\" style=\"height: 100%;\"><iframe title=\"Operacje matematyczne - Kurs programowania PLC Siemens S7-1200 - TIA Portal - LAD\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/jsZzfQWFgXs?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"850\" height=\"200\" src=\"https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5.png\" alt=\"\" class=\"wp-image-34056\" srcset=\"https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5.png 850w, https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5-300x71.png 300w, https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5-768x181.png 768w, https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5-18x4.png 18w, https:\/\/sklep-plcspace.pl\/wp-content\/uploads\/2025\/04\/bezplatny-s7-1200-5-600x141.png 600w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>Mo\u017cesz u\u017cy\u0107 instrukcji &#8222;Add&#8221;, aby doda\u0107 warto\u015b\u0107 z wej\u015bcia IN1 i warto\u015b\u0107 z wej\u015bcia IN2 oraz zapyta\u0107 o sum\u0119 na wyj\u015bciu OUT (OUT := IN1 + IN2). W swoim pocz\u0105tkowym stanie, pole instrukcji zawiera co najmniej 2 wej\u015bcia (IN1 i IN2). Liczba wej\u015b\u0107 mo\u017ce by\u0107 rozszerzona. Wstawione wej\u015bcia s\u0105 numerowane w porz\u0105dku rosn\u0105cym w polu. [&hellip;]<\/p>","protected":false},"author":2505,"featured_media":33812,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33824","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bez-kategorii"],"acf":[],"_links":{"self":[{"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/posts\/33824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/users\/2505"}],"replies":[{"embeddable":true,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/comments?post=33824"}],"version-history":[{"count":2,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/posts\/33824\/revisions"}],"predecessor-version":[{"id":34077,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/posts\/33824\/revisions\/34077"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/media\/33812"}],"wp:attachment":[{"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/media?parent=33824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/categories?post=33824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sklep-plcspace.pl\/en\/wp-json\/wp\/v2\/tags?post=33824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}