Page 1 of 1

modbus slave

Posted: Tue Feb 21, 2023 12:36 am
by flowcode-developer
Hello,
I am new to flowcode. I am programming an ATMEGA 2560 with flowcode V10. I am using the serial UART. I have a UART that is sending and receiving info from a weather sensor, another UART that is sending and receiving info from another sensor. These are comms on the flowcode. I want to modbus that info. Would I connect a UART to a modbus slave? I would have the computer polling the modbus slave. The examples I have seen with modbus slave use a vNet injector so I was not sure if the UART would be needed to connect to the modbus slave. I appreciate the help.

Re: modbus slave

Posted: Tue Feb 21, 2023 6:37 am
by p.erasmus
Hi,

Normaly the Slave are connected to your sensors by he normal mcu peripherals (ADC.I2C,SPI .etc) the slave then can connect to the MODBUS Master which could be another mcu or a PC ,the connection is done by UART conforming to RS232 or RS485 it could also be a MODBUS TCP connection i.a.w an LAN or Wifi Connection.
You need to determine what connection you want to use if you are the developer of the system if you connect to an exsisting MODUS device the method the devise is using will determine what your PC or your embedded system would use ,
Not sure however I think the vNet injector is just a file used by the examples that present some data for simulation might be wrong on this