General Discussions
Some Analog tags of Custom Type not Polling

I've created a Custom Type that contains five analog tags - Value, EU_Max, EU_Min, L_Alarm, H_Alarm. Their PLC addresses are based on a custom Parameter called 'BaseAddress'. Address expression example:

\baseaddress + ".Value"

I've also tried:

Pickvalid(Concat(..\baseaddress, ".Value), "")

and

Concat(getphrase(..\baseaddress), ".Value")

etc

Have also tried checking and unchecking the Text option for the parameter.

I've gotten the address to populate correctly each time but when I instantiate the type and the proper address populates only a couple of the tags in the type get a value. The others don't seem to have made the driver list.

If I disable/enable the tags that don't show a value, they'll start polling.

Anyone know what I'm missing?

I've created a Custom Type that contains five analog tags - Value, EU_Max, EU_Min, L_Alarm, H_Alarm. Their PLC addresses are based on a custom Parameter called 'BaseAddress'. Address expression example: ```` \baseaddress + ".Value" ```` I've also tried: ```` Pickvalid(Concat(..\baseaddress, ".Value), "") ```` and ```` Concat(getphrase(..\baseaddress), ".Value") ```` etc Have also tried checking and unchecking the Text option for the parameter. I've gotten the address to populate correctly each time but when I instantiate the type and the proper address populates only a couple of the tags in the type get a value. The others don't seem to have made the driver list. If I disable/enable the tags that don't show a value, they'll start polling. Anyone know what I'm missing?

I made a new identical Type but used Legacy Analog Status tags in the Type instead of the new IO tags. Now all the tag values populate. Not sure what the difference is but could be a quirk of the new IO tags or a setting I missed.

Anyone else run into this?

I made a new identical Type but used Legacy Analog Status tags in the Type instead of the new IO tags. Now all the tag values populate. Not sure what the difference is but could be a quirk of the new IO tags or a setting I missed. Anyone else run into this?

I would troubleshoot with:

PickValid(\GetPhrase(..\baseaddress), "") + ".Value"

I have done much, much more complicated dynamic addresses with the new IO tags and don't have any issues with it.

I think the optimize parameter checkbox must be turned off as well as you arre referencing a separate tag?. Almost all issues with scripting are that check box. I find it's extremely rare that you ever can have that checked.

I would troubleshoot with: ```` PickValid(\GetPhrase(..\baseaddress), "") + ".Value" ```` I have done much, much more complicated dynamic addresses with the new IO tags and don't have any issues with it. I think the optimize parameter checkbox must be turned off as well as you arre referencing a separate tag?. Almost all issues with scripting are that check box. I find it's extremely rare that you ever can have that checked.
edited Jul 14 at 9:01 pm

Well - I found my problem. I had an expression for Unscaled Min and Max:

Pickvalid([..\Min EU], 100)

I copied this expression from Unscaled Min and changed to ..\Min EU but didn't change 100 to 0 and 'Optimize at Tag Init' was checked.

I noticed in the debugger that the tags had Value as Invalid but showed the correct value in the RawValue variable. Sure enough, Value was invalid because the at initialization Min EU is invalid so Unscaled Min and Max were 100 making the value itself Invalid.

Solution: Change 100 to 0 in the expression and uncheck the Tag Initialization box.

Well - I found my problem. I had an expression for Unscaled Min and Max: ```` Pickvalid([..\Min EU], 100) ```` I copied this expression from Unscaled Min and changed to ..\Min EU but didn't change 100 to 0 and 'Optimize at Tag Init' was checked. I noticed in the debugger that the tags had Value as Invalid but showed the correct value in the RawValue variable. Sure enough, Value was invalid because the at initialization Min EU is invalid so Unscaled Min and Max were 100 making the value itself Invalid. Solution: Change 100 to 0 in the expression and uncheck the Tag Initialization box.
25
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft