<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Activity for hwillems</title><link href="https://forge.codesys.com/u/hwillems/activity/" rel="alternate"/><id>https://forge.codesys.com/u/hwillems/activity/</id><updated>2023-08-31T07:57:50.750000Z</updated><subtitle>Recent activity for hwillems</subtitle><entry><title>hwillems modified a comment on discussion Engineering 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3" rel="alternate"/><published>2023-08-31T07:57:50.750000Z</published><updated>2023-08-31T07:57:50.750000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3</id><summary type="html">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...</summary></entry><entry><title>hwillems modified a comment on discussion Engineering 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3" rel="alternate"/><published>2023-08-31T07:34:27.488000Z</published><updated>2023-08-31T07:34:27.488000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3</id><summary type="html">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...</summary></entry><entry><title>hwillems posted a comment on discussion Engineering 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3" rel="alternate"/><published>2023-08-31T07:16:39.448000Z</published><updated>2023-08-31T07:16:39.448000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Engineering/thread/bd8b488fdd/?limit=25#72e3</id><summary type="html">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...</summary></entry><entry><title>hwillems modified a comment on discussion Codesys V2.3 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#e754" rel="alternate"/><published>2021-03-13T11:43:07.091000Z</published><updated>2021-03-13T11:43:07.091000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#e754</id><summary type="html">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;</summary></entry><entry><title>hwillems posted a comment on discussion Codesys V2.3 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#e754" rel="alternate"/><published>2021-03-13T11:42:15.191000Z</published><updated>2021-03-13T11:42:15.191000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#e754</id><summary type="html">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;</summary></entry><entry><title>hwillems posted a comment on discussion Codesys V2.3 🇬🇧</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#342b" rel="alternate"/><published>2021-03-13T11:13:21.192000Z</published><updated>2021-03-13T11:13:21.192000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/f369253769/?limit=25#342b</id><summary type="html">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...</summary></entry><entry><title>hwillems modified a comment on discussion Codesys V2.3</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#23bd/0225" rel="alternate"/><published>2020-08-11T07:27:53.690000Z</published><updated>2020-08-11T07:27:53.690000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#23bd/0225</id><summary type="html">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....</summary></entry><entry><title>hwillems posted a comment on discussion Codesys V2.3</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#23bd/0225" rel="alternate"/><published>2020-08-11T07:27:22.721000Z</published><updated>2020-08-11T07:27:22.721000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#23bd/0225</id><summary type="html">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....</summary></entry><entry><title>hwillems modified a comment on discussion Codesys V2.3</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb" rel="alternate"/><published>2020-08-10T15:07:10.657000Z</published><updated>2020-08-10T15:07:10.657000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb</id><summary type="html">Hello, I have several (PRG) POU's in my Codesys V2.3 program. For example PRG1, and PRG2. Because PRG1 contains an adress which is a Modbus Holding memory, i want a pointer towards that adress. I have a HMI that can read and write that holding memory adress.(For example speed reference) I also have PRG2, which i also want to read and write to that adress. So what i did is: In PRG1: VAR testword AT %MW5480 : WORD; END_VAR In PRG2: VAR ptr_testvar : POINTER TO WORD; END_VAR ptr_testvar := ADR(PRG1.testword);...</summary></entry><entry><title>hwillems modified a comment on discussion Codesys V2.3</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb" rel="alternate"/><published>2020-08-10T14:55:13.540000Z</published><updated>2020-08-10T14:55:13.540000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb</id><summary type="html">Hello, I have several (PRG) POU's in my Codesys V2.3 program. For example PRG1, and PRG2. Because PRG1 contains an adress which is a Modbus Holding memory, i want a pointer towards that adress. I have a HMI that can read and write that holding memory adress.(For example speed reference) I also have PRG2, which i also want to read and write to that adress. So what i did is: In PRG1: VAR testword AT %MW5480 : WORD; END_VAR In PRG2: VAR ptr_testvar : POINTER TO WORD; END_VAR ptr_testvar := ADR(PRG1.testword);...</summary></entry><entry><title>hwillems posted a comment on discussion Codesys V2.3</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb" rel="alternate"/><published>2020-08-10T14:53:07.587000Z</published><updated>2020-08-10T14:53:07.587000Z</updated><author><name>hwillems</name><uri>https://forge.codesys.com/u/hwillems/profile/</uri></author><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2524c0643c/?limit=25#30fb</id><summary type="html">Hello, I have several (PRG) POU's in my Codesys V2.3 program. For example PRG1, and PRG2. Because PRG1 contains an adress which is a Modbus Holding memory, i want a pointer towards that adress. I have a HMI that can read and write that holding memory adress.(For example speed reference) I also have PRG2, which i also want to read and write to that adress. So what i did is: In PRG1: VAR testword AT %MW5480 : WORD; END_VAR In PRG2: VAR ptr_testvar : POINTER TO WORD; END_VAR ptr_testvar := ADR(PRG1.testword);...</summary></entry></feed>