Version:

This lesson is part of the Tags in Ignition course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off
Take topic challenge

Supplemental Videos

LESSON

Custom Tag Properties


Length: 2:26 min

Version:

Description

Like many things in Ignition, Tags can have their own custom properties, allowing you to create additional fields on a Tag, which can then be referenced by other systems. Learn more about creating custom properties on Tags in this lesson.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] In this lesson We will cover tag custom properties. Users can define their own custom properties within a tag. Their tag custom properties can then be referenced just like most other tag properties. Currently, I'm in my designer. I will create a new tag by hitting to my tag browser on the left, and right clicking where I want my new tag to be created. I'll head down to the new tag menu and select to create a new standard expression tag. I will name the tag "Multiplier" and set this expression to be 10 multiplied by five. Clicking okay and accepting my changes my tag will be created and it's value is 50. Or my expression's expected result. Instead of multiplying the number 10 by the static value of 5 let's make it dynamic and multiply it by a custom property value. I double clicked on my multiplier tag to bring up the tag editor. I will press on the plus sign here to create a custom property. I will name my custom property "myNumber" and set it's type to number. If I scroll to the very bottom here I will see my newly created property now listed. If I press okay I can expand my tag from the tag browser tree, and I will see my newly created property, as well as it's value. Now that I created our property, let's use it under the expression tags expression. As we said earlier, we want to multiply 10 by my custom properties value. So I can get rid of the 5 and use the tag button here to drill down to my expression tag, and then it's custom property. I'll press okay and now my expression is multiplying the number 10 by my custom properties value. Let's use some perspective components to visualize what's going on. Here, I have a perspective view where I will put a numeric entry field component and say, an LED display. I will bind my LED displays value property to my multiplier tag like so. I will then bind my numeric entry fields value property to my multiplier tag's custom property like this. I will set this binding to be bidirectional so that my component can run back to my custom property and press okay to finish my binding configuration. Now putting my view in preview mode using the F5 shortcut key whatever value I type into my entry field here will be written to my custom property and my custom properties value will be multiplied by 10. The product should then be displayed on my LED display. As you can see, tag's can have custom properties and these custom properties can be used by the system and within tags themselves.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.

close

Share this video