FC_SemaphoreMeDelete

 

FC_SemaphoreMeDelete - General Information

Overview

Type:

Function

Available as of:

V1.0.7.0

Versions:

Current version

Task

Destroying a semaphore.

Description

Calling up the function destroys the transferred semaphore. Prior to deleting, a Take() is executed on the semaphore. In the event that the semaphore is not free, the call up task is blocked.

For restrictions for use see Notes on Using the "SemaphoreMutualExclusion" Function.

Interface

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

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_sMsg

STRING[80]

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

Input/Output

Data type

Description

iq_stSemMe

ST_SemaphoreMe

Structure of the semaphores to be destroyed

Return Value

Data type

Description

BOOL

TRUE: the semaphores have been successfully destroyed.

FALSE: the semaphored have not been destroyed.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

SemaphoreMeNotInitialized

266

SemaphoreMe is not initializd.

UnexpectedProgramBehavior

SemaphoreMeDeleteFailed

274

Deleting the SemaphoreMe was unsuccessful.

UnexpectedProgramBehavior

SemaphoreMeDeleteTimeout

270

Timeout when deleting the SemaphoreMe

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The semaphores have been successfully destroyed.

SemaphoreMeDeleteFailed

Enumeration name:

SemaphoreMeDeleteFailed

Enumeration value:

274

Description:

Deleting the SemaphoreMe was unsuccessful.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

SemaphoreMeDeleteTimeout

Enumeration name:

SemaphoreMeDeleteTimeout

Enumeration value:

270

Description:

Timeout when deleting the SemaphoreMe

Issue

Cause

Solution

-

An attempt was made to destroy a semaphore in use that has not been released within a given time out.

Ensure that the semaphore with FC_SemaphoreMeGive has been released and was reserved with FC_SemaphoreMeTake.

SemaphoreMeNotInitialized

Enumeration name:

SemaphoreMeNotInitialized

Enumeration value:

266

Description:

SemaphoreMe is not initializd.

Issue

Cause

Solution

-

The semaphore is not initialized.

Transfer the same semaphore which was used during call-up of FC_SemaphoreMeCreate at the iq_stSemMe input.