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.

DRV8301-69M-KIT: IQ conversion

Part Number: DRV8301-69M-KIT
Other Parts Discussed in Thread: MOTORWARE

I am working with the motorware api and many of the values are in _IQ. This is easy to create a value such as I want speed to be gMotorVars.SpeedRef_krpm = _IQ(3.0); However I want to send some of these gMotorvars out the serial port for monitoring such as gMotorVars.Is_A. How do I convert this number from _IQ to a decimal? I have read in the forum that many of the values in the gMotorvars are in IQ(24). How do I know which ones are in which? For example the gMotorVars.SpeedRef_krpm = _IQ(3.0) above, how do I know what its range is?

  • Hi Terry,

    How do I convert this number from _IQ to a decimal?

    You can use the _IQNtoF() function.

    How do I know which ones are in which?

    You can figure it out from the code. _IQN(a) = 2^N * a. Can you provide a specific example where you are not able to figure it out?

    For example the gMotorVars.SpeedRef_krpm = _IQ(3.0) above, how do I know what its range is?

    What is the GLOBAL_Q value? Based on this, we would know the range based on the above formula. 

    Let me know if you need any further clarification.

    -Shantanu