PJSEXOCT – Parse JSON string (string output)
Block SymbolLicensing group: STANDARD
Function Description
The PJSEXOCT block is almost identical to the PJSOCT block. It expects text in
JSON format on the jtxt input. The outputs of sy1 to sy7 then have the values of the objects
identified by the parameters name1 to name7. Unlike the PJSOCT block, the
parameters name1 to name7 can contain the placeholder % + number instead of which the text
from the input sn + number is substituted.
Examples
Let
sn1 = "2",
sn2 = "rpm",
name1 = "motor[%1].temp",
name2 = "motor[%1].%2",
then the output sy1 will be the value of the object motor[2].temp, and the output sy2 will be
the value of the object motor[2].rpm.
This block does not propagate the signal quality. More information can be found in the 1.4 section.
Input
jtxt | JSON formated string | String |
RUN | Enable execution | Bool |
sn1..sn8 | Name of JSON object | String |
Parameter
name1..name8 | Name of JSON object | String |
nmax | Allocated size of string 0 65520 | Long (I32) |
Output
sy1..sy8 | String output value | String |
iE | Error code | Error |
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com