[MAT logo][Prev][Up][Next]

Data Logger

Introduction

There are two logger modules mat/io/logger/logger and mat/io/logger/logger_db

logger module logs data to a flat file.
logger_db module logs data to a MYSQL database.

Logger module configuration

Configuration options that need to be set to use a logger module:

file = filename
points pointname1 pointname2 ...
scan_period = sec

Sample:

[LOGGER]
file = chaser.log
points L1 L2
points L3 L4
scan_period = 0.25

Logger_db module configuration

Configuration options that need to be set to use a logger_db module:

host = host name
user = user name
password = password
#port_num = port#
#socket_name = socket name
db_name = database name
table = table name
points pointname1 pointname2 ...
scan_period = sec

Sample:

[LOGGER_DB]
host = localhost
user = matuser
password = mat
#port_num = 0
#socket_name =
db_name = matlog
table = demolog
points L1 L2
points L3 L4

Data logger demo

To try these modules use the /mat/demo/basic_logger module To use the logger_db module you should have a MYSQL connection available with the database already created. The table is automaticaly created if it does not exist. If a table with the same name exist in the database but the structure is not compatible then the logger_db will not log, but if a table with the same name exist and the structure is compatible then logger_db module will append rows to this table. Also there is a commented line in /mat/demo/basic_logger/matplc.conf that needs to be uncommented to test the logger_db module. This is because this sample uses only the logger module by default.

[Prev][Up][Next]

$Date: 2004/12/28 05:32:11 $