20 l_sdc_setbitofword - bit operation, 21 l_sdc_wordto2bytes - type converter, 22 l_sdc_wordtobits - bit demultiplexer – Lenze PLC Designer V2.x User Manual

Page 313: Plc designer v2.x| lenze application samples

Advertising
background image

1.3 EN - 07/2012

L

313

PLC Designer V2.x| Lenze Application Samples

The L_SDC_DataConversion.lib library

L_SDC_SetBitOfWord - bit operation

18.20

L_SDC_SetBitOfWord - bit operation

This function sets an individual bit to "1" within a value of the "WORD" type.

Inputs

Output signal
L_SDC_SetBitOfWord -
value of the "WORD" type, which results by the bit set.

18.21

L_SDC_WordTo2Bytes - type converter

This FB converts an input value of the "WORD" type to two output values of the "BYTE"

type.

Inputs

Outputs

18.22

L_SDC_WordToBits - bit demultiplexer

This FB outputs the 16 corresponding bit values for an input value of the "WORD" type.

Identifier/data type

Information/possible settings

wInput

WORD

Input signal

byBitNr

BYTE

No. (0 ... 15) of the bit that is to be set.

Identifier/data type

Information/possible settings

wInput

WORD

Input value

Identifier/data type

Information/possible settings

byOutput1

BYTE

Output value 1: Bit 0 ... bit 7 of wInput

byOutput2

BYTE

Output value 2: Bit 8 ... bit 15 of wInput

Advertising