| FORUM | LATEST POST | # TOPICS |
|---|---|---|
|
Engineering π¬π§ Discussions about the CODESYS Development System, IEC programming, CODESYS Professional Developer Edition |
CAA.File.Write β Unexpected characters when writing a CSV file by YIN 2 hours ago |
6079 |
|
Runtime π¬π§ Related questions to SoftPLCs e.g. Raspberry Pi, Beaglebone, IoT2000 and other platforms |
Raspberry Pi Runtime 4.22.0.0 vs. 4.20.0.0 I2C Bus not running... by eschwellinger 2026-10-16 |
2316 |
|
Visualization π¬π§ Realizing operator screens with CODESYS HMI, Targetvisu, Webvisu |
Alarm Manager - Disk IO Error and Memory Double Free Exception by josul 2026-10-12 |
1073 |
|
Motion π¬π§ Realizing single or multi axis motion control, CAM, CNC and Robotic applications |
Mismatch between coordinate monitor and actual motion using SMC_GroupJog... by darwin03 30 minutes ago |
575 |
|
Codesys V2.3 π¬π§ Forum about V2.3 |
Where Can I download the latest Version of CoDeSys V by yueqiqi 2026-06-15 |
2245 |
|
Deutsch π©πͺ German forum |
Nach "Alles Bereinigen" viele unklare Fehler, aber nur in Schrittketten by dmb-fan 2026-10-19 |
4596 |
|
Automation Server π¬π§ The Industry 4.0 administration platform for users and operators of CODESYS compatible controllers |
Gateway in China - "Gateway not connected" by pernockham 2026-03-18 |
81 |
|
Forge π¬π§ Discussions about CODESYS Forge projects and features of the CODESYS Forge website |
WebVisu scaling regression in V3.5.22 P2: frame size jumps when switchin... by charly29160 2026-06-15 |
232 |
Hi clesio, I have hit the same thing before, and SIZEOF really is the part to look at first. For a STRING, SIZEOF gives you the declared size of the variable, not the length of the text in it right now, so if sLine is declared as STRING(255) you end up writing the whole 256-byte buffer, including the unused bytes after the terminating zero. Those extra bytes are what show up as the strange characters at the end of your CSV, especially when you open it in Excel. LEN is the right idea, so the empty...
Hi davejc β and colorearm, since you asked for the same thing β I went down this exact road a while ago, and the bit that tripped me up was expecting the Alarm Manager to just give me a ready-made BOOL somewhere. It doesn't, at least not in the setup I was using. You have to read the alarm list from code. What worked for me was the approach TimvH linked to in the other thread: add the AlarmManager library, make a small FB that implements IAlarmFilterCriteria and another one that implements IAlarmManagerClient,...
Hi megasilver, That error message is actually telling you quite a lot, even if the wording is cryptic. Your compiled application expects version 2.0.0.12 of a set of system functions β the keyboard, backlight and splash screen ones β while the runtime on the controller only offers version 3.4.0.0 of them. So the project and the device disagree about which version of those functions exists. I have run into the same kind of mismatch before when a project was built against one device description and...
Hi luca03, I ran into something very similar a while back with a NodeSet2 file that imported fine through the repository but crashed the IDE the moment I tried to load it directly, so your description sounds familiar. In my case the file itself was the problem, not the Communication Manager. First thing I would check is the header of the NodeSet2.xml. If it lists other models under RequiredModel, those dependencies have to be present and loadable too, otherwise the import can die silently. I once...
Hi nixola, I ran into the same gap a while back, and honestly the documentation is thin here. The generated handler does return a DWORD, but I could not find any place in the online help where a specific return value is defined as resume, ignore, or stop, so I stopped treating it as a control signal at all. In my own projects I just return 0, which is what the generated stub does, and I use the handler for something else entirely: capture what happened, and get the machine into a known state. What...
Hi mankh, your follow-up is the right question to ask, because the EDS import itself is usually the easy part. CANopen is a standard and the CR710S manager just reads what the file describes, so a conforming EDS will load fine through the Device Repository. Where I have seen these migrations bite is not the file format but what the file assumes. The old EDS files sometimes carry default PDO mappings that don't match how the modules were actually configured under 2.3, so after importing I would open...
Tim is right on the core point, unfortunately β what sits in the PLC is compiled code, so there is no upload that hands your ST or ladder logic back. What I would do in your shoes, before rewriting anything, is check whether the source is still hiding somewhere. If the original programmer enabled the option to download the source together with the application, you can pull it back from the device through the Source Upload function in the Online menu, but it only works when that option was switched...
Hi yueqiqi, the short answer is that you don't create an instance of the master the way you would a function block. In your screenshot CANopen_Master is already the instance name, the part in brackets is just the device type, so that node is the master itself and it is configured in the device tree rather than declared in your code. What you actually work with in a program are the things underneath it. In your picture those are the two encoders, with Axis_CO and Axis_CO_1 below them, and those axis...
Good question, and both of your examples ring true β I have tripped over both kinds on site, usually at the worst possible moment during commissioning. One check I would add is around tasks and who writes what. If the same output, or the same function block instance, is touched from two tasks, or a fast task and a slow one both write a shared variable, the behaviour can look fine in a quick test and then go odd under load. Same for a task whose cycle time sits close to its watchdog, or a POU that...
Tim is right about the size. SIZEOF gives you the declared size of the string, so you end up writing the whole buffer, including the unused bytes after the terminating zero, and that is where those odd characters in the CSV come from. LEN is the right value for szSize. The empty file with LEN usually caught me out for a different reason, though. In my case the write was firing before the string was actually built, or the execute input stayed TRUE so the block never saw a new rising edge. I ended...