SET_SINTWrite a signed integer value into byte data with offset
This function sets 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.

Input
The input data from which the lower byte value is written to the byte data of input/output Data.
Byte offset relative to the first byte of Data starting from 0, must be greater than or equal to 0
Input/output
Byte data to which the byte is set
The byte offset is assumed to be greater than or equal to 0.
Please check the validity of the input data since the validity of the data to access is not checked.
To get the best performance please use constant input values as much as possible!
Inverse instruction: GET_SINT

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 WORD:=[100,200,300,400,501];
iOffs: INT:=0;
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 := 9 ;
NETWORK_BODY
B(B_CONTACT,,bStart,4,3,6,5,);
B(B_F,E_SET_SINT!,,11,2,19,8,,?DEN?DValue?DiByteOffset?DData?AData?AENO);
B(B_VARIN,,-128,9,4,11,6,);
B(B_VARIN,,iOffs,9,5,11,7,);
B(B_VARIN,,awByteData,9,6,11,8,);
L(1,0,1,9);
L(1,4,4,4);
L(6,4,11,4);
END_NETWORK_BODY
END_NET_WORK
END_BODY
if (bSTart) then
SET_SINT(Value := 128, iByteOffset := iOffs, Data := awByteData);
end_if;