The function block converts a JSON string, which is available in a BYTE_4096_BMARRAY, into two individual arrays (key and value array, STRING_128_ARRAY). This allows
This allows, for example, the JSON data received after a request to be converted into a usable format in the PLC.
| Recommended task: |
Cyclic, Default |
| Libraries used: |
BM_TYPES_40bd04 or higher TECH_TYPES_40bd15 or higher |
General description
InOut Parameter
Input Parameter
| Marking: |
Data type: |
Description: |
| x_Execute |
BOOL |
Execute the function block |
| a_JsonData |
BYTE_4096_BMARRAY |
Converted keys and values into a JSON string in a byte array |
Output Parameter
| Marking: |
Data type: |
Description: |
| x_Busy |
BOOL |
Function is working |
| x_Done |
BOOL |
Function is done and ready for a new measurement |
| x_Error |
BOOL |
Function shows an error |
| s_ErrorInfo |
STRING |
Gives information about the occured error |
| a_Keys |
STRING_128_ARRAY |
Array of keys; in JSON format, keys are the variable names |
| a_Values |
STRING_128_ARRAY |
Array of the values associated with the keys |