Data logger

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

Data logger

Post 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?

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Data logger

Post 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.
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

Re: Data logger

Post by jmsmoreira »

The problem is if I wait a couple of seconds, I will loose the loggings I get during those seconds...

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Data logger

Post 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.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

Re: Data logger

Post 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...

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Data logger

Post 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?
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

jmsmoreira
Posts: 28
Joined: Mon Apr 23, 2012 7:03 am

Re: Data logger

Post by jmsmoreira »

You're were right, I was using the older version of the file.

Thanks

Ya-hoo
Posts: 4
Joined: Fri Jan 16, 2015 12:00 pm

Re: Data logger

Post 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.

Post Reply