Difference between revisions of "Firmware-72 Function-122"
Line 1: | Line 1: | ||
==MAGNETIC3D (122, 7Ah)== | ==MAGNETIC3D (122, 7Ah)== | ||
− | The Magnetic3D function enables output of the Magnetic3D sensor data in both host and stand-alone mode. In host mode the sensor data is output in [[Firmware-72_Message-010 |I2C DATA messages]]. In stand-alone mode the sensor data is output according to the stand-alone mode settings of the input number that equals the I2C port number. Since the Magnetic3D has multiple output parameters the stand-alone mode settings are incremented by one for each extra output parameter. | + | The Magnetic3D function enables output of the Magnetic3D sensor data in both host and stand-alone mode. In host mode the sensor data is output in [[Firmware-72_Message-010 |I2C DATA messages]]. In stand-alone mode the sensor data is output according to the stand-alone mode settings of the input number that equals the I2C port number. Since the Magnetic3D has multiple output parameters the stand-alone mode settings are incremented by one for each extra output parameter. |
<u>Magnetic3D v1.0</u> | <u>Magnetic3D v1.0</u> | ||
Line 9: | Line 9: | ||
!style="text-align:left;"|Data output | !style="text-align:left;"|Data output | ||
|- | |- | ||
− | |0 | + | |0 |
|Magnetic Field Strength X-axis; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) | |Magnetic Field Strength X-axis; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) | ||
|- | |- | ||
Line 20: | Line 20: | ||
Each 16-bit value represents a magnetic field strength that is scaled using a factor that can be set with a separate I2C WRITE command, see for more details the Magnetic3D product page. | Each 16-bit value represents a magnetic field strength that is scaled using a factor that can be set with a separate I2C WRITE command, see for more details the Magnetic3D product page. | ||
+ | |||
+ | |||
+ | {| | ||
+ | !style="text-align:left;"|FP | ||
+ | !style="text-align:left;"|Data output | ||
+ | |- | ||
+ | |1 | ||
+ | |Magnetic Field Strength Magnitude; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| | ||
+ | !style="text-align:left;"|FP | ||
+ | !style="text-align:left;"|Data output | ||
+ | |- | ||
+ | |1 | ||
+ | |No Output | ||
+ | |} | ||
+ | |||
Example: | Example: |
Revision as of 19:54, 1 January 2016
MAGNETIC3D (122, 7Ah)
The Magnetic3D function enables output of the Magnetic3D sensor data in both host and stand-alone mode. In host mode the sensor data is output in I2C DATA messages. In stand-alone mode the sensor data is output according to the stand-alone mode settings of the input number that equals the I2C port number. Since the Magnetic3D has multiple output parameters the stand-alone mode settings are incremented by one for each extra output parameter.
Magnetic3D v1.0
FP | Data output |
---|---|
0 | Magnetic Field Strength X-axis; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) |
Magnetic Field Strength Y-axis; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) | |
Magnetic Field Strength Z-axis; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) |
Each 16-bit value represents a magnetic field strength that is scaled using a factor that can be set with a separate I2C WRITE command, see for more details the Magnetic3D product page.
FP | Data output |
---|---|
1 | Magnetic Field Strength Magnitude; a signed two’s complement 16-bit value sent as two 8-bit bytes (MSB, LSB) |
FP | Data output |
---|---|
1 | No Output |
Example:
In order to enable the Magnetic3D function to get the magnetic field strength X-, Y- and Z-axis data from an Magnetic3D sensor with I2C device address 30 (default Magnetic3D I2C device address) connected to the 7th I2C port, the following message is sent:
- 240, 125, 0 {DEV}, 8 {FUNCTION}, 6 {yyy = 6}, 30 {device address}, 122 {Magnetic3D function}, 0 {X-/Y-/Z-axis}, 247 (F0h, 7Dh, 00h, 08h, 06h, 1Eh, 7Ah, 00h, F7h)
In host mode raw sensor data will be output immediately in I2C DATA messages. In stand-alone mode a suitable configuration has to be set using the EDIT CONFIG command before any MIDI messages will be output. The sensor parameter’s raw values as output in a I2C DATA message are offset and scaled so as to fit in the channel voice MIDI value range of either 0-127 (eg. control-change message) or 0-16383 (pitch-bend message).
Other settings of the Magnetic3D sensor can be effectuated by using I2C commands such as I2C WRITE and I2C READ.