Post by biiebs on Aufbau von Ablaufsteuerungen ermitteln
CODESYS Forge
talk
(Post)
Hallo Zusammen, gibt es in CODESYS bei Ablaufsteuerungen weitere Möglichkeiten außer den AS-Einstellungen z.B. die Aufbaustruktur der Ablaufsteuerung herauszufinden? Gesamtanzahl der verwendeten Aktionen / Schritte - Im besten Fall auch die einzelnen Verzweigungen? Ich würde den gesamten Aufbau der Schrittkette gerne als "View" in einer übergeordneten Software abbilden lassen, da sich die Ablaufsteuerungen, je nach Projekt im Aufbau unterscheiden bräuchte ich die Kenntniss über den Aufbau dieser Schrittketten. Oder müsste ich mir hier einen "Workaround" programmieren, der z.B. bei Init erstmal den Aufbau der Ablaufsteuerung durchläuft und mir die nötigen Informationen liefert? Natürlich wäre auch ein Weg den Aufbau des AS-Bausteins über die PLCopen XML zu exportieren, jedoch müsste dies bei Änderungen jeweils nachgezogen werden - was etwas unschön wäre, falls dies vergessen würde. Mittlerweile habe ich auch das Tool "SFC Visu Generator" gefunden, dessen Funktion im Prinzip genau das darstellt, was ich benötige - jedoch leider nur als CODESYS interne Visualisierung. Ich würde den Export des Bausteins gerne in meine übergeordnete Software implementieren. Gibt es hier die Möglichkeit das Vorgehen zu Erfahren oder den vom Baustein generierten Export bei mir zu implementieren? Hat hier jemand sowas ähnliches schonmal gelöst? Vielen Dank im Voraus Mit freundlichen Grüßen Biiebs
Last updated: 2024-07-25
Post by kleeswi on Visualization scaling problem with B&R T30 panel
CODESYS Forge
talk
(Post)
The probelm arises for the B&R T30 panel after updating Codesys from 3.5.17 to 3.5.19 patch 5. We have to use 3.5.19 for other reasons so we cannot downgrade the version. The scaling problem only exists for the B&R 6PPT30.0702.20F025 panel, the B&R T50 panel and a esa lumia panel work. When we choose a fixed resolution it looks also good, however we also want to support the esa lumia panel with a different resolution. The images show the anisotropic and isotropic option. In the anisotropic option it scales the hight correctly but not the width and in the isotropic option is scales both hight and width false, it also does not start in the top left corner. Does someone have any suggestion why it does not work anymore with the new codesys version and are there workarounds? I added all versions with visualization packages as an image, visuElems is 4.4.0.0.
Last updated: 2024-07-29
Post by jmfernandes on OpenDir always in error
CODESYS Forge
talk
(Post)
Hello I'm trying to use DirOpen to access a directory where then I can read/list the files inside. But I can't list any files because DirOpen.xError is always true. In eError the message is this: " ERROR_UNKNOWN Local library error ID (0: no error; 5101: time out)**** " I have in the file explorer the path 'C:\CodesysTest\Aluminium' and to make sure I also created in the plc a folder to 'prj/Recipes/Aluminium'. I tried using the different paths, but in both it happens the same thing.Inside the folder Aluminium there is two csv files, that I want to list. I added in the library manager CAA Files and CAA Types. I am using the example of https://content.helpme-codesys.com/en/libs/CAA%20File/Current/Examples.html#directory but not matter what I do, I can't get the list the names of the files. What am I missing?
Last updated: 2024-07-31
Post by programmierer on Implementing UDP Communication
CODESYS Forge
talk
(Post)
Hello everyone, I hope you can help me with my problem. I am new to programming and am currently working with a WAGO controller in our lab, which controls a heat pump. My goal is to send the electrical power of the heat pump (Pel_WP) via a UDP connection to a specific IP address. I am using Codesys version 2.3 and following the guide I found here: https://forge.codesys.com/forum/de/396/genmed-Konfiguration%20der%20UDP%20Kommunikation%20Cosesys%20S7.pdf. I have adapted the guide to suit my needs. The data sending works since I can force the reception value Pel_WP and the data is sent accordingly. However, I am having trouble with the receiving part. The reception value is not being correctly received, and the diSocket variable shows -1. The connection between the heat pump and the WAGO controller seems to be set up correctly, as the heat pump is listed under the communication parameters with the correct IP address. I have also attached images to provide a better view of the setup. I would greatly appreciate any support or suggestions for a solution. Thank you in advance!
Last updated: 2024-08-02
Post by mecmag on gear over gear (2 masters,1 slave) - how to do it?
CODESYS Forge
talk
(Post)
Hello, i need to create an application that uses 2 masters, with 2 different ratios, and it outputs in one single slave. I explain better: Imagine axis A, B and C. -Axis A is the slave. -Axis B is master of A, with a specific ratio. -Axis C is master of A, with a specific ratio. the result motion from B and C should be executed by A, proportionally in position and ratios from B and C. With standard softmotion libraries (MC_...) it is not possible (i couldn't) because it is allowed only one master with its ratio. I have made a similiar application in past, using MoveOverGear in order to synch gears before engage. Instead this time, i need to do a gear over gear application, using 2 different masters. The position have to be the sum of both masters (considering their ratios). Any clue about how to do it? Or were to find some FB that can do it?
Last updated: 2024-08-16
Post by c3po on Von SNMP auf IIoT wechseln
CODESYS Forge
talk
(Post)
Hallo, 1. ich bin komplett NEU was Codesys angeht 2. ich muss direkt ein Retrofit machen von V2 auf V3 3. Neue Steuerung: WAGO 750-8211 PFC200. 4. das Projekt in V2 hat über SNMP daten im Netzwerk zur Verfügung gestellt, oder diese gelesen 5. das Projekt in V3 kann SNMP nur noch eingeschränkt nutzen, deswegen wurde mir vom WAGO Support nahegelegt die IIoT Lib zu verwenden. Frage: Wie mach ich das? Konkret: Ich habe die WagoAppSNMP Bibliothek installiert, damit kann ich schon mal Set und Get nutzen (hoffentlich, hab es ja noch nicht getestet, sondern nur programmiert). Ist das ein schlauer Weg, das über diese Lib zu machen? Denn: was macht der SNMP_SET_PLCDATA_WRITEAREA ? Den kann ich über die Wago Lib nicht nutzen und weiß auch nicht, was dieser Baustein konkret tut (Bild im Anhang). Es scheint mir, hier werden Daten auf ein Word im Netzwerk geschrieben? Aber geht das nicht auch einfacher? Es ist ja keine Adresse hinterlegt, wo das hin gehen soll oder? Also, ich verstehe den Baustein nicht so ganz und konnte bisher auch keine Erklärung dazu finden. Vielen Dank schon mal für eure Unterstützung, K.
Last updated: 2024-08-19
Post by ruobian on Analog Input Delay Timer
CODESYS Forge
talk
(Post)
Hello there, I am new here and in programming. I need help with the basics. I am trying to do what I mentioned in the title. I have an analog input. So I have a real or integer data type value. I want to delay it. TON and TOF only work with bool. I think there is a function block that has two inputs, 1 for real or int and 1 for bool. And if bool is true, it will give the output as real or int. I don't know but I need something like this. Actually, it is not exactly like that. In other words, it will not show the real value at the input at the output after a certain period of time. I want it to show the real value from 2 seconds ago continuously. The purpose of doing this is to compare the real value I received with the value from 2 seconds ago and find out whether it went up or down. I am using only FBD. Please help me with this. Thanks in advance.
Last updated: 2024-08-20
Post by fless on Von SNMP auf IIoT wechseln
CODESYS Forge
talk
(Post)
Hallo, 1. Willkommen :-) 2. Da hast schon etwas worauf du aufbauen kannst. 3. Da gibt es von WAGO Hilfen wie man Projekte zu Codesys 3.5 migriert. 4. Mit SNMP habe ich keine Erfahrung, kann dir leider nicht weiterhelfen. 5. WAGO hat eine eigene SNMP Implementierung. Ich vermute WAGO entwickelt diese Libary nicht mehr parallel weiter, deshalb die Aussage des Supports. Die Codesys SNMP lib ist in das Paket IoT gepackt worden. Die Library kannst du ganz normal einbinden wenn du die IoT Lizenz für das Gerät gekauft hast . Hilfe findest du hier Wenn du keine Lizenz hast sollte die Lib einen gewissen Zeitraum, iirc 30 Minuten, ohne Einschränkungen im Demomodus laufen. Zu den Detailfragen, das ist eine WAGO Libary da wirst du hier nur mit viel Glück Hilfe finden. Ich würde für ein Retrofit auf die Version von Codesys wechseln, dann bist du auch nicht mehr abhängig vom Hersteller. Grüße
Last updated: 2024-08-21
Post by mondinmr on First IO address of a CAADiagDeviceDefault.
CODESYS Forge
talk
(Post)
I have a device CAADiagDeviceDefault: IoConfig_Globals.Axis_A In our library, we perform introspection of the Etc_SlaveDiag. In that case, we have connectors, and by searching for them by address, I can find them in the IO mapping using the offset and size provided by EtherCAT. However, a Lenze i700 drive, instead of placing the IO mapping in the Etc_SlaveDiag device, places it in a sub-device CAADiagDeviceDefault. So, when I perform introspection, I cannot find the IO correspondences. Yet, in the CAADiagDeviceDefault, I do not find the connectors and cannot do the matching. Is there a way with a pointer or reference to a CAADiagDeviceDefault to obtain the address of the first input and the address of the first output? This is because we have our own motion library with many EtherCAT devices that automatically configure the mappings, but I can't manage to do so with the Lenze i700.
Last updated: 2024-08-22
Post by fless on Von SNMP auf IIoT wechseln
CODESYS Forge
talk
(Post)
Wie gesagt ich hatte noch keinen Kontakt mit SNMP. Um die Beispiele zu verstehen hier ein paar Tips: SetEngineId und CreateSNMPV3User sind Funktionsbausteine. Klicke rechts auf den Namen, Symbol suchen - Gehe zu Definition Dann sieht du entweder den Quelltext oder landest in der Bibliothek und kannst dir die Dokumentation ansehen. In deinen Fall siehst du den Quelltext. Die Funktionsbausteine sind in den Projekt POUs gespeichert weil das Projekt aus mehreren Applikationen besteht die alle diese FBs nutzen. sOID (drei Balken)oid → was wird da gemacht? In die Stringvariable sOID (String old ID?) wird der Inhalt von oid geschrieben. oid ist Member der Strukturvariable snmpVarBindings. Dem SNMP_SET Aufruf wird snmpVarBindings übergeben und geändert. Und da müsste doch irgendwo eine Verschlüsselung eingetragen werden oder? Beim Anlegen der SMNP-User wird ein Passwort vergeben, siehe CreateSNMPV3User. Dem SNMP_SET Aufruf wird nur der User übergeben, hier "readwrite". Die Bibliothek sucht sich die Einstellung des Users selbst.
Last updated: 2024-09-01
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by elektron785 on Dongle von Linux-Modul (ARM64) nicht erkannt
CODESYS Forge
talk
(Post)
Ich hatte noch einmal Zeit das mit der Lizenz zu probieren und habe dazu über den Codesys Installer das Virtual Control SL runtergeladen und ausprobiert, aber leider ohne Erfolg. Zunächst habe ich "Docker_codesyscontrol_virtuallinuxarm64_4.13.0.0_arm64.tar.gz" aufs Board geladen und das Image mit docker load geladen. Mit dem Befehl docker run --rm -dt --name codesys --network host -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ --device-cgroup-rule='c 13: rmw' --privileged 470a708f17a2 hab ich dies dann ausgeführt, aber das Problem, dass ich das Board im Netzwerk dann nicht finden konnte. Damit ich die Verbindung herstellen konnte, habe ich die Datei "DockerRuntimeStart.sh" so verändert, dass ich den Teil: -p 11740:11740/tcp \ -p 443:443/tcp \ -p 8080:8080/tcp \ -p 4840:4840/tcp \ gegen --net host \ ersetzt habe. Das Skript habe ich dann aufs Board geladen und bash DockerRuntimeStart.sh -i codesyscontrolvirtuallinuxarm64:4.13.0.0 -c codesys -H verdin-imx8mp- ausgeführt. Nun konnte ich in Codesys wieder eine Verbindung zu dem Board aufbauen, aber der Dongle wird leider immer noch nicht im Lizenz-Manager erkannt. Wie kann ich denn prüfen, dass auf den USB-Stick vom Container aus zugegriffen werden kann?
Last updated: 2024-09-23
Post by lbartik on J1939 TX/RX PDU1
CODESYS Forge
talk
(Post)
Is it possible to transmit a PDU1 PGN using the J1939 manager and local device? What if I need to transmit a PGN RQST via 0xEA00 (PGN 59904)? How would I do this P2P (Destination < 0xFF) or broadcast (Destination 0xFF)? I don't think this is possible for any destination type. I don't think it's possible to receive broadcast PDU1 messages either. For example, an address claim PGN 60928 (0x18EEFF80) is addressed to all nodes (0xFF) and not any specific local device so it will be filtered out. These are major oversights in the IoDrvJ1939 library to not support every PDU1 RX/TX scenario. IoDrvJ1939 supported scenario: 1. Receive (RX) PDU1 (P2P) destination-specific (PDU-specific < 255) to local device with matching address IoDrvJ1939 unsupported scenarios: 1. Receive (RX) PDU1 (P2P) global (PDU-specific = 255) 2. Transmit (TX) PDU1 (P2P) global (PDU-specific = 255) 3. Transmit (TX) PDU1 (P2P) destination-specific (PDU-specific < 255)
Last updated: 2024-09-23
Post by mainak on Opaque NodeId in the OPC UA server
CODESYS Forge
talk
(Post)
Hello all, I am using the OPC UA server with my custom information model. I have used the communication manager to add my information model under my application and created instances from OPC UA types. I see that the created instances in the OPC UA server has some opaque nodeid (attached screenshot) and I want to change that. Therefore I have the following questions: 1. Is there a way to configure the NodeIds of instances in the OPC UA server? I tried to edit it using the UaExpert client but got error "BadNotWriteable". is it possible to configure it somewhere so that the nodeids can be changed using an external client? 2. Is there a way to define the rule for creating instance nodeids within the codesys IDE? 3. Is it possible to create the instances before e.g. using a modelling tool like UaModeler and import them as part of the information model and use them later? Using the communication manager, I can only create instances from types. I couldn't find a way to map my existing instances to plc tags from my application. It would be nice if someone could help me with these issues. Thanks in advance. :)
Last updated: 2024-10-19
Post by koerbejm on Probleme beim aktivieren von Lizenzen
CODESYS Forge
talk
(Post)
Liebe Codesys-Gemeinde, ich habe folgendes Problem und bitte um Hilfe: Um eine auf meinem dem Raspberry Pi laufende Steuerung ohne große Mühe duplizieren zu können, habe ich mir ein Image der SD Karte mit Win32 Diskimager erstellt. Dieses konnte ich bisher ohne weitere Probleme auf eine weitere Micro-SD karte ausrollen. Anschließend habe ich mich via Putty auf den PI geschaltet, die vorherige Lizenz (die ja für den vorheringen PI zulässig war) gelöscht über - sudo su - rm -r /var/opt/codesys/cmact_licenses/ - reboot Um dann via Codesys 3.5 SP16 Patch 4 eine neue Lizenznummer ">>Tools>Lizenzmanager>Lizenz aktivieren" zu aktivieren und das wars. Durch die Umstellung des Lizensierungsverfahrens klappt diese Variante nun nicht mehr. Ich habe mir neue Lizenzen von Codesys gekauf, doch sobald ich diese in die Ticket-ID eintrage und aktivieren möchte bekomme ich folgende Fehlermeldung: ReturnCode: 403046401, An internal error has occured. Please try it again later. (siehe Bild im Anhang "Fehler_Codesys3.5V16.png") Ich habe dann meine Codesys-Version auf Version 3.5 SP20 geupdated und das selbe versucht mit dem Resultat, dass ich nun folgende Fehlermeldung erhalte: "Der ausgewählte Container "...." paßt nicht zu Ihrem Ticket. Bitte wählen Sie einen passenden aus." --> Siehe Bild im Anhang "Fehler_Codesys3.5V120.png" Was genau kann/muss ich tun, damit ich einfach wie bisher meine Steuerungen duplizieren kann? Verwendete Hardware: Raspberry Pi 3 Model B+ Verwendete Lizenz: Codesys Control Basic L Viele Grüße und Danke, Jan
Last updated: 2024-10-23
Post by scoob on ModbusFB - Slow Response Time
CODESYS Forge
talk
(Post)
Hello, I have been trying to use the ModbusFB functions so I can put some code into libraries, but it seems to be very slow for me. I have a Modbus device with 100ms registers. I previously setup 10 channels in the 'traditional' Modbus Slave with channels and mappings - and set a cyclic trigger at 100ms - this worked fine. I then tried the ModbusFB example, and setup reading the same 10 blocks of modbus addresses, copying the example and putting all of the requests into an array and triggering the requests sequentially. I timed how long the requests are taking to get round to each one, and it is around 1s 450ms. How do I speed this up to match the cyclic time? IF NOT(init) THEN init := TRUE; // Set the required IP address: ipAddress[0] := 192; ipAddress[1] := 168; ipAddress[2] := 1; ipAddress[3] := 10; // Pass the required IP address to the clinet FB: client_NetworkSwitch.aIPaddr := ipAddress; client_NetworkSwitch.udiLogOptions := (ModbusFB.LoggingOptions.ClientConnectDisconnect OR ModbusFB.LoggingOptions.ClientReceivedValidReplies); // Try to connect the client client_NetworkSwitch(xConnect:=TRUE); // Configure all the channels to read connecting them to the client: portStatus_Request(rClient := client_NetworkSwitch, uiStartItem := 4096, uiQuantity := 32, pData := ADR(portStatus), udiReplyTimeout := udiReplyTimeout); portSpeed_Request(rClient := client_NetworkSwitch, uiStartItem := 4352, uiQuantity := 32, pData := ADR(portSpeed)); flowControl_Request(rClient := client_NetworkSwitch, uiStartItem := 4608, uiQuantity := 32, pData := ADR(flowControl)); linkUpCounter_Request(rClient := client_NetworkSwitch, uiStartItem := 5888, uiQuantity := 32, pData := ADR(linkUpCounter)); txPacketCounter1_Request(rClient := client_NetworkSwitch, uiStartItem := 8192, uiQuantity := 100, pData := ADR(txPacketCounter1)); txPacketCounter2_Request(rClient := client_NetworkSwitch, uiStartItem := 8292, uiQuantity := 28, pData := ADR(txPacketCounter2)); rxPacketCounter1_Request(rClient := client_NetworkSwitch, uiStartItem := 8448, uiQuantity := 100, pData := ADR(rxPacketCounter1)); rxPacketCounter2_Request(rClient := client_NetworkSwitch, uiStartItem := 8548, uiQuantity := 28, pData := ADR(rxPacketCounter2)); txErrors_Request(rClient := client_NetworkSwitch, uiStartItem := 8704, uiQuantity := 64, pData := ADR(txErrors)); rxErrors_Request(rClient := client_NetworkSwitch, uiStartItem := 8960, uiQuantity := 64, pData := ADR(rxErrors)); // Trigger all client requests initially FOR clientRequestsCnt := 0 TO (SIZEOF(clientRequests)/SIZEOF(clientRequests[0]))-1 DO pClientRequest := clientRequests[clientRequestsCnt]; pClientRequest^.xExecute := TRUE; END_FOR // Prepare sequential trigger / control of client requests. clientRequestsCnt := 0; pClientRequest := clientRequests[clientRequestsCnt]; END_IF // Call the client to do request processing: client_NetworkSwitch(); // Now we trigger client request sequentially ... IF NOT pClientRequest^.xExecute AND NOT pClientRequest^.xDone AND run AND client_NetworkSwitch.xConnected THEN pClientRequest^.xExecute := TRUE; END_IF // .. and check result/error IF pClientRequest^.xExecute AND run AND client_NetworkSwitch.xConnected THEN IF pClientRequest^.xDone THEN // Prepare next trigger of client request (a rising edge of xExecute) pClientRequest^.xExecute := FALSE; IF clientRequestsCnt < SIZEOF(clientRequests)/SIZEOF(clientRequests[0])-1 THEN // next client request clientRequestsCnt := clientRequestsCnt + 1; ELSE clientRequestsIterationCounter := clientRequestsIterationCounter + 1; clientRequestsCnt := 0; END_IF pClientRequest := clientRequests[clientRequestsCnt]; END_IF END_IF I did try a semi-coded way using the IoDrvModbusTCP library, and setting the slave com settings, then 10 commands and 10 requests, then using a TP on xDone as a pause, before triggering another request - this is time the delay is around 120ms - so the device is fine with the speed, just something I am doing wrong in the ModbusFB method I am sure.
Last updated: 2024-04-26
Post by ryandmg on Web Client (HMI) Disconnects from Webvisu (Weidmuller u-OS)
CODESYS Forge
talk
(Post)
Hey Everyone, I'm having a bit of a struggle finding settings that will reliably maintain a connection between the webvisu and a touchscreen client. Every so often the HMI disconnects and will perpetually display the red spinning arrow with the "Error Happened, Will resume automatically" text. Power cycling the HMI to force a reconnect will re-establish comms. It seems to happen during periods of inactivity if that's a clue. From what I've gathered so far this seems to have something to do with the webvisu update rate, buffer size as well as the visu task scan rate. We first tried the default settings as follows: Webvisu Update Rate: 200 ms Webvisu Buffer Size: 50,000 Visu Task Scan Rate: 100 ms Priority 31 Other Tasks for Reference: Main Task Scan Rate: 100 ms Priority 1 Alarm Manager Scan Rate: 50 ms Priority 31 Ethercat Task: 4 ms Priority 1 This would disconnect some what regularly. We then made the following changes to try and stabilize: Webvisu Update Rate: 150 ms Webvisu Buffer Size: 75,000 Visu Task Scan Rate: 75 ms Kept other tasks the same. This seems to disconnect even more frequently. Also for reference the network is very small and only consists of the PLC, a small switch and the HMI. We're also not controlling frames from outside the visu program itself. The frame changes are all done natively. Any suggestions to get this to stop disconnecting? Oh and whatever the issue is the log does not record it. Figured I would ask here before opening a ticket. Thanks in advance for your help!
Last updated: 2023-09-06
Post by gallusrrr on usb2can in Codeysy 3.5 Can Gateway
CODESYS Forge
talk
(Post)
Hallo und guten Morgen, Ich danke für die Rückmeldung. ich habe das oben geschriebene durchgeführt und auch festgestellt das mit die Commandos für die Can befehle noch fehlen. (Google angeschmissen und geschaut auch gefunden) sudo apt-get install can-utils (damit auch jemanden anders der Post hilft) Anschließend habe ich das CAN System komplett aufgebaut so das ich mit einen anderen CAN Adapter schauen konnte ob die Nachricht auch ankommt. die Nachricht kommt an :) danach habe ich follgende Ausgabe: pi@Codesys:~ $ sudo ip -s -d link show can0 3: can0: <noarp,up,lower_up,echo> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10 link/can promiscuity 0 allmulti 0 minmtu 0 maxmtu 0 can state ERROR-ACTIVE restart-ms 0 bitrate 250000 sample-point 0.875 tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1 brp 12 gs_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp_inc 1 clock 48000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 tso_max_size 65536 tso_max_segs 65535 gro_max_size 65536 parentbus usb parentdev 1-1.4:1.0 RX: bytes packets errors dropped missed mcast 3549 819 0 0 0 0 TX: bytes packets errors dropped carrier collsns 32 4 0 0 0 0</noarp,up,lower_up,echo> (Sorry habe kein Speicherplatz im Web um Bilder anzuzeigen..) man kan sehen das die Nachricht abgeht und auch 32 Byte Empfangen worden sind. Die nachricht ist auch am anderen CAN Adapter sichtbar gewesen. Wie bekomem ich den einrichteten Adapter in Codesys rein? das ich den Befehl sudo ip link set can0 up type can bitrate 500000 das ich die Einrichtungs des Can Adapters noch in die Rasperry Start rutine nehmen muss ist mir klar. Ich bedanke mich .
Last updated: 2024-01-18
Post by micik on Using Codesys example problems
CODESYS Forge
talk
(Post)
Hello to all, I'm totally new to Codesys, but I do have some PLC programming experience, mosty with Siemens TIA and STEP7. I have just installed Codesys 3.5. sp19 and I have downloaded example with Ethernet Rockwell 1734AENT. The example can be found here: https://forge.codesys.com/prj/codesys-example/rockwell-1734-c/home/Home/ After opening, I had to manually update devices (Device, Ethernet, IP Scanner, EthernetIP adapter). However, when trying to build the project, I get the following errors: [WARNING] CODESYS_EtherNetIP_Rockwell1734AENT: Library Manager [Device: PLC Logic: Application]: C0100: Library System_VisuElemXYChart has not been added to the Library Manager, or no valid license could be found [WARNING] CODESYS_EtherNetIP_Rockwell1734AENT: Library Manager [Device: PLC Logic: Application]: C0100: Library system_visuinputs has not been added to the Library Manager, or no valid license could be found [ERROR] iodrvethernetip, 4.4.1.0 (3s - smart software solutions gmbh): ServiceCycle [IoDrvEtherNetIP]: C0040: Function 'ProcessUpdateConfigurationQueue' requires exactly '1' inputs [ERROR] iodrvethernetip, 4.4.1.0 (3s - smart software solutions gmbh): IoDrvStartBusCycle [IoDrvEtherNetIP]: C0040: Function 'GenerateRandomUINT' requires exactly '2' inputs [ERROR] iodrvethernetip, 4.4.1.0 (3s - smart software solutions gmbh): Cyclic [GenericServiceUnConnected]: C0040: Function 'GenerateRandomUINT' requires exactly '2' inputs [ERROR] cip object, 4.4.1.0 (3s - smart software solutions gmbh): ForwardOpenService [ConnectionManager]: C0040: Function 'GetAssemblies' requires exactly '3' inputs [ERROR] iodrvethernetipadapter, 4.4.0.0 (3s - smart software solutions gmbh): ServiceCycle [IoDrvEtherNetIPAdapter]: C0040: Function 'GenerateRandomUINT' requires exactly '2' inputs [ERROR] iodrvethernetip, 4.4.1.0 (3s - smart software solutions gmbh): SetupStructuredIOMapping [RemoteAdapter]: C0040: Function 'MallocData' requires exactly '1' inputs [ERROR] iodrvethernetip, 4.4.1.0 (3s - smart software solutions gmbh): SetupStructuredIOMapping [RemoteAdapter]: C0040: Function 'MallocData' requires exactly '1' inputs Compile complete -- 7 errors, 13 warnings Build complete -- 7 errors, 13 warnings : no download possible! What could be the reason for this errors and how to rectify them? Thank you!
Last updated: 2024-02-01
Post by westcountryewe on ac_persistence not working when creating a Boot Application but works with a Direct Download to the PLC
CODESYS Forge
talk
(Post)
I am using V3.5 SP18 Patch 5. I have noticed that when I Create a Boot Application from CODESYS, and upload this to my PLC via a USB stick the AC_Persistence does not work and none of my values that are in my PersistenceChannel are retained. However, if I connect direct to my PLC and I perform a direct download of my CODESYS program, my values that are in my PersistenceChannel are retained and work as they should. This makes me wonder if there are files that are missing when a Boot Application is created. I have tried taking a backup of my configuration files after performing a direct download, which gives me the plclog.zip folder, and appears to have the ac_persistence folder present within the file structure, however when I replace the plclogic.zip with the same folder that was created when I created a Boot Application, it still does not work but I wonder whether this is because the ac_persistence folder isn't stored in the correct location for reading. The .app and .crc files are embedded within the plclogic.zip folder, which obviously when uploading need to be standalone files in the root directory of the USB, so the intention there is clearly to extract the .app and .crc files and put them into the correct location within the USB. I wonder if it could be the same for the ac_persistence folder? I have tried moving it to different locations but none have worked. Has anybody else discovered a fix for this? I know the short-term solution is to do a direct download to the PLC but there are some logistical reasons why this isn't neccesarily the best solution for us.
Last updated: 2024-02-27
Post by superjojo2002 on Licensing info not available.
CODESYS Forge
talk
(Post)
I updated the docker container runtime to version 4.11.0.0. and build the container with this "Dockerfile" FROM arm64v8/debian:11.6 RUN apt-get update RUN apt-get install -y wget sudo unzip libusb-1.0-0-dev procps ENV CDS_VERSION "4.11.0.0" ENV EDGE_VERSION "4.11.0.0" ENV URL "https://store-archive.codesys.com/ftp_download/3S/LinuxARM64/2302000039/$CDS_VERSION/CODESYS%20Control%20for%20Linux%20ARM64%20SL%20$CDS_VERSION.package" ENV EDGE_URL "https://store-archive.codesys.com/ftp_download/3S/EdgeGatewayLinux/000120/$EDGE_VERSION/CODESYS%20Edge%20Gateway%20for%20Linux%20$EDGE_VERSION.package" RUN wget --output-document=/tmp/codesys.package $URL && \ unzip -p /tmp/codesys.package '*codemeter*.deb' > /tmp/codemeter.deb && dpkg -i /tmp/codemeter.deb && \ unzip -p /tmp/codesys.package '*codesyscontrol*.deb' > /tmp/codesys.deb && dpkg -i /tmp/codesys.deb RUN wget --output-document=/tmp/edge.package $EDGE_URL && \ unzip -p /tmp/edge.package '*arm64.deb' > /tmp/edge.deb && dpkg -i /tmp/edge.deb EXPOSE 11740 1217 11743 ENTRYPOINT ["/bin/sh", "-c" , "/etc/init.d/codemeter start && /etc/init.d/codemeter-webadmin start && /etc/init.d/codesyscontrol start && /etc/init.d/codesysedge start && tail -f /dev/null"] Now cmu -x" returns root@sensoredge-field-netfield-produktmanagment:/# cmu -x cmu - CodeMeter Universal Support Tool. Version 8.00 of 2023-Nov-28 (Build 5967) for Linux/ARMHF 64-Bit Copyright (C) 2007-2023 by WIBU-SYSTEMS AG. All rights reserved. But still CODESYS development system reports that it needs a dongle and when I click install that "value cannot be null. Parameter name: containerToLicenses" It seems that Codemeter is forced to look for a dongle instead of a CMsoftcontainer. Can you confirm that CODESYS licensing works also when CODESYS is installed in a Docker container?
Last updated: 2024-03-21
Post by manuknecht on Maximum dynamic limits of MC_MoveLinearAbsolute and MC_MoveLinearRelative
CODESYS Forge
talk
(Post)
Hello all I use an axis group with two linear axes in a kinematic system. Using MC_MoveLinearAbsolute and MC_MoveLinearRelative, I am trying to realise dynamic movements (set velocity: 1 m/s, set acceleration: 30 m/s^2) with the highest possible jerk, as I want to compare this with a movement with a trapezoidal velocity profile. However, my measurements show that the axes accelerate with a maximum jerk of approx. 800 m/s^3, even if the value in the function block was set to 10,000 m/s^3. I have already increased the dynamic limits of the two axes accordingly (Velocity: 5000 u/s, Acc-/Deceleration: 250'000 u/s^2, Jerk: 100'000'000 u/s^3, where 1 u = 1 mm), but this had no effect. I have checked the input parameters of the function blocks and the VelFactor, AccFactor and JerkFactor factors are all set to the maximum (value 1). Reducing the cycle time has resulted in a higher jerk, but as we are already working with a cycle time of 1 ms, there is nothing more that can be done here. The axes themselves are still a long way from drawing the maximum current, which is why I assume that this should not be a problem either. Are there other factors or parameters that influence the dynamic limits and therefore allow faster movements? The PLC I am using is a Raspberry Pi 4 and Codesys V3.5 SP20 with all libraries up to date. Thanks in advance Manuel
Last updated: 2024-05-08
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.