I'd like to import and a execute functions in a C file at run time. I used this feature in a previous version of CVI (about 7 years ago) in conjunction with the old version of Test Stand, but I can't figure out how to do this in CVI v8. I've looked at the help for LoadExternalModule which talks about loading a C file, but it sounds like you have to have the module written and included in your project file (which seems to me to defeat the purpose).
Specifically I need to provide a way for a user of my program to customize a function that converts a thermistor resistance into an A-to-D count based on a specific schematic circuit. For example, if the thermistor is in a simple voltage divider with a 10k pull-up and the A-to-D reference voltage is Vcc, then the function would be:
int ConvertResistanceToAtoD(int Resitance, int MaxAtoD)
{
return MaxAtoD * Resistance / (Resistance + 10000);
}
The function prototype will always be the same, but the user needs to be able to specifcy the equation for their particular application.
I would also appreciate any other suggestions for how to customize this equation at run time (short of including a full mathematical expression parser!).