15.2.40 FC 39 - STRNG_R - Convert STRING to REAL
The function FC 39 converts a string to a variable in REAL data format.
n The string must have the following format:
±v.nnnnnnnE±xx
– ±: Sign
– v: 1 digit before the decimal point
– n: 7 digits after the decimal point
– x: 2 exponential digits
n If the length of the string is smaller than 14, or if it is not structured as shown above,
no conversion takes place and the BR bit is set to "0".
n If the result of the conversion is outside the REAL range, the result is limited to the
corresponding value and the BR bit is set to "0".
Parameter Declaration Data type Memory area Description
S* INPUT STRING D, L Input string
RET_VAL OUTPUT REAL I, Q, M, D, L Result
*) You can assign only a symbolically defined variable for the parameter.
15.2.41 FC 40 - TIM_S5TI - Convert TIME to S5TIME
The function FC 40 converts the data format TIME to the format S5TIME. Here is always
rounded down. If the input parameter is greater than the displayable S5TIME format
(TIME#02:46:30.000), S5TIME#999.3 is output as result and the binary result (BR) bit is
set to "0".
Parameter Declaration Data type Memory area Description
IN INPUT TIME I, Q, M, D, L
Constant
Input variable in format TIME
RET_VAL OUTPUT S5TIME I, Q, M, D, L Return value in format S5TIME
15.3 IO
15.3.1 FB 20 - GETIO - PROFIBUS/PROFINET read all Inputs
With the FB 20 GETIO you consistently read out all inputs of a PROFIBUS DP slave/
PROFINET IO device. In doing so, FB 20 calls the SFC 14 DPRD_DAT. If there was no
error during the data transmission, the data that have been read are entered in the target
area indicated by INPUTS. The target area must have the same length that you config-
ured for the selected component. In the case of a PROFIBUS DP slave with a modular
structure or with several DP IDs, you can only access the data for one component/DP ID
with an FB 20 call each time at the configured start address.
Description
Parameter
Description
Parameter
Description
VIPA SPEED7
Standard
IO > FB 20 - GETIO - PROFIBUS/PROFINET read all Inputs
HB00 | OPL_SP7 | Operation list | en | 18-30 821