Post by winki on Modbus TCP & RTU with Control for Linux SL
CODESYS Forge
talk
(Post)
For small project, I would like to use my industrial computer as a PLC + Industrial Computer. Like that I can save the cost of one PLC. That why I am using Codesys on Linux. With the nic it is not working. I already set the IP adress with /etc/network/interfaces. Can it comes from there ? looking to "Control Linux SL" docuemntation it should work with rtu.
Last updated: 2024-10-23
Post by warrumungi on Opening a Dialog on a specific Client from ST
CODESYS Forge
talk
(Post)
Hi Thanks, Manuel, for providing this solution and insight. I too had exactly the same problem as you did. While I did implement a custom filter, I'd also like to point out what jinlee mentioned above...I see no reference to VU.PublicVariables.Clients.Current anywhere?? In my case I only needed to show a dialog on a "master" client, not all the clients, so I filtered by IP address to do this.
Last updated: 2024-11-05
Post by squiggleypuff on Can't Add New Version of Modbus TCP Master
CODESYS Forge
talk
(Post)
I'm having a tough time trying to get Modbus working on a Festo CPX-E PLC; it throws these pre-compiler errors as soon as I add in my Modbus TCP Master 3.5.12.30 to my project: I'm confused about the C0046 error, as I have IODrvModbusTCP 4.3.0.0 Library installed. So I thought maybe I needed to use the newest Modbus TCP Master 4.3.0.0, which is in my device repository: However, whenever I go to add this underneath the Ethernet adapter (which is version 4.2.0.0), the only TCP Master version available is the old 3.5.12.30 one, even if I have Display all versions checked.: I even went so far as to delete the old version, but then there were no options to add a Modbus TCP Master under my Ethernet adapter. What needs to be done to use the newest Modbus TCP Master? Or are these pre-compiler errors unrelated and I'm missing something? Any help greatly appreciated.
Last updated: 2024-04-04
Post by xnoop on MBTCP Slave configuration
CODESYS Forge
talk
(Post)
Hello, I use Codesys 3.5 SP18 Patch 4 (64 bit) My Codesys project is composed of several dozen of Modbus TCP Slaves. I want to configure each of them by define : - Modbus TCP Slave Configuration : Name, IPAddress, port - Channels - Mapping I can't afford to configure manually and I need to find automatic way What possibilities does the Codesys offer? 1. I know it possible to use python script to create Modbus TCP Master and Slave. But I don't find anyway to create Channels and Mapping through the API 2. I 've tested to set mapping with file.csv on a Modbus Tcp Slave, but no way to import channels definition from file 3. I 've tried to use PLCOpenXml file. For example I 've create a project with an Ethernet device. I've exported it in PlcOpenXml file. After delete the Ethernet device, I've imported the PlcOpenXml file without success. I've tried the same by creating Modbus TCP Slave. Could you help me to find to good way ? Thanks
Last updated: 2024-06-19
Post by cdutz on Problems connecting to Codesys 4.9.0.0 runtime on my Wago PFC200
CODESYS Forge
talk
(Post)
Turns out I managed to get a connection to my PLC. It seems that a few weeks ago Wago released something with version 4.3.3(25). So I reset my PLC to Factory-Reset, set it to the 192.168.1.17 IP and changed the IP to the one I wanted with the Wago EthernetSettings tool. Then updated the latest firmware using the WAGOupload tool. Now the PLC came back up without a PLC runtime running, so in the Web-tool I wen't to the "Configuration"/"PLC Runtime" and selected the runtime version "CODESYS V3". I uninstalled all Codesys versions and installed the version from the download package of Wago together with all the packages the bundle provided. After creating a new project I didn't select the old PFC200 runtime, but one of the dozens of new device profiles, that it now listed. With these settings I was then able to connect to my PLC. Now I hope I'll get the existing project that I had ported to this new structure. Sorry for the noise. Chris
Last updated: 2023-08-26
Post by yannickasselin on Connect to remote PLC via local pc and teamviewer
CODESYS Forge
talk
(Post)
Yes it is possible. I did it a lot of times using TeamViewer VPN. Unfortunately, TeamViewer VPN only works on Windows. If the remote PLC is a Codesys runtime running on Windows, you should be able to login directly using TeamViewer VPN if it is installed on the PC/PLC. If it is not Windows based, you can still do it but you need to have a Windows based PC acting as a gateway in the middle. In this case you need to enable IP Forwarding on the Windows remote PC (the gateway) and you need to setup the gateway IP address on the PLC to be the address of the Windows PC. Then you need to add a route on your local PC to point to the gateway PC for Codesys communication. I know it may not be detailed enough but I did not want to make a whole tutorial on how to do it. Bottom line, it is possible. I do it all the time.
Last updated: 2024-02-02
Post by programmierer on Implementing UDP Communication
CODESYS Forge
talk
(Post)
Hello everyone, I hope you can help me with my problem. I am new to programming and am currently working with a WAGO controller in our lab, which controls a heat pump. My goal is to send the electrical power of the heat pump (Pel_WP) via a UDP connection to a specific IP address. I am using Codesys version 2.3 and following the guide I found here: https://forge.codesys.com/forum/de/396/genmed-Konfiguration%20der%20UDP%20Kommunikation%20Cosesys%20S7.pdf. I have adapted the guide to suit my needs. The data sending works since I can force the reception value Pel_WP and the data is sent accordingly. However, I am having trouble with the receiving part. The reception value is not being correctly received, and the diSocket variable shows -1. The connection between the heat pump and the WAGO controller seems to be set up correctly, as the heat pump is listed under the communication parameters with the correct IP address. I have also attached images to provide a better view of the setup. I would greatly appreciate any support or suggestions for a solution. Thank you in advance!
Last updated: 2024-08-02
Post by gilbert-mh on CAA net base TCP client cause PLC to crash - Kernel message : N0HZ_local_softirq_pending 80
CODESYS Forge
talk
(Post)
Hello all, I have been trying to implement a TCP client on a Festo PLC (CPX-E-CEC-M1) and it looks like it works well except that after some time (greatly varies between a few hours to more than 100h) my PLC crash. When I look into the log file the only thing I see is that before the crash happens a few kernel warnings : N0HZ_local_softirq_pending 80 and then the crash. I've looked into this warning and from what I could find on the net it seems that this is warning is triggered when the ethernet link is down. I've tried to correct this bug for quite some time and what I know is that : - The crash is caused by my TCP client, when I remove it from my code I see no crash - The crash happens more quickly the more the TCP client is used. - The time before the crash is not directly proportional to the number of communications or their size. But it looks like it is just more likely to happen if the client connect to the server at a higher frequency. - The precedent observation makes it seem unlikely that the crash is caused by some memory overflow because then the crash speed would be more proportional to the amount of data exchanged. SO from these observations, I believe that the crash could be caused by the PLC trying to connect to a server while there is some kind of issue with the ethernet link resulting in the PLC getting stuck in some indefinite state and making it crash. This still seems a bit unlikely to me because if the ethernet is down it simply shouldn't be able to contact the server and the communication would just fail which doesn't cause my PLC to crash. Has anyone encountered the same kind of problem (with the same kernel message) ? I am pretty sure the warning is not the direct cause of the crash but just an indicator that something is wrong with my PLC. Thanks in advance
Last updated: 2024-01-12
Post by bfunk on Wago 750-8101 (mit Codesys V3) als Profinet device
CODESYS Forge
talk
(Post)
Moin, ich habe da ein Problem und komme einfach nicht weiter... Ich moechte eine Wago 750-8101 (mit Codesys V3) zu einem ModBus TCP Slave und einem Profinet slave machen. ModBus habe ich hinbekommen, Profinet bekomme ich einfach nicht hin. habt ihr das evtl. einen hilfreichen Tip fuer mich? Programmiert wird mit Codesys V3.5 SP19 Patch 2 Auf dem Zielsystem (PFC100) ist die Zielsystemversion 4.6.0.0 Das es nicht optimal ist PN und ModBus TCP auf einer Schnittstelle zu haben ist mir bewusst. Wollte aber erstmal ModBus und Profinet zum laufen bekommen bevor ich das Profinet auf die 2. Ethernet-Schnittstelle bringe. /etc/CODESYSControl_User.cfg [SysSocket] Adapter.0.Name="br0" Adapter.0.EnableSetIpAndMask=1 Adapter.1.Name="br1" Adapter.1.EnableSetIpAndMask=1 ist eingetragen. so sieht der Status fuer das PN-device aus. Anbei ein Screenshot.
Last updated: 2024-01-16
Post by idalu on Profinet PN_Controller Issue, Network Adapter
CODESYS Forge
talk
(Post)
i have a problem with Profinet on my project. I'm using Codesys RTE 3.5.19.50. When i download program to controller the ethernet is ok, PN_Controller is ok but every device i'm trying to connect is red with error "DCP no RealStationName". When i'm trying to Scan for Devices on PN_Controller there are no devices found. I have installed Codesys driver CmpEt1000Drv to my network adapter (i'm sure it is right intel pro 1000 model). I have noticed that when i installed codesys driver i'm no longer able to ping this network adapter (i can ping it when intel driver is installed). On my previous projects with runetimes i can ping it even with codesys driver installed. I have also tried to do downgrade of everything to version 3.5.19.20 and it not helped.
Last updated: 2024-01-17
Post by rh-pk on v3.5 SP19 - Modbus TCP Devices - Channel Limit?
CODESYS Forge
talk
(Post)
Hi, i found a solution for me. I had installed a 'old' version of CoDeSys (3.5.18 P5). I tried to add channels there, which works fine. I created a new project, added an Ethernet-Port, added a Modbus-Master and then I copied the ModBus-Slave from my working project to the new project. Now I could add more channels. I add the channels 10 and 11. Then I deleted (please make a backup before :-) the original ModBus-Slave in my working project and copied the extended Slave back to my working project. Surprisingly it is now possible to add new channels. Maybe this will help you.
Last updated: 2024-02-14
Post by timvh on Profinet fault with codesys control V3 - Receive packet error
CODESYS Forge
talk
(Post)
Are you using the Control Win SL (installed together with the development environment of CODESYS)? If yes, you might want to consider using the CODESYS RTE instead. This has real-time capabilities (running on separate core(s)). But to be able to use this, you have to install the CODESYS Ethernet driver for your network interface to be able to let the RTE access the network port also in realtime. See: https://store.codesys.com/en/codesys-control-rte-sl-bundle.html https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_windows_rts_v3.html PS, I haven't tested this myself yet, but you could try to use the SetCommunicationState method of the Profinet controller to see if you can reset and start the bus communication: result := PN_Controller.SetCommunicationState(eRequestedState := DED.DEVICE_TRANSITION_STATE.START); PS, if you are located in the Netherlands or Belgium, we could also provide the license(s) for you.
Last updated: 2024-02-28
Post by timvh on Profinet fault with codesys control V3 - Receive packet error
CODESYS Forge
talk
(Post)
Are you using the Control Win SL (installed together with the development environment of CODESYS)? If yes, you might want to consider using the CODESYS RTE instead. This has real-time capabilities (running on separate core(s)). But to be able to use this, you have to install the CODESYS Ethernet driver for your network interface to be able to let the RTE access the network port also in realtime. See: https://store.codesys.com/en/codesys-control-rte-sl-bundle.html https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_windows_rts_v3.html PS, I haven't tested this myself yet, but you could try to use the SetCommunicationState method of the Profinet controller to see if you can reset and start the bus communication: result := PN_Controller.SetCommunicationState(eRequestedState := DED.DEVICE_TRANSITION_STATE.START); PS, if you are located in the Netherlands or Belgium, we could also provide the license(s) for you.
Last updated: 2024-02-28
Post by mbmik on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi Im trying to setup a Weidmüller WL2000 to run with MODBUS, to get some data from a server. Codesys V3.5 SP20. The issue is, that whenever i attach an ethernet port and add MODBUS Master und also a Slave, codesys will compile the project, but there always seem to be some remaining errors, which or only visible, when setting the messages window to "Pre-Compiled". I tried a lot of stuff to get rid of these errors, but cant find to seem the reason. New installation of codesys, cleaned project, setup completely empty new project, manually adding libs. Nothing helps. Any help is apreciated. Maybe we are doing something wrong.. Example Project is available, if somebodey wants to take a look. Greetings and thanks alot
Last updated: 2024-04-15
Post by westcountryewe on Persistence Variables missing and DO NOT retain from Persistence Channel when using Boot Application
CODESYS Forge
talk
(Post)
We've been experiencing an issue through SP18, SP19 and now SP20 where the Persistence Variables do not retain if we upload our program via a Boot Application. If we use the exact same program, and perform a Direct Upload via the Laptop and Ethernet connection, the Persistence Variables work exactly as expected. I have submitted 2 bug support tickets but I haven't had a response back from Codesys. Has anybody experienced the same issues and discovered a workaround? We have a requirement to utilise the Boot Application method because of logistical restrictions of being able to get out to every site, so at the moment it's a bit restriction.
Last updated: 2024-05-15
Post by rohan on Child Application Alarm
CODESYS Forge
talk
(Post)
Hi All, I'm trying to develop a multi-application project that allows me to switch between applications. I currently have a parent application and several child applications, as this is the only way for them to share CAN/Ethernet communication. I've noticed that I am only able to create an Alarm Configuration for the parent application. But the children application do not seem to be displaying alarms on the Alarm Table in the visualisation for when an alarm is raised. Does anyone know of a fix, solution or a way around this? I am utilising Codesys v3.5 SP16 Patch 5 64Bit
Last updated: 2024-06-21
Post by shrikantp007 on new to codesys help on modbus with ardunio modbus rtu
CODESYS Forge
talk
(Post)
Hello , I am new to codesys ,working with it for just 15-17 days so ,i think i am able to installed it and configure it ,not i want to use ardunio program (smart dustbin ,college project using motor and Ultrasonic Module HC-SR04 and servo motor). i use ardunio program to write code with chatgpt to work ardunio as a modbus rtu as i dont have ethernet or wifi shild ,i wrote program in ariduno but now don have idea what change i have to make in codesys to comunicate as modbus slave it give error with bus error ,where i can get all errors ? Thanks in advance :)
Last updated: 2024-07-21
Post by acc00 on Redundancy Codesys Runtime, Synchronization
CODESYS Forge
talk
(Post)
Hi, I’m currently testing the Codesys Redundancy application with 2 Raspberry Pi, with the idea is of using in my project 2 Wago PFC200 and 1 Ethercat Master with 2 Remote IO. After I configure the redundancy, and one Pi is Active and the other is Passive, if I disconnect the Ethernet cable of the Active, the Passive become Standalone, which is good, but the problem is the following: -When I recover the Ethernet connection, both stay Standalone. They will NOT Sync until I do it manually in the Codesys environment. How to make the synchronization automatically? -If both Pi/PLC stays Standalone, who is managing the IO? (Ethercat and Serial) I have done a test with an Modbus Slave, where I am sending a counter that increase every second. And I see that when both PLC are standalone, they both keep an active connection with the Slave, and both write values. This does not seem good, since according to this in my project both PLC would try to control the IO at the same time. Note: The Codesys have an option (greyed out, not possible to select) which says “Auto Sync”. What is the purpose, and why I’m not able to select it? I'm using Codesys Control for Rapsberry Pi 64SL Runtime in my test environment (2xRaspberry Pi 4), with the idea of using Codesys Control PFC 200 Runtime in my project (2xWago PFC200 and 1 Ethercat Master with 2x Wago 750-354 Ethercat Fieldbus Coupler). Using the last Codesys 3.5 version (SP19 PAtch 5). I'd appreciate a lot any help on this questions!
Last updated: 2024-01-22
Post by riccardo on Management of a PLC network from a remote station
CODESYS Forge
talk
(Post)
Goodmorning, I would need to set a control station that can manage a PLC network. In short I need to access to all visu programmed in any PLC of the network (LAN). I was thinking to use a PLC with buttons that call, by mean an IP address, the visu of any PLC. I don't know if it is possible but I saw that there is a RemoteVisuTarget that run CODESYS Control Win V3. Can someone suggest me how to create a remote main control station from a normal PC? Thanks, Riccardo
Last updated: 2023-11-27
Post by cedriclee on RaspberryPI reconnection error
CODESYS Forge
talk
(Post)
"Hello, I'm Cedric Lee, a PLC engineer based in Korea. I'm reaching out about an ongoing issue with the connection when attempting to control Beckhoff modules using Raspberry Pi with CODESYS for the first time. I use CODESYS to target the Raspberry Pi's IP, install version 4.10.0.0 of the CODESYS Runtime Package, and upon pressing Start in the Runtime, the target connects to the Raspberry Pi. However, within about a minute, an error window appears, stating 'no connection to the device. please rescan your network,' leading to the disconnection of the target. This cycle repeats. I've attached some pictures for your reference. I'm using CODESYS Development System V3, Raspberry Pi 4 Model B (installed as 64-bit), and Beckhoff EK1100 modules. If anyone has a solution to this issue, please help. Your assistance is greatly appreciated."
Last updated: 2024-01-11
Post by valec on Connect local Asem HMI runtime to local Codesys Control Win V3 x64
CODESYS Forge
talk
(Post)
I have a project made on a PL700 PLC with Codesys and an Asem Premium HMI panel. I don't have access to the physical PLC right now, so I'm trying to use Codesys Control Win V3 x64. I created the application and loaded "Codesys Control Win V3 x64" without errors, then I activate "Start PLC" from the tray. Asem cannot connect. I tried to use "localhost" or the local IP address and it doesn't work (it's the "CoDeSys Soft PLC Communication Driver"). I need to connect my local Asem runtime to a virtual Codesys application on my PC. How can I do it?
Last updated: 2024-03-26
Post by jrsantab on Remote connection to ifm PLC & HMI
CODESYS Forge
talk
(Post)
Hello, We are trying to access remotely a PLC (ifm 711S) and a HMI (ifm CR1077). Both are connected to a Teltonika RUT200 router. We establish the connection with OpenVPN Connect and can ping both controllers. We have a laptop that, most of the time, will allow Codesys connection to the controllers, but we have several other computers that are unable to connect, although all of them can ping successfully. We cannot find any difference in the configuration or software installed from one PC to another. If we connect to the router by WIFI, instead of VPN, all the computers work fine. We know that scanning the network will not work over a remote connection, so we input the controller IP directly. Has anyone had a simlar problem and can offer any hint on what to check to meke the connection run?
Last updated: 2024-04-11
Post by jrsantab on Remote connection to ifm PLC & HMI
CODESYS Forge
talk
(Post)
Hello, We are trying to access remotely a PLC (ifm 711S) and a HMI (ifm CR1077). Both are connected to a Teltonika RUT200 router. We establish the connection with OpenVPN Connect and can ping both controllers. We have a laptop that, most of the time, will allow Codesys connection to the controllers, but we have several other computers that are unable to connect, although all of them can ping successfully. We cannot find any difference in the configuration or software installed from one PC to another. If we connect to the router by WIFI, instead of VPN, all the computers work fine. We know that scanning the network will not work over a remote connection, so we input the controller IP directly. Has anyone had a similar problem and can offer any hint on what to check to make the connection run?
Last updated: 2024-04-11
Post by sbrauns on Codemeter log error: API Error 200 (ENTRY NOT FOUND) occurred!
CODESYS Forge
talk
(Post)
Hi, I am using Codesyscontrol for linux 4.11 with an USB dongle with license. The log file from codemeter shows a constant error message which repeats every minute: Entry (6000437:8755) not found - Event WB0200 (ENTRY NOT FOUND), Request IP-Address local(IPV4) with UserLimit API Error 200 (ENTRY NOT FOUND) occurred! The log file from Codesyscontrol itself shows runtime licensed and I experience no other issues. But I am still concerned about the error message in the log file. Does anybody know what this is and how to fix it? thanks
Last updated: 2024-05-08
Post by kazuhiro on Problems using MySql Library and SysProcessExecuteCommand2 together
CODESYS Forge
talk
(Post)
I use fbMsSQL_compact(FUN) of the MySQL Library to write data to the database. There is no problem when writing data using only fbMsSQL_compact(FUN). However, when I try to write data obtained using SysProcessExecuteCommand2 to the database using fbMsSQL_compact(FUN), an error message "Dest server on ip address:xxx.xxx.xxx.xxx and port:1433 is unreachable" appears and writing is not possible. From what I have researched, it seems that writing is not completed in one cycle of fbMsSQL_compact(FUN), and when SysProcessExecuteCommand2 is executed first in the second cycle, the work done in one cycle of fbMsSQL_compact(FUN) is reset. Could you please give me some advice?
Last updated: 2024-06-18
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
.