User Tools

Site Tools


eeros_architecture:hal:scaling_multi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
eeros_architecture:hal:scaling_multi [2017/07/05 09:12]
graf [Two Inputs or Outputs with Different Scales]
eeros_architecture:hal:scaling_multi [2021/05/20 07:37] (current)
ursgraf [Output to Control a Motor]
Line 1: Line 1:
 ====== Setting Multiple Scales and Ranges ====== ====== Setting Multiple Scales and Ranges ======
-The existing hardware is often comprised of several stages such as a digital to analogue converteran amplifier, and the motor constant.  +The existing hardware is often comprised of several stages. The HAL can account for this in the following way.  
-[{{ :eeros_architecture:hal:hal_outputscalinghardware.png?700 |//Example of Output with Multiple Stages// }}] + 
-In such cases it is very handy to describe each stage individually as given in the following example+ 
 +===== Output to Control a Motor ===== 
 +The control of EEROS sets the torque for a motor. This signal passes a digital to analog converter and an amplifier. The amplifier delivers a current which is trabsformed by the motor constant into a torque.  
 +[{{ :eeros_architecture:hal:hal_outputscalinghardware.png?700 |//Example of output with multiple stages// }}] 
 + 
 +The HAL mirrors the multiple stages. Each stage can be described individually as given in the following example.
  
 <code> <code>
Line 28: Line 33:
   }   }
 </code> </code>
-The HAL will calculate the scale and range of the whole chain considering the single steps. The range of the whole chain will be determined by the most restricting range of the single stages. The unit is determined by the unit of the last stage.+The HAL will calculate the scale and range of the whole chain considering the single stages. The range of the whole chain will be determined by the most restricting range of the single stages. The unit is determined by the unit of the last stage.
  
-===== Two Inputs or Outputs with Different Scales =====+==== Inverting the Signal ==== 
 +If the output signal needs opposite sign, e.g. a motor turns in the wrong direction, you can simply add an inverting stage 
 +<code> 
 +  "channel0":
 +    "signalId": "dacOut", 
 +    "scale": [ { "id" : "dac", 
 +                 "minIn":    1000, "maxIn":  64000, 
 +                 "minOut": -9.787, "maxOut": 9.923 }, 
 +               { "id" : "inv", 
 +                 "minIn":   -1.0, "maxIn":  1.0, 
 +                 "minOut":  1.0, "maxOut": -1.0 } ], 
 +    "range": [ { "id" : "dac", 
 +                 "minIn":       0, "maxIn":  65536, 
 +                 "minOut":  -10.0, "maxOut":  10.0 }, 
 +                 { "id" : "amp", 
 +                 "minIn":   -10.0, "maxIn":  10.0, 
 +                 "minOut":  10.0, "maxOut": -10.0 } ], 
 +    "unit": "V" 
 +  } 
 +</code>
  
-{{:eeros_architecture:hal:?400|}}+===== Input for Axis Position ===== 
 +The angular position of an axis is controlled by a motor equipped with a gear and an encoder, see  
 +[{{ :eeros_architecture:hal:hal_inputscalinghardware.png?700 |//Example of input with multiple stages// }}] 
 + 
 +Here again, the HAL mirrors the three stages. Each stage can be described individually as given in the following example. 
 + 
 +<code> 
 +  "channel1":
 +    "signalId": "enc1", 
 +    "scale": [ { "id" : "gear", 
 +                 "minIn":  0, "maxIn":  1, 
 +                 "minOut": 0, "maxOut": 76 }, 
 +               { "id" : "enc", 
 +                 "minIn":  0, "maxIn":  2π, 
 +                 "minOut": 0, "maxOut": 4096 }, 
 +               { "id" : "fqd", 
 +                 "minIn":  0, "maxIn":  1, 
 +                 "minOut": 0, "maxOut": 4 } ], 
 +    "range": [ { "id" : "gear", 
 +                 "noLimit": true }, 
 +               { "id" : "enc", 
 +                 "noLimit": true }, 
 +               { "id" : "fqd", 
 +                 "noLimit": true } ], 
 +    "unit": "rad" 
 +  } 
 +</code> 
 +The HAL will calculate the scale and range of the whole chain considering the single stages. The range of the whole chain has no limit. 
 + 
 +===== Two Inputs or Outputs with Different Scales ===== 
 +There are cases where you want to read from a hardware input while this input might represent different things. A motor with its current and torque could serve as an example.  
 +[{{ :eeros_architecture:hal:hal_dualinput.png?400 | //Reading from input with different scaling//}}
 +  * Scale1 : scaling for the adc converter 
 +  * Scale2 : scaling for motor current. This input allows for current control of the motor. 
 +  * Scale3 : scaling for motor torque. This input allows for observation of the motor torque.
  
 +For outputs we have a similar situation. A motor might be controlled by setting its current during homing of the drive. During normal operation the motor will be controlled by setting its torque. 
 +[{{ :eeros_architecture:hal:hal_dualoutput.png?400 | //Writing from to output with different scaling//}}]
 +The scaling in the HAL includes the common part of the two outputs while each control signal have their individual scaling as well.
eeros_architecture/hal/scaling_multi.1499238771.txt.gz · Last modified: 2017/07/05 09:12 (external edit)