SoftPLC
 
Font size:      

Overview

Introduction

The LOGGER TLM is a free firmware add-on option for SoftPLC version 4.x and later that adds the capability of logging a group of data values to comma-separated values (CSV) text files. This capability is implemented as a TOPDOC Loadable Module (TLM), written in C++ and implements a ladder instruction (TLI) which triggers the log interval. This document describes the installation, usage, and functionality of the LOGGER TLM.

Concepts

The SoftPLC runtime engine software supports TLM's, which are shared library extensions to SoftPLC. A TLM may be loaded either as a DRIVER or as a MODULE. The difference between a DRIVER and a MODULE is that a DRIVER is called once per SoftPLC scan, and optionally an additional number of times per scan. A MODULE is only called when the control program decides to call it and not as an inherent part of the scan. TLM's are made known to SoftPLC in the MODULES.LST file which may be edited by TOPDOC NexGen by traversing to: PLC | Modules.

This LOGGER TLM is to be used as a MODULE, not as a DRIVER. It provides three (3) TOPDOC Loadable Instructions (TLI's) to trigger the log interval and copy the log files to other partitions or media.

Features

This TLM takes a configuration file named LOGGER.LST which holds the disk base directory for all log (CSV) files and one or more data groups. A data group contains a list of the word or bit level datatable addresses or tagnames to log and an optional time format specifier. Each data group must have a unique name.

All log files have a fixed time base of one week and will be named with the following convention where “nn” is the week number.

[diskbase]/week-nn-[group].csv

Week numbers will be generated in the range 1 to 53 per ISO 8601:1988. See Appendix A.

Requirements

  • SoftPLC version 4.x runtime
  • Dedicated Compact Flash partition for “diskbase” (ie. /dev/sda3 mounted as /storage)