FB_SetRuleState

FB_SetRuleState 1:

SetRuleState function block.

Syntax

Definition:

FUNCTION_BLOCK FB_SetRuleState
VAR_INPUT
    bExecute             : BOOL;
    nConfigurationId     : UINT;
    sGrammarFile         : STRING;
    sGrammarRule         : STRING;
    bGrammarActivate     : BOOL;
END_VAR
VAR_OUTPUT
    bBusy                : BOOL;
    bError               : BOOL;
    nErrorId             : ETcsSpeechCommandExitCode;
    nLastCommandExitCode : UINT;
END_VAR

FB_SetRuleState 2: Inputs

Name

Type

Description

bExecute

BOOL

Rising edge sets the given RuleId.

nConfigurationId

UINT

ConfigurationID to be used (see TcSpeech Configurator).

sGrammarFile

STRING

Path to the SRGS file on the target that is to be used. If not specified, the SRGS from the ConfigurationId is used

sGrammarRule

STRING

RuleId that is to be set.

bGrammarActivate

BOOL

Defines whether the RuleId should be switched on or off.

FB_SetRuleState 3: Outputs

Name

Type

Description

bBusy

BOOL

Function block is busy.

bError

BOOL

Function block is in error state.

nErrorId

ETcsSpeechCommandExitCode

ErrorId, which indicates the exact reason for the error.

nLastCommandExitCode

UINT

Return value of the last call.

FB_SetRuleState 4: Methods

Name

Description

SetAmsNetAddr

Method to specify a different AmsNetAdr for the TcSpeech service. Only needs to be called up once.

Required License

TC3 Speech