9/11/2014 1:50 PM | |
Joined: 4/14/2010 Last visit: 5/14/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: 5/14/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 (202 Downloads) |
MS |
|
9/18/2014 8:36 AM | |
Joined: 4/14/2010 Last visit: 5/14/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: (323)
|
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: 5/14/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 (204 Downloads) |
MS |
|
9/25/2014 2:54 PM | |
Joined: 4/14/2010 Last visit: 5/14/2024 Posts: 525 Rating: (11) |
Dear Sir, With using character delay time 1 or 4 and Response time 1000 or 2000 and connected trouble free data trrafic 330ohm resister on both end problem is remain. as mentioned in Modbus Serial Line Protocol and Implementation Guide V1.02 Character time is the total time for all bits that are sent per character. For example, with 1 start bit, 8 data bits, no parity and 2 stop bits at 9600 baud, the total character time is: 11 bits x 1sec/9600 bits = 1.14ms This means the silent interval must be at least: 3.5 x 1.14ms = 4.01 ms Third party slave device mentioned A, B, SCR, terminal for RS485 (not confirm which one is (+) , (-) and 1SI module mentioned (A) - (B)+ PE when i connect cross A with B i am able to right the value like function code slave address etc. after trigger the M120.7 as status of Tx, Rx led lights up with 2Hz. when we write function code 3 then both led's flashing but with other function code (1-2-4-16) Rx led not responding. error #811 not steadly its coming after 1or 3 second and some time after 8 second. we are using FB2 and FB3 RECV and SEND function block with Modbus master configuration please see attached. Regard's AttachmentDesktop.zip (105 Downloads) |
MS |
|