SR_MqttHandling
The program SR_MqttHandling
implements the program code to control the MQTT client.
The program code has been split into single logical functions. The single program parts are processed in subroutines, referred to as actions.
The actions called from the program are listed in the following table:
Name of the subroutine (action) |
Description |
---|---|
|
In this logic, the input variables, mainly coming from the visualization, are verified and assigned to local variables for further processing. |
|
This logic implements the state machine for the operation of the instance of the function block FB_MqttClient. The general states are:
|
|
This logic implements the state machine for the operation of the instance of the function block FB_MqttPublish. The general states are:
|
|
This logic implements the creation of the message to be published. |
|
This logic implements the state machine for the operation of the instance of the function block FB_MqttSubscribe. The general states are:
|
|
In this logic, the local variables are converted into the required format and then assigned to the associated output variables. The output variables are linked to the visualization. |
SR_VisControl
The program SR_VisControl
implements additional program code to control the displayed information on the visualization in the Logic Builder within the EcoStruxure Machine Expert software.
SR_SimulatedMachineData
The program SR_SimulatedMachineData
implements the simulation of process values which are converted into the JSON formatted string and then published via MQTT.
SR_PingService
This program implements the ping client functionality.