<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/</id><updated>2020-02-27T14:01:49.885000Z</updated><subtitle>Recent posts to MODBUS TCP loosing set values</subtitle><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#a569" rel="alternate"/><published>2020-02-27T14:01:49.885000Z</published><updated>2020-02-27T14:01:49.885000Z</updated><author><name>robz</name><uri>https://forge.codesys.com/u/robz/</uri></author><id>https://forge.codesys.com959e41ef023cbad76994def68445eed95a7cf1da</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Same issue, with no result here, but all of a sudden it began working with these settings&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2017" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3304"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#4660" rel="alternate"/><published>2020-02-27T14:01:49.617000Z</published><updated>2020-02-27T14:01:49.617000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comf0278ff4cfecc160f65b46ad57bff7b718490418</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;the plc should be a modbus slave and it is solved by increasing the timeout.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#d7b1" rel="alternate"/><published>2020-02-27T14:01:49.313000Z</published><updated>2020-02-27T14:01:49.313000Z</updated><author><name>ndzied1</name><uri>https://forge.codesys.com/u/ndzied1/</uri></author><id>https://forge.codesys.com191544b918512fd12b9a3445f0d8e1ac153b1ee5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The way you have it set up, it looks like your CoDeSys controller is the Modbus slave.  &lt;/p&gt;
&lt;p&gt;If you want your CoDeSys to write to another device, you have to install a Modbus master then install the slave(s) under that.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: CodesysModbus.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1614"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#68c2" rel="alternate"/><published>2020-02-27T14:01:48.483000Z</published><updated>2020-02-27T14:01:48.483000Z</updated><author><name>pavol.fazik</name><uri>https://forge.codesys.com/u/pavol-fazik/</uri></author><id>https://forge.codesys.com276498a8f460989929ab43c1795484352018c28a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
there is no such a setting when having only modbus slave. I found those settings only if you have modbus master&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2016" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1611"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#da76" rel="alternate"/><published>2020-02-27T14:01:48.216000Z</published><updated>2020-02-27T14:01:48.216000Z</updated><author><name>learnetk</name><uri>https://forge.codesys.com/u/learnetk/</uri></author><id>https://forge.codesys.com19beeabeaa307f7fda5befb4e4a8a8096a60bd66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi &lt;br/&gt;
maybe you could have set the Error Handling - Set to Zero instead or Keep last value.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: ErrorHandling.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1610"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#c6aa" rel="alternate"/><published>2020-02-27T14:01:47.953000Z</published><updated>2020-02-27T14:01:47.953000Z</updated><author><name>pavol.fazik</name><uri>https://forge.codesys.com/u/pavol-fazik/</uri></author><id>https://forge.codesys.com953c7cab1c817b7af524eca5e158c58c4ae3fc86</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;one more point, when I debug the code, the values stay set   I have tried to make few cycles...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#d0f3" rel="alternate"/><published>2020-02-27T14:01:47.687000Z</published><updated>2020-02-27T14:01:47.687000Z</updated><author><name>pavol.fazik</name><uri>https://forge.codesys.com/u/pavol-fazik/</uri></author><id>https://forge.codesys.com9fc1594668b25ed156b67662a5beeef68656e25a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for the reply. It gave me hope for a few minutes  but unfortunately the situation is still the same.&lt;/p&gt;
&lt;p&gt;I have no code that would null the modbus variables.  Neither in codesys neither in php.&lt;br/&gt;
I have very simple code and this code was working in 2.3 now in 3.5 not.&lt;/p&gt;
&lt;p&gt;Maybe the modbus variables are nulled at the begining of each cycle?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#d925" rel="alternate"/><published>2020-02-27T14:01:46.864000Z</published><updated>2020-02-27T14:01:46.864000Z</updated><author><name>MidwestFAE</name><uri>https://forge.codesys.com/u/midwestfae/</uri></author><id>https://forge.codesys.com33825584640d03ead28d42a0be4e86e6d8f30643</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have worked with Modbus TCP a pretty fair amount recently.  I there is no "Modbus TCP" setting that would explain this.  If you were trying to write to a read only area, you would get faults or unchanged values.  I would recommend doublechecking the programming at the slave and master level and make sure that you don't have code overwriting those registers, or resetting them.&lt;/p&gt;
&lt;p&gt;As to the "TYPE" question, WORD and BYTES are pretty much it.  Modbus seems to move the binary bit patterns from one place to another with regard to data type.  If you need to treat the data as something else, you will need to declare a variable in the global variable list.&lt;/p&gt;
&lt;p&gt;If you needed motor speed 1 to be a double word you would go to the global variable list and do something like&lt;/p&gt;
&lt;p&gt;MB_Motor_1 AT %IW0: DWORD;&lt;/p&gt;
&lt;p&gt;that will take IW0 and IW1 and place the binary bit pattern into the tag MB_MOTOR_1 and treat it as a double word.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS TCP loosing set values</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/cf4099e6a9/?limit=25#a4b8" rel="alternate"/><published>2020-02-27T14:01:46.589000Z</published><updated>2020-02-27T14:01:46.589000Z</updated><author><name>pavol.fazik</name><uri>https://forge.codesys.com/u/pavol-fazik/</uri></author><id>https://forge.codesys.comde394af918b61c20e29a98074d7220f62edbbe41</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all, could you please advice me. &lt;/p&gt;
&lt;p&gt;I'm able to write values from php via FC16 into the modbus. I can se that the variables were set:&lt;/p&gt;
&lt;p&gt;but the value is gone in few seconds and set back to 0:&lt;/p&gt;
&lt;p&gt;why is this happening? any idea?&lt;/p&gt;
&lt;p&gt;second question, I'm not able to set the TYPE of the variables in I/O setting?&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2016" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1608"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2016" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1609"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>