Message text written by "Foxboro DCS Mail List"
>has anyone succeeded in adding objects with read/write access to an
application's CDX on the AW70 using the FoxAPI function an_add_objects()? 
Adding read only objects works fine, but read/write access fails although
FoxDoc describes it and even gives an example program (which fails, too). 
So I'm wondering who is wrong, the function's documentation or the example
program.
 
I have a small test program here which tries to add two RI parameters of a
CALC block to the CDX.  I could send it to anyone interested.  We've tried
this program on virtually every FoxAPI version we could find and it always
failed with return code 76 which is not mentioned by FoxDoc as a possible
return code for an_add_objects().  foxapi.h defines it but the description
there doesn't tell much since I don't pass any NULL pointers.  If you
change 'rdwrit' to 'rdonly' (for access type) in the program, it works
fine.

I could of course open a data set instead for writing but I'm reluctant
because doing so gives me those annoying command prompt windows flickering
up briefly upon set opening and closing.  Data sets also stay open if
someone kills the application with the task manager.
<

Sascha,
This won't exactly address your question but we have also noticed a change
in the behavior of the foxapi on Solaris when writing to block parameters. 
On version 4.0.1, we had a C program which wrote values to the INP2
parameter of 2 SWCH blocks and it worked fine.  We upgraded to version 6.1
for Y2K and now the same program won't work.  Both versions used a set for
the 2 INP2 parameter points and I think there is a problem creating the
sets for write access. We use the sxopen utility to create the sets.  We
have another application which writes data into shared variables in a set
and it still works.  So I created two new shared variables, put them in a
set and linked them to the INP2 parameters and used the C program to write
to the shared variables.  It now works fine but I don't know why it would
not work the old way.  It seems that something has changed in the API.

Cyrus Taft
EPRI I&C Center

-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to [EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

Reply via email to