CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Oct 22, 2019 5:19 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Aug 27, 2019 8:31 am 
Offline

Joined: Tue Aug 13, 2019 1:59 pm
Posts: 2
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)
I have added an Ethernet Generic device and then add Modbus TCP Master and Slave (as I have seen in others threads).
I think I have put the proper parameters (IP adress: 192.168.1.48 = my BK9000 on the network, port = 502)
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)

This is very surprising to me :shock: , because I can read both the value usine Python (with the pymodbus lib)
in python 3.7.4 on my windows computer

Code:
from pymodbus.client.sync import ModbusTcpClient
client = ModbusTcpClient('192.168.1.48', '502')
rr=client.read_holding_registers(1,1)
print('input: ', rr.getRegister(0))
It gives me the proper value of the Thermocouple

When I use KS2000 from Beckhoff, I can read also the value from Channel 1.

Do you know what i'm doing wrong in CODESYS ? It makes me made not to understand where the problem is. :evil:


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Tue Aug 27, 2019 9:57 pm 
Offline

Joined: Tue Aug 13, 2019 1:59 pm
Posts: 2
Solution found. :)
Sometimes I feel that I'm not very clever. :cry: By the way, I just forgot to enabled an option about the updated of the variable.
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. :mrgreen:

I can now get the thermocouple values through MODBUS.


You do not have the required permissions to view the files attached to this post.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited