Compax3 Software - T30/T40 - Useful IEC Function Examples (Convert Binary Pattern to Integer)
The following is a function designed for importing into the Codesys software when developing Compax3 (T30 or T40) IEC programs.Â
To bring this function into the Codesys environment, first download the file, then open your project in Codesys, and then under the Project menu, select the 'Import' utility and point to where you have the particular .exp file saved on your computer.Â
You can then add the particular function to your overall program as you would any other function or function block. The imported function will be listed under either 'User Defined Functions' or 'User Defined Function Blocks'.
Convert Binary Pattern to Integer Function
Note - This function converts a binary pattern to an integer value.
Inputs:Â Â Â Â Â Convert (BOOL)
                Bit0 (BOOL)
                Bit1 (BOOL)
                Bit2 (BOOL)
                Bit3 (BOOL)
                Bit4 (BOOL)
                Bit5 (BOOL)
                Bit6 (BOOL)
                Bit7 (BOOL)
Outputs:Â Â Â Binary to Integer (INT)Â Â
glh 10/18/12