Scale & offset values in Micromod configuration Sw
Scale & offset values in Micromod configuration Sw
Hi all,
I'm trying to use the output frequency of a Micromod Module to drive a basic servo controller. As it requires a 20ms period signal, I set the options to PWM8Bits with a 50Hz frequency.
My main issue is that RC ON signal needs to be between 1 and 2 ms (out of 20 ms). So I wanted to use the scale and offset parameters to adjust my inputs (between 0 and 255 in decimal) to the rignt values, ie dividing by 20 (scale 0.05 in decimal) and adding +1 (offset +1 in decimal).
The online documentation says:
Scale / Offset
Multiplier and offset for the data contents. These may be positive or negative floating point values.
Calculation: Output = (MsgValue * Scale) + Offset, where MsgValue is a 16-bit value [0..65535]
What should be the "Scale" and "Offset" range?
Are these values 8 or 16 bits?
Does the module accept scales values between 0 and 1(decimal)?
Thanks for your help;
Laurent
I'm trying to use the output frequency of a Micromod Module to drive a basic servo controller. As it requires a 20ms period signal, I set the options to PWM8Bits with a 50Hz frequency.
My main issue is that RC ON signal needs to be between 1 and 2 ms (out of 20 ms). So I wanted to use the scale and offset parameters to adjust my inputs (between 0 and 255 in decimal) to the rignt values, ie dividing by 20 (scale 0.05 in decimal) and adding +1 (offset +1 in decimal).
The online documentation says:
Scale / Offset
Multiplier and offset for the data contents. These may be positive or negative floating point values.
Calculation: Output = (MsgValue * Scale) + Offset, where MsgValue is a 16-bit value [0..65535]
What should be the "Scale" and "Offset" range?
Are these values 8 or 16 bits?
Does the module accept scales values between 0 and 1(decimal)?
Thanks for your help;
Laurent
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Scale & offset values in Micromod configuration Sw
first of all we need to know which MicroMod Module you use?
only the CPU with your own board, or one of our boards - if yes - part number?
only the CPU with your own board, or one of our boards - if yes - part number?
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Scale & offset values in Micromod configuration Sw
Good afternoon,
I have most of your micromod modules but for this test I wanted to use a Micromod Digital 1 or 2 with the Fout0 output. My remark was more on the configuration sw and the way to use it.
If the HW doesn't fit, is it possible to use any other module for this test (Micromod demo board, Mix 1 or Mix 3)?
Regards,
Laurent
I have most of your micromod modules but for this test I wanted to use a Micromod Digital 1 or 2 with the Fout0 output. My remark was more on the configuration sw and the way to use it.
If the HW doesn't fit, is it possible to use any other module for this test (Micromod demo board, Mix 1 or Mix 3)?
Regards,
Laurent
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Scale & offset values in Micromod configuration Sw
Yes, but the configuration is depending on the used baseboards - you need to select the profile for the different base boards. The Offset is a simple Addition to the Result Value of the scaling calculation. The scale is a multiplication - as you wrote :
(MsgValue * Scale) + Offset
the Message Value is the data that you send on the defibned CAN ID
Intel or Motorola, 8 or 16 Bit - this is up to you
Also the Startposition of Byte and Bit.
The Frequenzy output is a LowSide driver with max. 10 KHz, the max. current is 0.75A
(MsgValue * Scale) + Offset
the Message Value is the data that you send on the defibned CAN ID
Intel or Motorola, 8 or 16 Bit - this is up to you
Also the Startposition of Byte and Bit.
The Frequenzy output is a LowSide driver with max. 10 KHz, the max. current is 0.75A
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Scale & offset values in Micromod configuration Sw
I undestand these informations but then what should I put into the scale field (as the offset is already 1) to make my calculation look like Output=(MsgValue*0.05)+1?
0.05 is decimal and the float value is not the same in 8 or 16bits...
Here is a screenshot of the interface in attachment As a complement of information, 2.75 coded with a 8 bits format will correspond to 0110 1011 in binay and 0x6B as described in the example below...
0.05 is decimal and the float value is not the same in 8 or 16bits...
Here is a screenshot of the interface in attachment As a complement of information, 2.75 coded with a 8 bits format will correspond to 0110 1011 in binay and 0x6B as described in the example below...
Last edited by Laurent on Wed 24. Aug 2016, 13:56, edited 1 time in total.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Scale & offset values in Micromod configuration Sw
what do you need frequenzy or PWM ? I was talking about frequenzy, you about PWM.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Scale & offset values in Micromod configuration Sw
I used the Frequency output (Fout0) configurated in 8 bits PWM mode...
Re: Scale & offset values in Micromod configuration Sw
The example I just mentionned was not included, sorry...
- Attachments
-
- 8 bits float example
- 2016-08-24_13h51_50.png (7.4 KiB) Viewed 16102 times
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Scale & offset values in Micromod configuration Sw
8Bit PWM is a usignedByte not a 8Bit Float (which is not common)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Scale & offset values in Micromod configuration Sw
Hello Lauren,
the possible values for scale and offset are decimal values between -65535 and 65536
Below an example for a 50Hz PWM Output with scale =1 (note: the logic is inverted because it´s a lowside driver)
8Bit PWM Out -> 0..100%
FFh = 255 = 0%
00h = 0 = 100%
3Fh = 63 = 75%
And here the same with a scale =2
Hope this helps.
best regards
Gunther
the possible values for scale and offset are decimal values between -65535 and 65536
Below an example for a 50Hz PWM Output with scale =1 (note: the logic is inverted because it´s a lowside driver)
8Bit PWM Out -> 0..100%
FFh = 255 = 0%
00h = 0 = 100%
3Fh = 63 = 75%
And here the same with a scale =2
Hope this helps.
best regards
Gunther