Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmInmat66 - Driver for communication with INMAT66/51 heat meters

This driver is used for communication with INMAT66/51 heat meters See also Communication with INMAT heat meter (Czech republic).
 
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communicaton using the PROMOTIC drivers.
 
Basic properties of the driver:
- Using this driver is bound to purchase the license: PmInmat66. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- The communication is done via Ethernet or via standard serial link (COM1, COM2 ...). Sending the same data via Ethernet and via serial link is currently implemented.

Even if the device does not have the Ethernet interface it is possible to connect it by "serial link-Ethernet" converter and let it communicate with the PROMOTIC application via Ethernet.

- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmComm object.

Driver supports to usage of PmCommMsg object. The PmCommData object cannot be used.

For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Inmat meter"

- The communication enables sending messages with high and low priority (for more details see the INMAT documentation). The selection of the message priority (if it is possible in the message) is made in the message parameters.
 
The driver supports the following data types:
- signed int: 2-byte integer (from -32 768 to +32 767). In the PROMOTIC application represented by the data type: Integer.
- unsigned int: 2-byte integer (from 0 to 65 535). In the PROMOTIC application represented by the data type: Long.
- long: 4-byte integer (from -2 147 483 648 to +2 147 483647). In the PROMOTIC application represented by the data type: Long.
- float: 4-byte real number. In the PROMOTIC application represented by the data type: Single.
- string: the number of chars is limited by the size of the message data part, thus it can hold values from 0 to 246 bytes. If we know the exact length of the the response message string, it is necessary to set the length of the read string increased by 1 in the received data (we read even the end char 0). If the length of the read string in the Data-received is lower than the real length of the read string, the system reports the "bad data read" (66) error. If we don't know the exact length, the maximum value can be set.
 

Device addressing:

Each device (Master and Slave) has its own unique address. The addresses can lie in the range from 0 to 63. The number of the control station (the computer with the PROMOTIC system) is entered in the protocol parameters. The number of the receiving device (INMAT) is entered in the sent data of the message.

 
Memory addressing:
- addressing by INX: The address can be chosen by selecting the memory name in the message parameters and the system itself adds the INX value. If we want to enter the INX value directly, we can select the "Memory type"->"INX common value" in the message parameters.
- addressing by segment and offset: This direct addressing type is called physical addressing and is based on entering the values of the segment (defines the memory area) and the offset (address in the memory area). INMAT66 has 2 memory areas with segments 0000H and 0010H-0013H:
segment 0000H: In this segment the whole memory area is directly accessible by the processor. There are variables, part of the archive memory and the program. The offset can be from 0000H to FFFFH.
segment 0010H-0013H: The archive data is saved here up to 256kB. The offset can be from 0000H to FFFFH. Segment 0010H addresses the memory 00000H-0FFFFH, segment 0011H addresses 10000H-1FFFFH, segment 0012H addresses 20000H-2FFFFH, segment 0013H addresses 30000H-3FFFFH. If the installed memory is smaller than 256kB, then the corresponding segments are invalid.
 

Recommended parameters values:

Recommended values for the Serial link parameters:
The communication uses the RS485 interface. That's why we recommend the intelligent converter that switches itself the RTS signal (see: Communication drivers).
Baud rate9600 Bd
Number of data bits8
ParityEVEN
Number of stop bits1
Recommended values for the Ethernet parameters:
Sending the same data via Ethernet and via serial link is currently implemented. The Ethernet parameters can be set accorting to the Eternet/serial link converter in this case.

The communication description by the PmCommMsg objects

The list and description of the communication messages:

The message names equal to the message names from the INMAT documentation. For more details refer to this source.

- Status: Getting status. The link-up of the communication to the INMAT. If everything is all right, then the FC value in the Data-received is 0.
- Identify: Reading device identification. Getting the producer, the type and the version of the device.
- Read: Reading one value. The message allows reading only one value whose type depends on the type of the read memory. By this message it isn't possible to read values from the matrix memory types.
- Read item of matrix: Reading one value from matrix of values. The message allows reading only one value whose type depends on the type of the read memory. By this message it is possible to read only values from the matrix memory type.
- Read block of matrix: Reading block of values from matrix. The message allows reading the matrix of values whose size is given by the message parameters.
- Write: Writing one value. The message allows writing only one value whose type depends on the type of the written memory. By this message it isn't possible to write values into the matrix memory types.
- Write item of matrix: Writing one value into the matrix of values. The message allows writing only one value whose type depends on the type of the written memory. By this message it is possible to write only values from the matrix memory type.
- Write block of matrix: Writing block of values into matrix. The message allows writing the matrix of values whose size is given by the message parameters.
- PhysRead: Reading from memory on physical address. The message amends the previous messages for reading. But it uses physical addressing by the segment and the offset. Only one value can be read.
- PhysWrite: Writing into memory on physical address. The message amends the previous messages for writing. But it uses physical addressing by the segment and the offset. Only one value can be written.
 
Testing communication on INMAT:

The INMAT enables to display the indication of the receipt (Rx*), response (Tx*) and errors (Err), which is suitable for debugging the communication. For displaying this information it is necessary to choose the "CONFIG" menu and the "Rx Tx Err 0" item. For more details see the INMAT documentation.

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice