![RMF Systems CMS 2 Скачать руководство пользователя страница 65](http://html1.mh-extra.com/html/rmf-systems/cms-2/cms-2_user-manual_1467398065.webp)
64
As a policy of continual improvement, RMF reserves the right to alter the specification without prior notice.
201.028 REV 1
Date of Issue: 18 June 2018
The simplest method is then to read the required registers directly out of the data area of this response frame.
For example, the CMS product ID code appears in Modbus register 0. This would therefore appear in the first two
bytes of the data area above, or at the 4th and 5th bytes counting from the start of the frame. In a programming
language like `
`C’’ the product ID could be extracted from an array containing the frame using a statement like:
Unsigned product_id = 256*buf[3+0] + buf[3+1];
Users of PLCs or other programming languages will hopefully be able to translate using the information provided
here.
The CMS product ID is 0xD3DD (hexadecimal) or 54237 (decimal). This fact can be used as a check when
attempting the above implementation.
Finally we come to extracting the test result. Referring to the CMS Modbus register map, the test result codes
appear in registers 56-63. In the case of NAS1638, the overall NAS code is in register 56. So a program can extract
the overall NAS code from the result frame using logic equivalent to the ``C’’ language expression:
Unsigned NAS = 256*buf[3 + 56*2 + 0] + buf[3 + 56*2 + 1]
This is a statement in the ``C’’ programming language that reads the 116th and 117th bytes of the response
frame, and forms a 16 bit number from these two 8 bit bytes. This reads Modbus register 56, the NAS code.
Similar expressions can be used to read the other registers according to the data required.
For PLC users the details will be dependent on their own programming environment and facilities. But hopefully
the above can be used as a guide for their own implementation.
Содержание CMS 2
Страница 1: ...User Manual CMS2...