The following example illustrates how you can use parameters of type Tables of a function module in the PI sheet or manufacturing cockpit:
The PI sheet contains a table with input fields that refer to variable MY_INPUT. The values are entered in the unit of measure kilogram .
The table values of variable MY_INPUT are to be transferred to function module MY_FUNCTION when the Quantity conversion pushbutton is chosen. The function module converts the quantity from kilogram to liter. When the calculation is finished, the values are transferred back to the PI sheet into variable MY_RESULT.
In the PI sheet, the converted quantities are displayed in a table.
Input request:
Characteristic |
Characteristic Value |
PPPI_DATA_REQUEST_TYPE |
Repeated data request |
PPPI_INPUT_REQUEST |
Quantity entry in Kg |
PPPI_VARIABLE |
MY_INPUT |
PPPI_REQUESTED_VALUE |
PPPI_MATERIAL_QUANTITY |
Dynamic function call:
Characteristic |
Characteristic Value |
PPPI_FUNCTION_NAME |
MY_FUNCTION |
PPPI_BUTTON_TEXT |
Quantity conversion |
PPPI_EXPORT_PARAMETER |
INPUT_TAB |
PPPI_FLOAT_VARIABLE |
MY_INPUT |
PPPI_IMPORT_PARAMETER |
OUTPUT_TAB |
PPPI_FLOAT_VARIABLE |
MY_RESULT |
Output:
Characteristic |
Characteristic Value |
PPPI_DATA_REQUEST_TYPE |
Repeated data request |
PPPI_VARIABLE |
MY_RESULT |
PPPI_MATERIAL_QUANTITY |
Initial |
PPPI_OUTPUT_TEXT |
Quantity output in liter |
PPPI_OUTPUT_VARIABLE |
MY_RESULT |