Post by thomas-moba on "sudo"-Befehle über die Funktion "SysProcessExecuteCommand2"
CODESYS Forge
talk
(Post)
Hello, I need to execute "sudo" commands via CoDeSys 3.5 SP 19 P5 using the "SysProcessExecuteCommand2" function. Commands without sudo are no problem, but as soon as sudo is used in a .sh or a single command, it does not work. Command=AllowAll is entered under "SysProcess" in CODESYSControl.cfg. Nevertheless it does not work. Does anyone know what the problem could be? Greetings, Thomas
Last updated: 2024-02-01
Post by thomas-moba on "sudo"-Befehle über die Funktion "SysProcessExecuteCommand2"
CODESYS Forge
talk
(Post)
Hallo Herr Schwellinger, vielen Dank für die Antwort. Leider hat auch das weglassen des "sudo"-Befehls kein Erfolg. Folgendes passiert: Bild 1: Befehl in der Konsole eingegeben ohne sudo; Uhrzeit wird nicht gestellt (keine Berechtigung). Bild 2: Befehl mit sudo ausgeführt, Uhrzeit wird gestellt. Bild 3: Befehl ohne sudo von CoDeSys aus ausgeführt; Rückgabewert gibt die Uhrzeit an, die eingestellt werden sollte, Uhrzeit wird jedoch NICHT eingestellt. Haben Sie noch eine Idee was es sein könnte?
Last updated: 2024-02-02
Post by elektron785 on CAN-Bus in Demo-Version
CODESYS Forge
talk
(Post)
Hallo, wie verhält es sich mit der Demo-Version und Datenübertragung z.B. via CAN-Bus. Der Bus läuft, das Device befindet sich im Zustand "Operational" aber es werden keine Daten von der Soft-SPS empfangen. Ich benutze aktuell eine nicht lizenzierte Version von CoDeSys Control for Linux ARM64SL. Normalerweise sollte die Demo-Version uneingeschränkt laufen - also kann ich davon ausgehen, dass es sich um einen Programmierfehler handelt oder ist die Feldbusfunktion ohne Lizenz doch in irgendeiner Form eingeschränkt verfügbar (außer dem 30 Minuten Limit nach Reboot)?
Last updated: 2024-02-06
Post by suthesan on Error when I go online on Simulation or PLC
CODESYS Forge
talk
(Post)
Hello I not sure if I made this topic under the right category. But I have a error, when I try to run a simple code on simulation or PLC. I have also tried to make a fresh project. I am testing the PLC and want to see if there is some way I can make an actuator run. Please help by looking at the picture, Iam stuckd and I don't know how to fix it.
Last updated: 2024-02-07
Post by tvm on VisuFbFrameBase.SetInputPositionData: The element id for the input position cannot be determined
CODESYS Forge
talk
(Post)
I'm getting this error on one of my projects. Searching for it I came across this https://www.codesys.com/fileadmin/data/Images/System/Releaseinformation/Patch-Note-CODESYS-Visualization-4300.html which says it was a bug VIS-1394, fixed in Visualization 4.3.0.0. I'm using a previous visu version, what is the cause of this error, and what can be done to work around it?
Last updated: 2024-02-08
Post by john-martin on Control SL Extension Package doubts
CODESYS Forge
talk
(Post)
Hello everybody, I'm trying to understand the SL control extension package, more specifically, the external IODriver example, because C integration is very easy and I just made my first C component successfully. Ther External IODriver has no documentation and it's not clear how to proceed. Furthermore, there is no information on how to modify the device descriptor, which is necessary to import the device into the Codesys repository. Any advice ? Thank you in advance and best regards.
Last updated: 2024-02-28
Post by e60newbie on EVL/EVC auf IFM CR711S
CODESYS Forge
talk
(Post)
Hi, jain. wir haben mit IFM gesprochen. Sie sagen es liegt an Codesys selbst. Die Daten seien anscheinend nicht konsistent wenn das Projekt zu und erneut geöffnet wird, sei ein probkem von SP11. IFM wird im Sommer ein neues Package rausgeben wo sie auf eine neue CS Version wechseln, dort soll das Problem dann behoben sein. Wir haben zwar einen Workaround rausgefunden aber jenachdem was du in der Safety treibst geht dieser dann nicht mehr. schreib mir zur not eine PN wenn du mehr wissen willst.
Last updated: 2024-02-28
Post by alexgooi on Disable OPC-UA server
CODESYS Forge
talk
(Post)
Dear Forum, I recently updated to the newest Codesys IDE (3.5 SP19 patch 5) The program wouldn't download cause of the amount of OPC-UA server tags (see picture) I'm not planning on using the OPC-UA server and therefore I unchecked the "Support OPC-UA features" checkbox in the symbol configuration. But this didn’t solve the issue of the OPC-UA server exceeding its license. How can I disable the OPC-UA server while still maintaining the symbol configuration. Thank you in advance Alex
Last updated: 2024-03-01
Post by dominggus on Recipe Manager - RecipeManCommands, load & write wrong values, Bug?
CODESYS Forge
talk
(Post)
I still have the same problem even when updating to CODESYS Recipes 4.3.0.0. My scenario: I'm trying to save/load an array of structs using the Visu: - Execute Command > "SaveRecipeAs" works properly - Execute Command > "LoadWriteRecipe" works not entirely: the structs of array[6] and array[7] should have been empty but were duplicates of array[4] and array[5]... the struct contains 26 variables and the array's length is 30.. Maybe there is a upper limit on recipe variable count?
Last updated: 2024-03-02
Post by stuartjr on Disabling forcing of specific variables
CODESYS Forge
talk
(Post)
OK.. so maybe I miss understood for how the forcing order works. It seems that the force list is applied at the beginning of every task call (I'm assuming this based on what I am seeing). If I force my variable FALSE and then write it TRUE in a task, then it stays TRUE for that task, but then in the next task it will go back to FALSE.
Last updated: 2024-03-15
Post by mp9876 on Device User Logon
CODESYS Forge
talk
(Post)
Hi everyone, Had that problem before where I could not create another user but used the method just above and it worked great. My problem now is that I get this message when attempting to logon to the device: invalid user authentication on the target dev5, the new user created is pretty much a copy of the user 'Owner' except for the password. Any idea as to why I am always getting this "invalid user authetication on the target" message ? Using Codesys V3.5 SP19 Patch 6 + (64 bit) Regards
Last updated: 2024-03-16
Post by tama00 on Raspberry Pi 4 als SPI Slave
CODESYS Forge
talk
(Post)
Hallo zusammen, grundsätzlich sollte ja die Möglichkeit bestehen den Raspberry auch als SPI Slave zu nutzen. Leider habe ich kein entsprechendes Projekt gefunden, bei dem dies der Fall war. Kann mir jemand dabei weiter helfen, wie ich bei Codesys Control for Raspberry , die Konfigurationen für den SPI Slave machen kann? Der Master soll ein Microkontroller sein von einem anderen Gerät sein. Ich arbeite noch mit 4.10.0.0 und einem Raspberry Pi 4 Vielen Dank und liebe Grüße
Last updated: 2024-03-19
Post by andy-yemm on Assertion Failed
CODESYS Forge
talk
(Post)
I had similar assertion failed error messages today. I am fairly new to Codesys. I tried using SFC for the first time, I usually use ST. Anyway I had errors in some of my transitions. I copied and pasted transition code and forgot to change the target of the code. I started getting lots of the assertion errors but now I have sorted out the problems and it compiles OK the assertion error messages seem to have stopped. There do not seem to be any other responses to your post, did you resolve your problem?
Last updated: 2024-03-19
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
Post by wind-11 on Simulation Modubus
CODESYS Forge
talk
(Post)
Hallo zusammen, ich bin über die Arbeit auf ein Problem in der Simulation gestoßen. In einem Test-Projekt haben wir eine Modbus Verbindung aufgebaut. Dies wollten wir mit Test-Werten simulieren. Verbindung hat auch funktioniert, jedoch sind leider die Werte eingfrohren und melden keine "laufenden Daten". (Bild im Anhang) Da es meine ersten Berührungspunkte mit Codesys sind und mein Kollege an anderer Stelle weiter arbeitet, hatte ich gehofft, dass vielleicht hier jemand eine Idee hat. MfG und schon jetzt ein Danke vorweg.
Last updated: 2024-03-22
Post by timo on Backup / Restore über HMI?
CODESYS Forge
talk
(Post)
Hallo, Über die Benutzeroberfläche von Codesys 3.5 kann ich unter Backup/Restore eine tbf-Datei erzeugen und laden. Ich suche nach Möglichkeiten beide Schritte über meine HMI durchzuführen, um z.B. ein Backup über die HMI auf der SPS oder einer SD Karte zu speichern und ebenfalls über die HMI ein Backup von dort oder von einer SD Karte zu laden. Ich habe bisher leider gar nichts im Netz dazu gefunden. Hat da jemand einen Tipp für eine Bibliothek oder ist das eher herstellerspezifisch gelöst, dass ich dort nachhaken sollte? Danke im Voraus.
Last updated: 2024-03-26
Post by schnepper on Error building Extension SDK Linux code
CODESYS Forge
talk
(Post)
I'm installed the CODESYS Control for Linux SL package and am trying to use the Extension API to call a simple C function. When I get to the step to run "make all" on the Linux machine, I get the error: build interface header: out/CmpFirstTestItf.h from CmpFirstTestItf.m4 ERROR: This functionname does not contain _cext (this is mandatory, see help for details): DEF_API(void',CDECL',external_struct__fb_init',(external_struct_fb_init_struct *p)',1,0x1F77E075,0x00000001) Why does "Generate Runtime System Files" create a function that does not have cext in the name? What am I missing?
Last updated: 2024-04-01
Post by amy123 on Alarm Manager Project Doesn't Open Successfully
CODESYS Forge
talk
(Post)
Hello, when I download AlarmManager.project from https://forge.codesys.com/prj/codesys-example/alarm-manager/home/Home/, it gives an error when I open it. If I ignore the warning and continue to open, the alarms are missing. ** Exception Text ** System.ArgumentNullException: Value cannot be null. Parameter name: first at _3S.CoDeSys.ControlsContrib.Utilities.WeakMulticastDelegate.Invoke(Object[] args) at _3S.CoDeSys.ControlsContrib.Controls.WizardControl.OnFinishClick(EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Last updated: 2024-04-04
Post by rossanoparis on RevPi CONNECT+, CODESYS, EtherCAT master "Filedbus lost synchronicity"
CODESYS Forge
talk
(Post)
Hello @rmaas I assume, you've already verified and tuned everything regarding the EtherCAT network. In my case the problem was due to a wrong core assignement. I suggest to not use the core #0 for your EtherCAT task. The OS realtime patch, which is present on RevPi OS, uses the core #0 for its porpouses and it mustn't be used by any other task which requires realtime and deterministic features. regards Rossano
Last updated: 2024-04-11
Post by tib0r on c2iec - translating C to ST
CODESYS Forge
talk
(Post)
I was looking for a transpiler from some more widely used general programming language into ST. It was not easy but I found this :) https://forge.codesys.com/tol/c2iec/home/Home/ Does anybody use it for a programm/library of a couple of hundred lines or more? How does one go about using the output? Is there a “converter” into the Codesys IDE? PLCOpenXML? Would there be interest in this? tib0r
Last updated: 2024-04-20
Post by yongchaow on Can't connect to Device Raspberry Pi 4 from CODESYS IDE V3.5 SP19
CODESYS Forge
talk
(Post)
Hi, eschwellinger, I have the same problem, but I can not resolve the problem following this forum. There are my situation: pi@RevPiXXXX:~ $ uname -a Linux RevPiXXXX 5.10.120-rt70-v7l #1 SMP PREEMPT_RT Thu, 28 Jul 2022 10:36:48 +0200 armv7l GNU/Linux After "top": It looks like runtime is not running. One more piece of information to refer to, when I reboot the device it is possible to scan the device. Looking forward your reply.
Last updated: 2024-04-25
Post by umair on Code for reading 4 address to get 1 value of sensor (Ethernet IP)
CODESYS Forge
talk
(Post)
Hi all, I want to ask, how do I write code to read multiple address for Ethernet IP communication protocol? Because this multiple address will produce one reading of a sensor that I am currently using. I want to read the value of the sensor. https://global.discourse-cdn.com/business6/uploads/wago/original/1X/7a79f4ad7ce474b9383b8550356d984defd9f3a0.png The addresses are in Byte. The 4 addresses are 89,90,91,92. Thanks in advance. Best regards, Umair
Last updated: 2024-05-06
Post by yannickasselin on How to sort JSON object in codesys
CODESYS Forge
talk
(Post)
Just adding: sSubscriberdata := ''; Right before your memcopy should fix the extra characters. It is because your are copying 36 characters into a string which can contain more than 36 characters and there is garbage left in the extra characters. Regarding the parsing of json, I usually build a structure that mirrors the json data and use the available methods in the IIoT library to parse the data and fill the structure.
Last updated: 2024-05-08
Post by shebi87 on Program from one PLC to other WAGO 750-8204
CODESYS Forge
talk
(Post)
Hello Everyone, 750-8204 was installed on a machine and it becomes faulty. We have arrange a new PLC from local market we don't have PLC program but thanks to our other machine which has the same PLC running I want to upload the program from that running PLC and download it to new PLC can anyone tell me the procedure please?
Last updated: 2024-05-21
Post by ndzied2 on Rounding error in simple addition
CODESYS Forge
talk
(Post)
This is a consequence of how computers store floating point numbers. 0.1 cannot be exactly represented in a computer. This is not a CoDeSys thing. Here is a link to a converter to show you the exact value that is represented when you use a REAL data type (which is a 32 bit float). https://baseconvert.com/ieee-754-floating-point If you really need to keep track of 0.1 increments. use INT OR DINT and then add 1 each time and assume that there is one decimal place.
Last updated: 2024-05-24
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
.