Yokogawa DataLogger NT
Interface to the PI System

Version 2.11

How to Contact Us

Phone / (510) 297-5800 (main number)
(510) 297-5828 (technical support)
Fax / (510) 357-8136
Internet /
World Wide Web /
Bulletin Board / (510) 895-9423
Telebit WorldBlazer modem (Hayes, MNP, or PEP compatible)
8 data bits, 1 stop bit, no parity, up to 14400 bps download
protocols: Xmodem, Ymodem, Zmodem, Kermit
Mail / OSI Software, Inc.
P.O. Box 727
San Leandro, CA 94577-0427
USA
OSI Software GmbH
Hauptstrae 30
D-63674 Altenstadt 1
Deutschland /
OSI Software, Ltd
P. O. Box 8256
Level One, 6-8 Nugent Street
Auckland 3, New Zealand

Unpublished -- rights reserved under the copyright laws of the United States.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013

Trademark statement—PI is a registered trademark of OSI Software, Inc. Microsoft Windows, Microsoft Windows for Workgroups, and Microsoft NT are registered trademarks of Microsoft Corporation. Solaris is a registered trademark of Sun Microsystems. HPUX is a registered trademark of Hewlett Packard Corp.. IBM AIX RS/6000 is a registered trademark of the IBM Corporation. DUX, DEC VAX and DEC Alpha are registered trademarks of the Digital Equipment Corporation.
PI-YOKANT.DOC

 1999 OSI Software, Inc. All rights reserved
777 Davis Street, Suite 250, San Leandro, CA 94577

10/15/2004 12:59:00 PM1

Table of Contents

Introduction......

PI Point Definition......

Interface Operation......

Setup(Start/Stop)......

Installation for NT......

RS-422 Hardware Configuration......

Troubleshooting......

October 15, 19971

Introduction

The PI-YOKA interface provides communication between a Plant Information (PI) System and various Yokogawa Recorders which are hereafter referred to as Yoka recorders. The interface program runs on a computer with the PI system or on another computer connected to the PI system.

Supported Features
Sign up for updates / Yes
Exception reporting / Yes
Runs as a Service / Yes
Outputs / No
Vendor software required / No
Failover / No
Maximum point limit / None

PI Point Definition

The following information is necessary for defining a PI point to read from or write to a Yoka recorder:

PI Tag / Definition
Point Source / This is usually Y for all Yokogawa points. This code must be defined in the PI Point Source Table.
Point Type / Use R or I for analog values, D for digital values.
Location1 / Interface copy number. This number identifies points belonging to a particular interface when multiple copies of the interface program are running.
Location2 / Recorder and channel address. This number identifies a channel on a particular recorder: (100 * recorder address) + channel number.
The recorder address is specified at the recorder (see Installation Checklist). For example, a point for recorder address 3, channel 25, has Location2 = 325.
Note: The first digit is always 1if you are not using the RS342 option
Location 3 / This parameter indicates which type of value to read or write. Allowable types are:
1 = analog read (i.e. read temperature)
Note: Version 2.1 and later supports only analog read (Location 3 =1).
Location4 / Scan class number. The scan classes are numbered from the order of the scan frequencies specified in PI-YOKA#.com (see Setup).
For instance, if PI-YOKA#.com lists scan frequencies of 5, 10 and 30 seconds, and the point should be scanned every 5 seconds, specify Location4 = 1.
Zero, Span / These values should match or exceed the range specified for the input device calibration.

In addition, the following attributes apply to the points:

Point Attributes
Tag / DigNumber / Archiving
Descriptor / Filtercode / Compressing
ExDesc / ExcDev / Res
EngUnits / ExcMin / CompDev
TypicalValue / ExcMax / CompMin
DigStartCode / Scan / CompMax

These attributes are not used for the points:

Attributes Not Used for Points
Location5 / Square Root / Convers
Source tag / TotalCode

Interface Operation

The interface loads points with valid point source, interface number and other location parameters into generic scan-based lists. The interface checks for point updates every two minutes and modifies its scan lists accordingly.

Scanning is more efficient if integer multiples of the fastest scan rate are used. Better performance is possible if all the points with the fastest scan rate are limited to one recorder or to a minimum number of recorders.

The interface periodically (i.e. every hour) attempts to initialize those recorders having at least one valid input point. Recorder initialization consists of checking status. When a particular initialization fails, the affected points are marked time-out until the next successful initialization. The time required for all points to change status is on the order of the slowest scan rate associated with the recorder.

When three consecutive read errors are detected, the interface assumes the port connection is bad, and tries to re-connect every minute. A message is logged in the output file when this first occurs, when it clears up, and at least once a day. Input data values that are under range, over range, or skipped result in corresponding status values for the points in question.

Setup(Start/Stop)

On the NT platform, the PI-Yoka interface is started automatically by the PI Data Archive startup procedure.

The following is an example:

REM YOKA1.bat 06/09/97 JB
REM
REM This command file initializes the port for communications and
REM starts
REM the interface process. Each interface should have its own command
REM file and run as a detached process.
REM
REM The port and run-time parameters are:
REM
REM port = port name
REM /ps = point source
REM /ic = interface copy (number)
REM /td = terminal device (port name)
REM /ec = event counter (IORate counter number)
REM /mo = recorder model (currently 3081, 4082 or 3880)
REM /rc = recorder channel number (e.g. 30 for 4082, 60 for 3880)
REM /dm = select mode: dm=0 (scan mode, default), dm=1 (dump mode, only model 4082)
REM /f = 1st scan frequency (hh:mm:ss)
REM /f = 2nd scan frequency
REM
..\pi-yoka# /ps=Y /ic=# /host=hostname:5450 /ec=# /td=com1 /mo=3081 /rc=30 /f=00:01:00 /f=00:05:00 /db

In this example,

/ps=Y

specifies the point source. Only points with this point source will be processed.

/host=hostname:5450

specifies the PI home node where xxxxxx can be localhost:5450 if the interface is running on the PI3 server node. If the interface is sending data t a PI3 server, /host=name of pi3 server:5450. E.g.: /host=rasin:5450. If the interface is sending data to a PI2 server, /host=rasin:545. This is an optional parameter. If not specified, localhost:5450 is used.

/td

specifies the serial port name.

/db

specifies that debug messages be written to the log files.

/f=00:01:00

specifies a scan frequency of 1 minute.

/mo=3081

specifies the recorder model 3081.

Note

The /dm switch is available for recorder model 4082 only. This model can be configured to either send data to the serial port automatically or send data only in case of being requested.

The /dm switch be used to select the data access mode.

With /dm =0 the recorder will be asked for data, with dm=1 the interface will wait for the recorder to send data. Note that the recorder has to be configured accordingly.

Installation for NT

The pi-yoka interface is installed separately from the installation of the PI Data Archive installation. Installations consists of the following steps:

1.Create the directory PI\interfaces\pi-yoka.

Copy the executable (pi-yoka.exe) and its startup procedure (pi-yoka.bat) into the newly created directory. The interface requires the MSVCRT*.DLL. If this DLL is NOT in your Windows System directory (on most NT systems this will be the C:\WINNT\SYSTEM32), copy the MSVCRT*.DLL file provided to your Windows System directory.

2.Edit the startup file pi-yoka.bat on NT.

3.Edit the PI\adm\pisitestart.bat or PI/adm/pisitestart.sh file to add pi-yoka.bat or pi-yoka.sh. This way the pi-yoka interface will automatically be started whenever PI is started.

To run as a NT service, complete steps 4, 5,6 and 7:

4.One can get help for installing the interface a service at any time by typing the following:

pi-yoka -help

Note that the –query flag that is described when help is invoked is not implemented at this time.

The pi-yokaservice can be installed either as a manual or an automatic service. Automatic services are started automatically when the NT operating system is rebooted. This feature is useful in the event of a power failure. To install the interface as a manual service, execute the following command from the pi-yoka\ directory.

pi-yoka -install -depend “tcpip bufserv”

To install the interface as an automatic service, execute the following command from the pi-yoka\ directory.

pi-yoka# -install –auto -depend “tcpip bufserv”

Check the Microsoft Windows NT services control panel to verify that the service has been successfully added. One can use the services control panel at any time to change the pi-yoka service from an automatic service to a manual service or vice versa.

The pi-yoka service can be started from the services control panel or by executing the following command from the pi-yoka\ directory:

pi-yoka# -start

A message will be echoed to the screen informing the user whether or not the interface has been successfully started as a service. If the service is successfully started, the interface will attempt to read the command-line arguments from the pi-yoka.bat file. For this to succeed, the root name (the part of the file name before the .exe and .bat extensions) of the batch file must be the same as the root name of the executable. Also, the batch file and the executable file must be in the same directory. If the interface is unable to read the command-line arguments or if the command-line arguments that the interface reads are invalid, the service will terminate with no error messages echoed to the screen. For this reason, the user MUST check the pipc.log file to verify that the interface is running correctly. In the pipc.log file, messages pertaining to the pi-yoka interface will be prepended by pi-yoka#>, where # is the interface number. The location of the pipc.log file is determined by the PIHOME entry in the pipc.ini file. The pipc.ini file is located in the Winnt directory. Usually, the pipc.log file will reside in the c:\pipc\dat\ directory.

If the service was successfully started, the user can verify that the service is still running from the services control panel. If the service has been terminated, the reason for its termination will be given in the pipc.log file. If the service is still running, the user can use c:\PI\bin\apisnap.exe or Processbook to verify that data is being successfully transferred to the PI Data Archive.

The pi-yoka service can be stopped at any time by issuing the following command:

pi-yoka -stop

The pi-yoka service can be removed by

pi-yoka -remove

5.If the pi-yoka service is installed as a manual service on the PI home node, the user may wish to edit the c:\PI\adm\pisrvsitestart.bat and the c:\PI\adm\pisrvsitestop.bat command files. These command files are invoked only when the PI data archive is started and stopped as a manual service with the c:\PI\adm\pisrvstart.bat and the c:\PI\adm\pisitestop.bat command files.
In the c:\PI\adm\pisrvsitestart.bat file, make sure that the second to last line ends in

& wait 5000

If not, append “& wait 5000” to the end of the line. In the same file, add the following command just above “:theend”

C:\PI\interfaces\pi-yoka#\pi-yoka#-start & wait 5000

Add the following command to the c:\PI\adm\pisrvsitestop.bat file just above “:theend”

C:\PI\interfaces\pi-yoka#\pi-yoka# -stop

Note that the full path name to the pi-yoka executable must be given in both the c:\PI\adm\pisrvsitestart.bat and the c:\PI\adm\pisrvsitestop.bat command files.

To run in interactive mode, complete steps 6 and 7:

6.Execute the following command from an MSDos prompt:

cd c:\PI\interfaces

start “pi-yoka#” pi-yoka#\pi-yoka#.bat

A new MSDos window will appear, and the user will see several messages echoed to the screen. Then the messages will simply stop. The user will not regain a command prompt on the MSDos window until the interface has been stopped. Typing CONTROL-C while the MSDos window is selected stops the interface. The user can use c:\PI\bin\apisnap.exe or ProcessBook to verify that data is being successfully transferred to the PI Data Archive.

Check whether there are any error messages to verify successful execution of the interface. Messages that are sent to the screen are also sent to the pipc.log file. Check the pipc.log file. Some messages are written to this file that are not echoed to the screen when the interface is started up. Messages in the pipc.log file that pertain to the pi-yoka interface will be prepended by pi-yoka#>. The location of the pipc.log file is determined by the PIHOME entry in the pipc.ini file. The pipc.ini file is located in the Winnt directory. Usually, the pipc.log file will be placed in the c:\pipc\dat\ directory.

7.If you plan on starting both the PI Data Archive and the pi-yoka interface manually, you may wish to start the pi-yoka interface along with the PI data archive. To do this you must edit the c:\PI\adm\pisitestart.bat command file (there is no such thing as a c:\PI\adm\pisitestop.bat command file). Make sure that the last line of the c:\PI\adm\pisitestart.bat file ends in:
& wait 5000
If not, append “& wait 5000” to the end of the line. In the same file, add the following two commands:
echo Starting pi-yoka# Interface
start “pi-yoka#” /min ..\interfaces\pi-yoka#\pi-yoka#.bat & wait 5000

The pi-yoka interface should now be started in interactive mode. The /min flag minimizes the MSDos window that is created when the pi-yoka interface is executed.

8.Configure a few points on the PI system to test the interface.

RS-422 Hardware Configuration

The Yoka recorders are usually installed in a rack or panel configuration with the appropriate power, ground and RS-422A cable. First set the hardware address, then set the baud rate, number of bits, parity, stop bits, and handshaking to match the serial port settings. Also enter the correct range and decimal place information before starting the interface. Refer to manual IM 4082-S34E for more details.

The RS-422 option allows daisy chaining as shown in Figure 1-1. The interface program supports this type of connection. Yoka recorders must be configured with Yokogawa's RS-422 interface option. See Yokogawa manual IM 4082-S34E for more details.

Figure 1 RS-422 Connection Diagram

If the Yoka recorders are connected to different serial ports, then a copy of the interface program is required for each port. Up to 99 copies of the interface may run at the same time as part of a PI system. Note that running a large number of copies on a single computer will reduce system performance.

Note:

This option has not yet been tested in a production environment. Please contact OSI technical support before you use this option.

Troubleshooting

The pi-yokainterface records status and error messages go to pipc\dat\pipc.log file. If the pipc directory does not exist it goes to the temp directory of the root drive. e.g.: c:\temp\pipc.log.

If you are having problems with the pi-yoka interface, this is the first place to look for indications of what the source of where the trouble lies.

By default, messages will be written to the pipc.log file at the following times:

  • At Startup
  • When invalid parameters are found in the command line
  • When a digital state is not found
  • When a PI point is not found
  • When a error occurs when adding data to PI
  • When a point does not have the passed point source (if passed)
Revision History
Date / Author / Comments
20Mar93 / JHZ / Written
01Apr93 / JHZ / Added Fig.1-1
05May93 / JHZ / Interface Operation, Yoka1.com, Yokasetterm.com
07Jun93 / JHZ / Minor corrections to Sections 1.2 , 1.3, 1.4 and 1.6
15Oct97 / JB / Port to NT, Support of model 3081/4081
01Jun99 / JB / Support of model 4082 and 3880, UNIINT 2.34
01 Apr00 / JB / Added option to select recorder scan mode

October 15, 19971