Post by fmon on Modbus : dis- / re-connect cable: modbus does not re-start
CODESYS Forge
talk
(Post)
Hello, I am using codesys Modbus TCP client (4.4.0.0) to communicate with a python modbus server (package pyModbusTCP). I first start my python server on the distant machine. After a fresh codesys compilation, a plc connection/transfer and a PLC run, the modbus connection is OK. Every time in this context the connection is created correctly. When I shut down the server, the modbus connection falls, that is normal. When I restart the python server, impossible to recreate the modbus connexion. With the client autoreconnection, I see on my server that the client tries to connect but unsuccesfully. I have the following message : DEBUG:pyModbusTCP.server:accept new connection from ClientInfo(address='192.168.1.20', port=33476) DEBUG:pyModbusTCP.server:Exception during request handling: NetworkError('recv return null') I tried to stop the codesys client and to restart it with these commands : Modbus_TCP_Client.xStop := True; // Or False Modbus_TCP_Client.Enable := True; // Or False Modbus_TCP_Server.Enable := True; // Or False I tried to confirm the error manually to force reconnection with: Modbus_TCP_Server_Motors.xConfirmError := TRUE; I tried also this command to STOP/RESET/START client and server (codesys side) but nothing happens : status_client := Modbus_TCP_Client.SetCommunicationState(eRequestedState := DED.DEVICE_TRANSITION_STATE.STOP); // .RESET & .START The answer of this function when executed is "status_client = NOT_SUPPORTED" It seems that is a socket problem, but I do not understand if it is on the client or server side. I tried a modbus simulator called "ananas.exe" and the result is the same. Impossible to get a modbus reconnection. What is different at the first connection and at a reconnection attempt ? Thanks for your help
Last updated: 2025-03-14
Post by wagomikep on Number of Connections to Modbus TCP Slave
CODESYS Forge
talk
(Post)
Hello, Is there a maximum number of Masters that can connect to a Modbus TCP Slave that is configured in the device tree? Is this limited by the CODESYS IDE, or the manufactures hardware and CPU load? Thank you,
Last updated: 2024-08-01
Controlling PM564-eth PLC using Weintek HMI with MODBUS TCP/I. I keep getting communication errors.
CODESYS Forge
talk
(Thread)
Controlling PM564-eth PLC using Weintek HMI with MODBUS TCP/I. I keep getting communication errors.
Last updated: 2021-02-15
Post by kurtk on Modbus TCP Server
CODESYS Forge
talk
(Post)
ditto I'm just getting my codesys wheels on and the modbus stuff is confusing. I am re-platforming an existing PLC application On that platform one could simply tag variables to register numbers and the whole shooting match could be accessed via modbus and typically holding registers and input registers were treated the same way... On codesys I see there is a modbus TCP server Device I/O mapping tab and a Modbus TCP server IEC objects tab I get the sense that one can configure the serving of variables both/either way but am unclear about the optimum/necessary path. Apparently in the IEC Objects tab one can "ADD" something or other - presumeably channels. I have created a preliminary function block but the Select Function Block window shows nothing to select WTH ? I exported the Device mapping and was surprised to see the entire Device IO map - complete with all the bit-mapped holding/input registers!! WTH!!?? Bit-mapped words are strictly a nichey special purpose application. I am targetting making a couple hundred variables available which would turn into hundreds of pages of IO/mapping Is the FUnction Block IEC objects thingy an alternative to that ? I notice that CODESYS shows the tags which the PLC used to specify the register address... are tags used in CODESYS for any specific hard-core purpose ?
Last updated: 2025-08-19
Post by bolopg on MODBUS TCP REGISTERS CODESYS V3.5
CODESYS Forge
talk
(Post)
Hi. I have a problem with MODBUS TCP MASTER. I treid to read HR in range 3027-3037 but I cannot read them. I have modbus slave chanel with offset 0x3037. I checked what I read and it looks like I am reading HR in range 1-10. What I am doing wrong.
Last updated: 2024-10-11
Modbus Extended Registers
CODESYS Forge
talk
(Thread)
Modbus Extended Registers
Last updated: 2023-08-26
Modbus RTU 485
CODESYS Forge
talk
(Thread)
Modbus RTU 485
Last updated: 2020-02-02
Modbus RTU Library Enquiry
CODESYS Forge
talk
(Thread)
Modbus RTU Library Enquiry
Last updated: 2021-07-29
Modbus Ethernet Baustein - Kommunikation
CODESYS Forge
talk
(Thread)
Modbus Ethernet Baustein - Kommunikation
Last updated: 2014-09-18
Modbus Lockup
CODESYS Forge
talk
(Thread)
Modbus Lockup
Last updated: 2024-08-07
Modbus Lockup
CODESYS Forge
talk
(Thread)
Modbus Lockup
Last updated: 2024-08-07
Modbus UDP
CODESYS Forge
talk
(Thread)
Modbus UDP
Last updated: 2025-01-14
MODBUS
CODESYS Forge
talk
(Thread)
MODBUS
Last updated: 2025-08-05
MODBUS
CODESYS Forge
talk
(Thread)
MODBUS
Last updated: 2025-08-05
modbus viel zu langsam
CODESYS Forge
talk
(Thread)
modbus viel zu langsam
Last updated: 2011-01-12
Create Modbus Slave's dynamically
CODESYS Forge
talk
(Thread)
Create Modbus Slave's dynamically
Last updated: 2018-07-06
RaPi Modbus RTU master
CODESYS Forge
talk
(Thread)
RaPi Modbus RTU master
Last updated: 2022-09-16
Modbus Slave IP address
CODESYS Forge
talk
(Thread)
Modbus Slave IP address
Last updated: 2017-07-21
Pi Modbus RTU
CODESYS Forge
talk
(Thread)
Pi Modbus RTU
Last updated: 2021-06-16
RS485 Modbus RTU
CODESYS Forge
talk
(Thread)
RS485 Modbus RTU
Last updated: 2010-04-28
Modbus RTU RS485
CODESYS Forge
talk
(Thread)
Modbus RTU RS485
Last updated: 2015-05-03
Modbus Communication
CODESYS Forge
talk
(Thread)
Modbus Communication
Last updated: 2019-10-28
Modbus configuration
CODESYS Forge
talk
(Thread)
Modbus configuration
Last updated: 2021-07-06
Modbus RTU write trigger
CODESYS Forge
talk
(Thread)
Modbus RTU write trigger
Last updated: 2018-02-27
question modbus
CODESYS Forge
talk
(Thread)
question modbus
Last updated: 2018-03-13
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND or OR.