Reporting help, historical data based on state of another tag

Thank you in advance for any help you can offer. I have a reporting project for a customer and I am not sure where to begin. Working in ignition 8.0.

The customer needs a report generated that will show when they initiated various tests on their system and the outcome of those tests.

Once a quarter they initiate each test via their scada system by pressing a button on the screen which toggles a boolean tag in a PLC. That PLC tag is tied to a tag in ignition that has history and alarming enabled (lets call this tag TestModeActive). The PLC tag also toggles other logic in the PLC which sets an alarm off in the PLC and in ignition after a delay.

I would like to create a report that finds whenever the TestModeActive tag changes to a value of true, and at that time record the date and time and the current value of 2-3 other tags at the time that tag became true. List that information in a row for each occurrence.

I just am not sure where to begin. I've been playing around in the reporting module and watching reporting videos at Inductive University but nothing stuck out so far to point me in the right direction.

You are trying to recreate the functionality of SQL Bridge transaction groups using the historian. The historian is not a reliable way to capture this information, as the relative timing of the various tags' storage is undefined. (Which is why nothing stuck out searching this forum--wrong tool for the task.)

Create a SQL Bridge transaction group with that PLC tag as its trigger. Use OPC items to capture the other values of interest, and use OPC "Read mode" instead of "Subscribe" to have that capture use reliable timing.

{If you don't want to purchase the SQL Bridge module, you can manually do the same task with a gateway tag change event script in your project.}

Each event will have one row in the database. Use a query in your report to capture all of those events within a desired time period.

2 Likes