GET_USINTRead an unsigned integer value from byte data with offset
This function gets the 8-bit byte value of Data with iByteOffset denoting the offset in byte. The byte numbering starts from 0, which refers to the first byte of Data.
The result contains the unsigned integer value in the range from 0 to 255, the upper bytes of the result are filled with zeros.

Input
Byte data from which the byte is got
Byte offset relative to the first byte of Data starting from 0, must be greater than or equal to 0
Output
Unsigned integer value in the range from 0 to 255, the upper bytes filled with zeros
Please check the validity of the input data since Control FPWIN Pro7 does not check the validity of the data to access.
To get the best performance please use constant input values as much as possible!
Inverse instruction: SET_USINT

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

VAR
bStart: BOOL:=FALSE;
awByteData: ARRAY [0..4] OF INT:=[100,200,300,-400,501];
iOffs: INT:=4;
END_VAR

When the variable bStart is set to TRUE, the function is carried out.

BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_CONTACT,,bStart,4,3,6,5,);
B(B_F,E_GET_USINT!,,11,2,19,7,,?DEN?dData?diByteOffset?AENO?c);
B(B_VARIN,,awByteData,9,4,11,6,);
B(B_VAROUT,,iResult,19,4,21,6,);
B(B_VARIN,,iOffs,9,5,11,7,);
L(1,0,1,7);
L(1,4,4,4);
L(6,4,11,4);
END_NETWORK_BODY
END_NET_WORK
END_BODY
if (bSTart) then
GET_USINT(Data := awByteData, iByteOffset := iOffs);
end_if;