Operation
To connect directly to a PC, all you need is an integrated RS485 interface or an external adaptor. Mains power can
also often be supplied in this way. A software program such as Modbus Poll will then assume the role of the master.
Further measures must be taken for more challenging applications in the network, for long distances and/or in
environments with electromagnetic interference. The bus must be designed in a daisy chain structure without
spurs. For this reason, any cables connected to the sensors have a double data line pair – one incoming and one
outgoing. The data line must be designed as a screened and twisted pair. The first and the last bus nodes must be
terminated. If DC termination is sufficient, the integrated resistance of 135Ω can be switched between A and B –
provided this is available on the relevant model. To do this, switch the jumper in the appliance to the corresponding
position or bridge the corresponding pins in the connector. If you have to use transmission line polarisation, we
advise against using DC termination. Instead you should use AC termination. The required series connection for
the resistor and the capacitor can then be switched between A and B on the second data line pair of the connection
cable or on the second terminal pair in the terminal block.
A Mela Modbus sensor according to the RS485 standard represents 1/8 unity load. If the network only contains
sensors in this impedance category, 256 bus nodes are theoretically possible instead of 32. However, due to the
available address space, in practice the number reduces to 247.
The scanning interval should not exceed 2 seconds across the entire network.
For further informationen see http://www.modbus.org/ .
RS232 with ASCII Protocol
Serial interface
The data transfer via the RS232 interface is effected with the following parameters:
•
Baud rate
:
9600
•
Data bits: 8
•
Parity:
N
•
Stop bits: 1
If power is also supplied to the sensor via the interface, the RTS and DTR signals must also be permanently enabled.
ASCII protocol
Approximately every 3 seconds (approx. 5 sec in case of an error), the sensor transmits a character string containing
the measured values for relative humidity, temperature and the corresponding alarm codes and serial numbers. A
checksum ensures the validity. The output character string has a constant length of 41 characters in the following
format:
@T;<Sign>;<Temperature>;<Alarmcode>;F;<Humidity>;<Alarmcode>;<Serialnumber>;<Sum>\r\n
The individual characters and fields have the following meanings:
„@“
Begins a protocol frame
„T“
Marks the temperature value
„F“
Marks the humidity value
„;“
Separator
„\r“
Carriage
Return
„\n“
Line
Feed
<Sign>
Temperature plus/minus sign, „+“ or „-“
<Temperature>
5 characters, two integer places, two decimal places from „0“ … „9“, Comma symbol is „.“
<Alarmcode>
3 characters, „A00“ … „A04“
<Humidity>
6 characters, three integer places, two decimal places from „0“ … „9“, comma symbol is „.“
<Serialnumber>
8 characters from „0“ … „9“
<Sum>
2 characters from „0“ … „9“ or „A“ … „F“
Examples:
1:
@T;+021.37;A00;F;038.92;A00;12345678;38\r\n
2: @T;+018.97;A00;F;099.54;A00;00251979;0A\r\n