<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/</id><updated>2020-02-27T15:20:35.639000Z</updated><subtitle>Recent posts to CODESYS v3+ WAGO PFC200+ MODBUS RTU</subtitle><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#3969" rel="alternate"/><published>2020-02-27T15:20:35.639000Z</published><updated>2020-02-27T15:20:35.639000Z</updated><author><name>johnlee</name><uri>https://forge.codesys.com/u/johnlee/</uri></author><id>https://forge.codesys.com74e1ab143d6885906b942f22f392998ed0b93c3c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;ZKh hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi every one&lt;br/&gt;
I  established a Modbus RTU (RS485) connection between CODESYS and PFC200; and I can read data from slave. &lt;br/&gt;
The problem is that slave's responses are very slow and erratic. &lt;br/&gt;
-I tried to fix this by changing timeouts but didn't workout.&lt;br/&gt;
-I am sure about authenticity of slave device, because it works fine with other PLCs. &lt;br/&gt;
Is there any way to boost and organize the update operation?&lt;br/&gt;
Thanks in advance&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi ZKH,&lt;/p&gt;
&lt;p&gt;The interest of the Modbus RTU is this communication protocol very easy to implementation due to it do not need any high speed communication chipset.&lt;br/&gt;
So for your case the issue is more on the slave site, if the slave it take longer time to process data then you can't do anything to boost up the respond time.&lt;br/&gt;
What you can try to do is shorter the distance of the wiring and using faster baud rate.&lt;/p&gt;
&lt;p&gt;Thank you&lt;br/&gt;
John Lee&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#70dc" rel="alternate"/><published>2020-02-27T15:20:34.993000Z</published><updated>2020-02-27T15:20:34.993000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.coma37a84e971365df5547d682056092f14e9f501fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
are you using a PFC200 mit Modbus RTU?&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#f857" rel="alternate"/><published>2020-02-27T15:20:33.124000Z</published><updated>2020-02-27T15:20:33.124000Z</updated><author><name>annD</name><uri>https://forge.codesys.com/u/annd/</uri></author><id>https://forge.codesys.comb0762ddff86f85b68bbb1b128c902a95a00fd14d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;how did you establish your connection in this case? What was the solution?&lt;br/&gt;
I am struggling with a similar topic.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
annD&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#5ab8" rel="alternate"/><published>2020-02-27T15:20:32.476000Z</published><updated>2020-02-27T15:20:32.476000Z</updated><author><name>ZKh</name><uri>https://forge.codesys.com/u/zkh/</uri></author><id>https://forge.codesys.com65ae011e837a513e0d7588c9d5eba70b470ba6d1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi every one&lt;/p&gt;
&lt;p&gt;I  established a Modbus RTU (RS485) connection between CODESYS and PFC200; and I can read data from slave. &lt;/p&gt;
&lt;p&gt;The problem is that slave's responses are very slow and erratic. &lt;br/&gt;
-I tried to fix this by changing timeouts but didn't workout.&lt;br/&gt;
-I am sure about authenticity of slave device, because it works fine with other PLCs. &lt;/p&gt;
&lt;p&gt;Is there any way to boost and organize the update operation?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#fb4b" rel="alternate"/><published>2020-02-27T15:20:31.839000Z</published><updated>2020-02-27T15:20:31.839000Z</updated><author><name>ZKh</name><uri>https://forge.codesys.com/u/zkh/</uri></author><id>https://forge.codesys.com1b136fbe40b82f75dfd083448b5a0cc5fb17562c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;br/&gt;
 Good news &lt;br/&gt;
Finally I established a Modbus RTU (RS485) connection and I can read data from slave. &lt;br/&gt;
I need data to update online but the problem is that, slave's data updates slowly&lt;br/&gt;
I defined timeout responses as 1 second. Still not enough.&lt;br/&gt;
Unfortunately adding data length makes updating slower. &lt;/p&gt;
&lt;p&gt;Is there any way to boost the update operation?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#22d0" rel="alternate"/><published>2020-02-27T15:20:29.982000Z</published><updated>2020-02-27T15:20:29.982000Z</updated><author><name>ZKh</name><uri>https://forge.codesys.com/u/zkh/</uri></author><id>https://forge.codesys.com409715413ac3bb6b3b0e8ef9c2a86a012b0c462b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin&lt;/p&gt;
&lt;p&gt;Thanks a lot for your consideration. &lt;br/&gt;
Wiring was the first thing I checked. I don't have wiring problem.&lt;/p&gt;
&lt;p&gt;To solve the problem; I did something different:&lt;br/&gt;
I did the same setting in CODESYS v2.3.9.47. &lt;br/&gt;
Still I can't read data from Modbus slave.&lt;br/&gt;
The program has no error (MBCFG_ERROR= MBCFG_NO_ERROR) but there is an error number generated by 'sercomm.lib' (MBCFG_SERCOM_ERROR= 2).&lt;br/&gt;
I've found 'sercomm.lib' from WAGO. If I'm not mistaken the error says: "0x02: COM port outside of the valid area". But the valid area is 2-65!!!!&lt;br/&gt;
This time I changed the slave and used 'ADAM-4561'; and I am sure of the COM Port 4; because I changed the port setting in device manager.&lt;/p&gt;
&lt;p&gt;Why this happens? How can I fix it?&lt;br/&gt;
Is it possible that the x3:RS232/485 port of PFC200-750-8202 doesn't work properly? &lt;/p&gt;
&lt;p&gt;I attached the screenshot.&lt;br/&gt;
Thanks in advance.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Codesysv2.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1962"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#75c8" rel="alternate"/><published>2020-02-27T15:20:29.338000Z</published><updated>2020-02-27T15:20:29.338000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com49810cdc5f227f218cf18ada376d793150fc5e68</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
if the slave does not respond on that simple project, &lt;br/&gt;
this maybe is a wiring problem?&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: RS485connector.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1958"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#2d93" rel="alternate"/><published>2020-02-27T15:20:28.697000Z</published><updated>2020-02-27T15:20:28.697000Z</updated><author><name>ZKh</name><uri>https://forge.codesys.com/u/zkh/</uri></author><id>https://forge.codesys.com1eef3428ede3f2c1b42109c66d1e10dcba5f2dbf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin&lt;/p&gt;
&lt;p&gt;Thanks a lot for helping me.&lt;/p&gt;
&lt;p&gt;I reset all settings:&lt;br/&gt;
1- Factory Resetting PFC200-750-8202/025-002&lt;br/&gt;
2- adding all Modbus Libraries and PFC200 Libraries to the project&lt;br/&gt;
3- inserting Modbus_com, Modbus_Master_COM_Port and Modbus_Slave_COM_Port into Devices tree&lt;br/&gt;
4- Changing serial interface to RS485&lt;br/&gt;
3- set the PLC settings as follows: &lt;br/&gt;
                      Always update variables: Enabled2(Always in bus cycle task)&lt;br/&gt;
                      Bus cycle task: Main task&lt;/p&gt;
&lt;p&gt;4- Modbus slave channel setting: &lt;br/&gt;
Modbus slave supports Function code 3 (read holding registers).&lt;br/&gt;
                       Access type: FC3&lt;br/&gt;
                       Offset: 0&lt;br/&gt;
                       Length: 1&lt;/p&gt;
&lt;p&gt;Modbus slave status is 'not running' again.   &lt;/p&gt;
&lt;p&gt;some questions:&lt;br/&gt;
1- How is it that when slave is connected or not, I got the same results? nothing will change.&lt;br/&gt;
2- The data type I am trying to read from slave is Real. The setting in CODESYS defines data of type word in Modbus slave I/O mapping. How can I change it to Real?&lt;br/&gt;
3- Is it helpful to Change Master or Slave response timeout and time between frames?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: SlaveChannel.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1955"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Modbus.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1956"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#a511" rel="alternate"/><published>2020-02-27T15:20:26.803000Z</published><updated>2020-02-27T15:20:26.803000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comfaebe5e2cd04227c8b6468c07d0f66ca31b0a7f0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I would just read one function code without offset.&lt;br/&gt;
If this give a result add others...&lt;br/&gt;
Which functioncode does the modbus slave support to read?&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS v3+ WAGO PFC200+ MODBUS RTU</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/d2261caecb/?limit=25#85cb" rel="alternate"/><published>2020-02-27T15:20:26.162000Z</published><updated>2020-02-27T15:20:26.162000Z</updated><author><name>ZKh</name><uri>https://forge.codesys.com/u/zkh/</uri></author><id>https://forge.codesys.com3d42427501a899269675ffa4cb87e09aeec249a4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin&lt;/p&gt;
&lt;p&gt;Thanks a lot for your response and help.&lt;/p&gt;
&lt;p&gt;yes CODESYSControl.cfg is from GatewayPLC Directory.&lt;br/&gt;
I tried every thing to fix this problem but my slave status is still 'not running'.&lt;br/&gt;
I don't know whats wrong!!!  &lt;/p&gt;
&lt;p&gt;Is there anything else I have to consider?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>