Expression Tags Slow

I’m at a customer site that is using 8.0.13 and in the UDT’s for the different devices we have an integer that is coming from the PLC and then an expression string that is generated from that integer number to use throughout the system.

That string expression is evaluating pretty slow and I’m trying to figure out where the bottle neck is and eliminate it.

For a test I have a single memory integer tag and a single string expression tag to test this just to make sure it isn’t in the UDT.

Well low and behold that same delay happens outside of the UDT as in the UDT.

I’ve created it own tag group to test to make sure that the tag group wasn’t causing the issue and the same thing is happening.

Any ideas on where I can start trying to figure out what is going on?

1 Like

What is the tag group rate at?

What is the expression and how are you evaluating that it’s slow?

Doesn’t seem to matter…


It’s a switch statement. However if I just mimic that value back its the same delay.

This is the statement:

	'Stopped', // State 0
	'Pre-Start', //State 7
	'Horn', //State 9
	'Starting', //State 10
	'Starting', //State 11
	'Forward', //State 20
	'Reverse', //State 21
	'Stopping', //State 30
	'Hand Forward', //State 100
	'Hand Reverse', //State 101
	'Unknown'), //Falback

TestSatus is a simple memory tag just for testing sake.

FYI this seems to be tied into another totally separate issue that we are having on this gateway that is causing the gateway to slow to a crawl.

Just FYI, consider using case statements instead of switch. They’re far more readable and editable

Yeah… that or a lookup is what we are looking at going towards. However some of the text is dynamic, just not shown here, based on the device.

It’s in the pipeline for future work.