FactoryTalk SE data log models

dang212

Member
Join Date
May 2016
Location
Ho Chi Minh
Posts
5
Hi everyone, I tried to use data log models in FTV Studio to store tag's value of a trend to a mdf file. Then i start my project in runtime mode, use DataLogOn to start data logging and then DataLogOff to stop data logging.
After that i tend to attach that mdf file to a SQL server using SQL server Management Studio but i can't because of this error: "filename.mdf is not a primary database file Microsoft SQL Server, Error: 5171"
And when i search about the error 5171 in Microsoft SQL, they said that the mdf file is somehow corrupted. I tested a lot of times but still face the same problem
Do you guys know about this issue, i think i missed something when i create data log models but i am not sure about that.
I am not good to explain in English so if you don't understand, i try to explain more clearly.
Thanks for reading :D
 
The FactoryTalk DataLog is a proprietary format. SQL cannot open them. If you want to store your data in a SQL database then take a look at using the ODBC format for your Datalog.

Oh, and the .MDF is not actually the data being logged, it is the configuration information for the datalog. The data itself is in a .DAT file.


OG
 
Can you post an .mdf file for us to try out our self?

Thanks

here is my mdf file https://www.mediafire.com/?8s0mz2rauyrb5l8
The FactoryTalk DataLog is a proprietary format. SQL cannot open them. If you want to store your data in a SQL database then take a look at using the ODBC format for your Datalog.

Oh, and the .MDF is not actually the data being logged, it is the configuration information for the datalog. The data itself is in a .DAT file.


OG
About FactoryTalk Datalog, i read manual from Rockwell and it said that user can open that Datalog using SQL. Also i followed this link and the tutor can open the Data which is logged by using SQL Server Management Studio

https://jap.vn/2014/06/12/factorytalk-view-se-datalog-voi-co-so-du-lieu-sql/
And as you said, .mdf file is just some kind of config file, and Data is in .dat file. I really don't know about this, i think i need to read more about SQL and ODBC, would you recommend me some documents ?

Thanks you guys (y)
 
I would suggest you start with the Users Guide. It is accessed from the Help menu under Online books and is 702 pages in the revision I am using.

When you create a Datalog model you choose to store the data in either the File Set format or the ODBC format.

The File Set format as stated in the FactoryTalk View manual page 584:
"Internal file sets store tag values in proprietary-format files. You cannot view the contents of the file sets, except in trends"

So, no you cannot use this in SQL Server.

The ODBC format:
"If you log tag values to an ODBC database, you can view the data in trends, or use third-party, ODBC-compliant tools to analyze and create reports from the data"

And then on page 585.....
"Use the ODBC database format to store data using an ODBC data source such as Oracle, Microsoft SQL Server, or Microsoft Access"

What we don't know about your datalog is whether you are using ODBC or File Set. If you are using the ODBC then the tutorial seemed pretty good. I did not attempt to follow it. Again look at the Users Guide Chapter 22 on "Setting up data logging". It can walk you through this.

OG

Datalog.jpg
 
I would suggest you start with the Users Guide. It is accessed from the Help menu under Online books and is 702 pages in the revision I am using.

When you create a Datalog model you choose to store the data in either the File Set format or the ODBC format.

The File Set format as stated in the FactoryTalk View manual page 584:
"Internal file sets store tag values in proprietary-format files. You cannot view the contents of the file sets, except in trends"

So, no you cannot use this in SQL Server.

The ODBC format:
"If you log tag values to an ODBC database, you can view the data in trends, or use third-party, ODBC-compliant tools to analyze and create reports from the data"

And then on page 585.....
"Use the ODBC database format to store data using an ODBC data source such as Oracle, Microsoft SQL Server, or Microsoft Access"

What we don't know about your datalog is whether you are using ODBC or File Set. If you are using the ODBC then the tutorial seemed pretty good. I did not attempt to follow it. Again look at the Users Guide Chapter 22 on "Setting up data logging". It can walk you through this.

OG

I also read that User's guide, it really helps me a lot
About my Data log models, i have done just like in the user's guide and i chose using ODBC
Oh i don't see any DAT file in that location of mine project, i just have DLG and DNS file. I think maybe because i don't use DataLogOn and DataLogOff commands in a proper way.

Firstly, after i built my project using FTV Studio, i create a runtime in SE Client
Then i click a button that i set to begin DataLog( DataLogOn command). And then after a period of time, i click another button that i set to stop Datalog( DataLogOff)
Then i close that Runtime app and go in DLGLOG to check
Did i do it right ?

Thank you so much, i think my knowledge is broaden a little bit !!!
 
Last edited:
The DLGLOG folder will not contain .DAT files for the ODBC format. The .DAT is only for the File Set format.

What you are seeing (.DNS and .DLG) is correct. The data is stored in an ODBC database that is separate from the View SE application. You need to open the database to see the data.

OG
 

Similar Topics

I have Factorytalk View Studio local edition installed on multiple machines. Every once in a while the data logging locks up and pens don't update...
Replies
4
Views
1,980
Hi there, I'm running FactoryTalk View Studio V9 on Win 10 Pro (x64) system. I've got a strange problem with the datalogging and wonder if...
Replies
7
Views
3,109
Hello! (I'm Using FactoryTalk View SE 8) I'm stuck in a project, I need to read the last n-data from a datalog, In order to make a customizable...
Replies
11
Views
5,865
I was wondering if someone found a way, maybe using VBA, to display data from a datalog in FactoryTalk view SE, that is not in a trend. Thank...
Replies
4
Views
4,602
How are data log files read from an external flash card? Once data is written to a flash card, how does one get it into something useful like an...
Replies
8
Views
22,131
Back
Top Bottom