Hello! Opening a project from a python script given at the CODESYS command line does not work for me with a file based storage project. Example: Running projects.open("test.project", primary = True) works but converting the project to a file based storage project and then give the folder name as an argument to project.open Running projects.open("test.fbsproj", primary = True) does not work. We decided to work with file based storage for the project. Is there a scripting API for file-based storage...
Hello! Opening a project from a python script given at the CODESYS command line does not work for me with a file based storage project. Example: Running projects.open("test.project", primary = True) works but converting the project to a file based storage project and then give the folder name as an argument to project.open Running projects.open("test.fbsproj", primary = True) does not work. We decided to work with file based storage for the project. Is there a scripting API for file-based storage...
A task in CODESYS normally is a task of the underlying operating system. If your os is preemptive and the sheduler is configured accordingly a CODESYS task will be preemptive too.
Export excel file into csv format and then read into CODESYS.
Hello! One can create a symbol config entry in CODESYS by using create_symbol_config in a python script. Is there a way to create the xml symbol config file (!) from within a python script without going online? Thank you!
There are some ways. One is to use SHR and SHL and it depends on your byte order in the data array. For Motorola byte order: PROGRAM PLC_PRG VAR u : UINT; byte_array_in : ARRAY [1..8] OF BYTE := [16#11, 16#12, 16#13, 16#14, 16#15, 16#16, 16#17]; byte_array_out : ARRAY [1..8] OF BYTE; END_VAR u := SHL(TO_UINT(byte_array_in[2]), 8) + TO_UINT(byte_array_in[1]); byte_array_out[1] := TO_BYTE(u); byte_array_out[2] := TO_BYTE(SHR(u, 8)); If it's Intel byte order just change 1 and 2 in the array indexes...
There are some ways. One is to use SHR and SHL and it depends on your byte order in the data array. . For Motorola byte order: PROGRAM PLC_PRG VAR u : UINT; byte_array_in : ARRAY [1..8] OF BYTE := [16#11, 16#12, 16#13, 16#14, 16#15, 16#16, 16#17]; byte_array_out : ARRAY [1..8] OF BYTE; END_VAR u := SHL(TO_UINT(byte_array_in[2]), 8) + TO_UINT(byte_array_in[1]); byte_array_out[1] := TO_BYTE(u); byte_array_out[2] := TO_BYTE(SHR(u, 8)); If it's Intel byte order just change 1 and 2 in the array index...
Using < br > did it for me in CODESYS 3.5.19 // 2023-12-05 Line 1<br> // 2023-12-06 Line 2<br> shows up in Library Manager with line breaks.
Using did it for me in CODESYS 3.5.19 // 2023-12-05 Line 1<br> // 2023-12-06 Line 2<br> shows up in Library Manager with line breaks.
Good morning! Is there a way to run a python script or something else automatically after CODESYS (3.5) did its build or before download? I am searching for something like the Custom Build steps in Visual Studio. Thank you! Voffi
Good morning! Is there a way to run a python script or something else automatically after CODESYS did its build or before download? I am searching for something like the Custom Build steps in Visual Studio. Thank you! Voffi