I'm writing a program to control a test station, and one of the things which i am trying to do is update an on screen display. I have a numeric indicator on my UIR called OLDTEMP and it is set up as type double. I'm trying to set the value of it using SetCtrlVal. The data type I'm trying to put into the indicator is of type double. A code snippet looks like this:
char lasttemp[1024];
double tempdub=57;
kei2182id=ibdev(0,kei2182, 0, TIMEOUT, EOTMODE, EOSMODE);
ibclr(kei2182id);
Fmt(command, ":SENS:TEMP:RTEM?"); //Gets the internal Temperature
ibwrt(kei2182id, command, strlen(command)); //writes command to the keithley
ibrd (kei2182id, lasttemp, 1024); //gets the result
Scan(lasttemp, "%s>%f", &tempdub); //converts from char to
double
SetCtrlVal(kei2182, KEI2182_TEMPNOW, tempdub); //updates the display . . . this is also the line where the error occurs.
When I try to run the program, the error I get back says: "ProbeStation.c", line 1423, col 42, thread id 0x0000049C Invalid argument type: found 'double', expected 'pointer to char'.
Line 1423 is the line containing SetCtrlVal(xxx), and the output "tempdub" is the argument the debugger doesn't like.
I'm still fairly new at this, but I don't understand what I'm doing wrong. If anyone has any suggestions, I would greatly appreciate it.
Thanks in advance,
john Nordling