LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FieldPoint: Error with fp_close

Hello
I have a customer who has created a CVI 5.51 applikation with FP-1600 and Fieldpoint Software Version 2.04.
All works well, but at the end of the program he calls "DestroyIOPoints" for every IO Point he had created, and then he calls "FP_Close" to close the server.
But this does not work. It gives us only a "Fatal RunTime Error" at address 77F990BA.

Does someone has an idea, what is going wrong here.

Stephan Gerhards
0 Kudos
Message 1 of 3
(3,108 Views)
I am not aware of any known issues with FieldPoint Explorer 2.04 functions under CVI 5.51. From your description, it sounds like the program is correctly written, but it is always wise to double-check. Make sure their is one FP_Open and one FP_Close. Also make sure that their is one DestroyIOPoint call for every CreateTagIOPoint call.


Since FP_Close is releasing memory from a location provided through a pointer, and Fatal RunTime Errors are commonly caused by wild pointers, the next thing I would check is that the handle from FP_Open is passed to FP_Close correctly. Also, make sure that errors are being checked on all calls to FieldPoint Functions. Some sample code is below:



if (status = FP_Open (filePath, &ServerHandle))
{
Error(status); //If error occur
s,
QuitUserInterface (0); //error message appears and
return(0); //execution stops.
}

.
.
.
.


/*=========================================================================*/
/* Function: Error */
/* Purpose: Reports errors by converting an error code to a string and */
/* using a message popup. */
/*=========================================================================*/
void Error (IAStatus status)
{
char message[300]; // Error string

if (status !=0) {
// Get the error string from the server
FP_ErrorMsg (ServerHandle, status, message);
// Popup the error string
MessagePopup ("Error", message);
}
}

As a final check, try some of the example programs under CVI/samples/FieldPoint, and see if they display the same behavior. These samples will work correctly if FieldPoint was correctly installed and configured.

Regards,
Greg Caesar
National Instruments,
Applications Engineer
0 Kudos
Message 2 of 3
(3,108 Views)
RE FieldPoint: Error with fp_close,
stephan said;
>Hello
>I have a customer who has created a CVI 5.51 applikation with FP-1600
>and Fieldpoint Software Version 2.04.
>All works well, but at the end of the program he calls
>"DestroyIOPoints" for every IO Point he had created, and then he calls
>"FP_Close" to close the server.
>But this does not work. It gives us only a "Fatal RunTime Error" at
>address 77F990BA.
>
>Does someone has an idea, what is going wrong here.
>
>Stephan Gerhards


Is there still a timer running that is trying to access a destroyed IO
point?

--
John Cameron.
0 Kudos
Message 3 of 3
(3,108 Views)