FB_SEND_136_SNVT_reg_val

FB_SEND_136_SNVT_reg_val 1:

This function block sends the following LON output variable (nvo):

SNVT Name: SNVT_reg_val.

SNVT number: 136.

Description: Register value (raw value, bit code, number of decimal places).

FB_SEND_136_SNVT_reg_val 2: Inputs

VAR_INPUT
  wNVIndex     : WORD;
  stValue      : ST_LON_SNVT_reg_val;
  bStart       : BOOL;
  bSendInit    : BOOL := bSendInitDefault;
  bAuto        : BOOL := bAutoDefault;
  tMinSendTime : TIME := tMinSendTimeDefault;
  tMaxSendTime : TIME := tMaxSendTimeDefault;
  bDisabled    : BOOL := FALSE;
END_VAR

Name

Type

Description

wNVIndex

WORD

Unique index. This index is required for binding the LON nodes. A maximum of 62 SNVTs are permitted per LON terminal. Values between 0 and 61 are possible.

stValue

ST_LON_SNVT_reg_val

Structure of the data to be sent.

bStart

BOOL

A positive edge starts the send process (irrespective of bAuto).

bSendInit

BOOL

Automatically sends the value once when the PLC restarts.

bAuto

BOOL

Automatic sending is selected when a value changes or the time tMaxSendTime has elapsed (polling).

tMinSendTime

TIME

Parameter for automatic sending. A new value will be sent at the earliest after this time has elapsed. This prevents continuous sending.

tMaxSendTime

TIME

Parameter for automatic sending. The value is sent at the latest after this time has elapsed. The value 0 disables this function.

bDisabled

BOOL

TRUE = deselection of the function block.

FB_SEND_136_SNVT_reg_val 3: Inputs/outputs

VAR_IN_OUT
  stLON_Com : ST_LON_Communication;
END_VAR

Name

Type

Description

stLON_Com

ST_LON_Communication

This structure is used to link FB_LON_KL6401() with the transmit/receive blocks.

FB_SEND_136_SNVT_reg_val 4: Outputs

VAR_OUTPUT
  bBusy         : BOOL;
  bError        : BOOL;
  eError        : E_LON_ERROR;
  dwErrorKL     : DWORD;
END_VAR

Name

Type

Description

bBusy

BOOL

The bBusy output is TRUE as long as values are sent.

bError

BOOL

This output goes TRUE as soon as an error occurs. This error is described via the eError variable.

eError

E_LON_ERROR

This output outputs an error code in the event of an error. bError goes TRUE at the same time.

dwErrorKL

DWORD

Error ID of the function block FB_LON_KL6401() (see dwErrorKL). In this case the variable eError has the value eKL6401_Error. bError goes TRUE at the same time.

Requirements

Development Environment

TwinCAT 3 PLC library to be integrated

TwinCAT from v3.1.4020.14

Tc2_LON from 3.3.4.0