Post by correo0269 on Problems with Raspberry Pi - IoDrvGPIO library 
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I am trying to create a new proyect using the Raspberry Pi 4.11.0.0 package with Codesys 3.5 SP20, I am able to communicate with the Raspberry and start the runtime application but when I create a new proyect I have these errors. When opening the library manager of the proyect the library of the IoDrvGPIO is used so I dont really know whats happening.
    
    Last updated: 2024-04-05
    
    
      
        Post by dkugler on build (F11) / generate code using a python script file
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      After a project is opened and I have done some changes, I want to start the build or code generating process by a python script file. After the build is done I a Windows sound/beep should appear. Anyone has an example or hint how the .py file has to look like? Thanks!
    
    Last updated: 2024-04-10
    
    
      
        Post by thomaspfrimmer on Can't import enums OnlineChangeOption / ResetOption
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello Jusito, Can you share your final code, please ? I tried to implement a similar feature (going online, doing the reset and the start). But I get a timeout on the reset/start when I'm testing the script. If you got something working, I would appreciate to see it.
    
    Last updated: 2024-04-11
    
    
      
        Post by phoward131 on Numpad decimal value requires leading zero
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have noticed on the standard numpad dialog, if a user enters a purely decimal number (ie '.6'), the numpad will not accept the value but gives no indication. One must type a leading zero (ie '0.6') in order for it to work. Is there a way to correct this so that a user can just type the decimal value?
    
    Last updated: 2024-04-30
    
    
      
        Post by arslan on G Code Position Shifting
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Dear friends, I have a issue that. I would like to give a zero offset of any axis in G-Code by G54 from PLC code as below demonstration. N000 G00 X0 Y0 Z0 N010 G54 (offset from PLC) N020 G01 X0 Y0 Z0 . . How to fix it! BR
    
    Last updated: 2024-05-02
    
    
      
        Post by bryandimino on OPC Da Server Code Meter Issues after Enabling License
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I'm trying to get the OPC server setup on my machine and currently I'm not having luck. I went ahead and got my license setup. However when I go to run WinCoDeSysOPC.exe I get an error message that I don't have the code meter licenses installed. Does anyone have any ideas on how I can fix this issue?
    
    Last updated: 2024-05-02
    
    
      
        Post by andrej on Channel timeout CmpChannelMgr
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello, I use Codesys RTE 3.5.16.5. If I connect to the PLC I often get the following message: (see printscreen) 1. Channel timeout CMpChannelMgr. 2. Closing connection CmpChannelMgr. Can you tell me, what the meaning of this is? What does the number 1250030,1220020 resp. c400:0a0a:015a:0301 refer to? I could find any information in the online help. Thanks a lot.
    
    Last updated: 2024-05-08
    
    
      
        Post by stiller on OPC-UA ApplicationUri / ProductUri
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Thank you for your answer! I'm not sure, but it seems this is not what I am looking for. I attached three pictures. The first one is from the Codesys IDE. I use an Information Model to generate an OPC-UA server. I connected via UA-Expert, and there I see the URIs I would like to change.
    
    Last updated: 2024-05-10
    
    
      
        Post by walkercope on Ethercat bus on Beckhoff CX with Codesys for Linux
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Has anyone figured out a way to use the ethercat bus on a beckhoff CX using codesys running on linux? Using ethercat on the native NICs works fine but I get a "packet could not be sent" error when trying to scan the ethercat bus device. Errors and hardware in attached image.
    
    Last updated: 2024-05-13
    
    
      
        Post by micik on CAA File- FILE_OPERATION_DENIED error
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello, I'm trying to use FILE.Open to open file that exists in the given location. sFileName is formed from "Copy as path" in Windows. So I'm sure file exists and it is in the given location. And still, I get thiss denied error. What could be the problem here? Attached is a screenshot with current implementation.
    
    Last updated: 2024-05-16
    
    
      
        Post by xiaoyan on Generic EtherCAT slave
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello Well i need some basic advice. My protegoD drive is shown deactivated in the device tree. i can see its variables and other i/o in online mode but the device itself is deactivated. how can i address this issue. is there any configuration error.using ethercat link to connect to protegoD by Primo MC plc
    
    Last updated: 2024-05-16
    
    
      
        Post by mgengler on Recipe Manager - Not Creating Recipe Files
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Thanks for info... However, I changed the directory to: C:\ProgramData\CODESYS\CODESYSControlWinV3x64\58719825\PlcLogic\Recipes It still displays the content of this folder OK, however still will not write or read files. Is this the PLCLogic area you speak of? I also tried adding this path the the CodesysControl.cfg file. But still can't get it to work. Any additional direction would be appreciated!
    
    Last updated: 2024-05-20
    
    
      
        Post by eschwellinger on connect IDE to plc that uses modem ppp
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Which plc type is it? Easy connection is to install a Gateway on remote side - this is available for Windows and Linux devices Then just add a new Gateway in CODESYS (with the IP Adress of the remote device) -> then scan the plc via this new added Gateway
    
    Last updated: 2024-05-21
    
    
      
        Post by anonymous on Hi, I try to send and receive data using a UDP connection via SysSocket 3.5.17.0. While sending data works fine, I have problems with the receiving part. I am able to capture the received data of client side in wireshark But unable to capture it on the codesys
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi, I try to send and receive data using a UDP connection via SysSocket 3.5.17.0. While sending data works fine, I have problems with the receiving part.I am able to capture the data of client side in wireshark but i am unable to capture it in the codesys. Heres the below part of code of client side. PROGRAM POU_udpclient_program VAR istep : INT := 1;//step variable for state machine xStart: BOOL;// Flag to start the UDP protocol iecSocketId: syssocket_interfaces.RTS_IEC_HANDLE;//socket handle for receiving iecCreateResult: syssocket_interfaces.RTS_IEC_RESULT; ipAddr: syssocket.SOCKADDRESS;//Socket address structure for receiving sIpAddress : STRING := '192.168.0.2'; wPort: WORD:= 12346; iecConnectResult : syssocket_interfaces.RTS_IEC_RESULT;//connect paramters sDataRec : STRING[255];//Buffer for received data xiRecBytes : __XINT;//number of bytes received iecRecResult : syssocket_interfaces.RTS_IEC_RESULT;//receive data parameters iecCloseResult : syssocket_interfaces.RTS_IEC_RESULT; END_VAR syssocket.SysSockInetAddr(sIpAddress,ADR(ipAddr.sin_addr)); ipAddr.sin_family := syssocket.SOCKET_AF_INET; ipAddr.sin_port := syssocket.SysSockHtons(wPort); CASE istep OF 1: //create socket IF xStart THEN iecSocketId:= syssocket.SysSockCreate(syssocket.SOCKET_AF_INET,syssocket.SOCKET_DGRAM,syssocket.SOCKET_IPPROTO_IP,ADR(iecCreateResult)); IF iecSocketId = syssocket_interfaces.RTS_INVALID_HANDLE THEN xStart := FALSE; istep := 1; ELSE istep := 2; END_IF END_IF 2: //connect to socket server using setoption iecConnectResult := syssocket.SysSockSetOption(iecSocketId,syssocket.SOCKET_SOL,syssocket.SOCKET_SO_REUSEADDR,ADR(ipAddr),SIZEOF(ipAddr)); istep := 3; 3: //receive data xiRecBytes := syssocket.SysSockRecvFrom(iecSocketId,ADR(sDataRec),SIZEOF(sDataRec),0,ADR(ipAddr),SIZEOF(ipAddr),ADR(iecRecResult)); istep := 4; 4: //close socket iecCloseResult:= syssocket.SysSockClose(iecSocketId); xStart := FALSE; istep := 1; END_CASE
    
    Last updated: 2024-06-03
    
    
      
        Post by installwhat on Panasonic servo Softmotion project
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      There are examples installed when you install codesys. they are located in C:\Program Files\CODESYS 3.5.19.50\CODESYS\CODESYS SoftMotion\Examples The examples won't be specific to your drive, though you haven't specified the exact drive. After you add the device to the ethercat master you can click on it and set pdo etc
    
    Last updated: 2024-06-13
    
    
      
        Post by rikher on Error: Too few outputs exixts for the box 'MemCopy' (minimum is 1).
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I am using MemCopy Function for this example: https://www.youtube.com/watch?v=DeTCT5Vyn28&t=482s It is from library WagoSysPlainMem. I want to use this for an MQTT example. However, Codesys is complaining the block does not have outputs. How to fix this?
    
    Last updated: 2024-06-19
    
    
      
        Post by kuegerls on SysProcessExecuteCommand2 and CANopen Device
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have now conducted some tests. The problem occurs when the Python script establishes an OPCUA connection, even if I only establish the connection without reading or writing any data. Is there another way to exchange data between Python and CODESYS without having to put in a lot of effort?
    
    Last updated: 2024-06-24
    
    
      
        Post by xcqt on Oop best practice
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi all, I’m currently trying to improve my OOP structure in CODESYS and I’m looking for some input on how others approach this. I understand the basics like inheritance, interfaces, abstract FBs, methods, and properties, but I still struggle a bit with the overall architecture and what’s considered clean or scalable in bigger projects. As an example, I’m working on two different energy meter function blocks: FB_EnergyMeter_MQTT reads data from MQTT (strings) FB_EnergyMeter_Modbus reads data from Modbus (words) Both have their own Update() method and implement the same interface (something like IF_EnergyMeter). Later on, I’ll probably add more meter types, but they should all behave the same from the controller’s point of view. Now, there’s a FB_GridControl block that needs power data from these meters. I see two options here: Define the meter blocks inside FB_GridControl and call them directly (for example fbModbusMeter.UpdateModbus()). Keep the meter blocks outside and pass them into FB_GridControl as interface references, so the control block doesn’t know which specific type of meter it’s dealing with. Option 2 feels cleaner and more flexible to me, but I’m not entirely sure how to handle the data flow in that case. Should I pass the meter instance through an interface reference (REFERENCE TO IF_EnergyMeter)? Or is there a better way to link the external FBs to the control block? I’d like to hear how you structure this kind of setup or see an example from someone who has done something similar. EDIT: I think i need to do something like this fbModbusUpdateInput(wInput:= wWordValue); fbMqttUpdateInput(strInput:= strStringValue); IF bUseMqtt THEN Meter REF = fbMqttUpdateInput; ELSE Meter REF = fbModbusUpdateInput; END_IF fbControl.SetMeter(UsedMeter := Meter); Or am i thinking wrong? Thanks, Thomas
    
    Last updated: 2025-10-16
    
    
      
        Post by kaotic2499 on Upgraded Raspberry 2b to Raspberry 5, Trends Broken?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Is there anyone who can assist me? ill just have to raise this as a bug with codesys otherwise. I see this as the only way foward. ill attempt a fresh install of RPI in the next day or two, but thats all i had previously so 🤷♂
    
    Last updated: 2025-10-21
    
    
      
        Post by salmawis on Advice on OOP hardware I/O code structure 
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Call 10 FB instances. Connect Motor_1_Fault to the i_xHW_FaultDetected pin of FB 1, Motor_2_Fault to FB 2... By doing this, your FB will be flexible. The programming will be smooth like a perfect Drift Boss, instead of "hitting the wall" because it can't be reused!
    
    Last updated: 4 days ago
    
    
      
        Post by danwoodlock on RPI Zero w - Edge gateway cant install
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello all, First post. I recently acquired an RPI zero W from amazon, and have been using it with Codesys v3.5 SP19 patch 2. I first got it working yesterday, and after installing the runtime on the Pi, I was prompted to install the edge gateway. Installation of the edge gateway failed because of unsupported architecture, undeterred I was able to connect to the pi and program as I wanted. The issue I've noticed is that if I do not load anything to the pi overnight, I can then no longer connect to the pi and download, although I can still ping it from my pc. I found that if I power cycle the PI, I am then able to connect again, and it works as normal. I did some googling and found instances where people recommended downloading the newest edge gateway, which brings me here. Wondering if there are any suggestions, or if this is a known issue. I actually tried installing all 3 versions of edge gateway for science, but all fail with the same message. Thanks -Dan
    
    Last updated: 2023-09-13
    
    
      
        Post by moksan on Unconnected_Send Explicit message with Route Path
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have been trying out Unconnected_Send Explicit Message with route path.(The Unconnected_Send service shall use the Connection Manager object in each router to forward the message and to remember the return path. Vol 1.3 / 3-5.6.7) However, I could not see the correct path on Wireshark. I want to see the Unconnected_Send Message Service Code as 0x52 and also the last of the message should have the route path. I want to ask some questions about this topic. The IIoDrvEIPAcylicServices Interface has the IoDrvSendUnconnectedMessage Method. And there is a struct (EIP_SendUnconnectedMessage) for this service. But there is no information about how to implement to project, and if it is successful, does it send a message with 0x52 Unconnected_Send Service Code or not? If that is not a solution, how can I set the Unconnected_Send Explicit Message struct on Codesys? Also how can I send explicit message with route path?
    
    Last updated: 2023-10-17
    
    
      
        Post by mondinmr on Jitter problems on imx8
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      We are experiencing serious jitter issues on an ARM64 imx8. Until now, on rpi and beaglebone derivatives, and on Intel, we never encountered jitter issues unless they were already present on the device. In this case, as can be seen from the attached graph, we have excellent maximum latency. The cyclictest on the isolated core dedicated to IEC CODESYS tasks shows a latency of 37µs, with an average of 14µs. Usually, on all other devices, with an RT kernel, with the appropriate parameters to avoid frequency throttling, with properly managed IRQs, and with the disabling of large page sizes, the jitter measured by CODESYS is very close to the cyclictest latency. However, on this imx8, we are noticing a fluctuating value of +/- 300µs that seems to be added to this latency, as if something occasionally miscalculates the sleep times by exactly +/- 300µs. Two screenshoot attached. - Result of cyclictest - Jitter on CODESYS Tasks are assigned to isolated core!
    
    Last updated: 2023-10-18
    
    
      
        Post by martinlithlith on Mux I2C
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi! I´ll try to get this thread going again as i´m having simliar problems. Right now i get a red triangle on my connected devices (i´m testing with a BME280 sensor and a PCA9685 resvo driver). The TCA9548 have the green symbol beside it. On the "red" devices i get that the bus is not running. I have tried to either run it using the parent bus cycle setting or creating a new freewheeling task prio 1 but nothing helps. I have compared my settings to the settings from the example from the MUX package and i have read (i think) every thread in forge that could be of interest. EDIT: The ic2detect only shows the mux (70-70) and the servo drive (70-76) so i´ll look in to if i managed to burn the 280-sensor while soldering). Another question regarding the 280 sensor. I have a sensor GY-BM E/P 280 that should record humidity and temperatur. Could this be a problem with the library? Does anyone have an idea of what i might be doing wrong? I have some experience from Codesys but not much so this could be an easy one. All suggestions are welcome. I tried to upload the project archive but it did not work. Should i upload the export or how could i show you my horrible project? Best, Martin
    
    Last updated: 2023-10-22
    
    
      
        Post by open on How to create a stopwatch?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi @ph0010421, I tried the program the TimeTaken is calculated when stop is triggered. I want the TimeTaken to be continuously calculated and counting when a BOOL variable is true. I tried to program this way: Declaration: PROGRAM PLC_PRG VAR bStartStop: BOOL := FALSE; // Start/Stop button bReset: BOOL := FALSE; // Reset button bRunning: BOOL := FALSE; // Flag indicating whether the stopwatch is running tStartTime: TIME; // Variable to store the start time tElapsedTime: TIME; // Variable to store the elapsed time END_VAR Implementation: // Main program logic IF bReset THEN // Reset button pressed, reset the stopwatch bRunning := FALSE; tElapsedTime := T#0s; ELSIF bStartStop THEN // Start/Stop button pressed, toggle the running state IF bRunning THEN // Stop the stopwatch bRunning := FALSE; ELSE // Start the stopwatch bRunning := TRUE; tStartTime := tElapsedTime; END_IF; END_IF // Update the elapsed time when the stopwatch is running IF bRunning THEN tElapsedTime := tElapsedTime + T#1s; // Adjust the time increment as needed END_IF However counting of the seconds is not accurate. I tried changing the main task cycle time interval to 1000ms. The counting of seconds become slower. (see attached) Please help
    
    Last updated: 2023-12-08
    
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.