Logging on more fields


sdistefano

Recommended Posts

Sensors often returns more than 1 value (i.e. LTH sensors).

It is possible to log into database splitting those values in more fields? (One DB field for each value)

Actually i'm logging a formatted string, but this is not a good solution.

Many thanks

Link to comment
Share on other sites

Yes, you can either use an export set and put the expression that splits your string into two of the fields, or create some Test channels (with timing = 0), and in the event of the real channel that's getting the multi-data, split it and stuff it into each of the Test channels. I'd need more detail to give more detail.

Link to comment
Share on other sites

Thanks for your answer.

What I wish is to obtain a table like this:

DateTime | SensorValue1 | SensorValue2 | SensorValue 3

--------------------------------------------------------------------

In that table I want to append the last values read from the channel.

Export Sets works on channel history and they aren't linked to the channel read operation (as logging sets are). I could start an export set cycle in a sequence, but i'll not sure I'll append the last value read and not still exported only. Is it correct?

In relation to using some test channel (with timing = 0, one channel for each real channel field), I could use a unique logging set for all those channels, so I obtain only one table. Is it correct? The only inconvenient thing is that I have to create N+1 channels for a channel returning N measures.

Thanks

Link to comment
Share on other sites

I'd use an export set instead of a logging set. You can get the export set to append just one line of data by making sure your Expressions in the export set all have [0] and therefore return a scalar value. Then, on the details page, select Fixed Interval and Snapshot.

As for Test channels, this isn't so much for logging, but rather for history, persist, and Channel's other features. I don't see why having to create one extra channel is an issue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.