08-11-2009 10:11 AM
Hello.
I'm trying to read an instrument response with ViScanf()and transfer the response values from the instrument.
The instruments response is:
"OP0,TRUE,-9.10,-9.08,-19.51,-8.74,FAIL\n"
I tried the following:
double dVal1,dVal2,dVal3,dVal4; char szValidity[32]; char szVerdict[32]; viScanf(instr,"OP0,%[^,],%le,%le,%le,%le,%[^\n]", szValidity, dVal1, dVal2,dVal3,dVal4,szVerdict);
But this throws an unhandled exception/access violation.
I guess my format specifier is wrong somehow.
Any suggestions?
Best regards,
Dietmar
08-11-2009 10:21 AM
Oh sorry, what a shame, viScanf() expects pointers of course...
... , &dVal1, &dVal2,&dVal3,&dVal4,...