9/11/2014 1:50 PM | |
Joined: 4/14/2010 Last visit: 4/3/2024 Posts: 525 Rating: (11) |
Dear Andrew, we have tested Modbus Master and Modbus Slave through ModbusPoll with ADAM-4561 interface. Successfully reading and writing the Register from slave device and also Rx and Tx both led flashing when we trigger bit M120.7 and connect the modbus poll with same configuration. but when we connect slave device with 1SI module no Rx led flashing. now we wish to read the address 1028 with function 03 as we read before this with modbus poll. where we can define the register, slave address, and function code in example program zXX21_11_1SI_MODBUS.zip Thanks. |
Last edited by: Min_Moderator at: 9/25/2014 4:20 PMNew subject after splitting from /tf/WW/en/Posts/109893#top MS |
|
9/12/2014 3:31 AM | |
Posts: 30 Rating: (0) |
Dear Sarfraz, Are you sure that you can read and write register from and to slaveonly using function code 03? Since you have been success in Modbus Poll software, then it should be no problem. Perhaps, the configuration is not correct. Please ensure the baud rate, parity, interface type of your slave device. As you mentioned that you can read from slave successfully, where is the place to confirm that? That is exactly the place where you can definethe register, slave address, and function code. Best regards, Andrew |
9/12/2014 3:35 PM | |
Joined: 4/14/2010 Last visit: 4/3/2024 Posts: 525 Rating: (11) |
Dear andrew_pj Are you sure that you can read and write register from and to slaveonly using function code 03? No, with modbus poll as following Function = 03 Read Holding Register Function = 16 Write Multiple Register Function = 06 Wite Single Register Since you have been success in Modbus Poll software, then it should be no problem. Perhaps, the configuration is not correct. Please ensure the baud rate, parity, interface type of your slave device. We are using The byte format over an RS485 link 1 start bit, 8 data bits, no parity bit and 2 stop bits as defined by the Modbus protocol see attached please. As you mentioned that you can read from slave successfully, where is the place to confirm that? That was with modbus poll see attached please read write. That is exactly the place where you can definethe register, slave address, and function code. We are using following address in OB1 but not receiving any slave data if you have any information about this please share.
L B#16#10 T "SEND_SRC_DB_SI_0".slave_address DB42.DBB0 L B#16#03 T "SEND_SRC_DB_SI_0".function_code DB42.DBB1 L W#16#0100 T "SEND_SRC_DB_SI_0".bit_start_adr DB42.DBW2 L W#16#0002 T "SEND_SRC_DB_SI_0".bit_count DB42.DBW4 Regard's. AttachmentDesktop.zip (198 Downloads) |
MS |
|
9/18/2014 8:36 AM | |
Joined: 4/14/2010 Last visit: 4/3/2024 Posts: 525 Rating: (11) |
Dear Kaulquappe, Where i can insert function code 16 in S7-blocks for reading the register. Regard's |
MS |
|
9/18/2014 9:49 AM | |
Posts: 3093 Rating: (322)
|
L B#16#10 T "SEND_SRC_DB_SI_0".function_code DB42.DBB1 And function code 16 is for writing.... |
Last edited by: Kaulquappe at: 9/18/2014 10:07 AM |
|
9/25/2014 9:17 AM | |
Joined: 4/14/2010 Last visit: 4/3/2024 Posts: 525 Rating: (11) |
Dear Sir, With using function code 03 both led Rx,Tx are Lights up at 2Hz but nothing to display in RCV destination DB some time S_RCV FB STATUS changing in 16#811 this code is not mentioned in manual please see attached. Regard's AttachmentDesktop.zip (200 Downloads) |
MS |
|
Follow us on