<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Use one variable serveral times in one program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/</id><updated>2020-02-27T14:05:00.888000Z</updated><subtitle>Recent posts to Use one variable serveral times in one program</subtitle><entry><title>Use one variable serveral times in one program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/?limit=25#4ae8" rel="alternate"/><published>2020-02-27T14:05:00.888000Z</published><updated>2020-02-27T14:05:00.888000Z</updated><author><name>Triodes</name><uri>https://forge.codesys.com/u/triodes/</uri></author><id>https://forge.codesys.com6d06fd7f4a0dbf612f614f16fe2912b37548c0a9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Try to use bits with an output only once in your program to avoid things like this.&lt;/p&gt;
&lt;p&gt;For your example you need to make an OR statement by paralleling the two inputs in the same rung as the output.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;----&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;-----&lt;/th&gt;
&lt;th&gt;----------------------( )----&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;</summary></entry><entry><title>Use one variable serveral times in one program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/?limit=100#7e09" rel="alternate"/><published>2020-02-27T14:05:00.468000Z</published><updated>2020-02-27T14:05:00.468000Z</updated><author><name>aliazzz</name><uri>https://forge.codesys.com/u/aliazzz/</uri></author><id>https://forge.codesys.comffb2e663e14ac7364aad4629e34c20065c6159d8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You can do these tasks in a single rung;&lt;br/&gt;
Set the input coils in parallel (in an OR operation) and then write output-coil once.&lt;br/&gt;
Also, by-design the latest operation in writing to the same output always get executed (in a single cycle). &lt;br/&gt;
So, in your case the lowest rung always has highest precedence.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use one variable serveral times in one program</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55e8621e41/?limit=25#f471" rel="alternate"/><published>2020-02-27T14:04:59.303000Z</published><updated>2020-02-27T14:04:59.303000Z</updated><author><name>McMarco</name><uri>https://forge.codesys.com/u/mcmarco/</uri></author><id>https://forge.codesys.combd687c098d4a6f77fd49414f95c5bb3976e5e00f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Everyone!&lt;br/&gt;
I have a problem with variables in Codesys.&lt;br/&gt;
Firstly, I would like to use 1 variable as Coil, serveral times in the same program, but if i have use other firstly variable, which runs Coil, then coil is not working. When I use other secondly variable, which runs Coil, then coil is working. Why? How to fix it?&lt;br/&gt;
I would like to attach a coil from several places in the program.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://ibb.co/iNSj4z" rel="nofollow"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://ibb.co/bJ9LcK" rel="nofollow"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://ibb.co/d3thPz" rel="nofollow"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="https://preview.ibb.co/n6DfcK/Screen_1.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="https://preview.ibb.co/gZWoWe/Screen_2.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="https://preview.ibb.co/ksqkcK/Screen_3.jpg"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>