Official | HULFT IoT EdgeStreaming Reverse Reference First Edition: July 1, 2021
Pad the acquired data with zeros and output the results
This section describes the processing of padding the data acquired from the equipment with zeros up to the required number of digits and outputting the result.
This process outputs results such as the following:
- Example: when "8" is set in Size
-
-
If the input value is "25", the output value is "00000025".
-
If the input value is "312", the output value is "00000312".
-
If the input value is "8", the output value is "00000008".
-
Description of the processing
The data acquired from the equipment is padded with zeros and then output.
Key features
- Zero padding
-
This logic pads the input value with zeros up to the specified number of digits and outputs the result as a string.
It can be set from String > Calculation > Zero padding of the tool palette.
Operation procedure
1. Create a script.
For information about how to create a script, refer to First Step Guide.
The descriptions in this procedure are based on the following scripts:
2. On the script canvas, double-click mapping_1.
The Mapper editor is displayed.
3. From the tool palette, drag and drop String > Calculation > Zero padding onto the Mapper editor.
The Zero padding logic is placed in the Mapper editor.
4. Enter the property of the placed logic.
-
Double-click the Zero padding logic.
The Zero padding Logic Property dialog box is displayed.
-
Enter the number of digits to pad with zeros in Size.
In this example, "8" is entered.
-
If necessary, enter a comment in Comment and click Finish.
5. Drag and drop the input source node (or another logic) onto the Zero padding logic.
The mapping link to the Zero padding logic is displayed.
6. Drag and drop the Zero padding logic onto the output destination node (or another logic).
The mapping link to the output destination from the Zero padding logic is displayed.
7. Save the script.
For information about how to save a script, refer to First Step Guide.
Official | HULFT IoT EdgeStreaming Reverse Reference First Edition: July 1, 2021