Post by ofey on Modbus TCP communication
CODESYS Forge
talk
(Post)
Hi! I tried setting up the PLC I'm working with (Beijer GN-9373) to connect to a modbus master running on a laptop. I have an ethernet connection (via USB-C to ethernet) between the laptop and the controller. I have tried following tutorial on how to set this up. I have added an ethernet device with the IP-address of the PLC. Further I added a ModbusTCP_Slave_Device with default settings. I get the error "Failed to open TCP Port: 1" when I try to go online with the PLC. Earlier I tested the exact same set up with the soft PLC from codesys. I can then read/write values correctly with the Modbus master i have running on the laptop. Hope anybody can help me with this, thanks in advance!
Last updated: 2023-10-06
Post by ewi04 on Recipe Manager - RecipeManCommands, load & write wrong values, Bug?
CODESYS Forge
talk
(Post)
Hallo, I have a strange problem with the recipe manager. ISSUE: When using RecipeManCommands not all values are loaded correctly. Saving a recipe with CreateRecipe(), ReadAndSaveRecipe() or ReadAndSaveRecipeAs() works without any problems. BUT: LoadRecipe(), WriteRecipe() or LoadFromAndWriteRecipe() do not load the data correctly. It is Interesting that we have a different error pattern with LoadRecipe() than with WriteRecipe() or LoadFromAndWriteRecipe(). LoadRecipe() does not load all data and WriteRecipe() or LoadFromAndWriteRecipe() overwrites some data or assigns it incorrectly. And it is also strange that LoadRecipe() writes the values to the PLC. Normally it doesn’t do it. It makes no difference whether the memory type is textual or binary. I have an object consisting of STRUCTs which is inserted in the recipe definition. Environment: Codesys V3.5 SP19 Patch 4 (64Bit), Recipe Management 4.2.0.0 *Add a project (reduced to the problem)
Last updated: 2023-11-15
Post by felipemsgarcia on Edge Gateway online, but PLC is not online
CODESYS Forge
talk
(Post)
Hello, Up until yesterday (2023/11/20) I was able to connect to the PLC remotely with no issues through Edge Gateway. However, today I can see the Edge Gateway online but I can find the PLC even if I do a network scan. Following the same path as janber0206 @ https://forge.codesys.com/forge/talk/automation_server/thread/e78b11d7e9/, I looked into certificates and found that one of the Trusted publisher certificates has expired earlier today (2023/11/21). Please see image. Questions are: Does it affect the connection to the PLC through Edge Gateway? How do I fix it? Thank you very much in advance!
Last updated: 2023-11-21
Post by seppi on Establishing communication between a Raspberry Pi 4 and an Arduino UNO R3 using I²C.
CODESYS Forge
talk
(Post)
Hello everyone, I want to establish communication between my Arduino and my Raspberry Pi via I²C, but I have no idea how to make it work. However, it should work because there are many examples available, although none of them were programmed using Codesys, but rather using Python. My Raspberry Pi will be the master and is supposed to exchange measurement data such as speed and battery capacity with the slave (Arduino). I would be very grateful if someone could help me with my problem. Here is another link that could be helpful. However, I can't find the mentioned libraries
Last updated: 2023-12-03
Post by jegerjon on Testing of Codesys program
CODESYS Forge
talk
(Post)
I have a simulation function that toggle xSimActive. I map all IO variables to "IO GVLs" when xSimActive=0. I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1. Then I write code for the simulation program that runs when xSimActive=1. Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on. I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept. When comissioned remove any possibility to activate simulation. Super when officetesting and supporting service dept. + cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
Last updated: 2023-12-07
Post by jegerjon on Testing of Codesys program
CODESYS Forge
talk
(Post)
I have a simulation function that toggle xSimActive. I map all IO variables to "IO GVLs" when xSimActive=0. I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1. Then I write code for the simulation program that runs when xSimActive=1. Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on. I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept. When comissioned remove any possibility to activate simulation. Super when officetesting and supporting service dept. + cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
Last updated: 2023-12-07
Post by snhatton on OpC UA server on Raspberry Pi 64 SL runtime
CODESYS Forge
talk
(Post)
Good afternoon, After changing the security settings to: CommunicationPolicy: POLICY_BASICSHA256SHA256 CommunicationMode: ALL Activation: Activated UserAuthentication: ENABLED Then generate a new certificate on the device for the OPC-UA server from Security Agent->Device->OPC UA Server. Restart the runtime using tools->Update Raspberry Pi->Stop->Start for the changes to take effect. It may take a minute for the runtime to start. Initiate the connection from the UA server side. You should see a pop-up asking you to trust the certificate. Click on the button 'Trust Server Certificate'. Next, you should see a certificate in the quarantined folder of the security agent in CODESYS. Click and drag this from quarantined to trusted and then try connecting from UA expert to the device. These steps worked for me and my setup and I hope they can help you!
Last updated: 2023-12-11
Post by sumit on Remote Ethernet/ip Adapter communication with scanner running on codesys
CODESYS Forge
talk
(Post)
Hello there, I have my ethernet/ip adapter (from Texas Instrument) running on Texas Instrument Board and I have configured the scanner on codesys. I have mapped the I/Os and I can see (on wireshark) the frames coming from adapter but I don't see my input variables in scanner get updated, they just stay at 0. I wanted to see the real data that has been sent from adapter to scanner on codesys. I am not sure if the problem is in I/O mapping or there is a step/s that I have missed. I have attached the screenshot of my project for your ref. Thank you, Sumit
Last updated: 2023-12-15
Post by sumit on Remote Ethernet/ip Adapter communication with scanner running on codesys
CODESYS Forge
talk
(Post)
Hello there, I have my ethernet/ip adapter (from Texas Instrument) running on Texas Instrument Board and I have configured the scanner on codesys. I have mapped the I/Os and I can see (on wireshark) the frames coming from adapter but I don't see my input variables in scanner get updated, they just stay at 0. I wanted to see the real data that has been sent from adapter to scanner on codesys. I am not sure if the problem is in I/O mapping or there is a step/s that I have missed. I have attached the screenshot of my project for your ref. Thank you, Sumit
Last updated: 2023-12-15
Post by preimesbergert on Raspberry Pi 4 B HW 1.5 Codesys control 4.10.0 stopps after a few seconds
CODESYS Forge
talk
(Post)
Wanted to play a bit with a raspberry Pi 4 Model B HW 1.5 and Codesys. Regardless of the image (tried 32bit / 64bit version from Raspberry Pi Imager) and with all tested Codesys Control versions (4.2.0, 4.8.0, 4.10.0) and regardless if single core / multicore / 64 bit variant, always is the runtime stopped after about 30sec with the nice message: ooops... this runtime was built for RASPBERRYPI. Hardware version or firmware version not supported! (-7, 0x00000BB8, 0xFFFFFFFB) Whats wrong with it?!?!? I read a lot about the issue in topics from 2020-2021 but it always was stated with new Codesys control version issue will be fixed (4.4 for example) but still it is there.
Last updated: 2023-12-21
Post by preimesbergert on Raspberry Pi 4 B HW 1.5 Codesys control 4.10.0 stopps after a few seconds
CODESYS Forge
talk
(Post)
Wanted to play a bit with a raspberry Pi 4 Model B HW 1.5 and Codesys. Regardless of the image (tried 32bit / 64bit version from Raspberry Pi Imager) and with all tested Codesys Control versions (4.2.0, 4.8.0, 4.10.0) and regardless if single core / multicore / 64 bit variant, always is the runtime stopped after about 30sec with the nice message: ooops... this runtime was built for RASPBERRYPI. Hardware version or firmware version not supported! (-7, 0x00000BB8, 0xFFFFFFFB) Whats wrong with it?!?!? I read a lot about the issue in topics from 2020-2021 but it always was stated with new Codesys control version issue will be fixed (4.4 for example) but still it is there.
Last updated: 2023-12-21
Post by royw on Profinet library for C#
CODESYS Forge
talk
(Post)
Hi, I don't know if I'm in the right place or if it's even possible... I'm looking for a way to address a Profinet device with Record Read and Write from my own PC. I actually only need very few commands to configure our device. This means setting the MAC address and a serial number. We would like to do this from a C# program. Now we are looking for a library or something similar. Since you can do it from Codesys, I thought there might be a DLL or something similar that you could use for this. As I said, we don't want real-time queries of the cyclic data but only record read/write. Does anyone have any helpful hint? Thanks in advance
Last updated: 2023-12-22
Post by i-campbell on What does CODESYS expect to do when I get such an error message
CODESYS Forge
talk
(Post)
you need to get the addons that the person that programmed it used. I always store an .installation-config file alongside the project. If you have lost that, then it gets a bit of a headache: I think even with SP18 you can hit yes to open it anyway, and it will suggest which addons it thinks are missing, if you double click the yellow "missing-addons" in the status bar. If you know you have the right addons, you can do a "Save As.." and it will write your current addon list to the file, and you wont get the error next time.
Last updated: 2024-01-08
Post by jeroen on Ramp function
CODESYS Forge
talk
(Post)
Hi, Found a nice ramp function in the OSCAT lib (FT_RMP), but is there a nice way to 'set' the output to the current input as form of a reset. The reason for this, is that I want to set up a ramp for a pressure control input that should have x Bar/sec linear rise input. The only option (or code it by hand) I found is this OSCAT FB. Any other options? Just need to increase a value by x Bar/sec from let's say 250Bar (as start) to end 1500Bar. The Oscat ramp will always start at 0 when enable is off (FT_RMP.Rmp := FALSE)
Last updated: 2024-01-09
Post by davidbo on Does the new license policy means I have to upgrade everything?
CODESYS Forge
talk
(Post)
We have several old project written with 3.5.17 and 3.5.18 and also some older Until now when a customer ordered a product from us. We just installed (we have a tested image) and added a license Now the license policy has changed and we have to buy a License Control Basic S or M However it only works with CODESYS Development System Version 3.5.19.10 or higher Does that mean we have to upgrade all our old products? That is not a simple task as a previous post has explained with weird error messages from CODESYS V3.5. Next we have to do rigorous testing of our applications afterwards. It is very expensive
Last updated: 2024-01-11
Post by imuser on Is it possible to use debug functions such as Step Execution while the PLC ladder is in Running?
CODESYS Forge
talk
(Post)
Hello, I am a student learning CODSIS. Lately, I've been curious about something. During the actual PLC run, that is, Assume that the I/O is connected to a physical device and the analog value is updated in real time. Is it possible to use a feature like Codesys’ Debug-Step Over-Step IN? If possible..... How do I process the values of analog values (pressure sensor, temperature, current, etc.) that are being updated in real time? To step over, the ladder must stop at the breakpoint. If that happens, the PLC will actually stop, right??
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 fdmartello on Unable to compare projects containing alarm manager 4.5.0.0
CODESYS Forge
talk
(Post)
Hello. In Codesys version 3.5.19.50 when comparing two projects that have an "Alarm Configuration" obj from the Alarm Manager library vers. 4.5.0.0 the attached error pops up. This originally happened with two projects that I converted from vers. 3.5.17.30 so, thinking it was some conversion issue, I created two clean projects directly in 3.5.19.50 using the Standard Project template and only added the Alarm Configuration objects in them. The result is the same and the only way I found that allowed me to compare them is by deleting the incriminated object in one of the two projects. Has anyone else encountered this issue? Best regards
Last updated: 2024-01-19
Post by yang123 on EtherCAT Can't reconnect to servo drive
CODESYS Forge
talk
(Post)
I am using Ethercat Master 4.6.0.0 and have use the automatic restart slaves feature. But we found of after the Ethercat communication normal and slave drive power-off and power-on the slave can't reconnect sucess. The PLC Log show the drive was al status "6#34 : Invalid DC Timeout Error" and its was reconnection sucess first but seconced later the drive will show the "16#2C : Fatal Sync error" and then drive will can't reconnection. Other slave are reconnect sucess which was link after the can't reconnect's drive the drive was OMRON R88D-1SN
Last updated: 2024-01-23
Post by riccardo on Error while processing the visualization: Client id not present or no longer valid
CODESYS Forge
talk
(Post)
Hallo goodmorning, I am using codesys 3.5 sp19 with Weidmueller PLC. I created a page with several checkbox to manage an array of bool. When I build the project the system doesn't signal any error, when I go in simulation mode everything works until I click on checkbox to toggle the variables. Other visu elements works proprerly (e.g. bottons, lights, ect, ect) but the check boxes cause a crash giving the following error: Error while processing the visualization: Client id not present or no longer valid I serched to figure the problem out and to search a solution on the web but nothing. Can someone help? Thanks and Regards, Scanu
Last updated: 2024-01-23
Post by matt-s on HMI Pushbutton/Move Instruction
CODESYS Forge
talk
(Post)
I am having an issue where the manual start/stop push buttons on the HMI are supposed to take the pumps/blowers out of auto. The logic I have attached works for the pumps, but not the blower. From what I can tell it is the exact same logic, but it is not writing a 0 to the Auto PB variable. Attached is the logic, cross reference list to show nothing else is writing to it, and the HMI screen. Any help? Am I missing something? I am using a Groov Epic PR1, my software version is 3.5 SP19 Patch 5 32 Bit.
Last updated: 2024-01-25
Post by matthew on New Ladder Diagram conversion does not work due to missing features
CODESYS Forge
talk
(Post)
Hi It looks like in the new ladder there is no way to remove unused FB call parameters or update the function block? It's quite often where you have a function block with multiple uses and not all the parameters are required. Need the ability to leave an input/output blank without getting an compile error Expression expected instead of '' Also double clicking on the FB no longer opens the underlying FB code and view what it was doing online. Dragging and dropping a variable does not work, only using the selection works. Will these be available in the V1.0 release or just best to stick to the old ladder until it's available? Thanks
Last updated: 2024-01-28
Post by alexgooi on Update boot project default unchecked
CODESYS Forge
talk
(Post)
Dear Forum, I'm currently switching to Codesys V3.5 SP19. When I want to do an online change, I get the option to update the boot project, in other (codesys based) packages this is checked on by default. In Codesys V3.5 SP19 (and maybe older versions) this is unchecked by default. We are doing a lot of remote updates with systems that almost never power cycle. In other words when this box is forgotten the system will run fine until a blackout. Is it possible to get it checked on by default? This question was asked before, but no answers where given. https://forge.codesys.com/forge/talk/Engineering/thread/ffb4ffa298/ Thank you in advance.
Last updated: 2024-02-09
Post by alexgooi on Is it possible in the log to see previous shutdown
CODESYS Forge
talk
(Post)
Hi DavidBo, In general Codesys is used to control equipment and an exception is the worst thing that can happen in your installation. If you cannot prevent the exception from triggering, you could implement a Try catch statement, with this solution your controller keeps on running and you are able to handle the exception. __TRY //This statement will trigger an exception Result := 4/0; __CATCH(exc) //Handle the exception HandleException(exc, strExceptionText => strExceptionText); // From the Codesys help file //Create a log file //-------------------------------------------------------- __ENDTRY What you also could do is implement implicit checks, these functions cover most of the exceptions (like dividing by zero) See picture But in general avoid a complete controller shutdown!
Last updated: 2024-02-09
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
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
.