This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
modport:md-hadin4:index [2023/04/29 12:05] COMFILE Technology |
modport:md-hadin4:index [2023/05/31 04:34] COMFILE Technology [4-Channel High Resolution Analog to Digital Input Module: MD-HADIN4] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== MD-HADIN4 - 4 Channel High Resolution Analog to Digital Input Module ====== | + | ====== 4-Channel High Resolution Analog to Digital Input Module: MD-HADIN4 ====== |
- | {{ :modport:md-hadin4:md-adin4.png?700 }} | + | {{ :modport:md-hadin4:md-adin4.png?600 }} |
===== Specification ===== | ===== Specification ===== | ||
^ Item ^ Description ^ | ^ Item ^ Description ^ | ||
+ | | Channels | 4 | | ||
| Operating Temperature | -10 ~ 50 (no condensation) | | | Operating Temperature | -10 ~ 50 (no condensation) | | ||
| Operating Humidity | 35 ~ 85%RH | | | Operating Humidity | 35 ~ 85%RH | | ||
Line 31: | Line 32: | ||
===== Output Values ===== | ===== Output Values ===== | ||
- | Read two 16-bit words from the MD-HADIN’s starting address to obtain the full value. The data will be | + | Read two 16-bit words from the MD-HADIN’s starting address to obtain the full 32-bit value. The data will be returned most significant word first. |
- | returned most significant word first. | + | |
The value returned from the MD-HADIN can be interpreted with the following algorithm: | The value returned from the MD-HADIN can be interpreted with the following algorithm: | ||
Line 39: | Line 39: | ||
unsigned int rawData = 0; // Raw 32-bit value from the MD-HADIN | unsigned int rawData = 0; // Raw 32-bit value from the MD-HADIN | ||
long value = rawData; | long value = rawData; | ||
+ | |||
if ((rawData & 0x80000000) != 0) // If most significant bit is set | if ((rawData & 0x80000000) != 0) // If most significant bit is set | ||
{ | { | ||
value = (rawData - 0x80000000) * -1; | value = (rawData - 0x80000000) * -1; | ||
} | } | ||
+ | |||
if (value == -111111) | if (value == -111111) | ||
{ | { | ||
Line 71: | Line 73: | ||
Rotary switch position 0 corresponds to Modbus slave address 10. If the ID is changed after the module is powered on, it must be power cycled for the new ID to take effect. | Rotary switch position 0 corresponds to Modbus slave address 10. If the ID is changed after the module is powered on, it must be power cycled for the new ID to take effect. | ||
+ | |||
+ | [[modport:index|MODPORT]] |