<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Updating Digital Outputs</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/310e2eb79a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/310e2eb79a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/310e2eb79a/</id><updated>2020-02-27T21:33:57.924000Z</updated><subtitle>Recent posts to Updating Digital Outputs</subtitle><entry><title>Updating Digital Outputs</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/310e2eb79a/?limit=25#a20b" rel="alternate"/><published>2020-02-27T21:33:57.924000Z</published><updated>2020-02-27T21:33:57.924000Z</updated><author><name>dgjohnson</name><uri>https://forge.codesys.com/u/dgjohnson/</uri></author><id>https://forge.codesys.com14ab0db05fadf90d57e80a03e38147db0f119303</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the response.&lt;/p&gt;
&lt;p&gt;It turns out there was a hardware problem with the PLC and a certain combination of IO modules.  &lt;/p&gt;
&lt;p&gt;I have since switched to a Moeller PLC and the same code works fine.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Updating Digital Outputs</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/310e2eb79a/?limit=25#3562" rel="alternate"/><published>2020-02-27T21:33:56.459000Z</published><updated>2020-02-27T21:33:56.459000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.com8732c8c2c0124f85b53523cfba18a363ded38b72</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Outputs will turn on and off if you force them only if the variable is not being called any where else in the code. If a variable is being called in the code, ie the variable bMotorStart := false; and you try to force it from the PLC configuration  then it will never turn on. Forcing outputs from variables being called in code as far as I am aware of is an art. Normally the control code is broken into at least three sections. Input section, control section, output section. When there is a need to force the outputs then a bit is set in such a way that no longer calls that output variable so you can manually turn it on and off.&lt;/p&gt;
&lt;p&gt;if (bForceMode = False) then&lt;/p&gt;
&lt;p&gt;bMotorStart := bStartEnable;&lt;/p&gt;
&lt;p&gt;end_if&lt;/p&gt;
&lt;p&gt;To force the variable bMotorStart set bForceMode = True;&lt;/p&gt;
&lt;p&gt;As for your outputs not coming on perform a global search for the variable and make sure it's not being called some where else in your code. There is also an option in Project-Options-Build-Multiple write access on outputs menu to force CoDeSys to check for this situation at compile time an report in the message window.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Updating Digital Outputs</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/310e2eb79a/?limit=25#e13d" rel="alternate"/><published>2020-02-27T21:33:52.357000Z</published><updated>2020-02-27T21:33:52.357000Z</updated><author><name>dgjohnson</name><uri>https://forge.codesys.com/u/dgjohnson/</uri></author><id>https://forge.codesys.comc597b9c64b6f17dc92d2e3cdc058c51262344c1c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm having a problem updating the Digital Outputs through the code.  If I monitor the outputs in Online-PLC Configuration the squares turn blue as if the output is switching, but it doesn't.&lt;/p&gt;
&lt;p&gt;If I use the Online-PLC Configuration (clicking on the blue square) to switch the outputs the turn on/off correctly.  Also when I do this the ones already turned On by the code switch.&lt;/p&gt;
&lt;p&gt;Is there something needed in the code to force an update of the digital outs?&lt;/p&gt;
&lt;p&gt;I'm running CodeSys 2.3 on a Kontron ThinkIO-P.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>