RediGate POD Programming Manual

RediGate POD Programming Manual

Table of Contents

 


 

Introduction

The RediGate is a multi-application remote data communications computer/data integration device.  It provides a wide array of SCADA and other communication and logic processing functionality.  In order to configure the operational characteristics of the RediGate, Elecsys provides the Advanced Configuration Environment (ACE) program. 

The RediGate allows for programmable logic routines to be included in its ACE configuration, called PODs (for “Programming On Director”).  This allows some reasonably complex operations to be performed during the RediGate’s operation, such as examining or changing contents of data registers, performing logical decisions or mathematical computations, publishing data, and a variety of other functions. 

Unlike ISaGRAF, which requires a third-party software development environment and generates a reusable, multi-module logic program that is semi-autonomous from the RediGate configuration, the POD logic routines are small, individual programs built into each configuration and may be more easily customized for the needs of a specific device.  Both ISaGRAF logic and POD routines may be used in the same RediGate, if desired.  Refer to the RediGate Configuration Manual for more discussion on the differences between ISaGRAF and POD logic.

It is assumed that the user has already installed the ACE Editor and is familiar with the ACE configuration tools.  Please refer to the ACE Operation Manual for more details on using ACE to configure basic RediGate features such as master or slave protocol communication.

POD Programming

Historically, the RediGate has supported the ISaGRAF programming environment for adding functional logic programs that provide a wide variety of powerful application development options.  ISaGRAF provides a full-featured application development environment, allowing the RediGate to operate as a programmable logic controller (PLC) in addition to its built-in routing, protocol translator, and host data publishing capabilities.

However, some applications only require a small to moderate level of programmability, such as manipulating or making decisions on data stored in real-time databases (RTDBs).  For these types of requirements, the RediGate now supports the POD (Programming On Director) capability.  POD programming is similar in concept to Assembly Language programming, having a list of opcodes having one or more parameters.

There can be up to 9999 PODs per Internal Master Channel.  The following sections describe how to program POD modules in the RediGate’s ACE configuration.

POD Configuration Structure

POD objects are executed by the Internal Master Channel, by calling an Internal Master Poll Table entry that references the POD definition.  The Internal Master RTU object determines which POD will be executed and the Scan Table determines when it is called.  More than one Field Unit in the Internal Channel can call the same POD.

To run a POD program, the following set of ACE objects need to be configured:

Internal Channel       Configure Scan entry points to a Poll Record of an Internal Master field unit that’s configured to run a POD.  The Scan Table entry is used like any other Scan Table entry (Unit Address and Poll Record point to the Internal Master Poll Table entry, and the Scan Period determines the frequency at which the POD will be executed, sequentially with other Scan Table entries in the list).

Null Circuit – Placeholder for Internal Master field unit

Internal Master – The Internal Master FieldUnit may contain other Poll Table entries for data transfers between RTDBs.  One or more Poll Table entries may also be configured to point to a POD object, which will contain the programming instructions to be run.  The normal Source/Destination fields of the Internal Master Poll Table have special uses when calling a POD program.

The Poll Table entry for a POD routine should contain:

  • Src Chan – The Source Channel column for a POD poll entry MUST be any valid Master Channel in the RediGate configuration. Otherwise, the Src Chan, Src RTU, Src Data, and Dest Data parameters are not used in the Poll Table entry and may typically be set to 0. However, these columns may be used to pass important information into the POD. There is a POD function ("GET COLUMN FROM POLL RECORD") which can read values from these fields of the Poll Table row that called the POD.

  • Src RTU – Unused for POD, but can be used for a configurable parameter (see note for “Src Chan”, above).

  • Src Data – Unused for POD, but can be used for a configurable parameter (see note for “Src Chan”, above).

  • Src Type – Select the “Run POD” option to use this poll record to call a POD function.

  • Src Count – This must be set to the instance number of the POD object in the ACE configuration.

  • Dest Data – Unused for POD, but can be used for a configurable parameter (see note for “Src Chan”, above).

The screen capture below shows an Internal Master unit with a regular poll in Poll Record 1 and a call to a POD function in Poll Record 2. Both polls would need to be scanned by the Internal Channel in order to operate, and a POD object with instance number 5 would also need to be configured with one or more program steps.

 

 

RTDB – All FieldUnits require an RTDB definition.  The POD is associated with the RTDB for whichever instance of the Internal Master FieldUnit that triggered it.  Programming instructions act on the RTDB registers associated with that Internal Master FieldUnit.

POD – Include one or more POD object with programming logic instructions. Configuration of the POD object and the available instruction types are described in the remainder of this manual.

POD programs may use RTDB registers for storing or using data during program execution.  There is also a Scratchpad area containing 40 elements (numbered -1 to -40).  The Scratchpad elements may use any of the following three data types:

  • 32-Bit INTEGER.  These are used for BOOLEAN (Zero=False, Non-Zero=True), CHAR, SHORT integer, and LONG integer data.

  • 32-Bit REAL (Floating Point)

  • 256-Byte STRING

When the RediGate restarts, the values in Scratchpad areas are all set to zero/empty and the type is set to INTEGER. Scratchpad elements are global to a Channel (shared in common among all PODs and devices on a Channel), but each Channel has its own set of numeric Scratchpad elements (-1 to -40). An element in the Scratchpad can have its value and type changed each time a POD program writes to it.  Once written to, the element retains its value and type (INTEGER, REAL or STRING) until the next write, even between successive executions of different PODs.

For example, writing a REAL value (such as 3.14159) to element ‘-5’ makes that element into a REAL type, and the value can be accessed as the same.  Later, a STRING value (such as “Hello, World”) can be written to element “-5”, which changes the element’s type to STRING.  The next read of element ‘-5’ will return “Hello, World”.  When POD programs need to use intermediate values in calculations, it is much faster to read or write Scratchpad elements than the read or write RTDB registers.

The POD maintains a row execution counter which is used to prevent infinite loops.  If the POD Interpreter does not return to the normal Internal Master Scan Table within this limit, then the POD Interpreter routine is aborted.

POD Object

The POD object holds one set of programming instructions to be called by the Scan Table based on the Scan Period.

 

Attributes

Function

Object Type

DirectorPod

Parent(s)

System → Clients → Master Channels → Internal Channel

Instance

Must be between 0 and 9999. The instance number is the POD number in the Poll Table ("Src Count" column) used for running the program.

Properties

Values

Properties

Values

Row Delay

Enter the amount of delay (in milliseconds) to insert after each instruction in the list of Instructions is executed.

Entering 0 will allow the POD to run as fast as possible.  Inserting non-zero a delay will help debug a POD by slowing it while viewing diagnostics and enables more diagnostic messages from the POD interpreter.