Hi, I am trying to use the library “Modbbus_RTU_7”. I read the documentation and examine the demo projects, but one thing seems obscure: In the case I have two or more RS UNI 1H serial modules on the same axioline bus, how can I configure the program to use a specific one? The documentation vaguely indicates that the MB_AXL_RS_UNI_REC or MB_AXL_RS_UNI_SND component does interface directly with the module hardware. But I found nothing that could link specifically these components to a specific module (using some settings in the structure “udtSerialIF” for example). But maybe I am mistaking and that I need to instantiate the Network component “AXC F 2152” itself. If it is the case, can you explain how to properly connect it to the “MB_AXL_RS_UNI_REC”. Thanks. Using the 2019.06 kit
Hi Frédéric, The module specific information is provided in the two IN/OUT parameters arrInputDataAXL_RSUNI and arrOutputDataAXL_RSUNI, in the two function blocks MB_AXL_RS_UNI_REC and MB_AXL_RS_UNI_SND. You should create two variables for each RS UNI module - an IN port of type MB2_AXL_RSUNI2_ARR_B_0_19, which you should connect to the ~DI160 port on the RS UNI, and an OUT port of the same type, which you should connect to the ~DO160 port on the RS UNI. Then, pass these two variables as the Input and Output parameters (respectively) on the REC and SND function blocks. The udtSerialIF variable connected to the same function block then contains module-specific information, and this should be connected to either the Master or Slave function block (depending on whether that specific module is acting as an RTU master or slave). Hope this helps. ~ Martin.