You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
2:47Property Binding
-
2:15Property Binding – Bidirectional
-
2:19Tag Binding
-
2:17Tag Binding – Drag and Drop
-
2:19Tag Binding – Bidirectional
-
1:40Tag and Component Overlays
-
3:20Indirect Tag Binding
-
2:17Tag Historian Binding
-
3:21Expression Binding
-
1:24Expression Binding – Concat Strings
-
1:01Expression Binding – Celsius to Fahrenheit
-
2:01Expression Binding – Format Date
-
2:46Expression Binding – Date Manipulations
-
1:23Expression Binding – Bit Functions
-
2:06Expression Binding – Switch
-
1:43Expression Binding – Checking Conditions
-
2:40DB Browse Binding
-
2:05DB Browse Binding – Dynamic Filters
-
1:16SQL Query Binding
-
2:26SQL Query Binding – Polling
-
1:47SQL Query Binding – Dynamic Filters
-
1:55SQL Query Binding – Scalar Query and Fallback
-
1:47SQL Query Binding – Scalar Query and Update
-
2:24Cell Update Binding
-
2:07Function Binding
-
4:22Component Styles
Take Topic Challenge
LESSON
Expression Binding – Bit Functions
Description
Learn how to use various bit functions in expression bindings like getBit to return individual bits of a word.
Video recorded using: Ignition 7.7
Transcript
(open in window)[00:00] The expression language in ignition has a lot of bit functions and opers that we can work with. The most common function people want to use is a getBit function, which basically gets a bit out of a word and displays it on a screen. So here I have a tag called WriteableInteger1 and the value right now is 5. So what I want to do is basically display the value of bit 0, the first bit of that integer. So I'm going to bring on a Multi-State indicator onto a window, which basically will show me the state, on or off. I'm actually going to bind the state property here to an expression. In the expression language, you go to effects, go down to logic, here I have my bit functions, or binary functions. I have binEnc, I have binEnun and I have getBit. The getBit here will allow me to get a bit at a particular position. So I'm going to bring that in, the first argument is the number I want to use. So I'm going to go over here to the tag and bring in my WriteableInteger1 tag, then, of course, the second is the bit position. I'm going to do bit 0 here, which is the very first bit. So I do that, it's going to bring back either 1 or 0 or true or false, soon as I press okay, I can see that, right now, it is certainly on, because the value's 5. So bit 0 is 1 . If I set this to say 4, bit 0 will no longer be active so you can see that it goes off. So it's very easy to work with bits in our expression language.