I have a UDT with multiple tags that I’m recording. I would like to have these tags only recorded when a “Connected” tag is set to true inside of the UDT.
Can I bind the tag value within the UDT to the History Enable property of the tags I want to record history on?
tag(stringformat(’%s/Connected’, {PathToTag}[.])
Each instance of the UDT is for a different device that is connected at different points of our process. They are connected with a PLC in the middle, so ignition doesn’t connect to the devices directly. Otherwise I just wouldn’t record the bad statuses.
I would like to avoid having 100s of different Driven Scan Classes, one for each device.
My other idea is to just have a script record the data and avoid tag historian all together.
Have you considered a triggered transaction group for this use case?
Transaction groups are often the ideal solution when the situation is similar to: “X data needs to be stored at rate Y when tag Z is true”
A triggered group would specifically only record data when a certain tag condition is met. For your case the trigger would be when the “Connected” tag is True.
When the device is connected, I would like the value to continuously be recorded, which I guess I could do with enable/disable of the transaction group. I feel like then I’m choosing between 100s of transaction groups or scan groups.
I might be able to just do the tag history as ‘On Change’. They’re environmental sensors so they wouldn’t hold a value for very long.
With a triggered transaction group the data storage would be driven by the device’s “connected” tag, but it would require making a different group for each device.
If the value of the tag will be consistently changing when the device is connected, then the ‘On Change’ history option should work.