Ejemplos Avg (Tagval
Ejemplos Avg (Tagval
Ejemplos Avg (Tagval
32 Bit PI-API
for Microsoft Windows NT and Windows 9x
Version 1.3.8
readme.txt
June 2002
Table of Contents
----------------Troubleshooting
C Programming Information
Visual Basic Programming Information
Release Notes
Version 1.3.8
Version 1.3.6
Version 1.3.5
Version 1.3.4
Version 1.3.3
Version 1.3.2
Version 1.3.1.3
Version 1.3.1.2
Version 1.3.1
Version 1.3.0
Version 1.2.3.6
Version 1.2.3.5
Version 1.2.3.4
Version 1.2.3.3
Version 1.2.3.2
Version 1.2.3.1
Version 1.2.3
Version 1.2.2
Version 1.2.1
Version 1.2.0
Version 1.2.B2
Version 1.1.4
Version 1.1.3
Version 1.1.2
Version 1.1.1
Version 1.1.0
Version 1.0.6
Version 1.0.5
Version 1.0.4
Version 1.0.4a
PILogin Version
PILogin Version
PILogin Version
PILogin Version
PILogin Version
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
your system.
When you encounter errors, always check the file pipc.log found
in your %PIHOME%\DAT directory. The PI-API writes to this file
when it encounters errors. (Note: PIHOME is defined in pipc.ini
located in the WINDIR directory)
The error codes which are found in the pipc.log file may be
translated using the pilogsrv -e # command.
---------- C Programming Information ----------------------------|
The import libraries, piapi32.lib and pilog32.lib, may be used to
implicitly link to the PI-API and PILOGIN routines.
An example program with a Microsoft Visual C++ 6.0 makefile is
located in the \pipc\examples\c directory.
C applications should use a struct member byte alignment of 8.
---------- Visual Basic Programming Information -----------------|
The file piapi32.bas in the INCLUDE directory contains function
declarations for the functions provided in the piapi32 and pilog32
DLLs. These files make it possible to call PI-API functions directly
from Visual Basic. See the PI-API Programming Manual for more
information regarding calling C routines from Visual Basic.
-----------------------------------------------------------------|
RELEASE NOTES
-----------------------------------------------------------------|
PI-API version 1.3.8 release notes
June-2002
Bug fixes
--------1. Crash in PINetMgr caused by a data set in PI-ProcessBook
If a PI-ProcessBook display has a data set which contains a large number
of characters (~4100), e.g.,
If(TagVal('cdf144','*')<=TagVal('cdf144','*-4h')) And SStDev ...
and so on up to about 4100 characters
previous versions of the PI-API caused the PINetMgr process of PI
Universal Data Server to crash.
PI-API v1.3.8 fixes this problem.
2. Initialization of the APIBUF.DAT file
PI-API v1.3.6 has a problem whereby the APIBUF.DAT file is
re-initialized to 16 bytes whenever a new PI-API program starts up.
A typical scenario is the following:
(a) a PI-API node is sending data to PI Universal Data Server
(b) this PI-API node loses communications to PI Universal Data Server
(c) the PI-Buffer Server buffers data to the APIBUF.DAT file
(d) a user runs "apisnap" on the PI-API node to check whether
by
$
$
$
$
$
PIHOME=/opt/piapi_1.3.6
export PIHOME
SHLIB_PATH=$PIHOME/lib
export SHLIB_PATH
sh pi.install
And in /opt/piapi_1.3.4/dat/piclient.ini:
[APIBUFFER]
BUF1NAME=PIAPI134_BUFFER1MEM
BUF2NAME=PIAPI134_BUFFER2MEM
BUF1MUTEXNAME=PIAPI134_BUF1MUTEX
BUF2MUTEXNAME=PIAPI134_BUF2MUTEX
FILEBUFNAME=PIAPI134_FILEBUF
FILEMUTEXNAME=PIAPI134_FILEMUTEX
PI-API node buffering program incompatibility
--------------------------------------------The PI-API node buffering programs (bufserv, bufutil, and isbuf) are
compatible with this PI-API version only. That is, you cannot use
PI-API v1.3.6 with the bufserv program that was delivered as part of
PI-API v1.3.4, and vice-versa.
User-specified check-time interval for Log File Utility
------------------------------------------------------By default, the pilogsrv process checks every 600 seconds (10 minutes)
to determine whether to shift the PIPC.LOG file. You may now specify
this check-time interval by putting the following entry in to the
[PIPC] section of the PIPC.INI file located in the Windows directory:
[PIPC]
CHECKLOGINTERVAL=300
For the above example, pilogsrv will check every 300 seconds (5 minutes)
to determine whether to shift the PIPC.LOG file.
Documentation clarifications
---------------------------The online help file, typically located in
C:\Program Files\PIPC\HELP\PIAPI.CHM,
has been updated with regards to the following functions:
pisn_evmexceptionsx()
PIAPI.CHM now indicates that this function returns -77 when an
exception buffer overflow occurs
pisn_evmexceptx()
PIAPI.CHM now indicates that this function returns -77 when an
exception buffer overflow occurs
pisn_flushputsnapq()
PIAPI.CHM now contains a correct example usage. Previously, the
example erroneously showed:
printf("Error %ld with point %ld\n",qerror[i].point, qerror[i].error);
The example now correctly indicates
printf("Error %ld with point %ld\n",qerror[i].error, qerror[i].point);
piar_getarcvaluesfilterx()
PIAPI.CHM now provides an explanation of the ARCflag_comp and
ARCflag_filter specifications:
Filter reporting modifiers ARCflag_filter and ARCflag_mark may also be
used in conjunction with ARCflag_comp, ARCflag_even, or ARCflag_time.
That is, if you want to get filtered, compressed data, use an arcmode
value that is the sum of ARCflag_comp and ARCflag_filter. The
tagname
pointA
pointA
pointC
pointD
pointC
pointB
pointA
timestamp
4/17/2001 10:03:01
4/17/2001 10:03:05
4/17/2001 10:02:59
4/17/2001 10:03:02
4/17/2001 10:03:01
4/17/2001 10:03:03
4/17/2001 10:03:06
value
10.555
11.230
0.123
3.112
0.140
CLOSED
12.788
These exception values are in the same order that were received by PI
Universal Data Server.
The first call to pisn_evmexceptionsx(), with GETFIRST, returns the data in
row 1 above.
A subsequent call to pisn_evmexceptionsx() with GETNEXT returns the data in
row 2 above.
Another subsequent call to pisn_evmexceptionsx() with GETNEXT returns the
data in row 3.
Another subsequent call to pisn_evmexceptionsx() with GETNEXT returns the
data in row 4.
Another subsequent call to pisn_evmexceptionsx() with GETNEXT returns the
data in row 5.
Another subsequent call to pisn_evmexceptionsx() with GETNEXT returns the
data in row 6.
close properly.
-----------------------------------------------------------------|
PI-API version 1.3.3 release notes
May-2000 cah
1. Arguments to PI-API routines which are unmodified 'char *' were
changed to 'const char *' in piapi.h and piapix.h. This will
prevent warnings by newer ANSI C++ compilers about passing literal
string constants as arguments.
2. Added the routine pitm_getutctime to return double UTC time for
a PITIMESTAMP structure.
3. A PI-API uninstall program for Windows is now included in the
PIPC\bin directory. A dialog is presented with check boxes for
choosing which components to uninstall.
4. The AIX
libraries.
manual have
libraries.
5. The HP-UX release now has versions for the new HP ANSI C++
compiler and the HP cfront compiler (CC). The installation script
allows installation of either version.
6. The Solaris release now supports the ANSI C++ compiler version 5
and the previous version 4 compiled code. The installatio script
allows installation of either version.
7. Added put and get of PItimestamp point types that are available
in PI 3.3 servers. For sending values to PItimestamp point types
using pisn_putsnapshotsx, pisn_putsnapshotx, pisn_putsnapshotqx,
piar_putarcvaluesx if bval is provided in the argument list a string
is sent to PI, if drval is provided a float64 or if ival an int32.
For pisn_sendexceptionsx calls with
PI_EVENT.typex=PI_Type_PItimestamp, if PI_EVENT.bval exists a string
is sent. Otherwise PI_EVENT.drval is sent. For VB variants with
typex=PI_Type_PItimestamp, pisn_sendexceptx sends a double. For
pisn_evmexceptionsx retrieving data from a PItimestamp point type,
the returned type is typex=PI_Type_PItimestamp and as double
(drval). For the VB routine pisn_evmexceptx, it returns VT_R8. For
pisn_getsnapshotx, double, int32, bval pointer arguments are all
filled if they exist. drval and ival arguments are UTC values and
the bval is returned in localtime.
8. Added digital states ACTIVEBATCHSTAT, WRONGTYPESTAT, OVERFLOW_ST
and INTFSHUTDOWN = -311 to pidgstat.h.
9. Fixed a bug in HP-UX network read/write of large network
packets. Conditions causing the problem were packet sizes greater
than about 1700 bytes and less than optimal speed between the client
and PI server. The impact was lost data on receiving packets.
10. Fixed bug in pisn_putsnapshotsx to PI2 server. It is possible to
have putsnapshot errors for valid values in mixed point type arrays
(queued calls).
11. For pisql calls, fix SQL queries so the queries are sent to the
server in 255 char chunks. PI servers would return an error for api
version 1.3.2 only.
12. Fixed warning message about unacceptable jumps in the server
time offset which were issued by pitm_fastservertime. These time
offsets were typically changed by about 1 second and were obviously
acceptable changes.
13. Fixed a problem with extended sendexception routines. New values
with an exception deviation of zero and no change from the old value
would not be sent to the PI server. Setting exception deviation to
zero now works for all points.
14. Fixed the output message of the buffer server for points which
had an extended putsnapshot or putarcvalues error. The timestamp and
status of the bad value were to be printed, but the status value was
incorrect.
15. Fixed a problem in which the buffer server (bufserv) may exit if
the client generating data puts large amounts of data into the
buffers. Under such circumstances bufsev may not be able to lock the
buffer before the status changes from second buffer to file. After
the unexpected status change, bufserv would exit. It now skips that
iteration of buffer processing and tries again.
16. pitm_getpitime will now return -1 for incorrectly filled
PITIMESTAMP structures.
17. Eliminated possible PI_OVERFLOW (-15000) messages from the
buffer server when checking the server/client time offset.
18. Reduced the number of "connect() failure" messages which occur
as the API attempts periodic reconnection. Previously, every 2
minutes, the API would log the failure message. Now every 600
attempts generates a message (about 10 hour intervals for 1 minute
timeout setting).
19. Fixed a problem determining version of a PI 2.1 or earlier
server. The problem would cause excessive calls to the server
during archive or snapshot retrievals of arrays. The results would
take several times longer to retrieve.
20. The pilogsrv service start and stop was added to the Windows NT
pistart.bat and pistop.bat scripts.
21. The definition of MAXUINT32 pidefs.h is now unsigned instead of
"L".
22. bufutil would sometimes not report events that were in the
primary buffer. This was usually seen when testing with a small
number of sent events. bufutil will now indicate the presence of
events in bufserv's temporary block used for sending data to the
server. The number of events in the block is added to the number of
events in the primary buffer.
23. bufserv previously attempted to communicate with the PI server
only when data was sent through the buffers by a PI-API program.
Thus, bufserv would only detect a server was unreachable when new
data was sent. When little or no data was sent to the PI server,
other PI-API programs could attempt to contact the server before
bufserv detected that the server was unreachable. Since bufserv did
not detect and disable the connection TIMEOUT first, these other
PI-API programs would wait for the TIMEOUT period before continuing
execution. Now bufserv checks the connection with the server every
PAUSERATE seconds (this parameter is set in piclient.ini and
defaults to 2 seconds). This allows bufserv to disable connection
TIMEOUT sooner for low throughput cases. Note: bufserv still waits
for TIMEOUT seconds when the connection is first lost.
24. Fixed output of Windows socket error numbers. The wrong number
was previously printed. No number-to-string lookup is available for
windows socket errors. Some socket errors have been added to the
PI-API installation instructions (API_install.doc).
25. Fixed pisn_sendexcepstrucq problem in which the numbpterrs
argument was not updated. Also, in some circumstances, qerrs was not
updated properly.
26. pisn_sendexceptionsx and pisn_evmexceptionsx contained a memory
leak for strings and blobs if a digital state was obtained
alternating with good values.
27. If no connection to the server was performed and no default
server was in pilogin.ini (or pilogin.ini was not found), making a
call which required a connection caused an exception violation.
This was caused by a failure at an implied connection. This has been
fixed.
28. Windows installation program now has a checkbox for enabling
auto-start of bufserv. Previously, bufserv would be installed as
manually started so that testing could be done before enabling
auto-start of the bufserv service. Changes to the dialog text of
the installation has been made for clarity.
29. The UNIX installation script has been expanded. It detects
unsupported versions of the operating system, the validity of the
user entered during installation is checked and presents information
for the HP and SUN library differences.
30. The iorates.dat file header has been updated to explain the
newer features.
31. The iorates program now detects the iorates.dat file
modification time to determine if a re-read is needed. Also, the tag
name lookup by pipt_findpoint would capitalize the tagname. It was
causing a repeated lookup of tagnames.
-----------------------------------------------------------------|
PI-API version 1.3.2 release notes
Dec-99 cah
1. A bug in the PI-API pitm_localtime routine (OSI's implementation
of localtime) has been fixed. The problem caused an exception
violation in pitm_intsec. The problem was caused during daylight
savings when a time is entered into PI-API routines that accept the
local time. Entering a zero local time may result in a UCT time
less than zero. The localtime routines previously used had a range
of validity to -3600 seconds for daylight representation of time
zero. Now the new localtime routine also handles the range to -3600
properly.
file.
If an alternate file name was used in pilg_checklog, the extension
was forced to be '.log'. Now any extension may be used.
Enabled the pilg_checklog option to re-initialize the filename and
size/number of log files using an argument of action=-1.
Fixed problem with pilg_checklog which caused Windows 9x logs to
be shifted on startup if size was not yet the maximum.
The UNIX iorates program has been enhanced to cleanly disconnect
when a kill -2 or kill -15 command is used. Also, the connection to
the server is attempted every 1 minute and after 10 minutes an
explicit disconnection is done before the next connection attempt.
The iorates.dat file is now checked every 10 minutes for additions/
deletions/changes to rate tags. Long tagname support is
implemented.
Added the HPUX process name to the pilg_formputlog output instead
of the process id.
pitm_delay now uses POSIX4 subsecond sleeps for OSF1, AIX and
SunOS. This forces SunOS to link with '-lposix4'.
The buffer server had a memory leak which would occur in high
snapshot rates with extended putsnapshot calls. This is fixed.
The buffer server program will now throttle error messages after
100 repeats of the same error for an array of points. Thus, if all
points get the same error, they will not all be reported.
The API buffer server program would occasionally report an error
cleared for points which never had an error reported. This has been
fixed.
The buffer server will now rename a truncated APIBUF.DAT file
which it is unable to read to APIBUF.###. It will then be able to
start successfully. Previously, the buffer server would be unable
to proceed if an APIBUF.DAT file with invalid header information
(such as zero byte size) was encountered.
The buffer server for Windows NT will now properly detect the free
disk space available if more than 4GB is free.
The apisnap program now can retrieve archive values with the same
timestamp as the snapshot value. The option to enter the servername
and a list of tags has been added. All tags in the list will have
snapshot and most recent archive value listed. The format of the
command is now:
> apisnap [servername [tag1] [tag2] [...]]
where "servername" must be listed to retrieve specified tag data.
If any tags are listed, the apisnap program exits after the data is
retrieved. Otherwise, a prompt is displayed for tagname.
The pilogsrv utility can now provide error messages for a specific
function (for instance, the -1 return for pisn_putsnapshot) instead
of all functions which produce that error return. The format of the
function code. The server will return all the values requested with
a GETFIRST call and the values will be buffered on the client for
retrieval. A filter expression may be passed if desired. A NULL
value for the expression is identical to the piar_getarcvaluesx()
call.
The allowed archive retrieval modes are (see pidefs.h):
ARCflag_time Retrieve values for the passed times.
ARCflag_even Retrieve evenly spaced values between the passed times.
ARCflag_comp Retrieve compressed values
The allowed modifiers are (see pidefs.h):
ARCflag_filter Remove values which do not pass the filter
expression. ARCflag_mark Mark values which do not pass the filter
expression with FILTERFAILSTAT. Note: PI 3 servers compress a
series of subsequent filter failure statii into one filter fail.
For server versions less than PI 3.2 SR1, this call reverts to
the standard API calls to return filtered archive data.
piar_putarcvaluesx(), piar_putarcvaluex(): These calls will
add/delete an event or array of events to the archive. The following
modes are valid for these calls (see piapix.h):
ARCNOREPLACE add unless event(s) exist at same time (PI 2.x)
ARCAPPEND
add event regardless of existing events
ARCREPLACE
add event, replace if event at same time
ARCREPLACEX replace existing event (fail if no event at time)
ARCDELETE
remove existing event
ARCAPPENDX
add event regardless of existing events, no compression
For server versions less than PI 3.2 SR1, this call reverts to
the standard API calls to delete/replace values.
pisn_evmexceptionsx(): This routine retrieves any new data
received in the update manager for points selected by the
pipt_evmestablish() call. It will now retrieve string type points
in addition to float, integer, and digital points. Data types of
the PIvaluetype enumeration are provided with the data retrieved
from PI3 servers. The data is placed into a PI_EVENT structure
which allows for any data type. The data type is set to PI_Type_PI2
for all data retrieved from PI2 servers. The only fields of the
PI_EVENT structure which are used for PI2 types are timestamp,
istat, and drval (typex=PI_Type_PI2).
pisn_flushputsnapqx(): This routine causes any queued data from
the snapshot calls pisn_putsnapshotqx() or pisn_sendexceptionqx() to
be sent to the home node.
pisn_putsnapshotqx():This routine accepts a queueing flag which,
if set, will queue data until a pinet message is filled before
sending the data to the home node or a pisn_flushputsnapqx() call is
made.
pisn_sendexceptionqx(): This routine accepts PI3 point types for
exception processing and queues the data (if queueing flag is set)
until a pinet message is filled or the queue is flushed before
sending the data to the home node.
pisn_sendexceptionsx(): This routine does exception processing on
an array of PI3 points.
pitm_isdst(), pitm_setdst(): These routines are used to
interpret/set the PITIMESTAMP structure tzinfo field. pitm_setdst
sets the appropriate bit pattern in tzinfo according to the tm_isdst
closed.
A bug on Windows NT in converting an IEEE floating point value to
VAX floating point value has been fixed. The compiler would do a
check on the VAX floating point format as an IEEE floating point
number. In 1/512 cases, the result would have one bit switched.
accuracy of the number would be reduced from 1.19e-7 to 7.63e-6.
values affected span the entire floating point range. API calls
pisn_putsnapshot, pisn_putsnapshotq, pisn_putsnapshots,
pisn_sendexcepstruc, pisn_sendexceptionq, pisn_sendexceptions,
piar_putvalue, piar_replacevalue calls were affected.
a
type
The
The
A bug on AIX which would produce inaccurate data due to IEEE to VAX
floating point conversions has been fixed. This is the same as for
Windows NT, except the values at which the error occured were
different.
-----------------------------------------------------------------|
PI-API version 1.2.3.6 release notes
10-Nov-98 hs
-----------------------------------------------------------------|
1. The PI-API in this and previous versions is built with the
C run-time library statically linked in. This means calls within
the PI-API to C run-time functions are not executed in the
msvcrt.dll installed on the system but instead are executed within
the PI-API. Version 4.x of the Microsoft C run-time libraries
contained a bug where conversions between local and UTC time were
incorrect for systems with a time zone setting that did not honor
Daylight Savings Time (e.g. Saudia Arabia, Korea, Arizona).
Recent versions of the Alpha NT PI-API (1.2.3.1 - 1.2.3.4) were
statically linked with version 4.x of the C run-time library and
therefore contained this bug. This version (1.2.3.5) is built
with the same code as version 1.2.3.4 but is statically linked
against version 5.x of the C run-time library where this bug has
been repaired. (Note: On the NT Intel platform v1.2.3.4 is linked
with version 5.x, prior versions are linked with version 4.x and
exhibit the bug)
This bug primarily affects programs which make "Extended
API" calls (see Chapter 6 of the Programmer's manual). These
calls send UTC times to the server and do conversion between
local and UTC times on the local system exposing the bug.
Regular API calls send local times to the server which in the case
of PI3 translates them to UTC on the server. As no conversion is
made on the API node the bug is not exposed. OSI products that
make use of the extended API functions include PIPC Datalink
(v 1.7) and the PI Batch File interface.
If you have been running an interface or program that sends data
to the PI Server using the extended API (e.g. Batch File) and
your system is set to a timezone where DST is not observed, you
may need to correct data in the archive. See the following
web pages for more information or call OSI technical support.
http://irn.osisoft.com/osiirn/pi/timebug/bugquest.html
http://irn.osisoft.com/osiirn/pi/timebug.htm#Repair
-----------------------------------------------------------------|
PI-API version 1.2.3.5 release notes
15-Oct-97 hks
-----------------------------------------------------------------|
1. pisql_set_timeout: this routine now checks to make sure that the PI-API
timeout is at least 5 seconds greater than the passed timeout value. If it
is not, it sets the PI-API timeout to 5 seconds greater than the passed
timeout value for the current session only, and writes an informational
message to the PI-API message log file. This routine is used by the
PI-ODBC Driver.
2. pitm_formtime previously would crash if passed a timedate of 0 for
systems set to time zones east of Greenwich, England and west of the
international dateline. The function pitm_secint had the same problem.
The function pitm_intsec would also exhibit this problem if passed
integer date components close to Jan 1 1970 0:0:0. This behavior has
been fixed. The problem was that the entered local time evaluated to
a time before Jan 1, 1970 0:0:0 which is the basis (epoch) of PI time.
These times are now treated as the base time.
3. A new routine, pilg_formputlog was added. This routine behaves similarly
to pilg_putlog but it logs the calling application name and a passed ID
string in addition to the passed message. The prototype for the function is:
PIINT32 pilg_formputlog( char PIPTR *msg, char PIPTR *idstring);
The user message is the first argument and a user defined idstring is the
second argument and is appended to the message. The internal api messages
have now been changed to use this function to give more useful error
messages. Example output appears as follows:
28-Oct-97 11:55:43
apisnap>PI-API> Warning: Server Minor Protocol Vers 7 < Client Vers 8:Major vers
ion OK
28-Oct-97 11:56:17
apisnap>PI-API> gethostbyname: foobar sock_errmsg: Error: 0, Error 0 occurred.
In this example, taken from a DEC UNIX system, the program apisnap
successfully connected to a host and posted the warning concerning different
protocol levels. The PI-API designator is the idstring argument. The
second example shows apisnap failing to connect due to the inability to
translate the hostname foobar. In previous versions these messages were
logged with no indication of the application that encountered the error.
Under HP-UX and AIX, the calling process name could not be obtained.
For these platforms the function logs the PID (process ID) which can be
compared to output from the ps command to determine the calling proram.
For example:
28-Oct-97 17:04:25
7955>PI-API> gethostbyname: foobar sock_errmsg: Error: 0, Error 0
Here the process with PID 7955 called the PI-API with a bad hostname.
-----------------------------------------------------------------|
PI-API version 1.2.3.4 release notes
20-Jun-97 hs
-----------------------------------------------------------------|
1. The function pitm_fastservertime previously did not work correctly
against PI on OpenVMS systems that had security enabled (RLWL), until
the user had successfully logged in and 10 minutes had elapsed.
-----------------------------------------------------------------|
PI-API version 1.2.2 release notes
13-Sep-96 hs
-----------------------------------------------------------------|
1. A bug was fixed where programs which attempt to stay connected for long
periods (such as interfaces), would be unable to reconnect to the home node
once they lost the connection. Sometimes this was manifested as being able
to reconnect once but not again. The problem was a resource leak in the
case of a connection failure. Each time the program attempted to connect
and failed, a socket descriptor was allocated but not released. There are
per process limits on the number of sockets that can be opened (~ 20).
Once this limit was exceeded, the program would never be able to connect.
For a long running program, the effect was cumulative. If you shut down a
home node for a short time, it was possible, depending on the program design,
to only try a few connections, so that when the server again became available
there were still socket descriptors available. However the next time the
server was taken down, there were fewer descriptors left for this process
so only a shorter down time could be tolerated.
The program design mentioned above refers to explicit vs. implicit
reconnection techniques. Programs can either detect connection loss and
suppress further calls and do periodic connection attempts (explicit) or
just continue to make PI-API calls ignoring the disconnect status and
rely on the PI-API to attempt the reconnection(implicit). Programs using
the explicit method had a better chance of reconnecting after a short delay
as typically they made fewer connection requests during that time, losing
fewer descriptors. UNIINT interfaces follow this explicit reconnection
method. In either case, if the server was down long enough, the problem
would arise.
2. The criteria for exception reporting was modified slightly to agree
with the documentation and with the PI2 toolkit. Previously the PI-API
would report an exception for real and integer points when the exception
minimum time was exceeded and the difference between the new value and
the last exception was greater than or equal to the exception deviation
for the point. The test for exceptions now uses a greater than comparison
instead of greater than or equal. The effects of this change are
noticeable when the exception deviation for a point is set to zero.
Previously if a point, whose exception deviation was set to zero, was
generating values of 0, the PI-API would report exceptions every exception
minimum time as the difference (0) was equal to the deviation (0). With
this change, in this case, an exception will only be generated when the
value changes or the exception maximum time is reached.
3. Increased frequency of calculation of difference between pi
system's time and devices time from every 30 minutes to every 5 minutes
to improve detection of daylight savings time transitions.
4. Changed flags in semaphore calls used in buffering to include SEM_UNDO.
This causes semaphores from processes that die or are killed to be released
by the system preventing other processes from hanging waiting for these
resources.
5. Previously pisn_putsnapshots did not update the iorates counter
correctly. For each call it incremented the counter by 1. This has been
changed to increment the counter by the number of values actually sent
by pisn_putsnapshots.
-----------------------------------------------------------------|
PI-API version 1.2.1 release notes
Aug-96 hs
-----------------------------------------------------------------|
1. A bug introducted in 1.2.0 in pisn_sendexceptions and
pisn_sendexceptionq was fixed.
2. The extended API functions that read data from PI
(pisn_getsnapshotx, pisn_getsnapshotsx, piar_getarcvaluex,
piar_getarcvaluesx) will fail if the data returned is in error
(i.e. non-zero istat) when communicating with PI 3.1. These bugs
will be fixed in PI-API 1.2.2.
3. pisn_getsnapshotsx: system error information returned for an
individual point by this routine is lost; all returned arguments
will be zero. This will be fixed in the PI-API 1.2.2 with the
addition of a new argument. This means that you will need to
change your code if you use this routine when PI-API 1.2.2 is
released.
The manual reflects the new calling sequence. Check the
current function prototype in the include file piapix.h.
-----------------------------------------------------------------|
PI-API version 1.2.0 release notes
Jul-96 hs
-----------------------------------------------------------------|
1. pipt_updates previously returned the tag name field without null
termination. It now copies as much of the 12 characters of tag name
returned from the server as possible given the user supplied buffer
and null terminates the string. When communicating with PI3 systems
(3.1 and greater) it is able to determine if the string has been
truncated and returns a -411 in this case.
2. Previously dummy functions were defined for functions provided by
Pathworks 4 and 5 on platforms where they did not exist. These are now
wrapped within functions named pixxxx to avoid name conflicts
particularly on UNIX platforms. The functions are getnodebyname,
dnet_ntoa, getnodeadd, and getnodename.
3. Previously on the Solaris platform, when the PI-API log files were
shifted, the resulting file was named incorrectly. The month and day
in the file name were months away from what should have been
yesterday. Log files when shifted now get the correct month-day
extension.
4. Previously piut_netinfo failed if no connection was made prior to
calling the function. Now it initialized the socket layer and is able to
deliver the local host information prior to any connection to a PI
server
5. When connecting to multiple servers, if disconnect was called
twice (either by application, or internally due to network failures)
the second call could crash or produce strange results. The linked
list of connections was not being cleaned up properly when removing
entries. This has been fixed. This change allows versions of piverifier
that previously crashed on piut_disconnect to complete successfully.
6. The batch functions, piba_getaliaswunit, piba_getunit, and
system had not yet been released to beta testing. For a detailed
description of the extended API functions, refer to chapter 6 of
the PI-API manual. This chapter is available on request for review
and will be incorporated into the version 1.2 release manual.
PI-API Modifications between Version 1.1.0 and 1.2.0
-----------------------------------------------------------------|
v1.1.4
-----------------------------------------------------------------|
1. The function pitm_servertime will now return -999 if security is turned
on and the caller does not have READ privilege. Previously it returned
1 which for this function was success but did not update the time.
-----------------------------------------------------------------|
v1.1.3
Jan 96 hs
-----------------------------------------------------------------|
1. In pipt_findpoint, if the passed tagname is a long tagname (>12chars)
and contains some lower case characters, when passed to a PI3 server
it is no longer truncated on return. Instead the full long name is
returned converted to all upper case. 28-dec-95 v1.1.3
2. pipt_digpointers now returns an appropriate digcode value for PI3 systems.
On PI2 systems the number was the starting digital code for the point,
typically less than 512. On PI3 systems, the code is the digital state
set identifier and is >65535 or 0 for the system set.
3. pisn_evmexceptions - previously would request network messages until a
count of zero was returned. Now stops requesting network messages when
less than a full buffer is returned.
4. pisn_evmexceptions - previously returned exceptions in reverse order for
each buffer returned from server. Server returns oldest data first. Within
each network buffer, function would return newest first. Now returns in
server order - oldest first.
5. pisn_evmexceptions now remembers the server used when events are retrieved
from the server and compares it to the current server each time the function
is called. If there is still data in the buffer but the server has
changed an error (-80) is returned and the data still in the buffer is
lost. Previously one could get unretrieved events from the previous
server when calling pisn_evmexceptions for the new server if you had
registered for events on both. Note programs should empty the
exception buffer by calling pisn_evmexceptions until it returns a count of
zero, before switching servers to avoid losing events.
-----------------------------------------------------------------|
v1.1.2
Dec 95 hs
-----------------------------------------------------------------|
1. The message system on UNIX would fail if too many messages were sent
in to short a time to the message log using pilg_putlog, and pilg_putoutput.
The result was a stream of messages reading msgq_send error: no more processes
The actual error message was lost. The system now will report to stdout
the first such error but also will send the original message to stdout. The
message logging system will not be retried until 100 messages have been
receieved and sent to stdout. This allows applications to realize that
the logging system is being overburdened but still provides a way to capture
the error messages generated during that time.
2. The api in Windows and NT now looks in pipc.ini for the entry PIPCSHARE
in the section [PIPC] for a network directory override when looking for
the pilogin.ini file. It searches for the file in the DAT subdirectory of
the PIPCSHARE directory.
The order of directories searched when finding pilogin.ini by the PI-API DLL
is maintained and enhanced for backward compatibility. It is now
a. The dat subdirectory under the PIPCSHARE entry in the pipc.ini file
b. The dat subdirectory under the directory above the module's directory
(../dat)
where the module's directory is:
16 bit - Directory where the PI-API DLL is loaded from
32 bit - Calling application's directory
c. The current directory
d. The dat subdirectory under the PIHOME entry in the pipc.ini file
e. C:\PIPC\DAT
-----------------------------------------------------------------|
v1.1.1
Nov 96 hs
-----------------------------------------------------------------|
1. The function piut_disconnect formerly sent a disconnection message to the
default server, regardless of its connection status and just closed the socket
for all other outstanding connections. This meant only the default server was
given a chance to gracefully end its process. It also meant if you were not
connected to the default server and called piut_disconnect, the API would
attempt to connect to that server in order to send the message it was quitting.
The API now sends the disconnection message to each currently connected server.
-----------------------------------------------------------------|
PI-API version 1.1.0 release notes
AUG-1995 - HKS
-----------------------------------------------------------------|
---------Bug fixes:
---------Fixed a bug which allowed pitm_parsetime to accept erroneous month
names on PI3 servers.
Added a check to piut_getapiversion that the passed buffer length
is at least 9 characters long. Previously a shorter buffer could
result in memory overwrites.
pipt_instrumenttag previously returned only 31 characters. The
full 32 character tag can now be returned.
pipt_recordtype incorrectly returned 1 for points with resCode of
4 and 0 for all others. This behavior was in conflict with the
documentation and the Vax toolkit. The results have now been
reversed. Existing code calling this function should be examined.
pipt_scan would not update the lscan parameter when the status bit
was off. This has been fixed. Calling functions that set the
lscan parameter to 0 before calling pipt_scan are unaffected.
Those that did not, in previous versions would have been returned
Three new functional areas have been added to the API each with
a list of supporting functions.
PIBATCH (piba_xxxx)
Access functions to the batch configuration data and the batch
history data. These functions are described in the PI-API
Programming Manual
PISQL (pisql_xxxx)
Functions which provide access to PI data as if it were stored
in a relational database. The functions provided are conceptually similar to other RDBMS API's (ODBC, DBLib, etc.). These
functions are now supported in the API but must be separately
licensed. The functions are briefly described below.
PILOGIN (pilg_xxxx)
Functions which provide commonly used connection services and
information as well as common PI dialogs - login, tag search,
and point attributes. These functions are described in the
PI-API Programming Manual.
Client Platforms
---------------The PILOGIN functions are provided for MS Windows only. PIBatch
and PISQL are not supported on MSW clients running Pathworks 4
communications software. An upgrade to Pathworks 5 or a WinSock
compliant product is recommended. PIBATCH and PISQL are not
supported on Solaris 1. It is also unlikely these functions will
be ported to Unix platforms which do not provide a C++ compiler.
Server Requirements
------------------PIBatch and PISQL API calls are only supported by server version
2.1.1 or higher and are not available on the PI3 platform yet.
Libaries
-------The new API functions continue to be supplied by a single library
except for the new PILOGIN functions which are delivered in a
separate dynamic link library (PILOGIN.DLL) only available in
MS Windows. On some UNIX platforms libraries are available for
both static linking and as shareable object libraries.
PISQL Functions
--------------pisql_bind_list
pisql_bind_param *
pisql_clear_data
pisql_clear_stmt
pisql_del2string
pisql_describe_list
pisql_describe_params *
pisql_error
pisql_execute
pisql_execute_callback *
pisql_fetch
pisql_free_stmt
pisql_get_data
pisql_get_info
pisql_get_list_info
pisql_get_param_info *
pisql_get_tagsize
pisql_get_timeout
pisql_get_timestep
pisql_new_sqlda
pisql_new_stmt
pisql_prepare
pisql_reset
pisql_set_options
pisql_set_tagsize
pisql_set_timeout
pisql_set_timestep
-----------------------------------------------------------------|
PI-API version 1.0.6 release notes
26-APR-1995
-----------------------------------------------------------------|
---------Bug fixes:
---------Correct handling of Daylight Savings and Standard time
transitions. The API supports local time based archives, PI 2.x
(clasic PI), and Universal coordinated time based archives, PI
3.0. This feature requires knowledge of archive time base before
calling pitm_parsetime. Therefore, piut_setservernode should be
called for the appropriate server before calling pitm_parsetime.
Applications that follow this practice will allow correct time
representation when displaying data from PI 2.x and PI 3.0
simultaneously. Default behavior assumes a local time based
archive (PI 2.x).
Fixed bug which could prevent multiple piserver connections.
------------Enhancements:
------------Allow TCP/IP connections by address. Previously only connections
by name were allowed. This feature allows calling
piut_setservernode with an address or name. For example the
following 2 syntaxes are now supported:
char hostname[25] = "pisystem"
int32 result = piut_setservernode ( hostname );
char hostaddress[25] = "123.45.123.32"
int32 result = piut_setservernode ( hostaddress );
Allow specifying TCP/IP port in connection. The syntax is name,
or address, followed by :port. For example:
codes are
System error
Success
Point does not exist
Tag was truncated (passed buffer not large engough)
codes are
System error
Success
Point does not exist
tag was truncated (passed buffer not large engough)
codes are
System error
Success
Point does not exist
Instrument tag not defined
Instrument tag is defined but truncated (passed buffer
not large engough)
-----------------------------------------------------------------|
The tag search dialog has been changed to reset to the selected
server during the retrieval of tags. In previous versions, it
was possible for the current active server used by the PI-API
to be changed after the first tag was retrieved but before all
tags meeting the selection criteria had been successfully
returned. The observable effects of this problem were an
inconsistent number of tags being returned, percentage completion
jumping from a few percent to 100% and tags from incorrect servers
being returned but shown with the proper server name in the tag
search list box.
This problem was only exhibited in OSI software by ProcessBook 2.1
beta versions when working with displays showing multiple servers or
a server other than the server being searched for tags. During the
retrieval process the tag search allows buffered window messages to be
processed in order to allow the user to hit the abort button on the
dialog. ProcessBook 2.1 would receive timer messages at this time
and update its displays, switching the server context to accomplish
the update.
-----------------------------------------------------------------|
PI Login DLL Version 1.3.4 release notes
Aug-99 cah
-----------------------------------------------------------------|
The pilog32.dll now replicates server changes made with the pilogin
functions in the PI-SDK server registry.
The connection information dialog now specifies the user actually
used to log in for the "Connection Status" field. The "User Name"
field has been changed to "Default User Name".
-----------------------------------------------------------------|
PI Login DLL Version 1.3.3 release notes
27-Jan-99 hs
-----------------------------------------------------------------|
BUG FIXES:
---------The point attributes dialog formerly would incorrectly display a short
tagname of "N/A" for points found by long name on PI2 systems. This
has been corrected so that against PI2 systems the point name found
is displayed as well as the associated long or short name(whichever
is not displayed as the found name). Against PI3 systems the dialog
continues to show N/A for the short name as PI3 systems only have a
single point name.
--------------------------------------------------------------------PI Login DLL Version 1.3.2
24-Oct-96 hs
--------------------------------------------------------------------1. A bug in the tag search dialog was fixed where searching for tags
by other than the tagname (e.g. point source) would bring up tagnames
truncated to 12 characters when communicating with a PI3 server.
2. A bug in the point attributes dialog was fixed where tags with longer
than 12 character tag names on PI3 systems would show their short tag
name as the tag name truncated to 12 characters. A similar bug was
fixed where if you selected a tag in a display and hit the properties icon
the tag would not be found if it was from a PI3 system and the tagname