Justas Grinaveckis Posted February 28, 2017 Report Share Posted February 28, 2017 Hi, I'm having hard time displaying data that I get through MODBUS. Need to read from multiple slaves, but after download display still shows 0. Maybe do I need to write data to data table and then display on HMI? Or I can just display data vector? I'm really confused, thanks in advance for your help. P.S. Program attached below. Thermofisher.vlp Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted February 28, 2017 MVP 2023 Report Share Posted February 28, 2017 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. Link to comment Share on other sites More sharing options...
DanT Posted February 28, 2017 Report Share Posted February 28, 2017 Hi Justas; 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. Recommendations: . Add a 2nd Com Port to the PLC V100-17-RS4X or 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. DanT 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now