ToText
ToText('Expression','Format'="%g",'datatype'=0)
Arguments
|
'Expression' |
Signal or expression whose content is to be converted into a text channel |
|
'Format' |
Optional parameter for a format string |
|
'datatype' |
Optional parameter that determines the floating-point format
|
Description
This function converts a numerical signal value into a text signal. In case of equidistant samples of the 'Expression' input signal and a constant Y-value, only the value of the first signal point is entered and displayed as sample in the text signal. If the Y-value changes, a sample is entered and displayed in the text signal for every new Y-value.
If the 'Expression' input signal does not contain equidistant samples, a sample is entered and displayed in the text signal for each input sample.
Enter the optional parameter 'Format' according to C printf syntax. You can only indicate a parameter (%) complying with an IEEE 32 bit floating point value. Default value is %g. This value is also used if you do not indicate the optional parameter.
Examples: %g = conversion of the floating point value into a text %. 4f = text/number with 4 decimal places, etc.
Example
The ToText function can be helpful, e.g. if trends are visualized containing vast amounts of data. Without constantly changing between the marker and signal view, the numerical values can be easily displayed. The following illustration shows the use of the ToText function.
FromText
FromText('Text','Begin','End')
Arguments
|
'Text' |
Text signal to convert |
|
'Begin' |
Optional: First character of the field content to be read. If you do not specify a value, the entire content is read. |
|
'End' |
Optional: Last character of the field content to be read. If you do not specify a value, the content is read from 'Begin' to the last character. |
Description
This function converts the content of the text signal 'Text' into a numerical value. You can use the 'Begin' and 'End' parameters optionally as indices to not convert the entire string. By default, 'Begin'=0 and 'End'=length of the string is used.
