Personal Data

Username:
hwillems
Joined:
2020-08-10 13:42:53

Projects

  • No projects to display.

User Activity

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

    I do datastructures and algorithms in Codesys. For example a Struct of Person with thing's like IdNumber, Name, Age etc. as example. Now i do all kind of calculations, filters. So i have this pretty big Fixed Array with Structs. On this struct i want to do simple stuff you can do easily in C++/Python/Rust etc. For example i want to do this: AvererageAge := Average(Peoples.Age); Then it will return the average of all members ages. Or Sort struct on age etc. Or sort on alphabetical Name. Or use Lambda...

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

    I do datastructures and algorithms in Codesys. For example a Struct of Person with thing's like IdNumber, Name, Age etc. as example. Now i do all kind of calculations, filters. So i have this pretty big Fixed Array with Structs. On this struct i want to do simple stuff you can do easily in C++/Python/Rust etc. For example i want to do this: AvererageAge := Average(Peoples.Age); Then it will return the average of all members ages. Or Sort struct on age etc. Or sort on alphabetical Name. Or use Lambda...

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

    I do datastructures and algorithms in Codesys. For example a Struct of Person with thing's like IdNumber, Name, Age etc. as example. Now i do all kind of calculations, filters. So i have this pretty big Fixed Array with Structs. On this struct i want to do simple stuff you can do easily in C++/Python/Rust etc. For example i want to do this: AvererageAge := Average(Peoples.Age); Then it will return the average of all members ages. Or Sort struct on age etc. Or sort on alphabetical Name. Or use Lambda...

  • Modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Already solved! I still don't know how and why this is not possible. Codesys has some strange things sometimes.... Anyway how i solved is way more efficient and neat(Not double loop, and more like "pattern matching" stuff): FOR i := 1 TO maxi DO rtarrNode[i].Control.ixStopBlocked := PrioGroupBlocked[rtarrNode[i].Status.oiNodePrio]; END_FOR;

  • Posted a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Already solved! I still don't know how and why this is not possible. Codesys has some strange things sometimes.... Anyway how i solved is way more efficient and neat(Not double loop, and more like "matching" stuff): FOR i := 1 TO maxi DO rtarrNode[i].Control.ixStopBlocked := PrioGroupBlocked[rtarrNode[i].Status.oiNodePrio]; END_FOR;

  • Posted a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Hi There, I have the following code, and i can't wrap my head around how the "equal" operator does literally not work. I tried almost everything and i came to the conclusion that the following line doesn't work: rtarrNode[i].Status.oiNodePrio = j FOR i := 1 TO maxi DO FOR j := 1 TO MAX_PRIO DO tempbool := (rtarrNode[i].Status.oiNodePrio = j); rtarrNode[i].Control.ixStopBlocked := PrioGroupBlocked[j] AND tempbool; END_FOR; END_FOR; rtarrNode is reference for IN_OUT but i don't think that is relevant...

  • Modified a comment on discussion Codesys V2.3 on CODESYS Forge

    I thought about that solution, i just am used to avoid global variables. For every "interface" i mostly write a seperate PRG, and because modbus holding registers are like IN_OUT, i wanted to distribute the "address" of the location throughout the rest of my program with a Struct of pointers to that holding register. Because i have alot of different information on that modbus, i like to put data that belongs to each other in a Struct which i normally do before consuming it in other places of my program....

  • Posted a comment on discussion Codesys V2.3 on CODESYS Forge

    I thought about that solution, i just am used to avoid global variables. For every "interface" i mostly write a seperate PRG, and because modbus holding registers are like IN_OUT, i wanted to distribute the "address" of the location throughout the rest of my program with a Struct of pointers to that holding register. Because i have alot of different information on that modbus, i like to put data that belongs to each other in a Struct which i normally do before consuming it in other places of my program....

View All