SWITCHBIT (FUN) ¶ FUNCTION SWITCHBIT : DWORD Switches a bit of a DWORD value See also: PUTBIT and EXTRACT . InOut: Scope Name Type Comment Return SWITCHBIT DWORD Value with the switched bit Input X DWORD Value to be manipulated N BYTE Position of the bit to switch, starting with 0
UNPACK (FB) ¶ FUNCTION_BLOCK UNPACK Converts a byte into 8 bits InOut: Scope Name Type Comment Input B BYTE Input value Output B0 BOOL Output bit 0 B1 BOOL Output bit 1 B2 BOOL Output bit 2 B3 BOOL Output bit 3 B4 BOOL Output bit 4 B5 BOOL Output bit 5 B6 BOOL Output bit 6 B7 BOOL Output bit 7
WORD_AS_BIT (FB) ¶ FUNCTION_BLOCK WORD_AS_BIT Converts an input value of data type WORD into 16 outputs of data type BOOL InOut: Scope Name Type Comment Input W WORD Input value Output B00 BOOL Output bit 0 B01 BOOL Output bit 1 B02 BOOL Output bit 2 B03 BOOL Output bit 3 B04 BOOL Output bit 4 B05 BOOL Output bit 5 B06 BOOL Output bit 6 B07 BOOL Output bit 7 B08 BOOL Óutput bit 8 B09 BOOL Output bit 9 B10 BOOL Output bit 10 B11 BOOL Output bit 11 B12 BOOL Output bit 12 B13 BOOL Output bit 13 B14 BOOL Output bit 14 B15 BOOL Output bit 15
HEX/ASCII Functions ¶ BYTE_TO_HEXinASCII (Function) HEXinASCII_TO_BYTE (Function) WORD_AS_STRING (Function)
BYTE_TO_HEXinASCII (FUN) ¶ FUNCTION BYTE_TO_HEXinASCII : WORD Converts one byte of binary code into one word in HEX code representing its ASCII value The higher bits in the input are represented by the higher byte in the output. Use HEXinASCII_TO_BYTE function for the reverse conversion. InOut: Scope Name Type Comment Return BYTE_TO_HEXinASCII WORD ASCII value as WORD of the input B Input B BYTE Value in binary code
HEXinASCII_TO_BYTE (FUN) ¶ FUNCTION HEXinASCII_TO_BYTE : BYTE Converts one word in HEX code representing its ASCII value into one byte of binary code The higher byte in the input represents the higher bits in the output. Use BYTE_TO_HEXinASCII function for the reverse conversion. InOut: Scope Name Type Comment Return HEXinASCII_TO_BYTE BYTE Value in binary code of the input W Input W WORD Value in HEX code
WORD_AS_STRING (FUN) ¶ FUNCTION WORD_AS_STRING : STRING(2) Converts one word into its ASCII string representation Example: Input : '16#48_46' Byte order : FALSE -> String : 'FH' InOut: Scope Name Type Comment Return WORD_AS_STRING STRING(2) A STRING(2) representing the HEX code of the input W Input W WORD Input value ORDER BOOL TRUE : Swaps high and low byte
Library Information ¶ GetLibVersion (Function) GetLibVersionNumber (Function) IsLibReleased (Function)
GetLibVersion (FUN) ¶ FUNCTION GetLibVersion : VERSION This function has been automatically generated from the project information. InOut: Scope Name Type Return GetLibVersion VERSION
GetLibVersionNumber (FUN) ¶ FUNCTION GetLibVersionNumber : DWORD This function has been automatically generated from the project information. InOut: Scope Name Type Return GetLibVersionNumber DWORD