6/19/2024 5:59 AM | |
Joined: 6/19/2024 Last visit: 11/7/2024 Posts: 1 Rating: (0) |
Hello, I'm trying to setup a communication between a couple of gas purity sensors and S7-1200 (CPU 1211 DC/DC/Rly). The problem is that I can't get Modbus communication going. Slave device settings (from the datasheet) are: 19200 baud Even parity 1 stop bit RS 485 (Half-duplex) Read Input Register (04) ----Register 30001----Length:2----sensor unit 1 live reading I've tried reading registers of the device using Modbus Poll and was successful. After that I've started setting up the communication with MB_COMM_LOAD and MB_MASTER (located in MODBUS LIBRARY folder) . The MB_COMM_LOAD block initializes OK (DONE bit is TRUE and without error), however MB_MASTER seems to be stuck in BUSY mode (the block never gets DONE - I've checked with counter) with error 16#80C8 (Slave timeout. Check the baud rate, parity and the connectors on the slave.) I've tried changing the baud rate and parity, but no success. The second option I've been trying is Modbus_Comm_Load and Modbus_Master (from MODBUS (RTU) library). When using this option the DONE bit in Modbus_Comm_Load stays false. I've tried putting Modbus_Comm_Load block in the startup OB but no success. This program is located in Modbus RTU library folder. Any help would be highly appreciated. Regards, D Attachmentprograms.zip (424 Downloads) |
6/26/2024 7:38 PM | |
Joined: 3/28/2010 Last visit: 11/19/2024 Posts: 1081 Rating: (214)
|
>I've tried changing the baud rate and parity, but no success. One would only change the baud rate and parity to make the settings on both ends (master and slave) identical. They must be identical or the master's messages will be ignored by the slave. Trying swapping the driver lines one end to see if the polarity is backwards (compared to the 485 adapter you used with Modbus poll. The attached doc might be of help for an S7-1200. Modbus RTU seems to start on page 29 (pdf). AttachmentModbus TCP and RTU S71200_system_manual_en-US_en-US.pdf (476 Downloads) |
Follow us on