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 email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
This lesson is part of the Perspective Components and Bindings course. You can browse the rest of the lessons below.
4:55Indirect Tag Binding
5:35Tag History Binding
Take topic challenge
Take topic challenge
2:55Expression Structure Binding
3:14Tag Binding - Expression
3:01Tag History Binding - Expression
Learn about how to customize the dragging and dropping of Tags into views, creating instances of the Tags as components.
Video recorded using: Ignition 8.1
Transcript(open in window)
[00:00] Perspective offers a handful of tools to make building a project simpler and more efficient. One of the most prominent of these tools is the ability to drag tags from the tag browser into a view and automatically create a component to display the value of that tag. For example, I have an integer tag here with a value of 10 and when I drag it into my view, I can select a component I'd like to use to represent the tag in my view. If I choose a simple LED display, it shows the value of my tag. Note that what this is actually doing is creating a binding on the component to my tag. Now, I also have a string tag here and when I drag that into my view, a different menu appears. Every tag data type is associated with its own component menu. So for here, I'll just select label and I'll make it a little bit bigger. Now, if we'd like I can customize the components that are shown for each tag data type. To do that, we select a project and then project properties. And then within project properties we want to be at tag drop under perspective. The first part of this menu gives us the opportunity to configure different components for each tag data type.
[01:10] So first, we select a data type, I'll stick with integer. So here we can see the components that can be created on an integer tag. To add a component, we click the plus icon and to remove a component from the list we click the trash can icon. So for example, let's say I want to add a component. I'll scroll down to the bottom of the list, and when I double click, I can see a dropdown that shows all of the components we could put in this menu. There are many components to choose from. Let's just say, I want a toggle switch, for example. And now when I drag in an integer tag, the toggle switch option will be available. This menu also gives us the ability to specify which bindings are actually configured on components that I create via tag drop. For example, if I specify a component type of cylindrical tank, by default the value property of the tag would be bound to the prop stock value property on the tank. I've also added another tag binding. Here I'm binding the metadata visible property on the cylindrical tank to the enabled property of the tag. So to see this inaction, I'm going to click OK and now I have an integer tag here that I've disabled.
[02:15] So when I drag it into my view and select a cylindrical tank it is invisible because the visible property on the components has been bound to the enabled property on the tag. We'll also note that when I drag an integer tag in that toggle switch option is available because I've configured it as such in the list. That's it for our coverage of the tag drop interface. It's an easy way to configure what happens when you drag standard tag types into a view and want to create standard components from them. In other videos we'll explore how you can configure dropping in other types namely UDTs or even standard tags to create view instances rather than just components.