Function Pack BOOL to WORD
I try to pack 16 BOOL to WORD in an IL but I got only 15 inputs
even when I write 16 in parameter.
The same function works perfect when used in an FBD.
Do I do something wrong?
Voted best answer
I think it might be an error in reasoning. I wrote a demo IL program which handles the packaging block correct as shown here:
You have to load the first bit at the beginning (line 1) and call the function block PBOBY afterwards (line 2 ...8) which brings 7 additional inputs with it (if you selected 8 inputs from the parameter mask). At the end all 8 bits will be stored in the variable "Result" (line 9).
From my understanding everything works fine and as usual with IL.
You are right, I tried that for byte and DW, seems it takes (n-1) inputs.
you can try this way, in IL goto menuitem Elements > Blocks > Converter > Binary conversion > Pack BOOL to BYTE > you get window to insert number of inputs.
Enter 2(two) and you will get only one field. and if you enter 1(one) then also you will get only one field. If you insert 3 you get two fields. So seems there is some bug. will communicate to consern people.
With best regards