Hi, I’m using Schneider Electric M241/M251 PLCs over ModbusTCP and they don’t support masked writes to registers.
The effect of this is that while Ignition can read bits from words, it cannot write to them. The workaround I’ve been using is located here: Troubles making a Derived Boolean Tag work as a mask for a Short Tag - #2 by Kevin.Herron
However, I’m seeing some strange behavior where the derived tags don’t work reliably in certain instances, failing with an unknown value
Specifically, I have 2 UDTs, one for
Tank and one for
Valve UDT has multiple
BOOL derived tags defined, as well as their source
Instantiations of this UDT work fine on their own.
Tank UDT has multiple
BOOL derived tags AND multiple
Valve UDT instantiations within.
Upon creating these tags or rebooting the gateway (possibly other times as well) the
BOOL derived tags inside say
tank1.valveA will fail. At this point, the log file fills up with the following on the gateway:
Error in derived tag com.inductiveautomation.ignition.common.expressions.ExpressionException: Unsupported types for RShift: 'null' and 'java.lang.Long' at com.inductiveautomation.ignition.common.expressions.BitwiseExpression.execute(BitwiseExpression.java:54) at com.inductiveautomation.ignition.common.expressions.BitwiseExpression.execute(BitwiseExpression.java:42) at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.reference.DerivedTagValueActorFactory$DerivedTagValueActor$Executor.execute(DerivedTagValueActorFactory.java:246) at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.reference.DerivedTagValueActorFactory$DerivedTagValueActor.processIncomingValue(DerivedTagValueActorFactory.java:107) at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.reference.TagReferenceValueActorFactory$TagReferenceValueActor.tagChanged(TagReferenceValueActorFactory.java:169) at com.inductiveautomation.ignition.gateway.tags.subscriptions.ProviderSubscriptionManagerImpl$TagChangePublish.run(ProviderSubscriptionManagerImpl.java:1138) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
Right clicking on the UDT instance and restarting the tag allows the derived
BOOL tags to work as expected.
I have a support ticket open, but it hasn’t been reproducible on their side. I thought I’d reach out here too.
Edit for screenshots of derived tag definitions: