read coils (1), read discrete inputs (2) simply return pkt.pkt is the received Modbus package as specified in the Modbus documentation. The value is send as a 32-bit value, it is extracted from the Modbus package in this way. The non-error reply contains the requested 32-bit value TX queue overrun (not sure if this one can happen) from a different Modbus device or just garbage with a correct CRC If an error occurs, an error command is reported back: CommandĬonfirmation from a write function (Write Single Coil, Write Single Register, Write Multiple Coils, Write Multiple Registers) with the new value Loxone modbus code#The reply is parsed (based on the function code and the bits in the polling cycle flags) and send back to the Miniserver. `address` `function code` `MSB register number` `LSB register number` CRC16-Modbus The send request is created from the entry table as follows:įor read coils (1) and read discrete inputs (2): With the configuration uploaded and the extension not muted, the Modbus extension will send all polling requests based on the timing, but only one per 2ms. A custom Modbus extension may not enforce it. The Modbus extension enforces a minimal 5s polling interval. The 32-bit value is a bit complex: Bit(s)Ġ:100ms, 1:1000ms factor for the polling cycle to have the delay in ms Timing timeout, default: 1000ms for a responseĭescription of a single 8-byte entry: Offsetġ…255: Address of the Modbus device (0 would be broadcast) Timing pause, default: 10ms between packages Parity (0=no parity, not in the Modbus specification, but very common) OffsetĠxFEEDFEED = magic to detect that the package is validĠ:automatic timing (based on the baudrate), !=0:manual timing flag (timing pause and timing timeout are used)īaudrate (2400,4800,9600 or 19200 are typical) The configuration is 0x810 bytes large and always version 1. This is done by uploading the configuration via a fragmented package of type 0x06 (config). The Modbus extension calls the Modbus read function automatically and sends the values back to the Miniserver. Loxone uses LSB for 16-bit, but Modbus MSB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |