I am trying to write a JSON. First time after login in PLC after download everthing works. But when I want to change values during runtime and try to recreate the JSON nothing happens.
When forcing the xStart as an impulse i want to recreate it and see 2 as Key3 instead of 1 from the first run.
I don't know the details of jsonArrayWriter, but the common behaviour for an xExecute input is that the FB starts on the trigger that it gets TRUE.
In your case xExecute is never FALSE, so it is never triggered again to start the jsonArrayWriter.
So change the condition from TRUE to a variable which you set to TRUE with the "xFirst". Then when the jsonArrayWriter is done (xDone), or has an error (xError), then set this variable to FALSE.
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey guys,
I am trying to write a JSON. First time after login in PLC after download everthing works. But when I want to change values during runtime and try to recreate the JSON nothing happens.
When forcing the xStart as an impulse i want to recreate it and see 2 as Key3 instead of 1 from the first run.
Any Idea how to make this work?
Kind Regards
I don't know the details of jsonArrayWriter, but the common behaviour for an xExecute input is that the FB starts on the trigger that it gets TRUE.
In your case xExecute is never FALSE, so it is never triggered again to start the jsonArrayWriter.
So change the condition from TRUE to a variable which you set to TRUE with the "xFirst". Then when the jsonArrayWriter is done (xDone), or has an error (xError), then set this variable to FALSE.
Sorry that I haven't replyed to youranwser in so long time. Thank you for explaining the issue. Now everything works without a problem!
Last edit: culius 2024-05-21
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.
Can you post the new code that you have by chance? Also, are you able to send the values of tags dynamically with the RTAC in this JSON format? I'm running into a lot of road blocks with it.