06-11-2020 08:21 AM
This project uses Visual Builder AI 2019 (64 bit) managed by the main application written in Labwindows/CVI 2019. I'm unable to get the VBAI Engine status in CVI when the application is compiled. When in debug, the status function works as expected returning a value associated with the current status of VBAI. Once the CVI program is compiled (in 64 bit), the Get VBAI Engine Status function returns junk; the variable appears to be uninitialized.
//Check VBAI engine is running
vbaiGetVBAIEngineStatus (VBhandle, &VBstat, ctextBuffer, sizeof ctextBuffer);
if (VBstat < 1 || VBstat > 3){
char cErrorbuffer[100] = {""};
switch (VBstat){
case 0:
strcpy (cErrorbuffer, "Offline");
break;
case 4:
strcpy (cErrorbuffer, "Inspecting");
break;
default:
strcpy (cErrorbuffer, "Unknown");
break;
}
sprintf (ctextBuffer, "%s%s%s", "There is a problem with Vision Builder AI.\nVBAI reports \"",
cErrorbuffer, "\".\nContact Test Engineering for support");
MessagePopup ("VBAI Error", ctextBuffer);
return -30;
}
The debug directory is the same as the compiled directory. What am I missing?
Solved! Go to Solution.
06-16-2020 07:50 AM
Answering my own question; if the VBAIStatus variable is initialized to 0 when it is declared, the status function updates this variable correctly. The Engine Status is now correctly reported.