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 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 micik on False Notification Application Error with raspberry pi 4
CODESYS Forge
talk
(Post)
Hello, I have just went through all steps shown on Codesys YT channel https://www.youtube.com/watch?v=RPoPscbo3Kc And it works, I have installed PI OS 32 bit and choose Single Core. However, immediattely when I create standard project with Raspberrz pi device, "Application" is underlined, like there is an error, but in reality there are no errors, and I cannot see what are these 3 messages like shown in attachment. Aside for this red underline, everything seems to work fine. How to correct this? Thank you! Update: I have found what errors are, but not sure how to correct them: Identifier 'IoDrvGPIO' not defined Function block 'IoDrvGPIO' must be instantiated to be accessed 'IoDrvGPIO' is no component of 'IoDrvGPIO'
Last updated: 2024-09-03
Post by pernockham on Linking to IO during runtime with hot swap?
CODESYS Forge
talk
(Post)
I have a project where a single PLC shall control multiple nodes (up to 10 units?) with IO connected through profinet. Ideally each node should be identical however with time I see situations were different setups/configurations will be used. Codesys PLC (GVLs) |Profinet | |--PNIO-node-1--| | | AIO, | | DIO, | | CNT etc. | |--PNIO-node-2--| | | AIO, | | DIO, | | CNT etc. Ideally I think of a configuration through yaml/xml-files (the assignment/linking of the profinet nodes towards GVL-variables in the PLC as well as scaling, channel configration etc.). Would be grateful if someone could suggest library/-ies that can handle the following: - Verify what IO is connected to a device/node. - Hot-swap/assign link for IO towards GVLs, either automatically or through a HMI.
Last updated: 2024-10-11
Post by paulg on RasPi CAA Serial example - unexpected behavior during debug
CODESYS Forge
talk
(Post)
I've trimmed down the CAA Serial Codesys example to only listen on one port but, when stepping through the Case structure in debug mode, it jumps out of the structure during a specific point in every scan (I'll point it out below after describing the setup and listing the code). I'm using a Pi 4 Model B, and I have an Arduino Nano Every plugged in via USB which is streaming the following serial message at 1 Hz: Time since opening connection: 1 s Time since opening connection: 2 s ...and so on. The Pi shows the Nano at /dev/ttyACM0 so I edited CODESYSControl_User.cfg to read: Linux.Devicefile=/dev/ttyACM The code in my PLC_PRG is (ignore some of the comments, I hadn't deleted them out from the original example): PROGRAM PLC_PRG VAR xStartTest : BOOL:= TRUE; iState : INT; xTestDone : BOOL;(* True, when the test was done succesfully *) (* Settings to communicate with the COM Port *) aCom1Params : ARRAY [1..7] OF COM.PARAMETER; como1 : COM.Open; comc1 : COM.Close; comw1 : COM.Write; comr1 : COM.Read; //sWrite : STRING := 'Test String!'; sRead : STRING(25); szRead : CAA.SIZE; xCom1OpenError : BOOL; xCom1CloseError : BOOL; xCom1WriteError : BOOL; xCom1ReadError : BOOL; END_VAR //This example shows the communication of two COM Ports with each other. //The first one writes a string of characters, which is read by the second one. //After successful execution, the two COM Ports are closed and the test is done. IF xStartTest THEN CASE iState OF 0: //The parameters are set for the COM Port aCom1Params[1].udiParameterId := COM.CAA_Parameter_Constants.udiPort; aCom1Params[1].udiValue := 1; // the correct Port should be adapted aCom1Params[2].udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate; aCom1Params[2].udiValue := 115200; aCom1Params[3].udiParameterId := COM.CAA_Parameter_Constants.udiParity; aCom1Params[3].udiValue := INT_TO_UDINT(COM.PARITY.NONE); aCom1Params[4].udiParameterId := COM.CAA_Parameter_Constants.udiStopBits; aCom1Params[4].udiValue := INT_TO_UDINT(COM.STOPBIT.ONESTOPBIT); aCom1Params[5].udiParameterId := COM.CAA_Parameter_Constants.udiTimeout; aCom1Params[5].udiValue := 0; aCom1Params[6].udiParameterId := COM.CAA_Parameter_Constants.udiByteSize; aCom1Params[6].udiValue := 8; aCom1Params[7].udiParameterId := COM.CAA_Parameter_Constants.udiBinary; aCom1Params[7].udiValue := 0; //The first Port is opened with the given parameters como1(xExecute := TRUE, usiListLength:=SIZEOF(aCom1Params)/SIZEOF(COM.PARAMETER),pParameterList:= ADR(aCom1Params)); IF como1.xError THEN xCom1OpenError := TRUE; iState := 1000; END_IF //After a successful opening, the next state is reached IF como1.xDone THEN iState := 15; END_IF 15: // the reading process is started comr1(xExecute := TRUE,hCom:= como1.hCom, pBuffer:= ADR(sRead), szBuffer:= SIZEOF(sRead)); IF comr1.xError THEN xCom1ReadError := TRUE; END_IF //After completion the size of the written bytes are saved IF comr1.xDone OR comr1.xError THEN szRead := comr1.szSize; iState := 20; END_IF 20: // If everything was successful the ports are closed and the handles are released comc1(xExecute := TRUE,hCom:= como1.hCom); IF comc1.xError THEN xCom1CloseError := TRUE; END_IF IF comc1.xDone OR comc1.xError THEN iState := 25; END_IF 25: // The first port is closed and the used handle released xTestDone := TRUE; xStartTest := FALSE; iState := 0; como1(xExecute := FALSE); comw1(xExecute := FALSE); comc1(xExecute := FALSE); ELSE iState := 0; END_CASE END_IF I realize as I write this that the .udiPort should be 0 and not 1, but that shouldn't be causing the issue I'm seeing. I'm forcing xStartTest:=TRUE every scan so that I can step into each line and observe what's happening. What I see is that the port parameters are set and the port is opened with no errors, but the code jumps out of the case structure to the last line every time it reaches (and I step into) the iState:=15 line (at the end of the iState:=0 block). So every scan cycle it goes through the block for iState=0 and jumps out at the same spot. I'm a little new to PLC programming so I may be misunderstanding the flow, but shouldn't this case structure keep moving down in the same scan? If it only handles one case per scan, why doesn't the value of iState persist? Thanks! Update: I restarted the Codesys control today and I was then able to see an error for como1.eError of "WRONG_PARAMETER". I tried doing some digging and another post made me think I should add another line to CODESYSControl_User.cfg, so I now have: [SysCom] Linux.Devicefile=/dev/ttyACM portnum := COM.SysCom.SYS_COMPORT1 So now when I set .udiPort to 1, I get "NO_ERROR" but I also don't read anything from the port (i.e. szRead = 0 always). If I try setting the port to 0 (which I'm confused about, because I added a COMPORT1 line but the device shows on the Pi as ACM0), I get the "WRONG_PARAMETER" error again. Is there an easier way to troubleshoot the Pi and view what ports the Codesys runtime is actually able to see while the Pi is running?
Last updated: 2024-06-06
Post by e60newbie on NETVAR_UDP
CODESYS Forge
talk
(Post)
Hallo Forums Gemeinde, hat jemand von euch eine Idde ob und wie es möglich sein könnte die Einstellungen was für die Netzwerk variablen Liste nötig sind, also Broadcast IP, Port usw., über die Application einzustellen? Ich müsste je nach Projekt immer die IP anpassen, da auf den Anlagen die Software Identisch bleibt, wäre es für mich viel einfache diese Einstellungen über den Code einzustellen. Wenn man so im Forum sucht gibt es nicht viel was NetVar angeht... Grüße Andy
Last updated: 2023-08-29
Post by tehthoams on Find Function: Object reference not set to an instance of an object.
CODESYS Forge
talk
(Post)
Hey, Sorry this isn't super helpful, but i had this problem once and was able to resolve it. I can't recall how I solved it and whether it was a problem with my codesys installation or the project itself. If it is the codesys installation, make sure all your required libraries and plugins are installed and available. compare with a colleagues installation if possible. I vaguely recall saving a copy of my project and deleting things one by one until the error went away...
Last updated: 2023-10-30
Post by tehthoams on Find Function: Object reference not set to an instance of an object.
CODESYS Forge
talk
(Post)
Hey, Sorry this isn't super helpful, but i had this problem once and was able to resolve it. I can't recall how I solved it and whether it was a problem with my codesys installation or the project itself. If it is the codesys installation, make sure all your required libraries and plugins are installed and available. compare with a colleagues installation if possible. I vaguely recall saving a copy of my project and deleting things one by one until the error went away...
Last updated: 2023-10-30
Post by timl on BacNet Server
CODESYS Forge
talk
(Post)
Hallo, für einen BacNet2 Server lassen sich mit zwei Ethernet Schnittstellen auch zwei Bacnet 2 IP Datalinks anlegen. Einen Datalink nutze ich für den UDP Port 47808 und einen für den UDP Port 47809. Dadurch ist der Server aus beiden Netzwerken erreichbar, was so gewollt ist. Allerdings verbindet er die beiden Netze auch miteinander, was zu Kommunikationsproblemen führt, da in beiden Netzwerken bereits gleiche Device ID's vergeben sind und diese sich dann doppeln. Lässt sich diese Verbindung der beiden Netze abschalten? Gruß Tim
Last updated: 2024-02-20
Post by tib0r on c2iec - translating C to ST
CODESYS Forge
talk
(Post)
I was looking for a transpiler from some more widely used general programming language into ST. It was not easy but I found this :) https://forge.codesys.com/tol/c2iec/home/Home/ Does anybody use it for a programm/library of a couple of hundred lines or more? How does one go about using the output? Is there a “converter” into the Codesys IDE? PLCOpenXML? Would there be interest in this? tib0r
Last updated: 2024-04-20
Post by tcarlbom on codesys sp20 opcua not working
CODESYS Forge
talk
(Post)
hi, anyone else having trouble with opc ua in codesys sp20? i get Error 'BadIdentityTokenInvalid' was returned during ActivateSession i have tried both windows x64 runtime and linux runtime. i have created a completely new codesys project for this. in each of them i have only added the symbol configuration and selected one tag. i have tried several opc ua client, like ua expert, nodejs and python. all return Error 'BadIdentityTokenInvalid' was returned during ActivateSession so the problem must be the opc ua server.
Last updated: 2024-07-03
Post by vamsi on How to configure gateway for programming RPi 2B using Codesys
CODESYS Forge
talk
(Post)
I found out what I was doing wrong. I was entering the wrong IP in the gateway. I found that I have to enter the RPi's IP in the gateway field from this post https://forge.codesys.com/forge/talk/Runtime/thread/01703ca970/#d9f6 But I do not understand why it has to be the RPi's IP. Could anyone help me in clarifying this?
Last updated: 2024-07-10
Post by paulpotat on Can't open license manager with raspberry CM4
CODESYS Forge
talk
(Post)
Hello eschwellinger, Thanks for your answer, with this I was finally able to make it work by doing the following : install CODESYS Control for Linux ARM SL v4.13.0 uninstall CODESYS Control for Linux ARM SL v4.13.0 and make sure to select "yes" when prompted to uninstall WIBU CodeMeter Lite Runtime (v8.10.6230.501) re-install "CODESYS Control for Raspberry Pi SL" v4.13.0 It looks like the issue was probably related to the CodeMeter Runtime ? Best regards
Last updated: 2024-10-16
Post by jeroenaero on CodeSys Raspberry pi I2C driver not found
CODESYS Forge
talk
(Post)
Finnaly i get it working. There was a line in the file that set the ADS1015 chip in /boot/firmware/config.txt which i removed and after that the ADS1115 has a green turning circle and i got values. i created a new component so it fits our ADS1015. see screenshot. It works also with Codesys Control for Raspberry Pi 64 SL after adding the ULINT_TO_UDINT conversion in the library. i think the chip was all the time in use by the Raspberry pi itself. Thanks for your help!
Last updated: 4 days ago
Post by sedoerr on Warnung C0373 / Dialog nicht instanziert
CODESYS Forge
talk
(Post)
Hallo Leute, in meinem Projekt bekomme ich mehrfach folgende Warnung beim Übersetzen: C0373: Dialog <visudialogs.textinputwithlimits> ist in der Applikation nicht instanziert. Fehlt er im Visualization Manager?</visudialogs.textinputwithlimits> Was genau möchte mir Codesys damit sagen bzw. wie bekomm ich diese Warnung behoben? MFG
Last updated: 2023-08-29
Post by jinil on Import RsLogix 5000 project to Codesys
CODESYS Forge
talk
(Post)
Hello, I am trying to do the same thing. I want my Rslogix 5000 project into Codesys. Was wondering if you have found a way to do it. Thank you.
Last updated: 2023-09-07
Post by jinil on Import RsLogix 5000 project to Codesys
CODESYS Forge
talk
(Post)
Hello, I am trying to do the same thing. I want my Rslogix 5000 project into Codesys. Was wondering if you have found a way to do it. Thank you.
Last updated: 2023-09-07
Post by maralani on Retain memory change to ZERO
CODESYS Forge
talk
(Post)
Hi, thanks for help, I add some retain variable , then some other variable change to zero , andI was not able to change the value
Last updated: 2023-09-19
Post by derpaul on PFC200 Update to 4.9.0.0 - No Connection
CODESYS Forge
talk
(Post)
This is: 02.04.22(06) As I do see now, minimal Version is 17, but why did my Controller work with Runtime 4.8.0.0 (Which was the last installed When I remember correctly)
Last updated: 2023-09-28
Post by tomas111 on Help with error C0142
CODESYS Forge
talk
(Post)
There was an exact mistake. I did as they wrote. I created a visualization and transferred it from the old one and everything works. CS 3.5 SP 19. Thank you.
Last updated: 2023-10-04
Post by davidbo on Is OPC communication possible with server certificate but no client certificate
CODESYS Forge
talk
(Post)
I was just wondering is the following option possible and what the settings should be. Is OPC communication possible with only and mandatory server certificate but no client certificate?
Last updated: 2023-10-06
Post by gurke258 on Codesys Safety EtherCAT with Beckhoff
CODESYS Forge
talk
(Post)
Okay, the solution was so simple... In my case, you first have to add the EL1918 and then the EL2904... then the connection is made automatically. I probably had something else before and then added the EL1918... then it doesn't catch the connection :/
Last updated: 2023-11-08
Post by vincentd on Datasource OPC UA Client error ID:7012
CODESYS Forge
talk
(Post)
I had some help from Codesys to debug this problem. It seems there was a problem within the target (a bug?). I only used for a proof of concept. Possibly it will work with a new version of the target
Last updated: 2023-11-21
Post by nathant on Easiest RevPi PLC to configure HMI visualization with?
CODESYS Forge
talk
(Post)
I'm worried that the Core SE (which I was originally going to go with) will not be straight foward in terms of setting up the HMI visualization. This is for an offline application, if that matters.
Last updated: 2023-11-28
Post by nathant on Easiest RevPi PLC to configure HMI visualization with?
CODESYS Forge
talk
(Post)
I'm worried that the Core SE (which I was originally going to go with) will not be straightfoward in terms of setting up the HMI visualization. This is for an offline application, if that matters.
Last updated: 2023-11-28
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
.