Post by richiemuia on Static Analysis, Loading Files via script.
CODESYS Forge
talk
(Post)
I've seen that you can use cmds like below to run SA from scripts. system.commands["staticanalysis", "run"].execute() But I would like to run different SA configuration files to create separate logs and cant find anywhere in the scripting engine if this is supported. This stems from if I turn on everything, SA stops reporting issues in the message log when the list gets over 600ish issues. Once we have done an initial clean up of code this wont be an issue, but I'm trying to get a baseline to track improvement.
Last updated: 2024-08-21
Post by nicopolux on Profinet RPC-call error
CODESYS Forge
talk
(Post)
Hello everyone Since I have installed Codesys 3.5.20sp2 I cannot get the profinet features working again. Now I get RPC Blocked during device scan (see attached file) and when online I get RPC-call error (see attached file). I run Codesys on the last version of Windows 11, Profinet ports have been added to Firewall rules, and even with disabled Firewall I get same result I really never seen that before Same result using another PC I already spent 2 days to find the issu without any success, I would appreciate some help, thank you! Nico
Last updated: 2024-08-22
Post by spilin on All devices lost for all installed version
CODESYS Forge
talk
(Post)
hello. After installing the latest version of codesys (3.5.20) from codesys installer, I had a problem. All my devices disappeared. Both PLCs and IO modules and network devices disappeared from my list. I browsed through the Windows files and I can find them in the programdata/codesys/devices folder. The files remain there, but they are not available within codesys (same error in all installed versions) which in this case are 3.5.16 and 3.5.19. Does anyone know how I can reimport or resynchronize my devices folder again? Thanks
Last updated: 2024-09-11
Post by thn-power on Codesys Communication Manger - Required information model version exists in the model repository but is not found
CODESYS Forge
talk
(Post)
Hi. Thanks for the answer. I think I found your post on the Wago forum. I have tried installing all different nodeset versions of the opcfoundation.org/UA but neither work. Though I could not find the nodeset version called 15.09.2021 anywhere online. The opcfoundation repository only goes back to version 1.04.11 2022-03-29. Also wondering how I can generate a custom information model that only refrences the latest version of nodesets?
Last updated: 2024-09-19
Post by garmusd on Raspberry Pi 5 GPIO not working.
CODESYS Forge
talk
(Post)
I paid money for the RPi runtime because the Product Description says that GPIO is supported. It is also written in the Versions that since 4.11 RPi5 is supported. And I use 4.13. Nowhere is it mentioned that GPIO is still not supported... It's a pity that the Codesys developers still can't find a way to fix it. Are there plans for when it will be fixed or are the developers too weak? Just wondering, is there anyone with a working GPIO? Can you share the details of your system?
Last updated: 2024-09-27
Post by ricardoteles97 on Trends Error: TrendStorageAccess: prvCheckForSizeLimit
CODESYS Forge
talk
(Post)
Hello, I currently have my trend configured with a maximum size limit of 5MB (additional settings can be seen in the attached image). However, I am encountering an error related to this trend, specifically within the TrendStorageAccess library. The device log shows the following message: TrendStorageAccess: prvCheckForSizeLimit (see the attached image for details). Does anyone know the reason for this error? Additionally, where can I find more information to troubleshoot this issue? Thanks in advance!
Last updated: 2024-10-16
Post by tk096 on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
Meanwhile, I would like to understand why the motion FB instances must still be called even after the Execute is set to FALSE, especially in view of the fact that the next instruction is programmed to abort the previous one, with BufferMode set to 'Aborting'. All these unnecessary FB calls are an unnecessary overhead on the CPU anyway. Is there any precise rule about when to cease calling the various instances? (It should precisely be the 'done' status that says this one has finished its work). In general: - Motion function blocks have to be called until they report 'Done', 'Error', 'CommandAborted' or a subsequent motion FB with BufferMode=Aborting is started in the current cycle. - Setting the Execute input to FALSE will not abort any ongoing motion of the motion function block. For example, one case that is often problematic is the execution of the Axis Halt instruction. When, after a MoveAbosulte instruction this returns the event as 'done' and indeed the axis is in standstill, the state machine first sets the move instruction to FALSE, and the next cycle sets the Halt request to TRUE. Some of the time everything works out fine. Occasionally, however, in this exchange, the axis goes into fault, also losing the OPERATIONAL state. I think the error SMC_FB_WASNT_CALLED_DURING_MOTION is only a follow-up (and misleading) error that results from the axis not being in operational state anymore (bus problems). Is there an error 'regulator or start not set' in the device log before the error 'motion generating FB wasn't called for at least one cycle'? Which error does the respective function block (Halt.ErrorId) report?
Last updated: 2024-07-22
Post by ihatemaryfisher on Sorting array of any-sized structure
CODESYS Forge
talk
(Post)
With that I could make an array of varying size, but would still have to define the array type in the function's declaration VAR_IN_OUT stArray: array [*..*] of <pre-defined data type> END_VAR I wanted a function that could take an array of any type (e.g., a structured VAR) as an input. That way I could call it in multiple POUs to handle different arrays structures.
Last updated: 2023-08-18
Post by rossanoparis on After un upgrade of "CODESYS Control for Raspberry Pi MC SL" from v4.7 to v4.9 SysFileOpen function stopped working
CODESYS Forge
talk
(Post)
For those who will step on this thread. Everything is fine, I had only to increase by 1 my place holders number. For sure the system is occupying the number 1 without being declared ... Below the modification I made to get my code working. [SysFile] PlaceholderFilePath.2=/home/pi/hpca/bin, $hpcabin$ PlaceholderFilePath.3=/home/pi/hpca/cfg, $hpcacfg$ PlaceholderFilePath.4=/home/pi/hpca/logs, $hpcalogs$ PlaceholderFilePath.5=/home/pi/hpca/resources, $hpcares$
Last updated: 2023-08-22
Post by dasch on eCockpit - unable to start simulation
CODESYS Forge
talk
(Post)
This is a known bug in e!Cockpit. See Release notes of V 1.11: 1 e!Cockpit Release Version 1.11 (2022-07) ATTENTION: If a library that uses asynchronous tasks (e.g. WagoAppConfigTool, WagoAppCloud or function modules such as Dali-Master) is dragged into the project, the simulation cannot be started. It is already sufficient to add the library to the project (an FB does not even have to be instantiated). I guess you are using one of these libraries/modules in your project. We e.G. often use PWM modules, these are also affected.
Last updated: 2023-09-05
Post by ofey on Symbol configuration / GVL
CODESYS Forge
talk
(Post)
Hi! I have som variables that I communicate to a Modbus Master. These variables are declared in a "Global Variable List" where I have assigned them memory addresses. To organize this mapping I want to make a MODBUS list where I show all the variable names together with the memory address. Is there an easy way to export this list from CODESYS? Either through script or some export function maybe?
Last updated: 2023-10-11
Post by ofey on Symbol configuration / GVL
CODESYS Forge
talk
(Post)
Hi! I have som variables that I communicate to a Modbus Master. These variables are declared in a "Global Variable List" where I have assigned them memory addresses. To organize this mapping I want to make a MODBUS list where I show all the variable names together with the memory address. Is there an easy way to export this list from CODESYS? Either through script or some export function maybe?
Last updated: 2023-10-11
Post by nathant on Some visualization objects disappear when user is logged in?
CODESYS Forge
talk
(Post)
I am deploying a webvisu on Codesys 3.5 SP 19.2 with legacy user management. I noticed that when a user logs in, some text and a rectangle I have (for aesthetics) both disappear. I made sure that none of the objects in question are linked to a state variable. Anyone know the cause/solution to this? Nothing crucial to the machine's function is lost, but it is a little annoying.
Last updated: 2023-12-15
Post by paro on Client Independent Visualization Switching
CODESYS Forge
talk
(Post)
Hi, can you please provide a new example for the topic at CODESYS "Client Independent Visualization Switching" https://forge.codesys.com/prj/codesys-example/client-independ/home/Home/ Since a few versions, the functions used cause warning messages. Examples for the use of all function blocks from the Visu Utils would generally be very helpful! Several people have put together an example here: https://forum-de.codesys.com//download/file.php?id=2240 BR Patrick
Last updated: 2023-12-20
Post by wiresplus on INT_TO_WORD function not working
CODESYS Forge
talk
(Post)
Hello, I need to take an INT input, and convert it to a WORD value. VAR DRV2Speed : WORD; //IO card takes a WORD where 16000 = full 10V output (equivalent to 50Hz) PumpFillSpeed : INT; //Users enter a value between 0 and 50 END_VAR IF <conditions> THEN DRV2Speed :=INT_TO_WORD((PumpFillSpeed/50)*16000); END_IF </conditions> According to me this should work - but it stays at 0, no matter what. What am I doing wrong?
Last updated: 2024-01-26
Post by ojz0r on INT_TO_WORD function not working
CODESYS Forge
talk
(Post)
That calculation will not work the way you expect it to. If PumpFillSpeed is limitied to 0-50 then the only whole number would be 50/50 = 1 everything else is 0.0-0.9999... and since you are using word and integer only 50 would work since there is no representation for mantissa in integer values. Declare a temporary real variable and do the calculation and then do a REAL_TO_WORD in the DRV2Speed assignment.
Last updated: 2024-01-26
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 otdeveloper on IEC 61499
CODESYS Forge
talk
(Post)
It is being worked on by many companies and its even-driven function blocks seem like a natural evolution of the object oriented industrial programming I have seen Gary Pratt (author of the Book of CODESYS and much more) so expertly implement and explain. I would expect CODESYS to have this front and center on their sights and, if they do not, I would be very interested in learning why.
Last updated: 2024-02-09
Post by kleeswi on SysFileOpen does not work after update to V3.5 SP19 Patch 5
CODESYS Forge
talk
(Post)
I use the function SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_WRITE, pErrorFileOpen); to open and write a file. Since the update from Codesys V3.5 SP17 to V3.5 SP19 Patch 5 it does not work anymore. I first had SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_APPEND_PLUS, pErrorFileOpen); in both versions. hFile_Test is a pointer to byte. It gives an exceptional error when dereferencing the hFile_Test pointer. Edit: I use Codesys on a Raspberry pi
Last updated: 2024-02-19
Post by andrej on POU - Access to runtime
CODESYS Forge
talk
(Post)
Hello all, when creating a POU, the Codesys IDE allows the setting "Enable System Call" (in the Settings, Property -> Build), see picture. The name suggest, that runtime functionalities i.e. functions of codesyscontrol such as "stop plc" etc. can be directly called. I tried various approches without success, the following does, unsurprisingly not work. FUNCTION accessRTE: BOOL; ****************************** codesyscontrol.stop(); Can you please tell me how I can make a system call to codesyscontrol from a POU. Or could you provide me with a use case for this setting. Many thanks for your feedback and kind regards Andrej
Last updated: 2024-03-02
Post by ofey on EtherCAT fieldbus
CODESYS Forge
talk
(Post)
Okey, thank you! Do you think it is something in this library, that makes it possible to do the configuration in a PRG? https://content.helpme-codesys.com/en/libs/IODrvEtherCATDriver/Current/IoDrvEtherCAT.html#id1 I think the codesys modbus libraries support configuration and connection to modbus slaves without having to add the slave devices in the device tree. Just do it from function blocks inside the program. I was hoping for something similar with EtherCAT.
Last updated: 2024-04-10
Post by gseidel on CNC - system goes to X=0 Y=0 before CNC file execution starts, how to avoid that?
CODESYS Forge
talk
(Post)
Hi peterned, the start position given in the CNC properties is only used if you use the compile mode OutQueue. With compile mode SMC_CNC_REF, you need to provide the start position in the IEC application. The function block SMC_NCInterpreter has an input piStartPosition. You can initialize it with the output of the forward kinematic transormation FB for your machine. In your case probably SMC_TRAFOF_Gantry2. Best regards, Georg
Last updated: 2024-04-30
Post by corriibme on Setting array values with JSON Utilities SL
CODESYS Forge
talk
(Post)
It turns out that you can build JSON structures without ever calling the JSONBuilder function block directly. Instead, create a pointer to JSON.JSONData and invoke the necessary methods on its dereference. The parent object has a parent index of -1 (and an index of 0). EVERY other item (including keys, values, empty arrays and sub-objects) created by the setX methods needs the index to increase by 1. Then use the JSONByteArrayWriter FB to generate your JSON string
Last updated: 2024-05-23
Post by plunje on Sensor not set
CODESYS Forge
talk
(Post)
A got a larger project but this very small example makes it clear. I have a button, and after it's clicked a lamp should flip on and stays on, and when the mouse-button is released it should stay on. When I try that in the PLC_PRG it works, but when I change it to a function block (seet attched demo proj) it isn't. I'm fairly new to PLC programming but are very experienced C# engineer, but this goes above my head...
Last updated: 2024-05-26
Post by swe-hob on call of a method of a function block in another program
CODESYS Forge
talk
(Post)
Hi, Let's assume following: PRG_1 fb_1 : fbExample1; fb_1.method_1 do something... PRG_2 fb_2 : fbExample2; fb_2.method_2 if xTest then PRG_1.fb_1.method_1(); end_if; Is there a reason why runtime hangs when I call the method_1 in PRG_1 from a method in PRG_2? Both programs run in the same task. No chance that any other program calls the method. What I practically do there is that in the program PRG_2 I add a structed object into a buffer. In PRG_1 I just process the items in the buffer.
Last updated: 2024-06-03
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
.