Post by francescoc on Custom log CmpLog
CODESYS Forge
talk
(Post)
Hi, I am trying to create a log in my application. Since I cannot find any documentation regarding modifying the codesys configuration file to be able to log in ms, i tried to create a new log via CmpLog.LogCreate. Below is the part of the code where I create the logger and write a test string. In the log tab of codesys I actually see the new log that was created, but it is empty, and in the folder I cannot find any files. I can't find any detailed documentation. Can you guys give me support? Are there any examples? Thank you IF NOT FirstCycle THEN LogName:= 'LOGS/TestLog'; LogOptions.bEnable:= 1; LogOptions.iMaxEntries:= 5000; LogOptions.iMaxFiles:= 100; LogOptions.iMaxFileSize:= 5000; LogOptions.szName:= LogName; LogOptions.uiType:= CmpLog.LogTypes.LT_TIMESTAMP_RTC_HIGHRES; LogOptions.uiFilter:= CmpLog.LogClass.LOG_ALL; LogHandle:= CmpLog.LogCreate(pOptions := ADR(LogOptions), pResult:= ADR(Result)); LogHandle:= CmpLog.LogOpen(pszName:= LogName, pResult:= Result); Component_Manager.CMAddComponent2('TestLogNEW', 16#00000001, ADR(udiCmpIdNEW), 0); CmpLog.LogAdd2(LogHandle, udiCmpIdNEW, CmpLog.LogClass.LOG_INFO, 1, 1, 'Logger started...'); END_IF IF TestWrite THEN TestWrite:= FALSE; CmpLog.LogAdd2(LogHandle, udiCmpIdNEW, CmpLog.LogClass.LOG_INFO, 1, 1, 'Write test'); END_IF
Last updated: 2024-03-16
Post by tariq on Using Hilscher CIFX Cards as EtherCAT Masters in CODESYS
CODESYS Forge
talk
(Post)
Dear Codesys Support Team, I hope this message finds you well. I am currently working on a project that involves using a Hilscher CIFX card to act as an EtherCAT master within the CODESYS environment. Despite following the available documentation and setup guides, I have encountered some challenges and require assistance to ensure proper configuration and operation. Questions: 1- Could you please confirm if the Hilscher CIFX card is supported as an EtherCAT master in CODESYS? If so, are there specific drivers or configuration files that need to be installed? 2- Are there detailed setup guides or example projects available that demonstrate the integration of Hilscher CIFX cards with CODESYS for EtherCAT communication? 3- Is there any additional software or plugins required for ensuring seamless communication between the CIFX card and the EtherCAT slaves within CODESYS? Your support and guidance on these matters would be greatly appreciated, as it is crucial for the success of our project. Thank you for your time and assistance. I look forward to your prompt response. Best regards, TB
Last updated: 2024-07-02
Post by paulpotat on cm4 runtime problem
CODESYS Forge
talk
(Post)
Hello, I have exactly the same issue, with the following configuration : Hardware version >>> cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3 processor : 1 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3 processor : 2 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3 processor : 3 model name : ARMv7 Processor rev 3 (v7l) BogoMIPS : 108.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 3 Hardware : BCM2711 Revision : a03141 Serial : 10000000d5be5b5f Model : Raspberry Pi Compute Module 4 Rev 1.1 Kernel version >>> uname -a Linux raspberrypi 6.1.21-v7l+ #1642 SMP Mon Apr 3 17:22:30 BST 2023 armv7l GNU/Linux OS Version >>> cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" /boot/config.txt I added the following line : arm_64bit=0 CodeSys runtime version 4.10 Were you able to solve the issue @michelebianchi ? Any help with this would be appreciated... BR
Last updated: 2024-08-28
Post by kevinrn on CODESYS Development System V3 installation auf unter Parallells Windows 11auf MAC PRO M1 ARM Prozessor
CODESYS Forge
talk
(Post)
Hallo, das Thema ist ja etwas offtopic. Aber ich kann gerne mal von meiner Erfahrung berichten: Nachdem ich von 2020 bis 2023 immer einen MacBook Pro mit Intel CPU hatte (i9/32GB) und nun seit Januar 2024 mit dem M3 Max unterwegs bin kann ich Nachfolgendes berichten. Infos zu den Aufgaben, die ich damit erledige: Die Runtime nutze ich nicht auf dem Mac (Wenn ich von Mac rede, dann meine ich damit die Win11 ARM64 Parallels Umgebung) Ich nutze die IDE für Library development und für automatisierungs Tests von CI/CD jobs. Weiterhin öffne ich oft große Projektarchive mit teilweise 160 MB. Erfahrungen zur Installation von CODESYS Versionen: Ich habe einige Versionen installiert, unter anderem, 3.5.14.4, 3.5.17.2, 3.5.16.3, 3.5.18.4 und 3.5.19.6. Ich hatte mit keiner einizgen Installation ein Problem. Die Installation lief immer ohne Probleme durch. Runtimes (Control Win) installiere ich nicht. Ich nutze linux basierte Zielsysteme und bei bedarf eine Windows VM auf einen entfernen Host mit X64. Lokales Gateway läuft ebenso Sonstige Erfahrungen: Ich nutze viele Komponenten Querbeet: Alarming, AC Persistence, Symbol Konfiguration, CFC und ST Editor, externes Packages wie STWeep, Git für Library Entwicklung, Visu, etc. Mit keiner dieser "Komponenten" hatte ich schwierigkeiten oder einen Unterschied zu x64 systemen festgestellt. Man muss aber auch sagen, dass das alles nur ein kleiner Bruchteil ist, was die CODESYS Welt beinhaltet, deshalb sind diese Aussagen auch nur subjektiv aus meinem Erfahrungsbereich. Für das Entwickeln von Libraries sehe ich keine Performance Einschränkungen. Ganz im Gegenteil, für das, dass hier eine emulation stattfindet, ist es erstaunlich schnell. Meiner Meinung nach sind sogar einfache und kleine Projekte schneller als beim Intel Mac. Die Akku Leistung mit dem Mac und Parallels ist fantastisch. Lüfter hört man nicht mal bei der Nutzung von CODESYS. Beim Intel konnte ich sonst ein Spiegelei auf der Abdeckung zubereiten... Was evtl. etwas langsamer ist bzw. mir manchmal so vor kommt ist, der CFC Editor im Online Mode. Aber hierzu fehlt mir ein richtiger Vergleich. Fazit: Ich bin selbst erstaunt wie gut die CODESYS IDE auf einem ARM64 emuliert wird. Ich muss aber auch sagen, dass ich jederzeit eine x64 Workspace zur Verfügung habe, falls was nicht funktionieren sollte. Das habe ich mir extra zum Umstieg zu gelegt. Bisher habe ich es jedoch noch nie benötigt, da meine Anforderungen alle erfüllt werden. Es sollte einem aber bewusst sein, dass dies keine supportete Umgebung ist und man auch bei spezifischen Problemen keinen Support erwarten sollte. Ich nutze CODESYS ca. 4-12 Stunden die Woche und ich warte immer noch auf etwas, um meine X64 Cloud Workspace mal zu verwenden... Vielleicht hilft dir dies ja etwas bei der Entscheidung.
Last updated: 2024-03-21
Post by gerdkoch on Dynamic I/Os Mapping
CODESYS Forge
talk
(Post)
Hi, I assume that you have a Pfc200 G2 or something and work with the original WAGO runtime. Then I would recommend the WagoSysDynamicIoMapping. Here in the example projects there is a PDF file for the library: https://downloadcenter.wago.com/learning-material/details/ll0w3pmdunzvem83g1 There is a global functional component in a GVL of the library. I think it's called DynKbusIoManager or something. The active terminals are registered there. Then there are filter Fb's for e.g. the first clamp with a specific article number. Everything is in the PDF.
Last updated: 2023-08-18
Post by vformanek on No source code available for profinet library
CODESYS Forge
talk
(Post)
Hello, I have been using CODESYS for a while and after updating to version 3.5.18.50 the code randomly stops with this fault. Why is that ? I have tried to locate the fault in the Call Stack but I dont know what to do now... I have updated the projects properly for the version I am using. This fault started happening after like 14 days of using the new version of CODESYS.
Last updated: 2023-08-23
Post by kreisfilho on Stop raspberry from executing a plc program
CODESYS Forge
talk
(Post)
Hi guys, Can someone inform where in a raspberry pi are stored the codesys programs? I´ve been training the use of a RPI as PLC, which works pretty well, however while both the RPI and PC (running codesys) remain connected to the same network. The question is: how to run the codesys program downloaded to the RPI as a stand alone device (disconnected from the PC)? Thanks! Kreis
Last updated: 2023-08-23
Post by martinlithlith on Relay board / relays for raspberry pi 3 b+
CODESYS Forge
talk
(Post)
hi! im planning a project on a raspberry with Codesys. For this I'll need a number of relays to control heating and fans, all a max of 24v and about 2a. How would i know if the board / relays i buy will be working with Codesys? Does every hat work or does it need a library/driver? is there a list of drivers/libraries created? as this is a hobby project all tips on a relay board or single boards that works with codesys and not to expensive are very welcome.
Last updated: 2023-09-03
Post by transmin01 on CANbus issue
CODESYS Forge
talk
(Post)
Update: This initial issue was when using a Linux target PLC. Since then I have created a Win10 target PC and the Codesys software reported an issue associated with the device version (see attached). I am assuming this is an incompatibility with the xml file from the manufacturer and the firmware version on the module and I am chasing this up with Beckhoff. Question is, why would this not report with a Linux target?
Last updated: 2023-09-14
Post by transmin01 on PCAN serial "No CAN driver found"
CODESYS Forge
talk
(Post)
Hi, I am using a PCAN mini CAN board which has the Windows drivers installed on the target PLC. PCAN board can be seen in device manager. However, I am getting "No CAN driver found" error. I have read the post https://forge.codesys.com/forge/talk/CODESYS-V2/thread/44aae19318/ and have uncommented the CmpPCANBasicDrv driver in the CodesysControl.cfg file in development PC and have copied it to the target PC. Current CodesysControl.cfg file attached. Is there anything else I am missing? Regards
Last updated: 2023-09-14
Post by timvh on CANbus issue
CODESYS Forge
talk
(Post)
On a PC with the Control Win, this is probably related to the fact that the CAN drivers are not loaded. Go to the folder where your Control Win Configuration file is: - E.g. C:\ProgramData\CODESYS\CODESYSControlWinV3x64\E1FA7ABE - Open the CODESYSControl.cfg - Remove the semi-colon in front of the CAN driver you want to use (section ComponentManager). - Set the component ID to the next number in the list (e.g. Component.8) - Save this file and restart the Control Win.
Last updated: 2023-09-14
Post by martinlithlith on Raspberry Pi: List of available drivers / libraries
CODESYS Forge
talk
(Post)
As most of the posts are moved here around 2015, what would be the right version of codesys to run? Would it be better to install a older version of codesys or should i keep on downgrading libraries? Is there any work done to update theses libraries? It´s been a few years since the last update in this post, are there new libraries/devices for raspberry being added/posted somewhere else? Thanks, Martin
Last updated: 2023-10-17
Post by mondinmr on Jitter problems on imx8
CODESYS Forge
talk
(Post)
SOLVED!!! In this imx8 max_cstate=1 in kernel boot parameters is not working! We found a workaround: #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <stdint.h> int main(void) { int fd; uint32_t value = 0; fd = open("/dev/cpu_dma_latency", O_WRONLY); if (fd < 0) { perror("Error opening /dev/cpu_dma_latency"); return 1; } if (write(fd, &value, sizeof(value)) != sizeof(value)) { perror("Error writing to /dev/cpu_dma_latency"); close(fd); return 1; } while (1) { pause(); } } This simple code launched before CODESYS do the same work! Now jitter is identical as measured by cyclictest!
Last updated: 2023-10-19
Post by drno on AlarmMgr Database Error in method WriteToStorage: Error code = 30531, Action = 1030
CODESYS Forge
talk
(Post)
Hallo zusammen, auf einer Industriesteuerung (Target-Version 3.5.5.0) läuft unter anderem eine Alarmverwaltung mit Alarmspeicherung. Offensichtlich kann kein Schreibzugriff auf das .sqlite File durchgeführt werden, daher ist die Alarmhistorie nicht mehr verfügbar. Versuche mit unterschiedlichen Unterverzeichnissen führten nicht zum Erfolg. Die Datei "application.alarmstorage.sqlite" wird zwar angelegt, aber es erfolgen keine Einträge. Hat jemand eine Idee dazu? Die Steuerung ist ca. 8 Jahre in Betrieb, die Alarmhistorie hat früher mal funktioniert. Danke, LG
Last updated: 2023-11-21
Post by timvh on Management of a PLC network from a remote station
CODESYS Forge
talk
(Post)
Maybe the CODESYS HMI is a good solution. https://store.codesys.com/en/codesys-hmi-sl-bundle.html Run this on the remote main control station. In the HMI application you can add the data source manager and to this manager you can add Data sources. A data source has a reference to the PLC you want to connect to and can get access to the variables of the PLC application. You can then use these variables in the visualization of the HMI application.
Last updated: 2023-12-04
Post by andrax on Mux I2C
CODESYS Forge
talk
(Post)
the TCA9548a does not work in Codesys. In Pyton this is only queried once and in Codesys cyclically. Of course you can also insert a terminating resistor in each port, then you should have no problems. I use this one: https://botland.de/8-bit-multiplexer/12723-qwiic-mux-breakout-8-kanal-modul-mit-i2c-multiplexer-tca9548a-sparkfun-bob-16784-5904422341428.html You can simply set the library to the latest version. You do not need Oscat. Do you need an example project for the BMP280?
Last updated: 2024-01-02
Post by andrax on Mux I2C
CODESYS Forge
talk
(Post)
the TCA9548a does not work in Codesys. In Pyton this is only queried once and in Codesys cyclically. Of course you can also insert a terminating resistor in each port, then you should have no problems. I use this one: https://botland.de/8-bit-multiplexer/12723-qwiic-mux-breakout-8-kanal-modul-mit-i2c-multiplexer-tca9548a-sparkfun-bob-16784-5904422341428.html You can simply set the library to the latest version. You do not need Oscat. Do you need an example project for the BMP280?
Last updated: 2024-01-02
Post by usacodesysuser on How to connect serial devices ?
CODESYS Forge
talk
(Post)
@eschwellinger do you have any examples of using a USB barcode scanner? I have read through the forums here and I am unable to find how to get the barcode data to populate in a text field without having to first click into the text field to activate it. Is there a library that allows you to access the barcode data? I am really new to this in general any help is greatly appreciated, hopefully you have a pretty clear example
Last updated: 2024-01-06
Post by andrax on Stop Programm geladen Ausnahmefehler
CODESYS Forge
talk
(Post)
Hallo, ich habe seid neustem ebenfalls dieses Problem auf den Raspberry. Codesys 3.5.18 Nach dem Download geht die SPS in STOP und es blinkt schwerer Ausnahmefehler. Der Fehler kommt sporadisch und ist nicht reproduzierbar. Es passiert beim kompletten Download, aber auch bei Änderungen. Wie kann ich den Fehler eingrenzen? Nachtrag: Wenn der Fehler kommt, ist die Runtime auf dem Raspberry nicht mehr ansprechbar. Der Raspberry selbst schon. Für einen neuen Download muss ich den Raspberry neu starten. Das selbe ist auch in der Programmierumgebung, die Software hängt sich auf.
Last updated: 2024-01-15
Post by mejak on Raspberry Pi USB HID RFID Reader - read ID in plc program
CODESYS Forge
talk
(Post)
Hello, I have an RFID reader that is detected as a keyboard. While looking for information, I came across examples using visualization. I would like to read the ID without visualization or external code in python, only in PLC. I found on the forum that you can try reading directly from potru /dev/... https://forge.codesys.com/forge/talk/Runtime/thread/24b3527036/ How to read values directly in codesys? Or maybe there is another solution? Best Regards
Last updated: 2024-01-25
Post by rpostwvu on Shared Memory Access Issues
CODESYS Forge
talk
(Post)
I got the shared memory example. I'm pretty sure I'm successfully created a memory space, CreateResult returns 18. szName:='CodesysDataShare'; hShm := SysSharedMemoryCreate(szName, 0, ADR(uxiSize), ADR(CreateResult)); I'm trying to access this memory with a C# application, but I get "Unable to Find Specified File". I suspect that Codesys and/or Visual Studio code alters the name I choose? Being in Windows, I cant find a way to see the mapped memory list. ~~~ using (var mmfRead = MemoryMappedFile.OpenExisting("CodesysDataShare",MemoryMappedFileRights.ReadWrite)) ~~~
Last updated: 2024-01-29
Post by jshirazi on Restore license on Raspberry Pi
CODESYS Forge
talk
(Post)
Hi, I recently got a license for Raspberry Pi, after license activation I made a backup copy of "CMLicenseNew.WibuCmRaU" file to a safe place. Things got complicated and I tried to downgrade OS for some reason after that I tried several times/ways to restore my license with no luck. the specifications are as follows: Raspberry Pi 4 Model B Rev 1.1 codesyscontrol 4.10.0.0 SDK 3.5.19.30 Logs: **** ERROR: CodeMWriteLicenseFile: 'CMLicenseNew.WibuCmRaU' failed: Container not found or Server dose not support .... So if someone know a solution for this please kindly help me. Regards
Last updated: 2024-02-03
Post by kleeswi on SysFileOpen does not work after update to V3.5 SP19 Patch 5
CODESYS Forge
talk
(Post)
I use the function SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_WRITE, pErrorFileOpen); to open and write a file. Since the update from Codesys V3.5 SP17 to V3.5 SP19 Patch 5 it does not work anymore. I first had SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_APPEND_PLUS, pErrorFileOpen); in both versions. hFile_Test is a pointer to byte. It gives an exceptional error when dereferencing the hFile_Test pointer. Edit: I use Codesys on a Raspberry pi
Last updated: 2024-02-19
Post by timvh on IFM CR711S Version Mismatch
CODESYS Forge
talk
(Post)
You should ask IFM to provide you with the correct version of their controller packages. Then after you have installed this, you can select the correct version of the controller by right clicking on it in the device tree, update device, enable the option "Display all versions" and then select the version which matches your controller. Alternatively you can ask IFM to provide an update package which can update the runtime version on your controller to 3.2.0.0.
Last updated: 2024-03-05
Post by superjojo2002 on Licensing info not available.
CODESYS Forge
talk
(Post)
I checked it using the very same docker container version like colleague moon and the command returned root@nt0001c02c5533:/# cmu -x cmu - CodeMeter Universal Support Tool. Version 7.60c of 2023-Aug-09 (Build 5625) for Linux/ARMHF 64-Bit Copyright (C) 2007-2023 by WIBU-SYSTEMS AG. All rights reserved. Result: 0 CmContainer(s) listed. (CodeMeter not running) Please consider that we intend to license a codesys ARM64 SL in a docker container.
Last updated: 2024-03-20
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
.