10512 questions

12517 answers

19444 comments

22040 members

0 votes
72 views 4 comments
by
Hi,

I'm trying to read registers 324 to 327 via modbus, that is status and direction of pins 3 and 4 on the 4 PIN connector.
However, when with registers 326 and 327 I get a read failure error and register 324 and 325 are stuck to 1 and 0 respectively.

The firmware version is  7.01.4.

1 Answer

0 votes
by

Hello,

In you request configuration make sure that you enter the first register number as 325, which corresponds to PIN 3 status, not the register address, which s 324. Depending on how many registers you want to read at once, you may enter register count as one, to read a single 325 register, or 4, to get values from registers 325, 326, 327, 328. Also, check if you have selected Data type as 16bit UINT, high byte first and function as Read holding registers (3). 

You can toggle pin states in the WebUI Services -> Input/Output -> Status section.

Below is a picture of possible request configuration:

Best regards,

Žygimantas

by

Hi,
I tried that, but if I use 325 as the first register I can read only 1 register. The 326 gives a modbus message timeout.

Besides the problem of not reading registers 356-328 when I try to change the status of the pins the registers value does not change. As you can see in the screenshot registers 324 and 325 (correspond to register adress in modbus manual) are fixed to 1 and zero even if I hange the pin status through web interface.

by

Hello,

Pin status is stored in registers with numbers 325 and 326. Pin directions are stored in registers 327 and 328. Registers 327 and 328, where the value of 327 register shown as 1 represents output and value 0 of register 328 represents PIN 4 direction as input. These values are stable and do not change. 

Now regarding the pin states, I did not encounter any issues. Below are screenshots of configuration, with correctly returned values:

  • Both pins off

 

  • Both pins on

Best regards,

Žygimantas

by
I tried QModMaster, but still the same problem.

Actually, I am using port 503 from remote. It is not a firewall problem since I'm reading the temperature correctly.
Port 502 is busy for RS-485 in gateway configuration.

Might this be the reason for error I get?

Thank you
by
Hello,

If you're using other ports than the dedicated ones (502 for MODBUS in this case), you could try to use a different port. It is advisable to choose ports from the range beyond 1024 as ports below this number might be used by other services.

Best regards,

Žygimantas