Lenze DDS Function library PLCToolBox User Manual Page 25

  • Download
  • Add to my manuals
  • Print
  • Page
    / 26
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 24
Function library LenzePLCToolBox.lib
Functions/function blocks
2.17 L_TBSetBitOfWord
2−17
L LenzePLCToolBox.lib EN 1.5
2.17 L_TBSetBitOfWord
WORD L_TBSetBitOfWord (wInput, byBitNr)
This function sets a single bit in a value of type "word" to "1".
L_TBSetBitOfWord
0
15
wInput
byBitNr
1
0...15
Set
Transfer parameters
Identifiers Data type Info/possible settings
wInput Word Value in which a bit is to be set to 1".
byBitNr Byte No. (0 ... 15) of the bit to be set.
Return value: Word
Value Meaning
0 ... 65535 Value of type "word" resulting from the set bit.
Example
Calling the function in ST:
wValue := 97 (* wValue = 97 dec = 01100001 bin *)
wValue := L_TBSetBitOfWord(wValue, 3); (* set bit 3 *)
(* wValue = 105 dec = 01101001 bin *)
Page view 24
1 2 ... 20 21 22 23 24 25 26

Comments to this Manuals

No comments