<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CODESYS Modbus TCP Master/Slave - BK9000 - doesn't work</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8f93480bc0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8f93480bc0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8f93480bc0/</id><updated>2020-02-27T18:53:54.186000Z</updated><subtitle>Recent posts to CODESYS Modbus TCP Master/Slave - BK9000 - doesn't work</subtitle><entry><title>CODESYS Modbus TCP Master/Slave - BK9000 - doesn't work</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8f93480bc0/?limit=25#76ee" rel="alternate"/><published>2020-02-27T18:53:54.186000Z</published><updated>2020-02-27T18:53:54.186000Z</updated><author><name>Dude82</name><uri>https://forge.codesys.com/u/dude82/</uri></author><id>https://forge.codesys.com5007b3853aba43ef8e7621e1dfb1f338a41a8474</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Solution found. &lt;br/&gt;
Sometimes I feel that I'm not very clever.    By the way, I just forgot to enabled an option about the updated of the variable.&lt;br/&gt;
indeed in the configuration of the PLC device (Here a Raspberry): Enable 1 ("Use bus cycle task if not used in any task") must be used in my project.  &lt;/p&gt;
&lt;p&gt;I can now get the thermocouple values through MODBUS.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: problem_soved.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4846"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: option_to_solve_the_problem.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4845"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CODESYS Modbus TCP Master/Slave - BK9000 - doesn't work</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8f93480bc0/?limit=25#73c6" rel="alternate"/><published>2020-02-27T18:53:50.901000Z</published><updated>2020-02-27T18:53:50.901000Z</updated><author><name>Dude82</name><uri>https://forge.codesys.com/u/dude82/</uri></author><id>https://forge.codesys.com220175510bad9a524ec87e059a700b14c7645b08</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In CODESYS 3.5 V15 I try to read data on Modbus from a Beckhoff Ethernet coupler ( BK9000+KL3314: input for thermocouple + KL3064 : Input 0-10V)&lt;br/&gt;
 I have added an Ethernet Generic device and then add Modbus TCP Master and Slave (as I have seen in others threads).&lt;br/&gt;
 I think I have put the proper parameters (IP adress: 192.168.1.48 = my BK9000 on the network, port = 502)&lt;br/&gt;
 I have added input canal Chanel 1 with Read Holdings register (Offset = 1 (=0x0001) and data = 1) but I can't get any value when the program runs on the PLC (here a Raspberry with Jessie)&lt;/p&gt;
&lt;p&gt;This is very surprising to me   , because I can read both the value usine Python (with the pymodbus lib)&lt;br/&gt;
 in python 3.7.4 on my windows computer&lt;/p&gt;
&lt;p&gt;&lt;span style="color: underline;"&gt;Code:&lt;/span&gt;&lt;br/&gt;
           from pymodbus.client.sync import ModbusTcpClient&lt;br/&gt;
           client = ModbusTcpClient('192.168.1.48', '502')&lt;br/&gt;
           rr=client.read_holding_registers(1,1)&lt;br/&gt;
           print('input: ', rr.getRegister(0))&lt;br/&gt;
           It gives me the proper value of the Thermocouple&lt;/p&gt;
&lt;p&gt;When I use KS2000 from Beckhoff, I can read also the value from Channel 1.&lt;/p&gt;
&lt;p&gt;Do you know what i'm doing wrong in CODESYS ? It makes me made not to understand where the problem is.  &lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Data_read_on_KS2000.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4841"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Config_Modbus_Slave_device.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4840"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Config_Ethernet_device.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4839"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>