Personal Data

Username:
paulpotat
Joined:
2021-05-19 13:47:31+00:00

Projects

  • No projects to display.

Skills

  • No skills entered.

User Activity

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello, You can use the SysProcess library to run commands from CodeSys. You can use the SysProcessExecuteCommand2 to run a command and get its output in a string. For example if you wanted to wrap this function in your programm you could do the following : FUNCTION Run_Command VAR_OUTPUT Command_Output : STRING; END_VAR VAR command : STRING := 'ls -al /media/pi'; res : RTS_IEC_RESULT; END_VAR SysProcessExecuteCommand2( pszCommand := command, pszStdOut := Command_Output, udiStdOutLen := SIZEOF(Command_Output),...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello, I'm currently experimenting with the CodeSys Persistent Manager and I was wondering if it was possible to change the location of the code generated by the Persistent Manager module ? For example, I have this project structure : And after generating the project from the module tree I get this : I want to be able to put any file generated by the Persistent Manager in a dedicated folder like so : Is there a good way of doing that ? Because moving the files manually will be tedious and raises...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    up

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello everyone, I have a setup with a very slow internet connection between my PC and the PLC, and most of the time when I try to set the active path with the IP address of the PLC the scan times out and CodeSys raise an error "No device is responding to the scan request". Sometimes I get lucky and the scan and login works but it's very rare. Do someone know what is the timeout value used by CodeSys when trying to set the active path ? And is it possible to change this value ? Thank you for your...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    I'm glad it helped ! Also you should check out this post, there are other (maybe better) solutions for managing persistant variables :)

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello, I had problems with that too, what you can do is use the AppRestoreRetainsFromFile and AppStoreRetainsInFile functions from the CmpApp library. Basically, you can use them like so : application_ptr : POINTER TO CmpApp.APPLICATION; res : DINT; // Get application pointer application_ptr := CmpApp.AppFindApplicationByName('Application', ADR(res)); IF application_ptr <> 0 THEN // Restore the variables CmpApp.AppRestoreRetainsFromFile(application_ptr, '/home/pi/retains.ret'); // ... // Store the...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    I don't know if it's good practice, but I simply do this to manage the persistant variables in my program: application_ptr : POINTER TO CmpApp.APPLICATION; res : DINT; // Get application pointer application_ptr := CmpApp.AppFindApplicationByName('Application', ADR(res)); // Restore the variables CmpApp.AppRestoreRetainsFromFile(application_ptr, '/home/pi/retains.ret'); // ... // Store the variables CmpApp.AppStoreRetainsInFile(application_ptr, '/home/pi/retains.ret'); To answer your questions, sFilename...

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    It looks really useful, thank you ! If I understand correctly, this block monitors every array of my program simultaneously ?

View All