Did you confirm the address and port of your slave device is correct? Also, is your device a modbus master device or slave device?
I suggest you to read the help first, and then run the corresponding example
You can run the two example to test if the modbus function is OK. Then you can come back to test your third party device.