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 errorsif(nStatus !=0){// Get error info from nStatus, display error msg...return-1;}return0;
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?
Question
amaningd
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:
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!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now