FactoryTalk Datalogging ... Help :(

DarrenG

Member
Join Date
Dec 2016
Location
London
Posts
74
Hi folks,

This looks like a long post but a lot of it it is just related/useful tech notes at the bottom.

I'm trying to get data logging to work again so we can finally have historical trends. I've attempted this on the last two projects, ran out of time and had to move on and now I'm back to it again on the third project. I don't know how something so easily implemented in Wonderware can be made so difficult in FTView but anyway!

I've read probably all the technotes there are on this and found there are some bits of conflicting information but I can datalogon successfully without any errors so I'm presuming I have the dsn configured correctly. One technote states you must use a File dsn and to search for it in My Documents folder, another one says use the System dsn. I found using the System dsn works (at least I don't get any errors when issuing the datalogon command) so that's what I've gone for. It just doesn't look like it's actually logging info to the database because if I try to trend it I either get a flatline at 0 depending on how I configure the trend or nothing at all.



System info: Windows 10 Pro x64, FTView V9, SQL Server 2014



What I'm trying to achieve: Historical trending.



What I've tried:

DSN: I've set this up using C:\Windows\sysWOW64\odbcad32, it's using SQL login credentials which are correct, not the integrated windows mode, and I've changed the default database from the master to the one I want to log to. After doing this the test comes back successful. I'm also using the sql server native client 10.

In SQL I've enabled named pipes and opened tcp port 1433. It's all local but I'm just trying everything at this stage. The users I have in the database have almost every right there is (see pic). The instance was configured to use both Windows and SQL login details.

I have also added the users "NT AUTHORITY/SERVICE" & "LOCAL SERVICE" and given them sysadmin rights.

I've set up numerous logs and dsn's trying to get this to work. I'm only using one dsn at a time and one log at a time though just in case it doesn't like multiples. I am also remembering to execute the datalogon command and it's starting successfully.



Questions/Comments:

One thing I just noticed is that when I log in using windows credentials, I don't seem to have permission to open up the databases even though I've assigned the windows user sysadmin rights and db owner... any ideas why that might be happening? (Edit: I was looking at the wrong windows user, fixed now but the issue remains)

Will the data log models work with the trendpro in FTView or will it only work with the standard trend?

Should the added users "NT AUTHORITY/SERVICE" "LOCAL SERVICE" etc have their default database mapped to the master or the database I want to write to? In my case it's called SQLExpress. (Edit: I just tried mapping them to SQLExpress and it didn't like it so went back to the master.)

For anyone that's set this up before, what pitfalls did you encounter? I'm either missing something critical every time I try to do this or else I'm losing the plot. I'm using SQL Server 2014 on this machine, I'm tempted to try a 2008 database and see if that makes any difference but I'm sure I checked if 2014 was compatible before I installed it.



Tech notes that I've read that might be useful to anyone else reading this in the future:

Cannot Start the Datalog Type ODBC - Unable to Access ODBC Data Source
554607

ODBC System DSN for 32-bit Applications on a 64-bit OS
471174

Step by step - How to Install SQL Server 2008 R2 to log FactoryTalk Alarms and Events History
521520

FactoryTalk View SE: Unable to access ODBC data source
1041464

Datalogs will not work if installing SQL server after installing FactoryTalk View SE
70187

FactoryTalk View Machine Edition: Data Logging Best Practices
36265

Installing IIS after FactoryTalk View SE has been installed
64845
 
Last edited:
OK so solution time:

*** Don't import tags into your data log model using a csv file. Don't use ODBC, just use a file set instead. Under your data log options, Storage format = File Set. ***

This is what worked for me anyway after many hours of torment.

I've been testing what works and what doesn't work now that I have something that does actually work and I think if you import the tags into your datalog that breaks it. I've added tags manually in the datalog model, even status bits which I thought might be the problem but it worked fine. If I then import the same tags using a csv file it just does not work.

Runtime didn't like it initially when I threw more than one tag onto the trend pro so if you're starting a datalog I would suggest putting just one tag into it at first, get that to work and then add more tags afterwards. I had one tag working, added new tags to the datalog, turned off data logging and back on and tried trending the new tags but they wouldn't populate. I had to restart the client in order to get the new tags working in the trend pro, they worked fine straight away in the normal trend object though.

Hopefully this will help others from losing their mind getting this to work! (y)
 
Hi DarrenG

wired that odbc to sql doesnt work. Does the "Test" in the odbc connection pass?

We use Datalog to SQL (for reports) and to file (for trend Data) in the same project, and it works good.

Best regards
crawler009
 
Yeah to be honest I think it was probably the fact that I had imported tags using a csv file into every test datalog that I was trying so it might not necessarily have been the odbc part that was the issue. But logging to a file set is far easier to set up though and the last time I attempted to set this up there were too many steps that I had to go back and check to see if I messed up. Should I have used a file dsn or a system dsn for example, OK I just created a file dsn, why can't I find it .. oh wait it's in My Documents folder! Which odbc to use, 32 bit or 64 bit, and then all the sql server set up which I had never done before, creating extra users, adding roles and permissions to said users etc etc.

So if you don't need to log to sql for reporting for example then logging to a file set is the way to go. When you consider how easy it is to log something in Wonderware, it's a simple tick of a checkbox when you create the tag, then using sql is a frustratingly over complicated way of enabling the same function.

I definitely think importing tags in broke it though, I had a working data log a couple of times and as soon as I imported even one tag it stopped working.
 

Similar Topics

Hey guys how would you approach the spreadsheet screen part? I searched and everyone points out that using parameters to display this information...
Replies
0
Views
742
Hello all I have a question, concerning datalogging in FTViewSE 8.0 I have 2 datalog models with 2 differents recording rates (30s for live...
Replies
0
Views
2,716
I have a client that is using an ODBC database to log a number of tags (110) every minute. This data is being displayed on a graph in the Client...
Replies
7
Views
2,597
Thanks for your time. I have added a new pen to a trend which works fine as long as you stay on the trend screen but resets when you navigate...
Replies
15
Views
25,500
HI All, I recently converted my RSView 32 application to FTalk View SE local. The issue that I've run into is that my trending screens data is not...
Replies
7
Views
5,067
Back
Top Bottom