User Tools

Site Tools

한국어

modport:md-hadin4:index

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
modport:md-hadin4:index [2023/04/28 22:14]
COMFILE Technology [Table]
modport:md-hadin4:index [2023/05/31 04:34] (current)
COMFILE Technology [4-Channel High Resolution Analog to Digital Input Module: MD-HADIN4]
Line 1: Line 1:
-====== ​AD Input Module: MD-HADIN4 ======+====== ​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 28: Line 29:
  
 The MD-HADIN4 has the benefit of a higher resolution than the MD-ADIN4, but takes longer to do the conversion. Therefore, the MD-HADIN4 may not be suitable for high frequency signals. The MD-HADIN4 has the benefit of a higher resolution than the MD-ADIN4, but takes longer to do the conversion. Therefore, the MD-HADIN4 may not be suitable for high frequency signals.
 +
 +===== Output Values =====
 +
 +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.
 +
 +The value returned from the MD-HADIN can be interpreted with the following algorithm:
 +
 +<code C>
 +unsigned int rawData = 0; // Raw 32-bit value from the MD-HADIN
 +long value = rawData;
 +
 +if ((rawData & 0x80000000) != 0) // If most significant bit is set
 +{
 +    value = (rawData - 0x80000000) * -1;
 +}
 +
 +if (value == -111111)
 +{
 +    // Value is below the lower bound (e.g. below 1V when 1-5V mode is selected).
 +}
 +else if (value == 222222)
 +{
 +    // Value is above the upper bound. (e.g. above 5V when 1-5V mode is selected).
 +}
 +else
 +{
 +    // Value is between 0 and 100,000
 +}
 +</​code>​
 +
 +===== Modbus Starting Address =====
 +
 +Each module has 4 channels, each with its own unique Modbus address.
 +
 +^Channel ^0 ^1 ^2 ^3 ^
 +|Starting Address(base 10) | 200 | 201 | 202 | 203 |
 +|Starting Address(base 16) | C8 | C9 | CA | CB |
 +|Address (base 10) used by HMI (SCADA) | 40201 | 40202 | 40203 | 40204 |
  
 ===== Module ID (Modbus Slave Address) Assignment ===== ===== Module ID (Modbus Slave Address) Assignment =====
Line 34: 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]]
modport/md-hadin4/index.1682687669.txt.gz · Last modified: 2023/04/28 22:14 by COMFILE Technology