Post by uluking on CodeSys2.3 Modbus 64-Bit Double Read Problem
CODESYS Forge
talk
(Post)
Hi everyone, I would appreciate your help with a problem I've been working on for a few days but haven't been able to resolve. I am reading data from a Siemens PAC3220 energy analyzer using Modbus with Wago-8202. However, the device's energy indices are given as doubles. Since a double variable is 64-bit, it is not possible to read it directly. I have been struggling for days, I have written many conversion functions but I have not been able to get results. I would appreciate your help. I read 4 word variables and processed them. I am converting them according to IEEE-754, but I can't seem to read the correct data. I would appreciate your help.
Last updated: 5 days ago
TextList name error (fake)
CODESYS Forge
talk
(Thread)
TextList name error (fake)
Last updated: 4 days ago
OPC UA Client failed to connect
CODESYS Forge
talk
(Thread)
OPC UA Client failed to connect
Last updated: 4 days ago
Post by msegon on OPC UA Client failed to connect
CODESYS Forge
talk
(Post)
Hi everyone, I would appreciate your help with a problem I've been working on for a few days but haven't been able to resolve. I'm trying to read data from Tridium Niagara 4.15 OPC UA Server, but I get the error BadCertificateInvalid. As far as I understand, you need to add a CA certificate somewhere to establish a secure connection, but I don't know where. 2025-10-27T09:06:43.247Z, 0x0000008d, 4, 0, 0, * ERROR: OpcUa_Channel_BeginConnect: Cannot create secure channel without certificates! 2025-10-27T09:06:43.247Z, 0x00001090, 4, 0, 0, * ERROR: Datasource: Error Failed (268468242) in state Connecting I tried communicating without encryption, but it doesn't find the point. Has anyone managed to establish encrypted OPC UA communication?
Last updated: 4 days ago
Post by gatto on Backtick identifiers
CODESYS Forge
talk
(Post)
Hello, I’m in Codesys 3.5.20.40 and I try to declare the variable ´var1´ but I get an error. here : https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_rules.html i read : Backtick identifiers By using backticks, characters can also be used in identifiers that are not normally permitted in identifiers, such as special characters. The acute accent character is used for backticks: ´ (Unicode: U+02CA) The use of backticks is recommended in order to be able to use the same identifiers in CODESYS as in other programming languages or documents, such as circuit diagrams. Any character may be used between two backticks, except line breaks and other backticks. Keywords are also allowed as identifiers between backticks. Examples: ´Variable+9´ ´INT´ The backticks are part of each identifier and therefore var1 and ´var1´ are two different identifiers. Example PROGRAM PLC_PRG VAR var1 : INT; ´var1´: INT; END_VAR var1 := var1 + 1; ´var1´ := 12; Are there any limitations or is something missing in my development environment?
Last updated: 4 days ago
Post by wchin on Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Post)
We are creating helper function blocks for our VFD(EtherNetIP). How should I set it up so that I can pass the device into and out of the Function Block so that ideally I can access the IO of the device by devicename.channelname. So something like for example we have a VFD with a start bit that is in the ControlWord channel and a SetVelocity that is a channel. And we want to create a Function Block called StartVFD. So I declare something like: FUNCTION_BLOCK StartVFD VAR_IN_OUT device: ioDrvEthernetIP.RemoteAdapter; END_VAR VAR_INPUT velocity : REAL; So in the code it would look something like device.SetVelocity := velocity; device.ControlWord.6 := True; We have a pretty basic eds file for our VFD and can update it if necessary. Thanks in advance.
Last updated: 4 days ago
Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Thread)
Passing EtheNetIP adapter device into a Function Block to access it's IO
Last updated: 4 days ago
Post by wchin on Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Post)
We are creating helper function blocks for our VFD(EtherNetIP). How should I set it up so that I can pass the device into and out of the Function Block so that ideally I can access the IO of the device by devicename.channelname. So something like for example we have a VFD with a start bit that is in the ControlWord channel and a SetVelocity that is a channel. And we want to create a Function Block called StartVFD. So I declare something like: FUNCTION_BLOCK StartVFD VAR_IN_OUT device: ioDrvEthernetIP.RemoteAdapter; END_VAR VAR_INPUT velocity : REAL; So in the code it would look something like device.SetVelocity := velocity; device.ControlWord.6 := True; We have a pretty basic eds file for our VFD and can update it if necessary. Thanks in advance.
Last updated: 4 days ago
Backtick identifiers
CODESYS Forge
talk
(Thread)
Backtick identifiers
Last updated: 4 days ago
Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Thread)
Passing EtheNetIP adapter device into a Function Block to access it's IO
Last updated: 4 days ago
Post by wchin on Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Post)
We are creating helper function blocks for our VFD(EtherNetIP). How should I set it up so that I can pass the device into and out of the Function Block so that ideally I can access the IO of the device by devicename.channelname. So something like for example we have a VFD with a start bit that is in the ControlWord channel and a SetVelocity that is a channel. And we want to create a Function Block called StartVFD. So I declare something like: FUNCTION_BLOCK StartVFD VAR_IN_OUT device: ioDrvEthernetIP.RemoteAdapter; END_VAR VAR_INPUT velocity : REAL; So in the code it would look something like device.SetVelocity := velocity; device.ControlWord.6 := True; We have a pretty basic eds file for our VFD and can update it if necessary. Thanks in advance.
Last updated: 4 days ago
Passing EtheNetIP adapter device into a Function Block to access it's IO
CODESYS Forge
talk
(Thread)
Passing EtheNetIP adapter device into a Function Block to access it's IO
Last updated: 4 days ago
OPC UA multiple Endpoints
CODESYS Forge
talk
(Thread)
OPC UA multiple Endpoints
Last updated: 3 days ago
Post by malte on OPC UA multiple Endpoints
CODESYS Forge
talk
(Post)
My CODESYS OPC UA server provides endpoints using both the hostname and the IP address. Connecting via the IP address works fine, but connecting via the hostname does not. The endpoint list shows both opc.tcp://<hostname>:4840 and opc.tcp://<ip>:4840. When using the hostname, the OPC UA client (UA Expert) fails to connect. Using the IP address connects without issues. Main goal is to conect via Python but opcua-asyncio seems to prefer the hostname. How can I configure CODESYS or my system so that the OPC UA connection via hostname also works properly or disable it completly? Running Codesys for PFC200 sl 4.18.0.0
Last updated: 3 days ago
Post by kporter on SoftMotion, accessing PDO input data via object ref/pointer
CODESYS Forge
talk
(Post)
It looks like one can use the OutputData and InputData members of ETCSlaveStack: https://content.helpme-codesys.com/en/libs/EtherCATStack/4.2.0.0/EtherCATStack/ETCSlaveStack.html
Last updated: 3 days ago
SoftMotion, accessing PDO input data via object ref/pointer
CODESYS Forge
talk
(Thread)
SoftMotion, accessing PDO input data via object ref/pointer
Last updated: 3 days ago
Post by kporter on SoftMotion, accessing PDO input data via object ref/pointer
CODESYS Forge
talk
(Post)
Now that SP21 is out, what's the answer? I want to get a pointer to the TxPDO and RxPDO structs. I can generate a STRUCT declaration from the ESI file with a bit of Python. I just need to get the pointer from the ETC_Slave.
Last updated: 3 days ago
TCP Server
CODESYS Forge
talk
(Thread)
TCP Server
Last updated: 3 days ago
Post by aria13 on Has anyone fed ESP32 sensor data into CODESYS (via MQTT/Modbus)?
CODESYS Forge
talk
(Post)
Has anyone tried sending live sensor data from an ESP32 into a CODESYS runtime (for example via MQTT gateway or a Modbus bridge) to trigger PLC logic? I was reading an ESP32 → MQTT tutorial (https://www.theengineeringprojects.com/2021/11/esp32-mqtt.html) that shows how easy it is to publish sensor data from an ESP32, and I’m wondering how practical that is when tying the stream into industrial control software like CODESYS. I’ve also seen Arduino forum threads where people relay sensor streams to MQTT brokers and Raspberry Pi projects that bridge MQTT→Modbus, so I’m mainly curious about real-world issues: reliability, message latency, and simple patterns you’d recommend for safe PLC integration. Any tips, examples, or gotchas from folks who’ve done this?
Last updated: 3 days ago
Has anyone fed ESP32 sensor data into CODESYS (via MQTT/Modbus)?
CODESYS Forge
talk
(Thread)
Has anyone fed ESP32 sensor data into CODESYS (via MQTT/Modbus)?
Last updated: 3 days ago
Difference between using OPCUA symbol configuration and OPCUA Server object
CODESYS Forge
talk
(Thread)
Difference between using OPCUA symbol configuration and OPCUA Server object
Last updated: 2 days ago
Post by jeroenaero on Difference between using OPCUA symbol configuration and OPCUA Server object
CODESYS Forge
talk
(Post)
Hi, What is exactly the difference between using symbol configuration as OPCUA server or using the Codesys object OPCUA server? What are the advantages and disadvantages of using symbol configuration and OPCUA server object. Please let me know
Last updated: 2 days ago
Post by totorovic on Project loses 'Download time' information
CODESYS Forge
talk
(Post)
Thank you for your answer. The build > Generate Code start the code of the application but does not modify the compileinfo. I work with .projectarchive to avoid this kind of problem. I would like to have the possibility to modify the compileinfo by myself so I can indicate the losses information.
Last updated: 2 days ago
Project loses 'Download time' information
CODESYS Forge
talk
(Thread)
Project loses 'Download time' information
Last updated: 2 days ago
CODESYS 3.5.17.30 Setup Error
CODESYS Forge
talk
(Thread)
CODESYS 3.5.17.30 Setup Error
Last updated: 2 days ago
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.