JSON Function Blocks
Last updated
Last updated
IMPORTANT: To prevent erroneous data being sent to DCH and unnecessary datastreams being created, it is strongly recommended to disable the MQTT connection while the JSON Schema is configured and debugged. Datastreams are created automatically using the filed entries from the first point JSON messages received. If the Schema is not configured properly this can result in thousands of unnecessary datastreams being created.
The functions required for the JSON message construction are:
1. A method to trigger the messages to be written at the required time interval;
2. A JSON function block where a message template can be created with necessary fields;
3. A Query function that identifies points to include;
4. A read and write function that reads current values from the included points and writes these values into individual messages for each point;
5. A function that queues the messages and sends them one at a time to the Publication point or function.
In the Tridium Jace, function 1 is performed by a Time Trigger (control palette), functions 2,3,4 are performed by the Relative Json Schema (JsonToolkit palette), and function 5 is performed by the EngineCycleMessageQueue (JsonToolkit palette). The function blocks are arranged as follows, with the Out slot of the EngineCycleMessageQueue linked to the ln16 in slot of the MqttStringPublishPoint within the MQTT Driver Device.
Set the Time Trigger interval to the required upload interval (e.g. 5min, 10min, 15min).
Set the Rate and Max Size of the Queue. In the Jace the slots are hidden and can be unhid and adjusted by viewing the AX Slot Sheet and removing the “hidden” config flag from the slots.