GetSupplierVersion (FUN) ¶ FUNCTION GetSupplierVersion : WORD InOut: Scope Name Type Return GetSupplierVersion WORD
VersionConstants (GVL) ¶ InOut: Scope Name Type Initial Constant gc_byVersion BYTE 1 gc_byVersion_1 BYTE 0
ARRAY and MemoryBlock ¶ Compare (Function) FindBlock (Function) FindByte (Function)
Compare (FUN) ¶ FUNCTION Compare : UINT Function compares “MemoryBlockA” with “MemoryBlockB”. Up to “uiNumberOfBytes” will be compared. Example: abyMemoryBlockA : ARRAY [0..9] OF BYTE := 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ; abyMemoryBlockB : ARRAY [0..9] OF BYTE := 0 , 1 , 2 , 0 , 4 , 5 , 6 , 7 , 8 , 9 ; -> MEM.Compare ( ADR ( abyMemoryBlockA ), ADR ( abyMemoryBlockB ), 10 ) = 4 InOut: Scope Name Type Comment Return Compare UINT function return 0 if the blocks are identical. If they are different then function returns the first position that differ Input pMemoryBlockA POINTER TO BYTE address of MemoryBlockA pMemoryBlockB POINTER TO BYTE address of MemoryBlockB uiNumberOfBytes UINT number of bytes to compare
FindBlock (FUN) ¶ FUNCTION FindBlock : UINT Function looks for the first occurence of “MemoryBlockB” within “MemoryBlockA”. Example: abyMemoryBlockA : ARRAY [0..9] OF BYTE := 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ; abyMemoryBlockB : ARRAY [0..2] OF BYTE := 6 , 7 , 8 ; -> MEM.FindBlock ( ADR ( abyMemoryBlockA ), 10 , ADR ( abyMemoryBlockB ), 3 ) = 7 InOut: Scope Name Type Comment Return FindBlock UINT function returns 0, if “MemoryBlockB” cannot be found. Otherwise the function returns the position of the first occurence Input pMemoryBlockA POINTER TO BYTE address of MemoryBlockA uiLengthBlockA UINT length of MemoryBlockA in byte pMemoryBlockB POINTER TO BYTE address of MemoryBlockB uiLengthBlockB UINT length of MemoryBlockB in byte
FindByte (FUN) ¶ FUNCTION FindByte : UINT Function look for the first occurence of “byValue” in “MemoryBlock”. Example: abyMemoryBlockA : ARRAY [0..9] OF BYTE := 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ; -> MEM.FindByte ( ADR ( abyMemoryBlockA ), 10 , 5 ) = 6 InOut: Scope Name Type Comment Return FindByte UINT function returns 0 if “byValue” is not found. Otherwise the function returns the position of the first occurence Input pMemoryBlock POINTER TO BYTE address of MemoryBlock uiLength UINT length of MemoryBlock in byte byValue BYTE value to look for in MemoryBlock
simple TYPE ¶ HighByte (Function) HighWord (Function) LowByte (Function) LowWord (Function)
HighByte (FUN) ¶ FUNCTION HighByte : BYTE Function returns the high byte of the input “wValue”. Example: wValue : WORD := 16#1234 ; -> MEM.HighByte ( wValue ) = 16#12 InOut: Scope Name Type Comment Return HighByte BYTE function returns high byte of “wValue” Input wValue WORD word with high and low byte
HighWord (FUN) ¶ FUNCTION HighWord : WORD Function returns the high word of the input “dwValue”. Example: dwValue : WORD := 16#12345678 ; -> MEM.HighWord ( dwValue ) = 16#1234 InOut: Scope Name Type Comment Return HighWord WORD function returns high wird of “dwValue” Input dwValue DWORD dword with high and low word
LowByte (FUN) ¶ FUNCTION LowByte : BYTE Function returns the low byte of the input “wValue”. Example: wValue : WORD := 16#1234 ; -> MEM.LowByte ( wValue ) = 16#34 InOut: Scope Name Type Comment Return LowByte BYTE function returns low byte of “wValue” Input wValue WORD word with high and low byte