Reading data from Datalog FactoryTalk

rikelme

Member
Join Date
May 2015
Location
Quebec
Posts
13
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 histogram. I have been trying to look on the internet, without much more success. đź“š ;)
I would appreciate if someone knows how I can do this task or if is not possible...

thank you very much!
:site:
 
Are you using the native datalog format or SQL Server? If its in SQL Server, I think you'll need to write a query to get the data you want.
 
The native catalog format is in a .dat format which to read externally you must use a Rockwell utility. I offhand can't think of a way to do this with the native .dat files.
 
The native catalog format is in a .dat format which to read externally you must use a Rockwell utility. I offhand can't think of a way to do this with the native .dat files.

yeah, I know that, but I want to read it and show it on the HMI, since TrendX don't have really Histogram, I want to take the data to make it by myself...

Thanks again!
 
o_O
I just did a small test here: It looks like my datalog makes a .mdf file which is sql. It also makes .dat files as well, but I would think a sql query would work. Changing the storage format from "File Set" to "ODBC Database" should also help as the ODBC should be easier to work with in VBA.

Alternatively, you might be able to open the .dat from VBA and get the text out, then filter for the last value. I know in notepad when you open it, there is a lot of junk, but there is also the data you need. In theory, you should be able to ignore the junk and pull the last known value without hurting the datalog.
 
o_O
I just did a small test here: It looks like my datalog makes a .mdf file which is sql. It also makes .dat files as well, but I would think a sql query would work. Changing the storage format from "File Set" to "ODBC Database" should also help as the ODBC should be easier to work with in VBA.

Alternatively, you might be able to open the .dat from VBA and get the text out, then filter for the last value. I know in notepad when you open it, there is a lot of junk, but there is also the data you need. In theory, you should be able to ignore the junk and pull the last known value without hurting the datalog.

Yes, there is a bunch of solutions about how to open a Factorytalk datalog file... I realized that my questions was not that clear... I need to take logged data on real time... I want to be able to take a window data and do something on the HMI screen. (Histogram). The XY plot doesn't work good, since is also in function of time...

thank you!!!

PS. If you know a way how to modify the discussion title, let me know... I'm trying, but i couldn't make it...
 
Oh right. Histogram.

Worst case, could you trigger a script to update every minute or 5 minutes? I know it wouldn't be true real time, but, depending on your application, might be good enough.

Actually, you know I was just exploring the option in derived tags of "Interval()". I would think you could make a series of derived tags that write the real time value every X minutes.
Tag_5minAgo would have a value of:
If Interval() then Tag_RealTime
Tag_10minAgo would have a value of:
If Interval() then Tag_5minAgo
etc

Would something like that fit your needs? There might be some finessing needed to get the values to move consistently.
Again, my disclaimer is that I have not actually used this Interval function, I was just exploring it.
 
Oh right. Histogram.

Worst case, could you trigger a script to update every minute or 5 minutes? I know it wouldn't be true real time, but, depending on your application, might be good enough.

Actually, you know I was just exploring the option in derived tags of "Interval()". I would think you could make a series of derived tags that write the real time value every X minutes.
Tag_5minAgo would have a value of:
If Interval() then Tag_RealTime
Tag_10minAgo would have a value of:
If Interval() then Tag_5minAgo
etc

Would something like that fit your needs? There might be some finessing needed to get the values to move consistently.
Again, my disclaimer is that I have not actually used this Interval function, I was just exploring it.

Yes, That could make my job. I need how to grab the previous values of a datalog, so I will not overcharge my plc program with unnecessary buffers...:unsure:

Do you have any Idea about how to do that??? ;)
 
Yes, That could make my job. I need how to grab the previous values of a datalog, so I will not overcharge my plc program with unnecessary buffers...:unsure:

Do you have any Idea about how to do that??? ;)

I'm not sure what you mean. I was talking about making derived tags in FactoryTalk, not the PLC.
 
I'm not sure what you mean. I was talking about making derived tags in FactoryTalk, not the PLC.

I mean, I know that a way to get the last n-values of something is creating a big buffer on the PLC, and I want to avoid that. That's why I want to access to the DataLog data. Also, data log is more flexible than the buffers....
 

Similar Topics

Hello! New to the forum and new to PLCs in general. We have an ABB AC500 PLC (circa 2012?) and we are using CoDeSys (version 2.something). We're...
Replies
0
Views
606
Hello Ken Roach, Thank you for your quick reply , As informed earlier i want to read P&F Sensor data on Micrologic 1400 series B using MSG...
Replies
17
Views
5,717
Anyone experience of working with these modules and interrogating status of an I/O port? The modules can throw up a red LED indicator to say an...
Replies
0
Views
1,064
Hello, I have a Micro850 PLC that has 5 2080-IF4 plug-in modules attached. Each of these modules are programmed to read 4-20 mA output signals...
Replies
4
Views
2,241
Hi, I have been struggling for a week with FATEK FBs-24-MAR-AC PLC. My goal is to read voltage and current from a powermeter Elnet Pico 5. The...
Replies
8
Views
3,608
Back
Top Bottom