Modbus TCP Snap S1


#1

Hi,

I have a SNAP PAC S1 and a modbus TCP device, I want to read the registers with the address 50512 up to 50530, this is the strategy that I have configured but in the variable n03AsFloatStatus it marks the code 2, where can I have the fault?

this is the link with the document of the MODBUS device ( http://www.socomec.es/files/live/sites/systemsite/files/SCP/6_gestion_energie/diris/diris_a40/536181B_GB_Ethernet.pdf ), I would appreciate your help to read these records correctly, since I do not identify if it is the modbus device or the control strategy.


#2

Code 2 is a modbus error code for illegal address. The Opto22 subroutines are expecting modbus “registers” (which are 1 based) not “addresses” (which are 0 based). So if you are requesting address 50512, then you need to pass in 50513 as the register.