I have a Channels table, with one column being the unit a channel is on. This can change, and is simply the name of the unit. I have another table in the driver that is the list of units, containing information like the serial number.
How can I trend the unit the channel is on?
Trending on strings does not work, nor does a dynamic discrete. There is no numeric representation (from the device) of the unit that is unique.
Any information is appreciated. Thanks.
Update with what the current trending looks like:
I mean that on the trend graph when trending=true is set, values like '1' or '2' is set, and you can't see the string values that were at the set time.
That looks like an issue to me, let's investigate via a collaboration task.
Hi Blake,
Trending on strings should generally work if it is enabled in the connector, but there are a few specific behaviors when trending a string parameter:
- In a trend graph, the strings will not be sorted or ordered. In the background these are numbered sequentially, so the first string that came in will be the lowest number, etc.
- Averaging is done differently, as an average cannot be calculated in the same way as for a numeric parameter. The average value will be the value that was present for the longest time in that interval. So e.g. if a parameter "color" was "red" for 3 minutes, "green" for thirty seconds" and "blue" for 90 seconds of a 5 minute interval, the average value will be stored as "red". If you do not want this behavior and the parameter is changing slowly, you could consider storing only real-time data for this parameter and increasing the TTL on the real-time trending. For rapidly changing parameters this is not recommended as it will increase the storage and performance requirements.
Hi Michiel, interesting and not something I would have considering (the average). I updated it to real-time only, and will check that later. I also updated my question with a screenshot, in that it only shows a numeric value instead of the string. Is it possible to get the string to show?
Hi Blake,
Unfortunately, I'm not able to tell from the screenshot. At first sight it even looks like a numeric parameter with some exceptions defined on it to me. Would you be able to share the definition of this parameter that was used in the connector?
See below. The exception is only for when the channel is currently not used. In my screenshot, it is connected, but the trending shows times were it was not.
Note I'm trying some of the other recommendations like trending last, and so far no luck.
<Param id="407" trending="true">
<Name>ChannelsUnit</Name>
<Description>Unit (Channels)</Description>
<Type>read</Type>
<Information>
<Subtext>Unit or Multipoint Unit name to which the channel was assigned.</Subtext>
</Information>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
<Exceptions>
<Exception id="1" value="-1">
<Display state="disabled">N/A</Display>
<Value>-1</Value>
</Exception>
</Exceptions>
</Interprete>
<!– SuppressValidator 2.5.1 No valid thresholds for dynamic discrete –>
<Alarm>
<Monitored>true</Monitored>
</Alarm>
<!– /SuppressValidator 2.5.1 –>
<Display>
<RTDisplay>true</RTDisplay>
<Trending>
<Type>last</Type>
</Trending>
</Display>
<Measurement>
<Type>string</Type>
</Measurement>
</Param>
The parameter definition looks correct, as Pieter already suggested it will be best to follow up with a task why the labels on the Y-axis are not visible.
When you say 'Trending on Strings does not work', do you mean the driver does not allow it (so trending="true" has not been set on the read param)?