Status Chart Component Show Data from a Transaction Group

I have an OPC tag that is reading the status of a machine from a PLC. I put this tag in a transaction group so that it will read the status of the tag (from t_stamp) every 60 seconds. I thought the status chart component would be a good representation of showing over time when the machine has been loaded (reads 4), unloaded (reads 2), or stopped (reads 1), with corresponding colors. Here is a picture of what I'm picturing with hardcoded values to get the point across for the status, time stamp, and legend.
image
Under the series property data i have the values I need attached to the colors I want for that value. I am assuming the binding on the series data is where I will tie in the t_stamp with the specific tag I want displayed in the chart, I'm just not entirely sure how. I know the easy chart component allows you to input the COL_NAME, TABLE_NAME, XVAL_COL_NAME, and DATASOURCE through DB Pens under the chart configuration property editor to directly grab and display this trend from the database table I made through the transaction group, and this feature would be super beneficial for the status chart, I'm just not sure if I am looking in the right place. If this status chart component is not the best choice for this circumstance, I am open to opinions, but if anyone knows how I can tie in my transaction group to this status chart component I would greatly appreciate it!

No, it's the right component. They key is to write SQL with something AS colName in the select list, so that the output column names match the column names the component needs. Drag a fresh component onto a window and examine the sample dataset it starts with. Arrange for your SQL binding to deliver the same column names and types.

4 Likes