FB_Play

FB_Play 1:

Playback function block.

Syntax

Definition:

FUNCTION_BLOCK FB_Play
VAR_INPUT
    bPlay                : BOOL;
    sPath                : STRING;
    nConfigurationId     : UINT;
END_VAR
VAR_OUTPUT
    bBusy                : BOOL;
    bError               : BOOL;
    nErrorId             : ETcsSpeechCommandExitCode;
    nLastCommandExitCode : UINT;
    nPlaybackPosition    : ULINT;
    nPlaybackTotal       : ULINT;
END_VAR

FB_Play 2: Inputs

Name

Type

Description

bPlay

BOOL

Rising flag triggers play command.

sPath

STRING

Path to audio file on target system. 16khz sample rate, 16 bit sample size, 1 channel expected.

nConfigurationId

UINT

ConfigurationId of configuration to be used in play request.

FB_Play 3: Outputs

Name

Type

Description

bBusy

BOOL

Function block is busy.

bError

BOOL

Function block is in error state.

nErrorId

ETcsSpeechCommandExitCode

ErrorId providing details of the occurred error.

nLastCommandExitCode

UINT

Returncode of last executed command.

nPlaybackPosition

ULINT

Current playback position in file playback (milliseconds).

nPlaybackTotal

ULINT

Total length of file playback (milliseconds).

FB_Play 4: Methods

Name

Description

SetAmsNetAddr

Method to be called once to specifiy the AmsNetId of destination TcSpeech service.

Required License

TC3 Speech