Activity for ludecus

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Es scheint so, als wäre der Timestamp als ULINT kodiert. Keine Ahnung ob es funktioniert, aber du kannst ja mal versuchen mit der SysTime.Lib den Wert in ein Date_And_Time zu formatieren.

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Hallo fludwig, Hierfür gibt es 2 Lösungen: Du arbeitest, wie du bereits angefangen hast, im CodeBehind. Den rTestString musst du lediglich über die DELETE beschneiden. nPosSeperator := FIND('.',rTestString); rTestString := DELETE(rTestString,LEN(rTestString)-nPosSeperator,nPosSeperator); So oder so ähnlich müsste es aussehen. Ich hab es nicht getestet. Du arbeitest im FrondEnd. Verwende einfach 2 Text Fields. Mit den State Varibales kannst du das nicht benötigte Element ausblenden. Dabei kannst du...

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Hallo noob, hast du mal versucht, den Namespace der Lib bei der Deklaration anzugeben? Woher sollte der Interpreter auch wissen, dass die Struct in der Lib definiert ist. http_result : HTTP.HttpResult;

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    I don't understand your point. Please use the dereference of a pointer to address the variables. IF _pointer<>0 THEN // check pointer has a reference _pointer^.Member_1 := TRUE; // access the variables by dereference _pointer^.Member_2 := 1; END_IF

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Hello mrsanderz, sorry i have no clue but maybe a option for you. Remove the Targetvisu from the application tree and use the Webvisu instead. The Webvisu could be used whenever needed. Best regards, Ludecus

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    Thanks for your response. Unfortunately you misunderstood my needs. I was looking for a Function like ANY_TO_STRING not DINT_TO_STRING. As you can see in the attached project, the ANY-type needs to be decoded firstly in a IEC datatype.

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Es scheint mir stark so, dass du die FB nicht deklarierst oder aufrufst. VAR instFb : Function_Block_A; END_VAR instFb();

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    The simplest way to do so is to use a Frame of the CODESYS Visu Element list. https://help.codesys.com/webapp/_visu_elem_frame;product=core_visualization;version=3.5.17.0 The Frame requires a Switch frame variable as INT. Somewhere in your code, each press could increase the linked variable. BTW: Most of the Visualizations use a code behind.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    While you need to work with array, there are two options: Declare a dynamic array size as input of the function (maybe it could require a FB instead) VAR_IN_OUT arrData : ARRY * OF WORD; END_VAR During the compile the size of the dynamic array will be scaled. Or you could use a pointer VAR_INPUT parrData : POINTER TO WORD; nDataSize : UINT; END_VAR Within the function or FB the pointer should be handled. At least both ways are more generic, if the array size has been changed.

  • ludecus ludecus modified a comment on discussion Visualization 🇬🇧

    Please try this VisuElems.cmpDynamictext.DynamicTextGetDefaultText(ADR(_sTextList),ADR(_sTextIndex))

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Try to use this VisuElems.cmpDynamictext.DynamicTextGetDefaultText(ADR(_sTextList),ADR(_sTextIndex))

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Hallo Ton, we use the GetText function of the TextListUtils (TLU) library. The function returns the text in the activated language. In case the text doesn't exist in this language the function gives the text in the default language. TLU.GetText(_sTextList,_sTextIndex,ADR(_sTranslatedText),SIZEOF(_sTranslatedText)); We do have 2 default languages and the third language is country-specific. We simple replace the .txt file on the target device.

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Dear Kevin, you can extract those elements into a library. Within the library you could hide elements from the editor by setting the property internal

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    For sure, your PM generator is pretty wrong. The device tree should look like the attachment. I use 3 persistence channels device, system and operating.

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    For sure, your PM generator is pretty wrong. The device tree should look like in the attachment. I use 3 persistence channels device, system and operating.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    For sure, the persistence manager generator is pretty wrong. The device tree should look like in the attachment. I use 3 persistence channels device, system and operating.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    What's the version of your CODESYS IDE? I worked at latest with the 3.5 SP17 Patch 0, where the persistence manager surely worked. The instruction you described is fully correct and should work. Please contact CODESYS with your issue.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    Please keep in mind, that there are also an CODESYS Persistence Manager, which could stores the persistence variables in a file. It's possible to control the persistence process. https://help.codesys.com/webapp/ac_pm_persistencemanager_module;product=core_Application_Composer;version=3.5.17.0

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Zur ersten Frage: Die Runtime ist verschlüsselt. Für das Projekt kann man innerhalb des Projektes eine Benutzerverwaltung aktivieren. Zur zweiten Frage: Man kann die Dateien überschreiben. Die Applikation liegt im Ordner PlcLogic auf der SPS. Zur dritten Frage: In allen Versionen vor der 3.5.18.0 kann sich immer nur einer mit der SPS verbinden. Das ist natürlich unabhängig von der Benutzerverwaltung innerhalb einer Visualisierung.

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Wenn du statt der Function einen Function_Block benutzt, kannst du die Variablen während der Laufzeit anschauen.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    As i can see, the ApplicationA8 is activated and the ApplicationB6 is not. Therefore the compiler doesnt call those POUs.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    dear codesys colleagues, i looked for a function that converts the value of the any variable into a string. While i couldn't find a library or at least some documentations for this case, i written my own function. Hints or improvements are welcome!

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    In CODESYS the IF is a statement. So the semicolon after the END_IF is needless. Only for assignment or calls is a semicolon required.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    To be honest, i love to pass a boolean as the return value for methods. Therefore i could simple call the method as a condition in IF statements. IF iDevice <> 0 AND_THEN iDevice.mReadValues() THEN <instrcutions>; END_IF

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    Just as hint: For reference/pointer/interface checks you could also use AND_THEN IF itfInterface<>0 AND_THEN itfInterface.Method THEN <instructions>; END_IF IF pointer<>0 AND_THEN pointer.value THEN <instructions>; END_IF

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    I do see two options: Firstly, you could create a frame, where the menu bar is located in the defined position (use a codesys frameswitch). The content is located in a smaller area within a second frameswitch. While the frames doesnt need the menu bar, you dont need to lock them. (If you don't want other users to edit the menu bar, you could locate the menu bar into a accessible library.) Secondly, if the first option is not possible, you might overwrite the absolute movement value x and y with a...

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    You might share the whole library with us, otherwise it's impossible to help.

  • ludecus ludecus modified a comment on discussion Visualization 🇬🇧

    A lovely visualization element for the page handling is the basic element FRAME of the toolbox. After you insert all your pages and linked the switch frame variable (int start by zero), you could easily handle the page you want to show with IEC code.

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    A lovely visualization element for the page handling is the basic element FRAME of the toolbox. After you insert all your pages, the linked switch frame variable (int start by zero) you could easily handle the page you want to show with IEC code.

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    As i know, a pointer to program or to method had never worked. So they only fixed the documentation.

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    https://help.codesys.com/webapp/idx-scriptingengine;product=ScriptEngine;version=3.5.17.0 https://help.codesys.com/webapp/_cds_access_cds_func_in_python_scripts;product=codesys;version=3.5.17.0#beispiel-geratebaum-des-aktuellen-projekts-ausdrucken So etwas?

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Deklaration: VAR instanceFB : FB_Name; VAR_END Aufruf: instanceFB(); Jetzt kannst du in der Laufzeit die Werte auslesen. Das ist nicht spezifisch für CODESYS, jede mir bekannte IEC Programmiersprache arbeitet genauso. Bitte arbeite dich erst ein, bevor du solche Basic-Fragen stellst!

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    Whoho! If i get you right, it's still Object-oriented programming. Please inform yourself, adrian! Adrian, you can't pass a method or an action like that. If the second fb owns the first fb, it will look like that: FUNCTION_BLOCK SecondFB VAR firstFb : FirstFb; // local instance of the child class END_VAR // call a method of the child firstFb.SomethingCallable(); If the second fb doesn't know the first fb, you will need an interface. FUNCTION_BLOCK FirstFb IMPLEMENTS I_FirstFb FUNCTION_BLOCK SecondFB...

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    Whoho! If i get you right, it's still Object-oriented programming. Please inform yourself! You can't pass a method or an action like that. If the second fb owns the first fb, it will look like that: FUNCTION_BLOCK SecondFB VAR firstFb : FirstFb; // local instance of the child class END_VAR // call a method of the child firstFb.SomethingCallable(); If the second fb doesn't know the first fb, you will need an interface. FUNCTION_BLOCK FirstFb IMPLEMENTS I_FirstFb FUNCTION_BLOCK SecondFB VAR_INPUT ifirstFb...

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    This why we use the OOP of CODESYS. Simply use a interface instead. FB myPOU VAR_INPUT itfYourInterface : I_YourInterface; END_VAR itfYourInterface.SomethingCallable(); Best regards ludecus

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    This why we use the OOP of CODESYS. Simply use a interface instead. FB myPOU VAR_INPUT itfYourInterface : I_YourInterface; END_VAR itfYourInterface.SomethingCallable()

  • ludecus ludecus modified a comment on discussion Deutsch 🇩🇪

    Hallo Bernd, ich benutze auch die SysTimeRtc Lib v3.4.1.20, aber ein Problem ist mir noch nicht aufgefallen. Allerdings fallen mir 2 Wege ein, um das zu analysieren: 1. Schau mal, ob das RTS_IEC_Result für beide Methoden zum Zeitpunkts des Lags überhaupt Ok ist. 2. Prüf mal, ob der Lag in der SysTimeRtcGet oder in der Convert Function liegt. _dtSysTime := TO_DT(SysTimeRtcGet(_Result)); Vielleicht hilft dir auch die GetLocalDateTime vom TimerSwitch aus der Util lib weiter. Diese Bibliothek wird zumindest...

  • ludecus ludecus modified a comment on discussion Deutsch 🇩🇪

    Hallo Bernd, ich benutze auch die SysTimeRtc Lib v3.4.1.20, aber ein Problem ist mir noch nicht aufgefallen. Allerdings fallen mir 2 Wege ein, um das zu analysieren: 1. Schau mal, ob das RTS_IEC_Result für beide Methoden zum Zeitpunkts des Lags überhaupt Ok ist. 2. Prüf mal, ob der Lag in der SysTimeRtcGet oder in der Convert Function liegt. _dtSysTime := TODT(SysTimeRtcGet(_Result)); Vielleicht hilft dir auch die GetLocalDateTime vom TimerSwitch aus der Util lib weiter. Diese Bibliothek wird zumindest...

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Hallo Bernd, ich benutze auch die SysTimeRtc Lib v3.4.1.20, aber ein Problem ist mir noch nicht aufgefallen. Allerdings fallen mir 2 Wege ein, um das zu analysieren: 1. Schau mal, ob das RTS_IEC_Result für beide Methoden zum Zeitpunkts des Lags überhaupt Ok ist. 2. Prüf mal, ob der Lag in der SysTimeRtcGet oder in der Convert Function liegt. _dtSysTime := TO_DT(SysTimeRtcGet(_Result)); Vielleicht hilft dir auch die GetLocalDateTime vom TimerSwitch aus der Util lib weiter. Diese Bibliothek wird zumindest...

  • ludecus ludecus posted a comment on discussion Deutsch 🇩🇪

    Ja, dass kann geändert werden. Dafür muss aber die CurrentClientId verwendet werden. Siehe https://forge.codesys.com/forge/talk/Deutsch/thread/f14041c158/?limit=25. Dort werden die verschiedenen Client Ids gut erklärt. Man braucht dann für jedes Visu Element unterschiedliche Instanzen je client. Da hilft das Visualisierungselement ‚Frame‘. In die Elementeigenschaft ‚Umschaltvariable‘ wird die CurrentClientId verlinkt.

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    I plan to add Unit tests for our future application with the Test Manager. A framework allows me to test the most function blocks really easy. Unfortunately, i also have methods which use functions of System-dependent libraries. Best example is, that i need to synchronize my system time with a external clock: For the synchronization i currently use the SysTimeRtcSet function of the eponymous library. Each run of a test case for the synchronization method will call this function and manipulate my...

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    I plan to add Unit tests for our future application with the Test Manager. A framework allows me to test the most function blocks really easy. Unfortunately, i also have methods which use functions of System-dependent libraries. Best example is, that i need to synchronize my system time with a external clock: For the synchronization i currently use the SysTimeRtcSet function of the eponymous library. Each run of a test case for the synchronization method will call this function and manipulate my...

  • ludecus ludecus modified a comment on discussion Engineering 🇬🇧

    I plan to add Unit tests for our future application with the Test Manager. A framework allows me to test the most function blocks really easy. Unfortunately, i also have methods which use functions of System-dependent libraries. Best example is, that i need to synchronize my system time with a external clock: [img src=Screenshot 2022-02-28 231445.png] For the synchronization i currently use the SysTimeRtcSet function of the eponymous library. Each run of a test case for the synchronization method...

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    I plan to add Unit tests for our future application with the Test Manager. A framework allows me to test the most function blocks really easy. Unfortunately, i also have methods which use functions of System-dependent libraries. Best example is, that i need to synchronize my system time with a external clock: [-img src=Screenshot 2022-02-28 231445.png: missing =-] For the synchronization i currently use the SysTimeRtcSet function of the eponymous library. Each run of a test case for the synchronization...

  • ludecus ludecus posted a comment on discussion Engineering 🇬🇧

    We use the Persistence Manager to store system configurations in a file. An change request requires to change the data type of a variable from boolean to short integer. How could we handle the data type change without an inconsistence of the file? An extension of the file is possible, as long as the old file is correctly interpreted. The file could also be overwritten after reading.

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Good morning Marcel, thank you very much! Your solution works nicely, as it suppose to do. The image is shown now in the target and also in the webvisu. I'm speechless, but happy! Best regards, Ludecus

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Thanks for your answer. But you misunderstood. The image i want to have shouldn't be part of the lib. The image should be application specific.

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    The visualization in the IDE looks like this Unfortunately the target and Web shows no image.

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    Hey Marcel, Thanks for your support. I attach an example of our code as archive, which includes also a the library with the mentioned element. Friendly regards, Ludecus

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    We designed a library for customized visualization elements, according to our style guide. One of the elements is holding a placeholder for an image. The property Bitmap ID variable is linked with an input variable. Within the application these variable is successfully written. In the IDE the image is correctly shown with the image from the image pool of the application. On the target this image isn't shown. The image is correctly loaded on the target device. On the WebVisu this image isn't shown,...

  • ludecus ludecus posted a comment on discussion Visualization 🇬🇧

    I did search for any solutions of my issue, but i am not happy with the results. The issue: We use function blocks instances within a visualization. For the first time the frame is called, we would like to initialize some values or references. We typically use pragmas like call_after_init or the FB_Init method. Unfortunately these don't work in the visualization. Is there any way for?

  • ludecus ludecus posted a comment on discussion Visualization

    I use the VisuUserMgmt lib for the user management. Unfortunately some customers don't want to manage user rights, so they would like to deactivate the user mgmt. Is there any function within the VisuUserMgmt library? This library isn't well documented. Thanks for your help.

  • ludecus ludecus posted a comment on discussion Visualization

    I would like to have a list of customized elements which i could use template. For example, a radio button which could be selected, unselected or not selectable (if the user has no permission). Once if i did configurate such an element, i don't want to copy-paste it anywhere. Is there any way to set elements into the visualization toolbox? Thank for your support!

  • ludecus ludecus posted a comment on discussion Visualization

    Thanks for your response m.prestel. That's exactly what i need to do, but its not a good solution. The PLC_PRG would be just a helper, which i want to eliminate.

  • ludecus ludecus posted a comment on discussion Visualization

    Thank loraul for your sample. The method i would like to call is a method of a FB. Therefore your idea won't work. Okay, i could use a function as wrapper to call the method. But that's not a simple solution.

  • ludecus ludecus posted a comment on discussion Visualization

    Thank you for your response! Unfortunately this mouse click is - as all the other input configurations also - only an event. If the method or function runs more then one cycle, this wont work. Even if that would be bad while its hidden code. Or am i wrong? An other option would be, that the TextVariable would be linked to a cyclic called variable, e.g. Prg_Visu. There the variable could call a method or function until those is finished. But that will completely separate the functionality from the...

  • ludecus ludecus posted a comment on discussion Visualization

    I tried many things but i didn't solved my issue. In an visualization frame i would like to run a method by the mouse click event. If the button is clicked, the method should run (multiply cycles) until the method returns a value. My issue is, that i can't find a way within the frame. Do i really use to have a POU which handles the cyclic call? Isn't there any code behind within the frame possible? An other way is to use a separate HMI project and map with data sources. How can i map also methods?...

1