in what format is the calculation(Q24?). Where this is documented? For Example User_SpdRef
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
in what format is the calculation(Q24?). Where this is documented? For Example User_SpdRef
Hello,
If you are asking about IQmath, you can find the documentation in ControlSuite:
C:\ti\controlSUITE\libs\math\IQmath\v160\doc
Best regards,
Maria
I am interested in block Traj Ramp... Where his description? In what format is specified speed User_SpdRef
any interaction between modules is done in per unit.
in the case of a speed, this will be in a per unit relationship to your user.h IQ_FULL_SCALE_FREQUENCY_Hz.
SPEED_COMMAND_Hz / IQ_FULL_SCALE_FREQUENCY_Hz = SPEED_COMMAND_pu
Q30 format allows numbers between -2.0 and +1.99, so from a variable standpoint you could command a value of nearly 2x the FULL_SCALE.
If you are using the SpinTAC motion suite however there is internal safety logic that checks and only allows commands in the +/- 1.0 scale.
To make this easier for a user we have provided some access functions that are in _krpm instead of _pu. EX:
// set the speed reference
CTRL_setSpd_ref_krpm(ctrlHandle,gMotorVars.SpeedRef_krpm);
This is an input into the Trajectory module, which also requires an acceleration setting. Here you can see that we don't have a helper function so we must scale the _krpmps value into per unit first:
// set the speed acceleration
CTRL_setMaxAccel_pu(ctrlHandle,_IQmpy(MAX_ACCEL_KRPMPS_SF,gMotorVars.MaxAccel_krpmps));
You can review the module (and driver) documentation in MotorWare.exe where we use Doxygen to create a hyperlinked set of docs.
"gMotorVars.SpeedRef_krpm = _IQ(0.001);
CTRL_setSpd_ref_krpm(ctrlHandle, gMotorVars.SpeedRef_krpm);"
you can work in a global q (global q =24?)
yes, the Global Q being used is Q24, which allows up to nearly +/- 128.0 representation.
So for the Spd_ref_krpm the variable limit would be 127.9 krpm
I corrected my previous post regarding the -2.0 to +1.99 limit....this is Q30 format.
all in Global Q value
C:\ti\motorware\motorware_1_01_00_12\sw\modules\traj\src\32b