Want to share a UDFB? Here's the place! NOTE: This page contains files and links to items developed by third parties. Unitronics bears no responsibility for any consequences of accessing and using any third-party items of any kind.
I have looked at your program.
You appear to be using the USB port for programming and COM 1 for Modbus, You cannot do this .
The USB port is probably set for 115,200 and the Modbus is set for 9600
The Installation manual says :
The USB port may be used for programming, OS download, and PC access.
Note that COM port 1 function is suspended when this port is physically connected to a PC.
. Add a 2nd Com Port to the PLC V100-17-RS4X
Setup the Ethernet port and program thru the Ethernet Port - nice feature in the V700. -- see below
You Initialize the Modbus several times - 1 for each device.
This Modbus Config is for this unit- the Master(Client) This is Modbus ID 1 - only need to do this once.
You have to set up each device to a different Modbus Address. ID address 2 , etc.
In the Modbus Read Holding registers, this is where you define the Server(Slave) address to read from.-
Trim the program to work with 1 Modbus Slave unit to start, and get it working, then add the others in.
Typical Ethernet Setup Line:
--||-------PLC Name ----- TCP/IP Config ------ TCP Socket Init
SB2 - Power up Set the IP address Socket 1, Port 20256, TCP,Slave
In the Connectons, change Serial to Ethernet, and then favorite, and enter the PLC name, IP Address, and port 20256.
Be sure the IP address is on the same network your PC is on, and is an unused IP. After setting up the PLC, do a PING from the
PC to be sure you can see the PLC.
Ausman, I just had to look this up yesterday. It can't be found with search for some reason. You have to go to the Contents tab, then expand Communications, then Communications FBs, then expand MODBUS. There you'll find the topic Slave Addressing. It's very handy to have at your fingertips.
i'd be happy with Uni to Vision. My last project used Vision slaves and a Unistream master. Uni to Uni would be a given. I don't expect Uni to third party. the vision R/W mixed was Vision only (no third party). I can't emphasize enough how incredibly valauble the MODBUS R/W mixed I/O is! Cuts airtime in half on RF data modems.
Yes, you can display your MI read from the slave directly on the HMI screen. If it's just displaying zero, then you should confirm that you are in communication with the slave. Are you getting increments for Status Messages, Sessions, and Acknowledgements? Are you certain you're reading the right register addresses? Are you sure the slave registers have a value other than zero?
One other thing, you only need one COM INIT block unless you are wanting to change your COM properties on the fly.