FB_ALY_BinaryStream_Mqtt

Syntax

Definition:

FUNCTION_BLOCK FB_ALY_BinaryStream_Mqtt
VAR_INPUT
    nCycleTime: UDINT;
    stSystemID: GUID;
    sStreamTopic: T_MaxString;
    stMqttConnSettings: ST_MqttConnectionSettings;
END_VAR
VAR_OUTPUT
    bError: BOOL;
    ipResultMessage: I_TcMessage;
    eConnectionState: ETcIotMqttClientState;
END_VAR

FB_ALY_BinaryStream_Mqtt 1: Inputs

Name

Type

Description

nCycleTime

UDINT

Logging cycle time

stSystemID

GUID

Twincat System ID

sStreamTopic

T_MaxString

Topic to stream to

stMqttConnSettings

ST_MqttConnectionSettings

Settings for the mqtt connection to the message broker

FB_ALY_BinaryStream_Mqtt 2:Outputs

Name

Type

Description

bError

BOOL

TRUE if an error has been occurred

ipResultMessage

I_TcMessage

Eventlogger

eConnectionState

ETcIotMqttClientState

Indicates the state of the connection between client and broker as enumeration ETcIotMqttClientState.

FB_ALY_BinaryStream_Mqtt 3:Methods

Name

Definition Location

Description

Call

Local

Method for background communication with the TwinCAT driver. The method must be called cyclically.

CloseStream

Local

Close the analytics binary stream

CreateDescription

Local

Create binary stream description

CreateSymbolic

Local

Create binary stream symbolic

SendData

Local

Send binary stream data

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics