[foxboro] Problems in C programs with FoxApi

Hello,

I try to create a C program for Foxboro and i need advise.
I use the Foxapi and the scopen and bread functions.

I get errors when opening set in read write. The set had 612 tags. I have no 
problem when opening it in read only.
I tried different maner to open it: 

 - splitting it in 100 tags sets
 - using sbopen,scopen, setting sleeps between the scopens.

non of this trick work. The result is that my program locks up and i need to 
kill it manually (not with a -KILL) to stop it.
but when sometimes it works, the write fonction bwrite works perfecty. but when 
it wors and i close the sets, it is therefor totaly impossible to reopen the 
sets because it open them with no connection errors (-1); I look into the 
omlist with the som program and when i call the clsset fonction, the omlist are 
not destoy like they are with a read only open.

does someone have any sugestion to help me ??

i copy here the open fonction and the parametres used :

#include <foxapi.h>

/* Definition du type tag facilitant l'ecriture */
typedef char tag[AN_ONAM_SIZ];

tag nom_tmp[100];

int set;
int acctyp = 2; 
int rsr = 5;
int wsr = 10;
int clexit = 1;
int reterr;

int gw_cp[612];
int valtyp_cp[612];
float rdelta_cp[612];
int error_cp[612];
float wdelta_cp[612];
int nument_cp = 612;
int index_cp [612];
int status_cp [612];

for (i=0;i<612;i++) {
        valtyp_cp[i] = 5;
        rdelta_cp[i] = 1.0;
        wdelta_cp[i] = 1.0;
        gw_cp[i]=1;
        }

scopen (gw_cp, nument_cp, nom_tmp, valtyp_cp, acctyp, rdelta_cp, clexit, rsr, 
wsr, wdelta_cp, &set, index_cp, error_cp, &reterr);
printf("scopen cp%d reterr = %d, set %d\n",i,reterr,set);


thank you for any help


 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: