Posted 21 May 2020 (edited) Hi, I am using Sysmac Studio. I want create a function block to convert a BYTE into 8 bits. How can I create that FB? Thank you, Jean Edited 21 May 2020 by Jean20 Share this post Link to post Share on other sites
Posted 21 May 2020 I assume that your difficulty is with creating the code to do it, not with the actual creation of a function block. So, I am just showing the code below. You can use the Union functionality. First, open up Data Types and create a union: Then create a variable of that union type (MyUnion in this example): Then you can do a move from the byte variable that you want to convert into MyUnion.ByteLevel as shown below in rung 0. Then you can use the bits within that byte as shown in rung 1 as MyUnion.BitLevel[0]. Share this post Link to post Share on other sites