I am working on adapting the SmarAct MCS motor record driver for the MCS2, which seems to record its position in picometers unlike the MCS’s nanometers.
I have the following code in my polling function:
Int64_t val = getp(0); //Gets position of channel 0 positioner
printf(“%f\n”,(double) val); //prints -6000093133.000000
setDoubleParam(c_p_->motorEncoderPosition_,(double)val);
setDoubleParam(c_p_->motorPosition_,(double)val);
…
callParamCallbacks();
return asynSuccess;
But when I look at the motor record, the RRBV is shown as -2147483648. I looked at asynMotorController.cpp and saw the line:
createParam(motorEncoderPositionString, asynParamFloat64, &motorEncoderPosition_);
Shouldn’t this mean I can write 64-bit floating point values to motorEncoderPosition_ (i.e. larger than 2147483648)? How should I go about working with position counts larger than 2147483648?
Alex