Discussion

FORUM LATEST POST # TOPICS
General Discussion

Forum about anything you want to talk about.

Handle 0 is invalid
by james
2025-10-28
1

Recent Activities

    CODESYS Forge

  • YIN YIN posted a comment on discussion Engineering 🇬🇧

    Good question, and one I have run into as well when a customer started asking for a list of everything inside a project before they would accept it. Short version: I have not found a built-in "export SBOM" button in the IDE, so your Python script is already on the right track. What I usually do is treat the Library Manager as the source of truth. It shows the name, version and company for every library actually referenced, including the ones pulled in through placeholders. Your script reading the...

  • YIN YIN posted a comment on discussion Forge 🇬🇧

    That jump on returning to a page rings a bell — I had a similar scaling oddity after an update on a WebVisu project a while back, and in my case it turned out the tab control was keeping the size of the last page instead of recalculating it when you came back. So I would first check whether all the pages in the register actually have the same base size. If one of them is a different size, or uses a fixed size while the others are automatic, that mismatch tends to show up exactly like this, with the...

  • YIN YIN posted a comment on discussion Visualization 🇬🇧

    Hi blade, I ran into this exact thing a while back and it turned out not to be the project at all, it was the installation on that PC. First thing I would check is whether the Visualization package is actually installed for the version you are running. In the IDE, go to Tools > CODESYS Installer, look under the add-ons for your version and see if Visualization is listed and enabled. I once had a setup where the main IDE installed fine but Visualization had been left out, and the entry just never...

  • YIN YIN posted a comment on discussion Deutsch 🇩🇪

    Hallo radar17892, die Meldung sagt im Grunde schon, woran es liegt: Der Online Change wurde ausgeführt, aber die Runtime findet auf der Steuerung keine gültige Lizenz für die „Online Configuration Change". Dass es letzte Woche noch ging, spricht dafür, dass sich auf dem Gerät etwas geändert hat – bei mir war das bisher fast immer ein Firmware-Update, ein Tausch der SD-Karte oder ein Rücksetzen der Steuerung, nach dem die Lizenz nicht mehr da war, wo die Runtime sie erwartet. Ich würde zuerst im Web-Based-Management...

  • YIN YIN posted a comment on discussion Deutsch 🇩🇪

    Hallo Thomas, der Haken ist, dass SysTimeRtcHighResGet immer UTC liefert, in Millisekunden seit 1970, das ist so gedacht. Wenn du danach erst HighResToLocal und dann gleich wieder LocalToHighRes aufrufst, heben sich die beiden Umrechnungen gegenseitig auf, und am Ende steht wieder genau die UTC-Zeit da. Genau das siehst du ja auch. Ich mache das bei mir so: einmal HighResGet, dann einmal ConvertHighResToLocal, und das Ergebnis nehme ich direkt als lokale Zeit in Millisekunden. Die Rückrichtung brauche...

  • YIN YIN posted a comment on discussion Engineering 🇬🇧

    I've hit this same crash in SP22 as well, and it's a nasty one precisely because the error tells you almost nothing about where it comes from. The compiler dies in phase 5 while it's rewriting an assignment expression, and in my experience that usually means it tripped over some construct SP21 quietly tolerated — a stray empty statement, a VAR_IN_OUT used as a FOR loop counter, or an assignment buried inside deeply nested IFs. hhermsen's list above is a good place to start, those are exactly the...

  • YIN YIN posted a comment on discussion Visualization 🇬🇧

    Hi chaylak, I ran into almost the same 'works in CFC, not in ST' situation a while back, and in my case the function block wasn't the problem at all — it was the program around it. First thing I would check is whether this POU actually compiles and downloads as ST. The code you pasted has a VAR_INPUT block with CFC_Motion sitting at the very bottom, after the executable code. In ST all declarations have to come before the body, so a trailing VAR_INPUT like that won't compile, and if the POU never...

  • YIN YIN posted a comment on discussion Engineering 🇬🇧

    Thanks for writing this up so clearly — I ran into the same wall when I was trying to keep a small table of axis limits read-only once it left the owning function block. The worry was exactly the same: some consumer further down the chain changes a value by accident, and the machine starts behaving differently with no obvious culprit. As far as I know there is still no persistent const reference in ST, so the FB-with-getters route is the one that has held up best for me in practice, even though I...

  • YIN YIN posted a comment on discussion Engineering 🇬🇧

    Hi tarek, the short answer is that you can't add the slave in the CODESYS tree, and that's expected rather than a bug. CODESYS itself has no DeviceNet master, so the DeviceNet side of your setup belongs entirely to the EL6752. In the CODESYS device tree the terminal only shows up as an EtherCAT slave, and whatever slaves sit behind it are configured in the terminal's own setup, not in CODESYS. In practice that setup happens in TwinCAT's DeviceNet configurator. That's where you add the valve, give...

  • YIN YIN posted a comment on discussion Runtime 🇬🇧

    Hi, since the same setup works from your PC with the USB converter, the Carel side of this is basically proven — the 19200/None/1 settings, the address 1 and the FC03 register map all do what they're supposed to. So I'd focus on the PFC200 side, that's where the difference has to be. The first thing I'd check is whether the port is really in RS485 mode and really free. You set serialmode in the PLC shell and the owner to unassigned in WBM, which is the right combination, but the port mode usually...