In today's edition of “Insight's Inbox,” we answer a reader's question on how to make a PanelView Plus or View Machine Edition trend contain historical data.
To do this you'll need to create a Data Log Model, set it to run automatically, and then tie it to your existing Trend object.
Below I'll list the steps needed to make this change, however I will assume the reader knows how to open their project in View Studio, as well as which graphic display their trend is on.
Step 1) Discover which tags are displayed on your trend
Open your project in FactoryTalk View Studio, then open the Graphic Display with your Trend, and then double click on the Trend Object to bring up its properties.
Next, select the “Connections” tab and make note of every tag listed.
In the example below, my Trend Object has three tags: memint1, memint2, and systemsecond.
Step 2) Create a new data log model
Now return to the project tree, expand the “Data Log” folder, right click on “Data Log Models,” and select “New.”
Step 3) Describe Data Log and Define Maximum Data Points.
Once the new data log window appears, give your new data log model a description and provide a maximum number of data points you would like the log to hold.
Note: “Maximum Data Points” refers to all the data collected for all tags in the data log model. When the maximum is reached, the oldest data is overwritten.
Step 4) Understanding the “maximum data points” setting in FTViewME 7.0 and higher
The maximum number of data points in a data log file in View Machine Edition 7.0 or higher is 1 million (all previous versions were limited to 300,000.)
This means if you set the maximum data points to 1 million, and have the maximum number of tags being logged (100,) each tag can have up to 10,000 data points of historical data logged in the data log file.
Step 5) Choose your desired path to store the data log file.
Now select the “Paths” tab, and choose where you would like the data log file stored.
“System Default” stores the data log file with the project and is by far the most popular choice.
“Custom” allows the data log file to be stored in another folder on the local drive, storage card, external storage device, or on a network share.
NOTE: It is important to note that if the data log file becomes unavailable (i.e. an external storage card is unplugged or the network goes down) then data will stopped being logged until the path becomes available again AND the project is restarted.
Step 6) Configuring Log Triggers for Periodic
Next click on the “Log Triggers” tab and select “periodic.”
Now choose how often the data for all tags should be logged (the fastest interval is 10ms.)
NOTE: If you set the maximum data points to 1 million, have 100 tags being logged, and set the log period to 50ms, each tag will only have about 8 minutes worth of historical data logged.
Step 7) Optional: Configuring Log Triggers for On Change
In applications where tag values change little over time, the usefulness of the data log can be greatly extended by using the “On Change” log trigger.
To do this, select “On Change” and then choose the desired “Maximum update rate,” “Change percentage,” and “Heartbeat.”
Step 8) Add tags to data log model
Now select the last tab of your new data log configuration, “Tags in Model,” and then click on the ellipsis button (with the three dots:)
Step 9) Select tags from Tag Browser
You should now see the “Tag Browser” as shown below.
Navigate the browser to find each tag listed in Step 1, selecting each tag and clicking on the “Add Tag(s) to List” button.
When done, click on “OK.”
Step 10) Adding Tags to Model
Back on the “Tags in Model” tab, click the “Add” button:
Step 11) Approve Changes
Once all the changes to your new data log model is complete, click the “OK” button.
Step 12) Save your new Data Log Model
At this point you will be prompted to save your data log model.
Select “Yes” to continue:
Step 13) Name your new Data Log Model
Now provide a name for your data log model, and click on “OK.”
Step 14) Verify your new data log model has been created.
Verify your new Data Log Model has been created by insuring it now appears in the project tree under “Data Log Models:”
Step 15) Edit your Trend and specify the data log model
Now return to your Graphic Display that contains your Trend Object, and open the Trend's properties.
On the “Pens” tab, select your new “Data Log Model” as shown below.
Now click “OK” and save your graphic display.
Step 16) Set the Data Log Model to start logging on startup
In most cases you'll want your data log model to start logging data when the project starts.
To enable this, in the project tree double click on “Startup:”
Step 17) Choose which Data Log Model runs on startup
In the Startup configuration window, select the checkbox to the left of “Data Logging,” and then select your data log model from the drop down list.
Step 18) Accept Startup changes
Once your data log is selected to run on startup, click the “OK” button to accept your changes.
Step 19) Run PanelView Plus / View Machine Edition project to insure the trend is now historical
Run your project, and after a couple of minutes view your trend screen to insure your trend now contains historical data like the trend below:
I hope you've found today's “Insight's Inbox” about making a PanelView Plus or View Machine Edition Trend Object display historical data helpful.
If you have any comments, questions, or suggestions, please feel free to share them with us by submitting the “post a comment or question” link below.
Update: If you have your own question you'd like to ask, please post it as a comment on a related post here at TheAutomationBlog.com
Click HERE to scroll down to view or leave comments
- Does the logging go to internal memory or do you have to have additional external memory?
It appears you can only put one logging file in the startup. Is there anyway to specify more than one logging model on startup because obviously if you have different polling rates for different data points (ie: motor current vs. tank level) this would make you put everything in at the same polling rate consuming more bandwidth and memory than necessary.
I know some would say just use change of state to solve this but that's event driven and watching something like motor current would cause you to collect even more data again than you want.Hey Stem Apps,
Q1 - Does the logging go to internal memory or do you have to have additional external memory?
Check out the DataLog setup for custom log path options, and also check out the free add-on, Data Store Plus:
Q2: It appears you can only put one logging file in the startup. Is there anyway to specify more than one logging model on startup because obviously if you have different polling rates for different data points (ie: motor current vs. tank level) this would make you put everything in at the same polling rate consuming more bandwidth and memory than necessary.
This is an option with ViewSE but not ViewME. I've used "On-Change" effectively to get around this limitation, as well as the free Data Store Plus add-on.
Q3: I know some would say just use change of state to solve this but that's event driven and watching something like motor current would cause you to collect even more data again than you want.
The minimum change percentage will filter out most "jitter", but if you need all the options your asking for you may want to either check out Data Store Plus, or get a PC and low screen count ViewSE runtime since ViewSE can run 20 datalog simultaneously AND log directly to an ODBC database like MS SQL Express as shown in my course, ViewSE Basics:
Best of luck!
Instructor, The Automation SchoolIs it possible to add tag during a panel view is running?
I've added tags to dalalog and I want to select which tag i want to see each time on trend?
How can I do it? It would help to investigate.
Thank you in advance!At first glance I would suggest using tag placeholders in your trend and then pass the tags you want to show in the trend to your trend graphic via different display buttons and parameter files, as I just don't see a way to toggle the visibility via a button in ViewME...