Detailed description
2.12 Block descriptions
Basic logic functions: PLC basic program solution line (P3 sl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
201
Additional parameters
The pointer parameters for the input and output data of the handheld unit must be
parameterized in the start OB 100 in FB 1, DB 7. Parameter "BHGIn" corresponds to the
input data of the PLC from the handheld unit (data received by PLC). Parameter "BHGOut"
corresponds to the output data of the PLC to the handheld unit (data transmitted by PLC).
These two pointers must be set to the starting point of the relevant data area, which is also
parameterized in SDB 210 with an MPI link.
Note
If the numerical converter is used to display information, then it is better to avoid performing
a conversion in every PLC cycle for the sake of reducing the PLC cycle time. In this case, it
is advisable to use the input signal from the HHU to the PLC "Acknowledgment digital
display" (DB m+5.7) for parameter "Convert".
In this way it can be ensured that the most recent numerical information is displayed.
Only the string is processed if the value 0 is entered in the "Row" parameter. The function is
therefore not linked to the display control function for BHG, HT2 and can be used as a
conversion routine in a string. If "Row" = 0, the pointers for the BHG are not evaluated.
Declaration of the function
STL representation
DATA_BLOCK "strdat"
//The data block number is defined in the symbol file
STRUCT
disp: STRING [32]:= 'line 1 line 2 '; //32 characters are defined
END_STRUCT;
BEGIN
END_DATA_BLOCK
FUNCTION FC 13 : VOID
VAR INPUT
Row : BYTE ; //Display line (see table)
ChrArray : STRING ; //Transfer at least string[32]
Convert : BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to the variable being converted
DataType : BYTE ; //Data type of the variables
StringAddr : INT ; //Right-justified string address (1 to 32)
Digits : BYTE ; //Number of decimal places (1 to 3)
END VAR
VAR OUTPUT
Error : BOOL ; //Conversion or string error
END VAR