FB_SendVisionData - General Information

Overview

Type:

Function block

Available as of:

V1.0.0.0

Inherits from:

-

Implements:

-

This chapter provides information on:

oTask

oDescription

oInterface

oDiagnostic Messages

oMethods

oProperties

Task

Send a vision protocol to a TCP server.

Description

The function block FB_SendVisionData contains a TCP client to send a vision protocol to a TCP server.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any action.

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active. If the output is TRUE while the i_xEnable is deactivated, the POU must first terminate its ongoing processing before transitioning this output to FALSE.

FALSE: The POU is inactive

q_xReady

BOOL

TRUE: The POU is ready to operate and can accept user commands.

FALSE: The function block is not ready to accept user commands.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = GD.ET_Diag.Ok -> Status message

q_etDiag <> GD.ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message that gives more detailed information on the diagnostic state.

q_xConnectedToServer

BOOL

Indicates that the client is connected to a server.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value of q_etDiagExt

Description

Ok

Ok

0

Ok

ConnectionRefused

17

Connection refused

Disabled

11

Disabled

WaitUntilDisabled

10

Wait until disabled

Working

8

Working

ConfigurationFailed

ConfigurationInvalid

16

Configuration invalid

ExecutionAborted

AddressInUse

18

Address is in use

AddressInUse

Enumeration name:

AddressInUse

Enumeration value:

18

Description:

Duplicate address.

Issue

Cause

Solution

The address/port is already used.

The IP address / port combination is not unique.

Verify that the combination of IP address and port is unique and not used by another client.

Verify that the combination of IP address and port is available.

ConfigurationInvalid

Enumeration name:

ConfigurationInvalid

Enumeration value:

16

Description:

The configuration is invalid.

Issue

Cause

Solution

The configuration is invalid.

The method Configuration(...) was not called successfully.

Verify that the method Configuration(...) was called successfully before enabling the function block FB_SendVisionData.

ConnectionRefused

Enumeration name:

ConnectionRefused

Enumeration value:

17

Description:

The connection to server has been refused.

Issue

Cause

Solution

Connection to server was unsuccessful.

The connection to the server could not be established.

Verify that the server is configured and available.

Disabled

Enumeration name:

Disabled

Enumeration value:

11

Description:

Disabled.

Issue

Cause

Solution

The function block is deactivated, no actions are executed.

FB_SendVisionData.xEnable and FB_SendVisionData.xActive are set to FALSE.

Set FB_SendVisionData.xEnable to TRUE to enable the function block.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

Status message: Sending the data was successful.

WaitUntilDisabled

Enumeration name:

WaitUntilDisabled

Enumeration value:

10

Description:

Wait until disabled.

Status message: The function block is going to be disabled.

Working

Enumeration name:

Working

Enumeration value:

8

Description:

Working.

Status message: The data is being sent.

Methods

Name

Description

ClearVisionData

Remove the data that was stored to be sent in the next vision protocol.

Configuration

Configure the IP address of the server, the client tries to connect to.

RegisterLoggerPoint

Register the FB_SendVisionData to the Application Logger.

Send

Send the protocol of vision data, set by SetHeader(...), SetNextProduct(...), and SetAdditionalString(...).

SetAdditionalString

Add an additional string to the vision protocol.

SetHeader

Set the data for the header of the vision protocol.

SetNextProduct

Set the data of one product.

Properties

Name

Data type

Accessing

Description

uiNumberOfProductsSet

UINT

Get

Number of products available to send to the server.

xVisionDataSent

BOOL

Get

Signal that new vision data was sent. Will be reset with next call of SetHeader(...).