Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB-TEMP config issue #55

Closed
thojDufour opened this issue May 23, 2023 · 2 comments
Closed

USB-TEMP config issue #55

thojDufour opened this issue May 23, 2023 · 2 comments

Comments

@thojDufour
Copy link

thojDufour commented May 23, 2023

Apparently it does not seem to be possible to change the sensor type with the ulAISetConfig(DaqDeviceHandle daqDeviceHandle, AiConfigItem configItem, unsigned int index, long long configValue) function.

The only way I found to set it is to use a VM with Windows, and change the config with InstaCal.

To try this, I set all the channels as Thermocouple in InstaCal, then I use this code to set some channels as RTD SCT_3_WIRE:

if (ulAISetConfig(daqDeviceHandle[devN], AI_CFG_CHAN_TYPE, i, AI_RTD) != 0)
{
    printf("Failed to set up channel temperature type.\n");
    return -1;
}
if (ulAISetConfig(daqDeviceHandle[devN], AI_CFG_CHAN_SENSOR_CONNECTION_TYPE, i, rtdType[devN]) != 0)
{
    printf("Failed to set up channel temperature type.\n");
    return -1;
}

Neither of those call trigger any errors, but when reading the channel I get the error 85: ERR_OPEN_CONNECTION and get the result -9999.
If I use those config but wire a thermocouple it works.

Am I doing anything wrong?

Edit: The code block above is used to configure different devices and channels. devN is the device number and i is the channel number.

@sbazaz
Copy link
Contributor

sbazaz commented May 26, 2023

The USB-TEMP's channel type can only be configured through InstaCal. However, I'm not sure why you don't get an error when you call ulAISetConfig.

@thojDufour
Copy link
Author

Weird, even weirder that such a big, and known issue has not been corrected by now. I mean the fact that the USB-Temp can only be configured with InstaCal.

@sbazaz sbazaz closed this as completed Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants