We use USB-TEMP and USB-TEMP-AI devices in production. They are configured in InstaCal, then we query temperatures and voltages, respectively, through our in-house Windows/Visual C++ software using the Universal Library API. Recently, we've run into issues where calls to the cbTin and cbVin functions don't return, causing their threads to lock up. Our code is basically as shown below:
int nStatus = 0;
nStatus = cbTin(nBoardID, nChannel, CELSIUS, &fTemperature, FILTER):
// or: nStatus = cbVIn(nBoardID, nChannel, nADCRange, &fVoltage, 0);
// nStatus = 0 if no errors
if(nStatus != 0)
{
// Get error info from nStatus, display error msg...
return -1;
}
return 0;
Is there an issue with how we are using these API calls, and are there alternatives to these API functions that return immediately instead of blocking?
Thanks!