SoftPLC
 
Font size:      

Overview

Introduction

The SDI12 TLM is an add-on firmware option for SoftPLC version 4.6 and later which adds communications support for devices using the SDI-12 protocol. This capability is implemented as a TOPDOC Loadable Module (TLM), written in C++ and implements several ladder instructions (TLIs) which can be used for gathering data from one or more SDI-12 devices. This document describes the installation, usage, and functionality of the SDI12 TLM.

This TLM initiates SDI-12 measurement command/reply sequences by way of a ladder logic instruction, giving the user full programatic control over the trigger conditions. Queuing is implemented, allowing multiple commands to be triggered within a very small window of time. The TLM will queue up the requests on a first in, first out basis.

Concepts

The SoftPLC runtime engine software supports TLMs, 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. TLMs are made known to SoftPLC in the MODULES.LST file which may be edited by TOPDOC NexGen by traversing to: PLC | Modules.

This SDI12 TLM is to be used as a DRIVER, and it provides TLIs that you call from your ladder program. A new request is sent on any false to true rung condition edge. All of the provided TLIs take a CONTROL datatable element as their first parameter and use this to keep track of edge triggering and sending progress. Each TLI used in your ladder program must have its own dedicated unique CONTROL element.

Features

Up to 20 requests may be queued at one time before the SDI12-related TLIs will report that the queue is full. As soon as the first request has been processed, this frees up another slot and the TLM is then ready for another rising edge trigger condition.

Note
When designing your ladder program, keep in mind the communication speed limits of the SDI-12 protocol (which specifies 1200 baud). A full communications sequence could take several seconds (per sensor) depending on the number of data measurements.

Each of the SDI_CMD TLIs performs a full communication sequence with the specified sensor(s), meaning: start measurement command, get reply, wait for data to be ready, send data command, get reply. This includes the case of multiple "send data" commands being necessary to retrieve the full data set from the sensor.

Additionally, the SDI12 TLM package includes administrative/debugging utility programs to provide useful functionality and configuration/testing of SDI-12 sensor devices and your cabling setup. These utilities are further described in the usage section of this manual.

Requirements

  • A sensor device using the SDI-12 protocol attached to your SoftPLC.
  • Version 4.6 SoftPLC or later.