Modbus RTU configuration
I'm using FI820F for Modbus RTU communication. There will be 4 slaves into this card (4 HMI 800 series and a Chiller), but I'm not able to connect more than 1 slave (MODS_DEV option) in each serial port.
Do I need to configure another thing before insert a slave directly into the first serial port?
P.S.: If I first connect a Master (MODM_DEV) the only slave that I'm able to connect is the FLRC_MSL (Protonic), I think this is not the correct option for me.
Voted best answer
There is no Modbus network structure that needs to be built in the hardware tree. These fist 2 communication channels are for determining if the Freelance FI820F will be the Modbus Slave or Modbus Master (or both, as we have 2 channels to work with). Then in your code you will select Modbus master or slave function blocks based on which you chose for the FI820F channel. Then inside the parameter mask you can sent slave and/or master addresses.
So for your example, you want the FI820F to be MODM_DEV. Then in your code you will use the Modbus Master function blocks.
Inside a Read Register block, for example, you will set the Interface name which is the name of your Master (use the “F2” key to pick it from a list), and Slave addr. for the device you are talking to.
You may have many function blocks for each slave. As you assign blocks to the Master they will automatically appear in the hardware structure.