Accessing the database with modbus, How logicpro accesses the database, How logicpro accesses the database 162 – Watlow PPC-2000 User Manual

Page 188

Advertising
background image

Chapter 5: LogicPro and Modbus Reference

PPC-2000 User’s Guide

162

Watlow Anafaze

Doc.# 30002-00 Rev 2.3

Accessing the Database with Modbus

Each register can be individually accessed using software and
the Modbus communications protocol via a serial port on the
processor module because each register has a unique Modbus
address. The Modbus address for each parameter is given in
sections Analog and Counter Input Parameters in the Database
on page 163
through
Global Parameters in the Database on
page 206
.

Because the database is quite large, it is impractical and
undesirable to list each Modbus address. Instead, the first and
last addresses for each parameter are listed. Individual
registers are addressed by determining the offset from the first
address corresponding to the particular input, output, or
channel.

For example, in a PPC-2000 system with 32 analog inputs on
one module, the register addresses for inputs 1-32 are 30601 to
30632. The measured value corresponding to the first analog
input is stored at address 33601. The value of the second input
is stored at address 33602. The value of input 26 is stored at
address 30626, and so on. The Database Offset for the first
analog input is said to be 1, for the second input is 2, and for the
26th input is 26. In each section describing a database table,
the Database Offset scheme is explained.

How LogicPro Accesses the Database

Logic programs can be written and downloaded using LogicPro.
Typically, such programs access digital and/or analog
I/O and may also access other values stored in the database.
Because the user-written logic program resides in the processor
module, it does not use the serial port or Modbus to access the
database. Instead, each register can be accessed by logic
program variables using one of the I/O drivers supplied with
LogicPro.

Some drivers correspond to modules. These drivers are used to
access the digital and analog I/O values corresponding to the
field devices connected to each module. The LogicPro
IO Physical Address is used in conjunction with these
module-specific drivers to use a digital or analog I/O value in a
logic program.

For example, the value measured by a thermocouple attached
to the first input on an Analog In module with address 2 is
accessed with the Analog_In_202x driver and the Logic Pro IO
Physical Address 2.1.

The LogicPro Database driver facilitates access to all database
parameters. Because the database is large, it impractical and
undesirable to list each LogicPro address. Instead, the
parameter number and database offset range for each
parameter are supplied. Individual registers are addressed by
coupling the parameter number and the database offset
corresponding to the particular input, output, or channel.

Advertising