MikahB Posted June 25, 2015 Report Share Posted June 25, 2015 Have a real-time trend that my customer really wants to be able to compare to historic data. So, I came up with the following plan: - Real-Time Data is stored in a DataTable - call it DataTableCurrent - Allow User to Save DataTableCurrent contents into a History Data Table called HistOutput1 - When User enables History Trend, every time I write a row to DataTableCurrent, read the row from HistOutput1 with the same Row Number - Enable Trend Curve for destination Int from HistOutput1 And, viola - you get current data overlaying historic data of your choice. Trouble is, every time I run the Read Row From Data Table FB, I get zero as a result. Here is what I have checked and know for sure: 1) HistOutput1 does indeed have the data I want - I can export it to an SD and see exactly what I expect 2) The RowNumber I am trying to read is a valid number - I am using the same variable to write the current row in DataTableCurrent as I am to read the row from history, the two FB's are in the same rung and the variable cannot change 3) There are no data type mismatches - Everything is ML 4) The rung containing the Read Data Table Row is executing as the next FB in line is properly writing data to DataTableCurrent I'm kind of out of ideas as to what I need to check. From everything I can see, no matter what I do to call this FB I get a zero back. Screenshot attached of what I have now. The disabled rung below divides to give me a trend-able number, thought that was the problem but ML403 is always zero. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.