Re: [foxboro] Problems in C programs with FoxApi

hello,

You tell me to use an_close() but which include file do i need to use this =
function, there is only an_close_server() in foxapi.h but i dont use this f=
unction.

I make a couple of test and find out that when the lists doesn't open, ther=
e always was one of the list that open with no connected status (reterr -1 =
in status array) in the omlists (the one that never return). but there is n=
o return code for the open function because it simply never return. and whe=
n i tried to reopen a list the return error of the scopen funtion is 26 (an=
d -1 in the status of all tags)
the nom_tmp as the correct size in my program, it's because i copy an old p=
ortion of code where i was opening 6 sets of 100 tags and 12 but this solut=
ion didn't work. The same problem occurd, some of the list opened correctly=
 but one doesn't opened and never return.

I found a solution in opening prior to everything the lists in read write a=
nd only after the lists in read only. In this way all the lists opened corr=
ectly.

the maxobj of foxapi is set to 6000 and the max number of data sets to 100

> Message du 17/06/03 22:25
> De : Grumelart, Alain <agrumela@xxxxxxxxxx>
> A : 'foxboro@xxxxxxxxxxxxx' <foxboro@xxxxxxxxxxxxx>
> Copie =E0 :=20
> Objet : Re: [foxboro] Problems in C programs with FoxApi
> Alexis
>=20
> The process that opens the r/w dataset also needs to close it
> by calling clsset() and needs to call an_close() before it exits.
> If it fails to do that, the r/w cdx (dataset 1) will not release the
> entries and they will remain secured.
> This is what prevents re-openeing of the r/w datset with the same variabl=
es.
> For a work-around, you can stop and re-start foxapi to clear the r/w CDX
> and close the OM list which is holding the variables secured.
>=20
> Hope this helps.
>=20
> Alain G.
>=20
>=20
> -----Original Message-----
> From: Schouten, Frits JF [mailto:Frits.Schouten@xxxxxxxxxxxx]
> Sent: Tuesday, June 17, 2003 4:18 PM
> To: 'foxboro@xxxxxxxxxxxxx'
> Subject: Re: [foxboro] Problems in C programs with FoxApi
>=20
>=20
> Hi Alexsis,
> It looks to me that the nom_tmp(100) is smaller that all the other
> arrays(612).
> What is the maxobj for foxapi set to?
> What are the errors you get?
>=20
> I would like to suggest to start off with a small number of tags like 2 t=
o 5
> or so and iron out all problems first before you go for the full size of
> what you want/need.=20
>=20
> Regards,
> Frits Schouten.
>=20
> -----Original Message-----
> From: Alexis BOUTILLIER [mailto:alexis.boutillier@xxxxxxxxxx]
> Sent: Tuesday, 17 June 2003 20:10
> To: foxboro@xxxxxxxxxxxxx
> Subject: [foxboro] Problems in C programs with FoxApi
>=20
>=20
> Hello,
>=20
> I try to create a C program for Foxboro and i need advise.
> I use the Foxapi and the scopen and bread functions.
>=20
> 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:=20
>=20
>  - splitting it in 100 tags sets
>  - using sbopen,scopen, setting sleeps between the scopens.
>=20
> 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. bu=
t
> 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 lo=
ok
> 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.
>=20
> does someone have any sugestion to help me ??
>=20
> i copy here the open fonction and the parametres used :
>=20
> #include <foxapi.h>
>=20
> /* Definition du type tag facilitant l'ecriture */
> typedef char tag[AN_ONAM_SIZ];
>=20
> tag nom_tmp[100];
>=20
> int set;
> int acctyp =3D 2;=20
> int rsr =3D 5;
> int wsr =3D 10;
> int clexit =3D 1;
> int reterr;
>=20
> int gw_cp[612];
> int valtyp_cp[612];
> float rdelta_cp[612];
> int error_cp[612];
> float wdelta_cp[612];
> int nument_cp =3D 612;
> int index_cp [612];
> int status_cp [612];
>=20
> for (i=3D0;i<612;i++) {
>         valtyp_cp[i] =3D 5;
>         rdelta_cp[i] =3D 1.0;
>         wdelta_cp[i] =3D 1.0;
>         gw_cp[i]=3D1;
>         }
>=20
> 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 =3D %d, set %d\n",i,reterr,set);
>=20
>=20
> thank you for any help
>=20
>=20
> =20
> =20
> _______________________________________________________________________
> 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
> =20
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
> =20
>=20
> EOM=20
>=20
> NOTICE - This message and any attached files may contain information that=
 is
> confidential and/or subject of legal privilege intended only for use by t=
he
> intended recipient. If you are not the intended recipient or the person
> responsible for delivering the message to the intended recipient, be advi=
sed
> that you have received this message in error and that any dissemination,
> copying or use of this message or attachment is strictly forbidden, as is
> the disclosure of the information therein.  If you have received this
> message in error please notify the sender immediately and delete the
> message.
>=20
>=20
> =20
> =20
> _______________________________________________________________________
> 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
> =20
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
> =20
> =20
> =20
> _______________________________________________________________________
> 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
> =20
> foxboro mailing list:             http://www.freelists.org/list/foxboro
> to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
> to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
> =20
>
 
 
_______________________________________________________________________
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: