FB_OCPP1_Client

FB_OCPP1_Client 1:

This function block represents an OCPP client that can be connected to an OCPP server. There are two directions of communication.

The send methods are used when sending requests to the server. In these methods, the response from the server is processed directly and stored in the output parameters of the methods.

If, on the other hand, a request is received from the server using one of the Receive methods, the response must be sent using the appropriate Response method.

The client sends an internal Heartbeat, the time interval of which can be adjusted using the HeartbeatInterval Property. If the client does not receive a response from the server to a Heartbeat, a Reconnect to the server is then attempted. For all other message types, a timeout error is output on the client function block if there is no response.

Syntax

FUNCTION BLOCK FB_OCPP1_Client
VAR_OUTPUT
    bValid              : BOOL;
    bBusy               : BOOL;
    bError              : BOOL;
    eErrorResult        : HRESULT;
    eErrorAction        : E_OCPP1_Action;
END_VAR

FB_OCPP1_Client 2: Outputs

Name

Type

Description

bValid

BOOL

The interface to the driver in the background exists.

bBusy

BOOL

Is TRUE as long as the function block is busy with processing.

bError

BOOL

Becomes TRUE when an error situation occurs.

eErrorResult

HRESULT

Last error present on the function block.

eErrorAction

E_OCPP1_Action

OCPP command for which the error occurred.

FB_OCPP1_Client 3: Properties

Name

Type

Access

Description

HeartbeatInterval

TIME

Get, Set

Internal HeartbeatInterval from the client. Another Heartbeat can also be sent manually using the SendHeartbeat method. With the internal HeartbeatInterval, it should be noted that the server responds in its BootNotification.conf with a specified HeartbeatInterval for the client. This specified HeartbeatInterval is then set internally. However, the HeartbeatInterval can then be changed as required during runtime.

IsConnected

BOOL

Get

Status of the connection to the OCPP server.

IsPending

BOOL

Get

Waiting for completion of the request.