Page 1 of 1
Data logger
Posted: Thu Jan 24, 2013 3:25 am
by jmsmoreira
Hi,
I'm trying to control the number of logs on a Datalogger, and when it reaches the limit, export and clear it.
I'm using a tag, that is incremented each time the Datalogger colects a value, and the on the tag action >=limit, I have the following actions:
Database export Datalogger
Clear Datalogger
Reset Tag
The problem, is I'm only getting empty files.
If I take the Clear Datalogger out, it works fine, so I guess it is getting cleared, before it is exported.
Any other way of doing this?
Re: Data logger
Posted: Thu Jan 24, 2013 4:29 am
by Edmund
The database export function is probably started on it´s own thread and there seems to be no event to hook up on when it´s done exporting.
You could write your own export / clear function or just wait a couple of seconds before you clear the datalogg.
Re: Data logger
Posted: Thu Jan 24, 2013 8:11 am
by jmsmoreira
The problem is if I wait a couple of seconds, I will loose the loggings I get during those seconds...
Re: Data logger
Posted: Thu Jan 24, 2013 8:44 am
by mark.monroe
There is no guarantee that actions will perform in a given order. They are managed by a thread that is outside the user's control.
You will have to manage your database export yourself. Which means you will first write a
SQL statement that gets the data you want, then you will need to save that to a file. Next you will need to write another SQL statement that deletes the data in the datalogger.
Re: Data logger
Posted: Thu Jan 24, 2013 8:52 am
by jmsmoreira
Mark,
I can't open the example project on that post. It says it was developed for an old model, no longer supported...
Re: Data logger
Posted: Thu Jan 24, 2013 9:46 am
by mark.monroe
What version of iX Developer are you using? It is targeted to an A7 and opens up fine in the latest iX version which is 2.0.463.
There was an older version posted, but I updated it months ago. Have you tried downloading the version that is posted?
Re: Data logger
Posted: Fri Jan 25, 2013 2:21 am
by jmsmoreira
You're were right, I was using the older version of the file.
Thanks
Re: Data logger
Posted: Fri Mar 06, 2015 9:29 am
by Ya-hoo
Hello Mark,
I am having same issue which is that my file was deleted before it finishes exporting.
I am using iX 2.15.5751.0 and A7, couldn't open the sample code you provided.
Could you please update to the latest version?
Thank you very much.