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.
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.