Search talk: adding a device

 
<< < 1 .. 116 117 118 119 120 .. 186 > >> (Page 118 of 186)

Post by hhermsen on Codesys v3.5.22.10 - Internal error:System.AggregateException...Value cannot be null...Parameter name: expLValue CODESYS Forge talk (Post)
I pinpointed down 4 possible causes for this compiler error: Bare/empty statements (;) standing alone inside an IF/CASE branch — just removed two instances. The optimizer that tries to inline/replace expression statements may choke when a statement has no actual assignment to extract. A VAR_IN_OUT parameter used directly as a FOR loop's own control variable (FOR X := X TO Y DO) General deep-nesting complexity — every one of my decode routines has the same shape (IF busy THEN ... FOR loop containing nested CASE/IF chains ... END_IF), and the crash trace consistently shows for loop → sequence → ifst → sequence → ifst → sequence regardless of the code change. This raises the possibility that it's not one specific statement but a structural depth/complexity limit in SP22.x's compiler optimizer — which would mean no small code change fixes the issue. Only restructuring to reduce nesting depth, or downgrading the compiler will. Something entirely outside my library files — which cannot not ruled out since the exact stack trace was triggered by a Visualization object, in a totally different codebase. This means the same crash signature can come from unrelated causes. IMHO cause 3 seems the most probable one..
Last updated: 2026-07-11

Post by hammer on Cartesian XY Chart — 2-D array binding: "Element to use" enumerates the wrong dimension CODESYS Forge talk (Post)
Title: Cartesian XY Chart — 2-D array binding: "Element to use" enumerates the wrong dimension; documented example (Dialog: XY Chart Configuration, "Two-dimensional array of base type REAL") appears transposed Product / version: CODESYS Development System V3.5 SP21 Patch 40 (3.5.21.40). Cartesian XY Chart visualization element (System_VisuElemXYChart / VisuElemXYChart). Summary: When a curve's Data X/Data Y is bound to a two-dimensional array, the element treats the last array dimension as the per-point record (the one selected by "Element to use") and iterates the first dimension as the sequence of curve points. The online documentation's worked example has the dimensions in the opposite order, so following it produces a non-functional curve and a nonsensical "Element to use" list. Steps to reproduce (fails — matches the documented layout): 1. Declare aData : ARRAY[0..1, 0..4095] OF LREAL; (2 data sets × 4096 points, i.e. first dimension = set, second = point). 2. In XY Chart Configuration, bind a curve's Data X (and Y) Variable to this array. 3. Observe the "Element to use" combobox. Actual result: The "Element to use" combobox lists 4096 entries (the indices of the second dimension) instead of 2 (the data sets in the first dimension). Selecting a row does not produce the expected curve; at most a single/degenerate point is plotted. Steps to reproduce (works — transposed): 1. Declare aData : ARRAY[0..4095, 0..1] OF LREAL; (points first, set second). 2. Bind Data X/Y to this array; "Element to use" now correctly lists [0] and [1]. 3. Populate aData[point, set] and the curve plots as expected. Expected result: Either the documented example should select the data set from the first dimension (as its [1]/[2] "Element to use" implies), or the documentation should state that the last dimension is the record dimension (stride) and the first dimension is the point sequence — consistent with how the element actually behaves. Analysis: The behavior is self-consistent if the element always walks a single array by a fixed byte stride, reading one element per point — the same mechanism as the documented "one-dimensional array of a DUT" case, where it strides by SIZEOF(DUT) and "Element to use" picks the member offset. For a 2-D array the record is the last dimension: to plot column/set c it starts at [0, c] and strides by the last-dimension length to reach [1, c], [2, c], … (row-major layout makes this a contiguous column walk). Under that rule, ARRAY[0..N, 0..1] is correct (record length 2 → "Element to use" [0]/[1]), and the documented ARRAY[1..2, 1..50] with "Element to use" [1]/[2] is transposed. Documentation reference: Dialog: XY Chart Configuration → Data X / Data Y → "Example: Two-dimensional array of the base type REAL" (ARRAY[1..2, 1..50], Element to use [1]/[2], "100 array values are displayed"). This example does not plot as described in 3.5.21.40; transposing to ARRAY[1..50, 1..2] does. Request: Please confirm whether this is (a) a documentation error (example dimensions reversed) or (b) an element defect (combobox enumerates the wrong dimension). Either way, a corrected example plus an explicit statement of which dimension is the point sequence vs. the record/stride dimension would prevent others from hitting this. Two separate 1-D arrays for Data X and Data Y work correctly and are unaffected.
Last updated: 2026-08-14

Post by george32 on Readable IO names CODESYS Forge talk (Post)
Hello Folks, I have a quite basic understanding of how PLC programming works. However I keep getting stuck on 1 problem I could not get my head around. The problem is as follow: I have a PLC with 60 IO (20 inputs, 40 outputs). Each IO is defined as a function block. Furthermore I have an external IO card connected trough a CanBus connection. This IO card has 4 analog input channels (USINT), 4 digital inputs (Bool) and 4, digital outputs (Bool) Because I have 2 different components which both has data have I made 4 arrays to store the data off every component in one variable. PLC_Input: Array [1..20] of BOOL; PLC_Output: Array [1..40] of BOOL IOCard_Input: Array [1..8] of BOOL IOCard_Output: Array [1..4] of BOOL Because the control and reading of the different in and outputs is done by a TCP connection I want to use some kind of enumeration or struct to give each index a name so that my main would be a little bit more readable instead of all the magic numbers. Also this would make my program more dynamic for the furter in case I need to changes some in the IO nummers. For example: pump is placed on the fysical terminal strip number place 54, which is the 3th output of the IO card in the program: if I am sending a message with value 54 I would like to control IOCard_Output[3]. If there is a solution or methode to get this done, I can eventually do the following in my main program: IOCard_Output[Pump]. I have tried the following: IOCard_Output[Pump - 51] with an enumration but this keeps raising an error I hope some of you could help me further with this problem. In gross lines: I want to couple all the different IO to a more readable name and this readable name should control the right Array index Thanks in advance, George
Last updated: 2024-09-26

Post by struccc on Application failing to boot after system reboot CODESYS Forge talk (Post)
I started to experience the same issue, after upgrading to 3.5.19 , and still persists with 3.5.20.3 , using CodesysControlWinV3 x64 on Windows. Unfortunately, this is a live application, normally it is running for months without interruption - so it was a surprise at the last cold start... It was not possible to go online with the original version, so I couldn't see the application, or system status, just the log message. First time I manually clean the Application from the PlcLogic directory (there was no coredump file in there), then I could start the runtime service, and do a fresh download, and set the bootproject. I could not try a cold system reboot - it's in a 24/7 production environment, and I was under heavy pressure to start... What I did, I have created a backup from the * complete * runtime directory, from the failed, and fixed version - before and after download. This directory in my case C:\ProgramData\CODESYS\CODESYSControlWinV3x64\55096128 - At the next shutdown, it was sufficient to copy back this backup completely, and could start the runtime service afterwards. Ugly, but local staff with some skills can do it without programming tool... I don't store any live data, configuration, log files, persistent data in this directory - the only reason I need this is to edit the CodesysControl... .cfg file.... And to see the logfiles in emergencies like this. The application concerned doesn't use any retain area. - exactly for these reasons - Maybe that is causing the problem with the newer runtime versions As far as I see, this problem occurs only if the power of the Windows PLC is interrupted without a proper shutdown. Unfortunately, this can happen sometimes. The newer versions, seems tp modify CodesysControl.cfg on the fly, and register the applications, and bootproject information after download. (I don't really see CodesysControl.cfg a proper location for this... but that's just my feeling) So now I had a look at CodesysCotrol.cfg on my laptop and I found: [CmpRetain] ;Retain.SRAM.Size=0x200200 ;Retain.SRAM.Address=0xFA3C5776 ;SimulateSRAM=1 [CmpApp] ;Bootproject.CreateOnDownload=0 ;Bootproject.StoreOnlyOnDownload=0 ;Bootproject.InvalidateByRename=1 ;Bootproject.InvalidateBySetting=1 ;Bootproject.InvalidateNever=0 ;PersistentForce=0 ;RetainType.Applications=InSRAM ;RetainType.Applications=OnPowerfail ;RetainType.Applications=None ;Exception.Hardware.GlobalStop=1 Application.1=MyTestAppNoRetain The last line appeared after download and boot project creation. Maybe... Should set RetainType.Applications=None? I wonder about all these settings, but... Will write separately about it. I hope this helps a little...
Last updated: 2024-11-21

Post by rkohser on Scripted Git clone / checkout being blocked by "Project Environment" popup CODESYS Forge talk (Post)
Hi, I am trying to build a CI/CD pipeline around our codesys projects. The only entry point if the git url and branch, as we do not put our project file under source control, so we needed to find a way to git clone from the python scripting engine. This is currently how we do this : system.commands["Git", "Clone"].execute( "ProjectLocation=" + project_dir, "ProjectName=" + project_file_name, "RemoteUrl=" + project_git_remote_url, "GitProjectStoragePath=" + project_git_local_dir, ) system.commands["Git", "Checkout", "Branch"].execute( "PrimaryProjectHandle=0", "BranchName=origin/" + project_git_branch ) This works fine, except that, depending on the environment and the project, the "Project Environment" popup gets displayed to suggest for some updates, and waits for a user interaction, even with the "--noUI" flag injected as parameter. I investigated the VersionUpdateFlags, but the problem is that the git clone is an atomic operation that clones and directly opens the generated project without the possibility to inject any updateFlags argument (only used in the ScripProjects.open() function. I also tried to simulate some keyboard events acknowledge the window from script but I did not find the right location for the SendKeys statement, I think before the git clone call is too early and after is too late. So I am wondering if there would be some other way to do that. Is there some more proper scripting api for the git add on ? Is there a global configuration of the VersionUpdateFlags that would allow the popup to be disabled outside from any project context ? Is there some way to automatically acknowledge this kind of messages in a "--noUI" mode ? What do you suggest ? Thanks for your help, Roland Edit : I managed to solve my problem by following these steps in my pipeline : - create a template of a project and opt file preconfigured not to open the popup - open this project - initialize an empty git repo - add the remote, fetch and checkout the needed branch -> no popup is displayed, hourra Edit2 : The initial question was raised on a CODESYS V3.5 SP18 Patch 2 profile. Since CODESYS 3.5.19.30 a scripting API is available for Codesys Git that allows cloning a project with the support of VersionUpdateFlags https://content.helpme-codesys.com/en/CODESYS%20Git/_git_using_scripting.html
Last updated: 2024-01-19

Post by hprog on Codesys 3.5.20/21 Import Geräterepository bzw. Bibliothen Repository funktioniert nicht CODESYS Forge talk (Post)
Hallo, Ich habe schon mehrfach Treiber für I2C Geräte geschrieben und keine Probleme mit dem Einbinden gehabt, aber derzeit komme ich auf keinen grünen Zweig. Der Import des Geräterepository (xml) funktioniert, der Import ins Bibliothekenrepository funktioniert auch, aber wenn ich dann das Gerät an den I2C MAster anfüge funktioniert der Import in das Projektbibiothek nicht und somit wird auch der entsprechende FB nicht instanziert und ich bekomme folgende Fehlermeldungen ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... [FEHLER] I2C_Test_Examples: MCP23008_X81 [Device: I²C: I2C_master]: Bibliothek Raspberry I2C MCP23008_X81, 1.1.0.1 (3S - Smart Software Solutions GmbH) konnte nicht eingefügt werden: [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.AfterReadInputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.BeforeWriteOutputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert Kompilierung abgeschlossen -- 5 Fehler, 0 Warnungen Übersetzung abgeschlossen -- 5 Fehler, 0 Warnungen : Kein Download möglich Als Device habe ich Name: CODESYS Control for Raspberry Pi SL Hersteller: CODESYS Kategorien: SoftMotion Steuerungen Version: 4.13.0.0 Bestellnummer: 2302000009 Beschreibung: Eine Soft-SPS nach IEC 61131-3 für Raspberry Pi. CODESYS Control basiert auf CODESYS SDK 3.5.20.20, Release . Das ganze unabhängig von der Codesys Version
Last updated: 2025-10-06

Post by hprog on Codesys 3.5.21 Import Geräterepository bzw. Bibliothen Repository funktioniert nicht CODESYS Forge talk (Post)
Hallo, Ich habe schon mehrfach Treiber für I2C Geräte geschrieben und keine Probleme mit dem Einbinden gehabt, aber derzeit komme ich auf keinen grünen Zweig. Der Import des Geräterepository (xml) funktioniert, der Import ins Bibliothekenrepository funktioniert auch, aber wenn ich dann das Gerät an den I2C MAster anfüge funktioniert der Import in das Projektbibiothek nicht und somit wird auch der entsprechende FB nicht instanziert und ich bekomme folgende Fehlermeldungen ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... [FEHLER] I2C_Test_Examples: MCP23008_X81 [Device: I²C: I2C_master]: Bibliothek Raspberry I2C MCP23008_X81, 1.1.0.1 (3S - Smart Software Solutions GmbH) konnte nicht eingefügt werden: [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.AfterReadInputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.BeforeWriteOutputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert Kompilierung abgeschlossen -- 5 Fehler, 0 Warnungen Übersetzung abgeschlossen -- 5 Fehler, 0 Warnungen : Kein Download möglich Als Device habe ich Name: CODESYS Control for Raspberry Pi SL Hersteller: CODESYS Kategorien: SoftMotion Steuerungen Version: 4.13.0.0 Bestellnummer: 2302000009 Beschreibung: Eine Soft-SPS nach IEC 61131-3 für Raspberry Pi. CODESYS Control basiert auf CODESYS SDK 3.5.20.20, Release . Das ganze unabhängig von der Codesys Version
Last updated: 2025-10-06

Post by hprog on Codesys 3.5.20/21 Import Geräterepository bzw. Bibliothen Repository funktioniert nicht CODESYS Forge talk (Post)
Hallo, Ich habe schon mehrfach Treiber für I2C Geräte geschrieben und keine Probleme mit dem Einbinden gehabt, aber derzeit komme ich auf keinen grünen Zweig. Der Import des Geräterepository (xml) funktioniert, der Import ins Bibliothekenrepository funktioniert auch, aber wenn ich dann das Gerät an den I2C MAster anfüge funktioniert der Import in das Projektbibiothek nicht und somit wird auch der entsprechende FB nicht instanziert und ich bekomme folgende Fehlermeldungen ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... [FEHLER] I2C_Test_Examples: MCP23008_X81 [Device: I²C: I2C_master]: Bibliothek Raspberry I2C MCP23008_X81, 1.1.0.1 (3S - Smart Software Solutions GmbH) konnte nicht eingefügt werden: [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.AfterReadInputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert [FEHLER] I2C_Test_Examples: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'MCP23008_X81.BeforeWriteOutputs' erwartet [FEHLER] I2C_Test_Examples: C0046: Bezeichner 'MCP23008_X81' nicht definiert Kompilierung abgeschlossen -- 5 Fehler, 0 Warnungen Übersetzung abgeschlossen -- 5 Fehler, 0 Warnungen : Kein Download möglich Als Device habe ich Name: CODESYS Control for Raspberry Pi SL Hersteller: CODESYS Kategorien: SoftMotion Steuerungen Version: 4.13.0.0 Bestellnummer: 2302000009 Beschreibung: Eine Soft-SPS nach IEC 61131-3 für Raspberry Pi. CODESYS Control basiert auf CODESYS SDK 3.5.20.20, Release . Das ganze unabhängig von der Codesys Version
Last updated: 2025-10-06

Post by meke001 on Visualisierungswerkzeuge CODESYS Forge talk (Post)
Hallo zusammen, ich habe ein hartnäckiges Problem mit der CODESYS-Visualisierung und hoffe auf eure Expertise. In meinem Projekt wird die Toolbox ("Werkzeuge") für die Visualisierung komplett leer angezeigt, es lassen sich also keine Basis-Elemente wie Rechtecke oder Kreise in die Zeichenfläche ziehen. Mein System: CODESYS V3.5 SP22 Patch 2 (64-bit) Device / Compiler-Version: 3.5.22.20 Das Kuriose:Das eigentliche Projekt läuft absolut einwandfrei. Mein Programmcode lässt sich ohne Probleme übersetzen, die SPS-Logik funktioniert fehlerfrei und auch die Simulation läuft einwandfrei durch. Nur das "Gesicht" des Projekts fehlt. Zwischendurch tauchte in den Meldungen der Fehler auf: Die Bibliothek '#System_VisuElems' konnte nicht aufgelöst werden. Was ich bereits zur Fehlerbehebung versucht habe: Installer-Check: Im CODESYS Installer geprüft, ob das Add-on "CODESYS Visualization" installiert ist (ist vorhanden und aktiv). Profil erzwungen: Im Visualisierungsmanager das Visualisierungsprofil manuell auf die aktuellste Version gesetzt. Gerät aktualisiert: Das Device im Projektbaum per Rechtsklick sauber auf die Version 3.5.22.20 hochgezogen. Clean Build: Mehrfach "Alles bereinigen" ausgeführt und neu übersetzt. Neues Projekt: Selbst wenn ich ein komplett neues Standardprojekt anlege, fehlen die Werkzeuge in der Visualisierung weiterhin. Hat jemand von euch eine Idee, woran das noch liegen könnte? Gibt es unter Windows eventuell einen versteckten Cache-Ordner für die Visualisierungs-Bibliotheken, den man manuell leeren muss? Für jeden Tipp wäre ich sehr dankbar! Viele Grüße
Last updated: 2026-06-15

Post by mubeta on Some 'pathetic' errors in SoftMotion program CODESYS Forge talk (Post)
Thank you for your interest. Your answers are in line with what I knew, so at least it comforts me that I did not misinterpret the situation. However, I don't have an exact match as, for this project over the past few days I have: 1) I have gone back to leaving the various FBs of the motion always called, all of them, and in the state machine I use a boolean to activate the various useful Execute. (But in the future I want to go back and try the programming technique with which I wanted to develop this project); 2) For the occasional error: SMC_FB_WASNT_CALLED_DURING_MOTION perhaps it was due to the fact that I had set the Ethercat bus synchronism only at the CAN master level, but not at the level of individual drives. I have now also activated it for the individual drives and it does indeed seem to have been resolved, but having also adopted the programming technique mentioned in point 1), I cannot say whether this was the solution to the problem, or instead the previous point. Is there an error ‘regulator or start not set’ in the device log before the error ‘motion generating FB wasn't called for at least one cycle’? I can't answer that right now. By now the machine is running and I am no longer there, at this one. Also, I seem to remember that the 'fbeFBerror' drive structure (5-element array), does not cycle, BUT ONCE THE 5 EVENTS AFTER SWITCHING ON, IT DOES NOT UPDATE ANYMORE (but that's another issue), so diagnostics were not easy.
Last updated: 2024-07-24

Post by gorditron on I2C Communication with CODESYS Forge talk (Post)
Hello, I have problems with the I2C communication to an ADS7828 AD converter. I don't get any value back from the chip. I use a Kontron chip (ARM 32SC) with Linux as the operating system. I also use the CmpCharDevice library. ADS7828 parameters Address: A1 = 0 / A0 = 0 = SD = 1 = Single End C2 = 0 / C1= 0 / C0= 0 / Channel 0 PD1 = Internal Reference and PD0 = AD Converter ON Here is my code: VAR b_i2cAdr : BYTE := 16#48; (* Standard I2C-Adresse des ADS7828 *) x_Init: BOOL;(* Flag für die Initialisierung *) b_config_byte: BYTE;(* Konfigurationsbyte für den ADS7828 *) ab_cmd_buffer : ARRAY [0..0] OF BYTE; (* Buffer für den Befehl *) ab_data_buffer : ARRAY [0..1] OF BYTE; (* Buffer für die empfangenen Daten *) ui_adc_value_1 : UINT; (* Ausgelesener ADC-Wert *) I2C_Handle: RTS_IEC_HANDLE; (* Handle für das I2C-Device *) di_result_open: DINT;(* Ergebnis der Funktionsaufrufe *) di_result_adr: DINT;(* Ergebnis der Funktionsaufrufe *) di_result_wr_cmd: DINT;(* Ergebnis der Funktionsaufrufe *) di_result_rd_cmd: DINT;(* Ergebnis der Funktionsaufrufe *) di_result_close: DINT;(* Ergebnis der Funktionsaufrufe *) END_VAR //*** Init from the I2C communication port *** IF NOT x_Init THEN I2C_Handle := CDOpen(szFile:= '/dev/i2c-0', dFlags:= O_RDWR, pResult:= ADR(di_result_open)); //* I2C opening * //*** set of the I2C address *** CDIoctl(hFile:=I2C_Handle , dRequest:=1795 , dParameter:=b_i2cAdr , pResult:=ADR(di_result_adr) ); x_Init := TRUE; END_IF (* Hauptlogik *) IF I2C_Handle <> 0 THEN (* Konfigurationsbyte setzen: Single-Ended Kanal 0, interne Referenz *) b_config_byte := 16#8C; (* 10001100b: AIN0, interne Referenz, Single-Ended *) ab_cmd_buffer[0] := b_config_byte; (* Schreiboperation zum Konfigurieren des Chips *) CDWrite(hFile:= I2C_Handle, pbyBuffer:= ADR(ab_cmd_buffer), udCount:= SIZEOF(ab_cmd_buffer), pResult:= ADR(di_result_wr_cmd)); IF di_result_wr_cmd = 0 THEN (* Leseoperation, um den ADC-Wert zu erhalten *) CDRead(hFile:= I2C_Handle, pbyBuffer:= ADR(ab_data_buffer), udCount:= SIZEOF(ab_data_buffer), pResult:= ADR(di_result_rd_cmd)); IF di_result_rd_cmd = 0 THEN (* ADC-Wert aus den Daten extrahieren *) ui_adc_value_1 := SHL(TO_UINT(ab_data_buffer[0]), 8) OR TO_UINT(ab_data_buffer[1]); ELSE (* Fehler beim Lesen der Daten *) ui_adc_value_1 := 0; (* ADC-Wert auf 0 setzen *) END_IF ELSE (* Fehler beim Schreiben der Konfiguration *) ui_adc_value_1 := 0; END_IF END_IF
Last updated: 2024-12-13

Post by s1ack on Wago PFC200 Ethernet / IoDrvEthernet Issue? CODESYS Forge talk (Post)
CODESYS Control for PFC200 4.13.00 CODESYS IIoT Libraries SL 1.11.0.0 Application Based License: CODESYS Control Standard M I have (2) projects with similar code base and both using Wago PFC200. On the second project I am seeing 2 things that I have not been able to resolve: 1) Errors in the log under the Ethernet Item: IoDrvEthernet: [PCI\E1Q51CE62] Could not be found on target! Please check the Ethernet settings. 2) Exception for CPU Load. "Processorload watchdog: plcload=100, maxplcload=95" I have slowed down cyclic tasks on this project, even though on the first project there is actually more code - and it does not exhibit this behavior. In looking at the CPU loading via Linux 'TOP' command there appears to be 20% idle. So plenty of headroom (my opinion). In an effort to troubleshoot I have duplicated the target hardware on my bench. It ran overnight without a CPU load exception. On the test system, I have tried (3) version of the ethernet device. 3.5.16.0 3.5.17.0 and 4.2.0.0 Presently the log does not show the error, but status says the module reports an error. I really do not know if this issue is related to the CPU load exception. The issue does not appear to effect ethernet communications (ModbusTCP or SNMP or Webvisu or PuTTy into Linux Shell). On my test bench I have ModbusTCP slave simulators for all ModbusTCP slaves, but only (1) of the (5) SNMP devices present.
Last updated: 2025-01-21

Post by dnordenberg on BOOL variable in OPC UA and modbus simultaneously CODESYS Forge talk (Post)
How can I have an BOOL variable that is read/write in both modbus TCP server and from OPC UA at the same time? Variables with %MX.n %QX.n addressing which is used for BOOL/coils in modbus server is not allowed in OPC UA symbol list on Schneider M251 controllers. I have already asked on Schneiders forum but there are not a lot of codesys experts over there :( So OPC symbols can't have a address and the modbus TCP server needs a address. So how should I do it then? It seems like an impossible combination. Since I want read/write access from both ways I can't just simply make a second variable and assign it the value of another since it would be a one way assignment. I also tried using VAR_CONFIG which then makes the address syntax %Q or %M in my main variable list and that fools OPC UA Symbol Configuration to allow it and then I add the complete %MX.n address of it in the VAR_CONFIG list. This semi works, I can toggle the BOOL from modbus but the OPC UA symbol seems to be read only. It displays symbol status but nothing happens when I toogle it. I think I need another way to have the variables and symbols pointing to the same bits in memory... My plan B is to write a BOOL array compare FB that saves a history bit from previous cycle and if that does not match current status at next cycle for either the OPC symbol or the modbus variable then it copies the new status over to the other. Maybe ugly but it's like my last alternative. Kind regards David
Last updated: 2025-07-14

Post by serwis on Dynamic target position tracking CODESYS Forge talk (Post)
Hello, I am trying to control a servo drive and dynamically set its position. I control the drive via EtherCAT with a cycle time of 500us. I use the MC_MoveAbsolute block for this. The problem is that when using a PID controller, I generate the positions I want the drive to move to on an ongoing basis, and I would like the position to be set immediately. The MC_MoveAbsolute block must receive a rising edge to execute, and I would like the movement to be performed without waiting for this edge. I have created a function that generates a rising edge every 1 ms, but I am unable to change this time to 500 µs because the TON function does not support times shorter than 1 ms. Below is the code to call the rising edge: IF Exe = TRUE THEN delay1(IN:=TRUE, PT:=T#1MS); IF delay1.Q = TRUE THEN Exe := FALSE; delay1(IN:=FALSE); END_IF END_IF IF Exe = FALSE THEN delay(IN:=TRUE, PT:=T#1MS); IF delay.Q = TRUE THEN Exe := TRUE; delay(IN:=FALSE); END_IF END_IF END_IF Here is the code for calling the MC_MoveAbsolute function: MoveDegree( Axis:= Tilt, Execute:= Exe, Position:= position_target - (base_angle_real * feedforward_turn), Velocity:= vel, Acceleration:= acc, Deceleration:= dec, Jerk:= jerk, Direction:= MC_DIRECTION.shortest, BufferMode:= MC_BUFFER_MODE.Aborting, Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> ); I realize that there are probably better methods for performing this type of task. How can I implement motion with a dynamically changing setpoint? THANKS
Last updated: 2025-09-05

Post by r-niedermayer on C0564 Warning Message CODESYS Forge talk (Post)
Please see or Online Help on how to initialize variable before using them: https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_pragma_attribute_global_init_slot.html Regarding the Attribute global_init_slot: You can use this pragma to influence the order in which signatures are processed during global initialization. It can only be applied to signatures. By default, the initialization sequence for variables from global variable lists is undefined! However, if, for example, variables from one list depend on variables from another list, it is necessary to initialize one before the other. (Aee OLH and Syntax) The placeholder <slot> must be replaced by an integer value that defines the position in the initialization sequence.</slot> The default value is 50000. A lower value causes an earlier initialization! If several signatures have the same value for the 'global_init_slot' attribute, the order of their initialization remains undefined! Cautious application should therefore be considered! Example: The project contains f.e. two global variable lists GVL_1 and GVL_2. The global variable "A" is part of the global variable list GVL_1: {attribute 'global_init_slot' := '300'} VAR_GLOBAL A : INT:=1000; END_VAR The initialization values of the variables "B" and "C" of GVL_2 are dependent on the variable "A". {attribute 'global_init_slot' := '350'} VAR_GLOBAL B : INT:=A+1; C : INT:=A-1; END_VAR So if you set the 'global_init_slot' attribute of the global variable list GVL_1 to 300, i.e. to the lowest initialization value in the example, then it is ensured that the expression "A+1" is well-defined at the time of initialization of "B".
Last updated: 2024-01-30

Post by e13740e on Parameterized Property syntax for array element processing CODESYS Forge talk (Post)
Since parameterized (indexed) properties are not possible, I decided to use architectural approach "Indexing Property Adapter" to achieve the intended goal — avoiding code duplication for validated access to array elements. Essence: Create a Function Block Adapter (FB_PropertyAdapter) that encapsulates the logic for working with a single element of the target array (e.g., with one settings structure). Declare Properties inside the adapter block for accessing each individual field of the data structure. All validation logic is implemented within the Set accessors of these properties. Data Binding via VAR_IN_OUT: The adapter block receives a reference to a specific data element from the global array through its VAR_IN_OUT section, which ensures direct work with the original data without copying. Create an Array of Adapters: In the parent POU (e.g., FB_SettingsManager), an array of these adapter blocks is created — one for each element of the global array that needs to be managed. Initialize Bindings: In a FOR loop, each adapter instance from the array is given a reference to the corresponding data element. Result: This approach allows accessing the data via the index of the adapter array, and then through the property name, which simulates the behavior of an indexed property: MyAdapterArray[Index].MyProperty Thus, the validation and data access logic is written only once inside the adapter block and is then reused multiple times by creating instances of it in an array. This completely solves the problem of code duplication while providing a clean, scalable, and object-oriented architecture compatible with standard CODESYS features. Question closed.
Last updated: 2025-10-19

Post by bbm1995 on Camera RTSP Feed CODESYS Forge talk (Post)
Hi dgrard, I had the same issue for a long time, but on a WAGO webvisu. Now I'm glad that I can share my solution. I don't know if you are trying to use the webvisu or the target visu, but this works on webvisu: Get "go2rtc" and set it up according to the documentation. I'm running the Windows binary. Here's my example of the go2rtc.yaml config file (contains working example streams): api: listen: ":1984" # default ":1984", HTTP API port ("" - disabled) origin: "*" # default "", allow CORS requests (only * supported) static_dir: "www" # default "", folder for static files (custom web interface) tls_listen: ":443" # default "", enable HTTPS server tls_cert: "./SSL/fullchain.pem" tls_key: "./SSL/privatekey.pem" streams: # Streams with multiple links will fall back on the next link. ABUS TVIP48511: - rtsp://<username>:<password>@<hostname>:<port>/ch1/main - rtsp://<username>:<password>@<hostname>:<port>/ch1/sub # Diagnostic connections Kirchhoff Institute for Physics - Germany: http://pendelcam.kip.uni-heidelberg.de/mjpg/video.mjpg Blanton Bottling, Kentucky - USA: http://camera.buffalotrace.com/mjpg/video.mjpg Tokyo - Japan: http://61.211.241.239/nphMotionJpeg?Resolution=320x240&Quality=Standard Tampere Hacklab - Finland: http://tamperehacklab.tunk.org:38001/nphMotionJpeg?Resolution=640x480&Quality=Clarity Soltorget Pajala - Sweden: http://195.196.36.242/mjpg/video.mjpg Kaiskuru Skistadion - Norway: http://77.222.181.11:8080/mjpg/video.mjpg webrtc: listen: ":8555" #ice_servers: # - urls: [ "stun:localhost:3478" ] # username: "" # credential: "" Access the webinterface of go2rtc and get the link of your stream. Use the link as for your browser frame in the visualization. Depending on your device, you need to be able to access the file /etc/lighttpd/lighttpd.conf or /etc/lighttpd/webvisu.conf and change the contents similar to this one, otherwise you'll get CORS and CSP errors in the browser and you won't be able to view the stream on the webvisu: # Webvisu specific settings $SERVER["socket"] =~ port_webvisu_used_any { url.redirect += ( "^/webvisu/?$" => "/webvisu/webvisu.htm" ) $HTTP["url"] =~ "^/webvisu/?" { var.response_header_policy_webvisu = ( # CSP for WebVisu, allowing inline sources. "Content-Security-Policy" => "default-src 'self' 'unsafe-inline'; media-src *; frame-src *", # CORS for WebVisu, allowing any origin to access. "Access-Control-Allow-Origin" => "*", # Tell older browsers that this page can only be displayed if all ancestor # frames are same origin to the page itself. "X-Frame-Options" => "SAMEORIGIN" ) # Response header policy for WebVisu setenv.set-response-header = var.response_header_policy_webvisu setenv.set-response-header += var.response_header_policy_common }
Last updated: 2023-11-14

Post by wallandreas008 on OPC-Server V3 - keine Items zu sehen... CODESYS Forge talk (Post)
Hallo ich habe ebenfalls Probleme mit dem Verbindungsaufbau zu 3 ABB SPSen nach einem Windows Update. hier meine OPCServer.ini [Server] updaterate=200 publicgroups=0 logevents=1 syncinit=1 PLCs=3 PLC0=PLC1 PLC1=PLC2 PLC2=PLC3 [PLC:PLC1] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC01 reconnecttime=10 waittime=12 active=1 logevents=1 logfilter=0 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_101 parameter0=Address value0=192.168.0.101 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [PLC:PLC2] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC02 reconnecttime=15 waittime=10 active=1 logevents=1 logfilter=10 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_102_ parameter0=Address value0=192.168.0.102 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [PLC:PLC3] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC03 reconnecttime=15 waittime=10 active=1 logevents=1 logfilter=10 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_103_ parameter0=Address value0=192.168.0.103 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [Redundancy] NumOfGroups=0 Im Logfile habe ich immer diese Meldungen: ;********* ;<loggername>OPCServer.log</loggername> ;<logoptions> ; <maxfiles>0</maxfiles> ; <maxfilesize>1048576</maxfilesize> ;</logoptions> ;********* 2026-09-29T12:01:40.598+0200, OPC-Server V3.5.20.0 by CODESYS Development GmbH. 2026-09-29T12:01:40.598+0200, Path for ini-File: C:\ProgramData\CODESYSOPC\OPCServer.ini 2026-09-29T12:01:40.598+0200, Path for AE-Config: C:\Program Files (x86)\CODESYS 3.5.20.0\CODESYS OPC Server 3\OPCServerA.ini 2026-09-29T12:01:40.598+0200, AE-Configuration unused. 2026-09-29T12:01:40.598+0200, 3 PLCs configured 2026-09-29T12:01:40.598+0200, [PLC1]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC2]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC3]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC1]: Open communication successful 2026-09-29T12:01:40.600+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC1]: ---------- Configuration ---------- 2026-09-29T12:01:40.601+0200, [PLC2]: Open communication successful 2026-09-29T12:01:40.601+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC1]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulId = 0, m_pPlcConfig->pszName = PLC1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulWaitTime = 12000, m_pPlcConfig->ulReconnectTime = 10000 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->pszProjectName = ZE_PC01 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.601+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC2]: ---------- Configuration ---------- 2026-09-29T12:01:40.601+0200, [PLC3]: Open communication successful 2026-09-29T12:01:40.601+0200, [PLC2]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulId = 1, m_pPlcConfig->pszName = PLC2 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulWaitTime = 10000, m_pPlcConfig->ulReconnectTime = 15000 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->pszProjectName = ZE_PC02 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->pszInstance = TCPIP_0_102_ 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.601+0200, [PLC2]: parameter0 = Address, value0 = 192.168.0.102 2026-09-29T12:01:40.601+0200, [PLC2]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.601+0200, [PLC2]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.601+0200, [PLC2]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.601+0200, [PLC2]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.601+0200, [PLC2]: ----------------------------------- 2026-09-29T12:01:40.601+0200, [PLC2]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.602+0200, [PLC1]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC1]: m_pDeviceDesc->pszInstance = TCPIP_0_101 2026-09-29T12:01:40.602+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.602+0200, [PLC3]: ---------- Configuration ---------- 2026-09-29T12:01:40.602+0200, [PLC3]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulId = 2, m_pPlcConfig->pszName = PLC3 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulWaitTime = 10000, m_pPlcConfig->ulReconnectTime = 15000 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->pszProjectName = ZE_PC03 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->pszInstance = TCPIP_0_103_ 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.602+0200, [PLC3]: parameter0 = Address, value0 = 192.168.0.103 2026-09-29T12:01:40.602+0200, [PLC3]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.602+0200, [PLC3]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.602+0200, [PLC3]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.602+0200, [PLC3]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.602+0200, [PLC3]: ----------------------------------- 2026-09-29T12:01:40.602+0200, [PLC3]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.603+0200, [PLC1]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.603+0200, [PLC1]: parameter0 = Address, value0 = 192.168.0.101 2026-09-29T12:01:40.603+0200, [PLC1]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.603+0200, [PLC1]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.603+0200, [PLC1]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.603+0200, [PLC1]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.603+0200, [PLC1]: ----------------------------------- 2026-09-29T12:01:40.603+0200, [PLC1]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.623+0200, [PLC2]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC3]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC1]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC1]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.623+0200, [PLC3]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.625+0200, [PLC2]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.850+0200, * ERROR: [PLC2]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:40.850+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:40.851+0200, [PLC2]: Open communication successful 2026-09-29T12:01:40.851+0200, [PLC2]: Starting adding new symbols 746... 2026-09-29T12:01:40.852+0200, [PLC3]: Open communication successful 2026-09-29T12:01:40.852+0200, [PLC3]: Starting adding new symbols 1168... 2026-09-29T12:01:40.875+0200, [PLC2]: Adding symbols finished 2026-09-29T12:01:40.875+0200, [PLC2]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:40.881+0200, [PLC3]: Adding symbols finished 2026-09-29T12:01:40.881+0200, [PLC3]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:45.928+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:45.928+0200, [PLC1]: Open communication successful 2026-09-29T12:01:45.929+0200, [PLC1]: Starting adding new symbols 499... 2026-09-29T12:01:45.933+0200, [PLC1]: Adding symbols finished 2026-09-29T12:01:45.933+0200, [PLC1]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:46.110+0200, OPC-Server started successful. 2026-09-29T12:01:50.625+0200, [PLC1]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:50.625+0200, [PLC1]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:55.625+0200, [PLC2]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:55.625+0200, [PLC2]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:01:55.699+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:55.699+0200, [PLC1]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:01:59.341+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:59.341+0200, [PLC2]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:02:00.626+0200, [PLC1]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:00.626+0200, [PLC1]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:05.700+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:05.700+0200, [PLC1]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:10.626+0200, [PLC3]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:10.626+0200, [PLC3]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.626+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.627+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:15.693+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:15.693+0200, [PLC3]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:20.627+0200, [PLC1]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:20.627+0200, [PLC1]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:25.626+0200, [PLC2]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:25.626+0200, [PLC2]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:25.699+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:25.699+0200, [PLC1]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:30.629+0200, [PLC1]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:30.629+0200, [PLC1]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:30.675+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:30.675+0200, [PLC2]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:34.710+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:34.710+0200, [PLC1]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:02:40.627+0200, [PLC2]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:40.627+0200, [PLC2]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.628+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.630+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:02:44.711+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:44.711+0200, [PLC2]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:50.631+0200, [PLC1]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:02:50.631+0200, [PLC1]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.628+0200, [PLC2]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:55.628+0200, [PLC2]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.629+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:02:55.690+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:02:55.690+0200, [PLC1]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:02:59.692+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:59.692+0200, [PLC2]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:03:00.632+0200, [PLC1]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:00.632+0200, [PLC1]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:04.716+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[9]: FAILED! 2026-09-29T12:03:04.716+0200, [PLC1]: CPLCHandler: Reconnect[9]: Reconnect cycle end 2026-09-29T12:03:10.628+0200, [PLC2]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:03:10.628+0200, [PLC2]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.629+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:03:10.632+0200, [PLC1]: CPLCHandler: Reconnect[10]: Reconnect cycle begin... 2026-09-29T12:03:10.632+0200, [PLC1]: CPLCHandler: Reconnect[10]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.632+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[10]: FAILED! 2026-09-29T12:03:10.633+0200, [PLC1]: CPLCHandler: Reconnect[10]: Reconnect cycle end 2026-09-29T12:03:14.762+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:03:14.762+0200, [PLC2]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:03:20.634+0200, [PLC1]: CPLCHandler: Reconnect[11]: Reconnect cycle begin... 2026-09-29T12:03:20.634+0200, [PLC1]: CPLCHandler: Reconnect[11]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:24.730+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[11]: FAILED! 2026-09-29T12:03:24.730+0200, [PLC1]: CPLCHandler: Reconnect[11]: Reconnect cycle end 2026-09-29T12:03:25.630+0200, [PLC2]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:03:25.630+0200, [PLC2]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:25.631+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:03:29.742+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:03:29.742+0200, [PLC2]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:03:30.635+0200, [PLC1]: CPLCHandler: Reconnect[12]: Reconnect cycle begin... 2026-09-29T12:03:30.635+0200, [PLC1]: CPLCHandler: Reconnect[12]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:34.717+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[12]: FAILED! 2026-09-29T12:03:34.718+0200, [PLC1]: CPLCHandler: Reconnect[12]: Reconnect cycle end 2026-09-29T12:03:40.630+0200, [PLC2]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:40.630+0200, [PLC2]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.631+0200, [PLC3]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:40.632+0200, [PLC3]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.632+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[9]: FAILED! 2026-09-29T12:03:40.632+0200, [PLC3]: CPLCHandler: Reconnect[9]: Reconnect cycle end 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: Reconnect cycle begin... 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.637+0200, * ERROR: [PLC1]: CPLCHandler: Reconnect[13]: FAILED! 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: Reconnect cycle end Ich kenne mich nicht so gut aus mit dem Thema OPC. Aber bis vor dem Windows Update hat es funktioniert.. Bin mit meiner Fehlersuche langsam am Ende...!
Last updated: 2026-09-29

Post by kevinrn on Github Actions CI/CD tasks - development topic CODESYS Forge talk (Post)
Hello community, I just want to inform you about our plans and the current status of automating the build process for CODESYS libraries. So it might be helpful for some people who are in the same situation. Background story: I am a software engineer at powerIO GmbH, normally I use high level languages for the products we develop and offer. Sometimes I work with my team on CODESYS libraries, which can also be found in the CODESYS store. Most of the time I spend with them on architecture tasks and tasks that are not directly related to our products. Every time I see the manual processes for releasing a library etc., I am very surprised about this time intensive process. Current situation: I know there has been a scripting interface for years. CODESYS Git was released a few years ago, but the scripting interface was only released a few months (weeks?) ago. We developed a pseudo-automated solution a few months ago, but it was all very hacky. So now there is a better Git implementation and also more modularization and installation options. For example, the CODESYS installer has a full CLI, which makes it very convenient to install CODESYS installations headless. Plans: I think it's the right time to develop a better automation solution. Most of our software projects are hosted on Github and we use Github actions very intensively for other software projects. Therefore, we have decided to use Github for our CODESYS library projects as well. Following tasks should be implemented in automation for CI/CD tasks: - Automated setup of CODESYS installation (Already released: https://github.com/marketplace/actions/setup-codesys-installation) - Checkout CODESYS libraries - Execute tests scripts - Sign CODESYS libraries - Extract Library documentation - Create CODESYS package - Sign CODESYS package Side Note: - This is mainly a side project, and we do not provide support for the CI/CD part. - This topic is here to help and also to get help from other software engineers. - This project and idea is not prioritized as I am currently the only one working on it and I hope it will help us and also others and increase productivity. - We are putting this out there as an organization, but priorities can change quickly and the CI/CD tasks I am developing are mostly done in my spare time. So please don't expect this to happen in a short time or even be fully completed. I would be very happy if some ppl will join the development process and might be open to discuss some technical details for this. I hope this topic is not to off-topic, but I think the CI/CD part is very important today and it can increase a lot of quality and push productivity. Thanks :)
Last updated: 2024-03-28

Post by alexgooi on Modbus TCP interface get stuck CODESYS Forge talk (Post)
Dear Forum, I'm currently experimenting with Modbus interfaces in combination with a virtual controller. I have the following setup (Modbus_Setup.png): I have an IPC with Debian installed on it (Debian 13). On this Debian machine I have installed a docker server and on this docker server a Codesys runtime container is deployed (Codesys_image.png). The Modbus scanner makes connection with and IO coupler and this works well. But when I physically disconnect the ethernet connection between the IPC and the IO coupler the Modbus interface gets stuck in a state where it gets stuck in the busy state (Modbus_Stuck.png). When I plug the cable back in, the IO coupler isn't communicating until the xBusy variable is manually set to False, after this action is performed the communication goes back to normal. I have tried to set the container network to host and bridge (Network.png), but both version gives the same result (stuck scanner). I would expect that the Modbus interface is generating a timeout after 1 sec, because this is how it is setup (Modbus_settings.png), but this is not what happens. I have thought to write a piece of code that writes xBusy to false when it is stuck but because it is an output I'm not able to write to it. I have tried this with another PC (different CPU/motherboard) but this gives the same outcome. I tried updating to the latest version of Virtual control (4.20) but this gives the same result. I also tried to do the same thing with an ethernet IP scanner, and this gives an error after the timeout is expired (so this works well). I have tried to connect to the IO coupler using the Modbus_FB lib (Modbus_FB.png) the FB's are giving the correct errors and behaving as expected. At last I have tried to use a Scanner on a Codesys controller (no IPC) and here the scanner behaves as expected (an alarm is triggered after the timeout has been expired). The version of the Codesys components are listed in the picture Versions.png Is there anyone that can give me a push in the right direction? Kind regards Alex
Last updated: 2026-04-14

Post by alexschooneveld on OPC UA PubSub SL 1.3 — UADP WriterGroup with assigned PSS.SecurityGroup still publishes plaintext CODESYS Forge talk (Post)
I am currently investigating an OPC UA PubSub connection over UDP. When I don't use encryption, the publish and subscribe are working correctly. But with encryption it does not. Environment OPC UA PubSub SL 1.3.0.0 (namespace UADP) OPC UA PubSub Security 1.3.0.0 (namespace PSS) OPC UA PubSub Base 1.3.0.0 (namespace PSB, incl. PSS.SecurityGroup / PSS.CONFIG) Programmatic PubSub in a CFC: UADP.Configuration → UADP.Connection → UADP.writerGroup → UADP.writer → writerDataSet, plus a CyclicCall gated by xEnable. Goal: publish secured UADP, SignAndEncrypt, policy PubSub-Aes256-CTR. What I do (one-shot, before xEnable := TRUE): fbSecurityGroup.SetInitialValue( 'http://opcfoundation.org/UA/SecurityPolicy#PubSub-Aes256-CTR', PSB.SECURITY.SIGNING_AND_ENCRYPTION); stSecurityCfg := fbSecurityGroup.GetConfig(eErrorID => eError); // eError=NO_ERROR, udiEncryptionKeySize=32 eError := fbSecurityGroup.SetSecurityKeys(udiTokenId, ADR(abyKey), SIZEOF(abyKey), 2436001000); // eError=NO_ERROR, SIZEOF=68 // writerGroup.itfSecurityGroup := fbSecurityGroup -- set in the WriterGroup block's Parameters (a per-scan code write got overwritten) What I verified eError = NO_ERROR after both GetConfig and SetSecurityKeys; udiEncryptionKeySize = 32. Key length = 68 bytes (signing 32 ‖ encrypt 32 ‖ nonce 4). itfSecurityGroup is set via the WriterGroup's Parameters (so it isn't clobbered each scan). Init runs before xEnable (the writer doesn't run with xEnable=FALSE). The UADP.writerGroup FB exposes only itfSecurityGroup for security — no SecurityMode/MessageSecurityMode property. Result: the published datagrams are still plaintext — ExtendedFlags1 = 0x01 (security bit 0x10 clear), no security header: b1 01 29 00 0f 16 00 … (PublisherId 41, WriterGroupId 22, RawData, no security) Questions With UADP.writerGroup, is assigning a configured + keyed PSS.SecurityGroup to itfSecurityGroup sufficient to enable message security, or is there an additional step/property/method to switch the WriterGroup to SignAndEncrypt? At what point in the WriterGroup lifecycle is itfSecurityGroup read? Must it be assigned/keyed before xActive, and does the group need a stop→start to pick it up? Is there a required call order, and does SetSecurityKeys need to be called once or repeatedly? Should security be configured on the Connection/Configuration level rather than (or in addition to) the WriterGroup? Is there a working example of secured (SignAndEncrypt) programmatic UADP publishing with this library, or a known limitation in 1.3? How can I read back at runtime whether security is actually active (via itfDiagnostics or similar)? Additional information I can confirm that the consumer side works — i.e. a standard subscriber decrypts the same keys fine — so the keys/profile aren't the issue. The Wireshark capture of the published message is: 0000 b1 01 29 00 0f 16 00 df 0d bb 25 01 00 0e 00 1b ..).......%..... 0010 0e 00 00 00 00 00 00 00 ........
Last updated: 2026-06-22

<< < 1 .. 116 117 118 119 120 .. 186 > >> (Page 118 of 186)

Showing results of 4634

Sort by relevance or date