Introduction to FactoryTalk View ME DataStore to CSV
With FactoryTalk View ME DataStore to CSV, we will log data to a CSV file for later viewing. When using FactoryTalk View ME, you have a Data Log model. This is good for the operator to view historical data on a trend chart. However, you can not easily print the data log.
The DataStore Plus in FactoryTalk View ME, we will log data to a file on the computer. We will then open this file to view the data points using Openoffice Calc, LibreOffice Calc, or Excel.
Add the ActiveX Object
First, we’ll need to add the ActiveX object to a display. Go to Objects | ActiveX Control, and draw the object on your screen.
After you add the object, the properties window will appear.
Under the “General” Tab, we’ll specify how often to restart new files on your hard drive. Furthermore, you will specify when to delete the older files. Within the top frame, you see a sample of how your filenames will appear at a path that we will later specify.
On the Advanced tab, we’ll specify the file headers. Most of the time, we’ll probably just want to use tag names for this. Be sure to set up your periodic time in seconds. This will be how often we sample the tag.
We’ll log the system time, and assigned connections only. This prevents your spreadsheet from having many blank fields. Otherwise, the data might be so far off the viewer’s display that they think data is missing!
Next, go to “Connections”. Be sure to set the path at which you want the files to be stored. In this case, I’ll just store them on the D:\ Drive. Another key point is the trigger. When the trigger value is 1, this object will start logging data. One option is just to use 1 as the expression. In this case, though, I’ll just trigger the data logging off of a switch. In the same fashion, add the tags that you want to log.
Test your application. Obviously, we won’t see anything happen unless we look at windows explorer to see if our file exists.
Open the File
At this point, we’ll close the FactoryTalk View application, and open the file in OpenOffice to view the logged data. FactoryTalk View ME will show an error if the file is open that it’s trying to write to.
When you open the file in Openoffice, we’ll specify that the values are separated by commas.
Hit OK, and we see the data log worked!
For more information on FactoryTalk View ME, visit the Category page!
— Ricky Bryce
I like your tech note on FactoryTalk View ME DataStore to CSV. Does it work on the PanelView Plus 7 standard? I’m having trouble getting the File Location to work.
Joe,
It’s good to hear from you.
I don’t have a way to test the Panelview Plus 7, but curious about what file location you are trying. Remember the file location will be relative to the Panelview. ie: “External Storage 2\MyFile.csv” If I remember correctly, that does need to be in quotes. For other path examples, you can check out page 47 of the manual: https://literature.rockwellautomation.com/idc/groups/literature/documents/um/2711p-um007_-en-p.pdf
Also, be sure your trigger tag is going high.
You might want to check your Panelview’s setup and be sure the active X control is installed as well. I believe you can get to this from the configuration screen.
Take care,
Ricky