Ik want to make a function block that converts 16 inputs bool into one bytes number
I have already a pack box for 8 inputs image 'knipsel'. Got that Pack box from a library.
But now I want a pack box for 16 inputs. I already made a seperate function block program.
and copy it in the program where I wanna use it. But I get a error called 'Call recursion'
how can I fix that? And I am very new in codesys so made I maybe some more mistakes?
Thanks in advance,
PS: I have use fake inputs by the function block program do not pay attention.
I forgot the error notification
You defined a function "Pack_16" and then proceed to call "Pack_16" inside it. How do you think this can work?
Apart that recursion is generally disallowed (as opposed to other languages), but this would not make sense either, since you are not going to reach a base case.
If you try this e.g. in C your program would hang indefinitely or get terminated by the OS due to a segmentation fault.
Furthermore, I really doubt you can shove 16 bits in a BYTE...
Log in to post a comment.