Citect Interface


Communication Test Programs



Download 0.67 Mb.
Page8/26
Date31.07.2017
Size0.67 Mb.
#24967
1   ...   4   5   6   7   8   9   10   11   ...   26

21.Communication Test Programs


The interface comes with a program, PI_CitectTest.exe that connects only to Citect. This test program connects to Citect in exactly the same way as the interface does. It eliminates PI as a variable during any connection problems that may occur because it makes no reference to the PI system.

The program is run from the MS-DOS command prompt and needs no command-line parameters. It begins by initializing a connection to Citect and displaying version information as retrieved from Citect.

Before attempting to run the interface, a connection test should be done individually for both the PI API and Citect API client. If a test program is run that makes reference to only one system, any problems that occur with the communication will be specific to the system being connected to; thus problems can be found and corrected more efficiently. Once connection has been established and confirmed using the test programs described below, the connection specifications for both PI and Citect that have been set up will function equally well for the interface.

Testing the Connection to Citect


PI_CitectTest.exe is run from the MS-DOS command prompt and needs no command line parameters. It begins by initializing a connection to Citect and displaying version information as retrieved from Citect.

Connecting to Citect


The program will prompt for a host with which to establish a remote connection to Citect. If the Citect system to be connected to is version 5.20 or greater and is on a remote system, the remote machine name or IP address must be entered at the prompt. The program will then prompt for a Citect user name and password before it attempts to connect. The following is an example:

Citect host: 206.347.209.32

Citect User: ENGINEER

Password : ******

Attempting to connect to Citect on 206.347.209.32 ...

Connected to Citect Version 5.20 Rev. 00

handle = 7e45f0

Iead or (W)rite:

...

If the Citect system is on the local system, it is not necessary to supply a host name. Also, if the version of Citect is earlier than 5.20, remote connections to Citect are not possible. Press Enter to bypass remote connections and attempt a connection to the Citect system on the local machine. The following is an example:



Citect host:

Attempting to connect to Citect on local machine ...

Connected to Citect Version 5.20 Rev. 00

handle = 7e45f0

Iead or (W)rite:

...


Note: The test program supplied with version 2.0.x of the interface will not prompt for a host but immediately attempt to connect to the Citect system on the local machine.

Reading Points


After connecting to Citect, press R (not case-sensitive) to put the test program into read mode. It will prompt for the name of a Citect point to read and display the value for that point. It will only display the value once and then ask for another Citect point to read. Press Enter without entering a point name causes the program to use the last point that was entered.

The following is an example of the test program’s output using read mode:

Iead or (W)rite: R

Citect point to read from: LOOP_1_PV

LOOP_1_PV = 136.500

Citect point to read from:

LOOP_1_PV = 145.200

Citect point to read from:

LOOP_1_PV = 149.600

Citect point to read from: LOOP_2_PV

LOOP_2_PV = 5.700

Citect point to read from:

LOOP_2_PV = 7.200

Citect point to read from:

LOOP_2_PV = 10.500

Citect point to read from: ^C


Writing Points


After connecting to Citect, press W (not case-sensitive) to put the test program into write mode. It prompts for the name of a Citect point to write to and ask for a value to write to that point. Press Enter without entering a point name causes the program to use the last point that was entered. Press Enter without entering a value causes the program to write a random number.

The following is an example of the test program’s output using read mode:

Iead or (W)rite: W

Citect point to write to: LOOP_1_SP

Value to write: 95.22

Citect point to write to:

Value to write:

Writing random number: 75.602

Citect point to write to: LOOP_2_SP

Value to write:

Writing random number: 77.230

Citect point to write to: ^C



  1. Digital States


For more information regarding Digital States, refer to the PI Server documentation.
Digital State Sets

PI digital states are discrete values represented by strings. These strings are organized in PI as digital state sets. Each digital state set is a user-defined list of strings, enumerated from 0 to n to represent different values of discrete data. For more information about PI digital tags and editing digital state sets, see the PI Server manuals.

An interface point that contains discrete data can be stored in PI as a digital point. A digital point associates discrete data with a digital state set, as specified by the user.


System Digital State Set

Similar to digital state sets is the system digital state set. This set is used for all points, regardless of type, to indicate the state of a point at a particular time. For example, if the interface receives bad data from the data source, it writes the system digital state Bad Input to PI instead of a value. The system digital state set has many unused states that can be used by the interface and other PI clients. Digital States 193-320 are reserved for OSIsoft applications.
Interface Specific Digital State

The interface uses one state that is not defined as part of the standard PI system digital state set.

Cit_Bad_Conn: This state indicates that the connection to Citect has been lost. It must be entered precisely as shown.

I/F_Stopped: This state indicates that the interface was not running at a particular time. This state can be entered as any string but must match the /stopstat parameter in the interface startup file. See /stopstat Command-line Parameters section for more information.

These two states need to be inserted into unused states in the system digital state set. An unused state is identified by a label ?# where # is the number of the unused state; for example, if state 100 is unused it will have ?100 as its label.





  1. Download 0.67 Mb.

    Share with your friends:
1   ...   4   5   6   7   8   9   10   11   ...   26




The database is protected by copyright ©ininet.org 2024
send message

    Main page