[refactor-14335]Ignition 8 equivalent of TagProp.InterpolationMode

ignition80
#1

Hello, I have existing code that looks like this:

tag.getAttribute(TagProp.InterpolationMode).getValue();

where Tag is an old-style Ignition 7 Tag object.

There is no InterpolationMode in WellKnownTagProps, I’m wondering how to retrieve this now?

0 Likes

#2

Hmm. I think this prop is now HistoricalDeadbandMode, and that its definition got moved to the tag history module… which would make it hard to access for you.

Maybe you can define your own copy of the Property and try calling getAttribute with it:

public static final Property<DeadbandMode> HistoricalDeadbandMode = new BasicProperty<>(
    "historicalDeadbandMode",
    com.inductiveautomation.ignition.common.sqltags.model.types.DeadbandMode.class,
    com.inductiveautomation.ignition.common.sqltags.model.types.DeadbandMode.Absolute
);
0 Likes

#3

OK thanks Kevin, I’ll take a look

0 Likes

#4

@Kevin.Herron I don’t think that’s it. In the Ignition 7 Designer, this property was shown in the UI as Value Mode, and there was also a different separate concept called Historical Deadband Mode.

So it seems to me that the concept of Value Mode has just been dropped, because you can’t specify it anywhere. Any chance you could confirm that with your development team? It’s an important concept so I’d be surprised if there isn’t an equivalent in Ignition 8.

0 Likes

#5

The LegacyTagPropUpgrader specifically upgrades the InterpolationMode prop into historicalDeadbandStyle:

        registerPropertyUpgrader(TagProp.InterpolationMode,
            new BasicPropertyUpgrader(
                new BasicProperty<>("historicalDeadbandStyle", InterpolationMode.class, InterpolationMode.Auto)));

Which is now defined in com.inductiveautomation.gateway.tags.history.actor.TagHistoryProps, rather than in common tag properties.

0 Likes

#6

Oops, I read the wrong prop… they’re right next to each other!

0 Likes

#7

@Kevin.Herron I did a face palm as well, I should have clicked on Deadband Style to see what its values were.

@PGriffith, com.inductiveautomation.gateway.tags.history.actor.TagHistoryProps does not appear to be accessible in the Ignition SDK. I’ll just do new BasicProperty<>("historicalDeadbandStyle", InterpolationMode.class, InterpolationMode.Auto) for now but it might make sense to expose those TagHistoryProps in the SDK so that code like mine doesn’t proliferate and make it harder for you guys to control.

1 Like

#8

I’ll make a ticket, no reason (I can think of) those shouldn’t be available in the SDK.

1 Like