Modbus communication error

More
20 Jan 2020 11:37 #155247 by cmorley
Replied by cmorley on topic Modbus communication error
Sorry I meant set offset to 1

Please Log in or Create an account to join the conversation.

More
20 Jan 2020 11:39 - 20 Jan 2020 11:42 #155248 by jsskangas
Hello

2100 and 2101 are correct. i tried them both, in hex value and in decimal.
I also tried different offsets 0-9. none made difference.




Attachments:
Last edit: 20 Jan 2020 11:42 by jsskangas.

Please Log in or Create an account to join the conversation.

More
20 Jan 2020 12:16 - 20 Jan 2020 12:17 #155249 by cmorley
Replied by cmorley on topic Modbus communication error
Its about 4am here so i'm getting hazzy...

When I said element offset I meant the radio button in classiclader's modbus configuration page - it's either 0 or 1

anyways the command send seems ok but is different from your program - if I'm reading it right:

your program 0103210000018e36 broken up is 01 03 2100 0001 8e36
meaning slave 1, function 3, address 2100H, number of bytes 1, then checksome

from classicladder:
INFO CLASSICLADDER-   Modbus I/O module to send: Lgt=8 <-  Slave address-1  Function code-3  Data-8 34 0 1 C7 A4 
meaning slave 1, function 3, address 0834H, number of bytes 1, then checksome

oh wait - in classic ladder the '1st modbus element' must be input as a decimal 8448 - not 2100

In my test config then the message is the same as your program:
INFO CLASSICLADDER-   Modbus I/O module to send: Lgt=8 <-  Slave address-1  Function code-3  Data-21 0 0 1 8E 36
That looks better...
Last edit: 20 Jan 2020 12:17 by cmorley.

Please Log in or Create an account to join the conversation.

More
20 Jan 2020 13:33 #155254 by jsskangas
Solved.
Thanks.

It was HEX address in VFD and one should input address in linuxnc as DEC.

now works.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
20 Jan 2020 20:35 #155272 by cmorley
Replied by cmorley on topic Modbus communication error
Thats great!
Could you post the terminal print out of classicladder so I can see the correct returned result from the VDF - I an adding some docs to linuxcnc to help next time.
Thanks

Please Log in or Create an account to join the conversation.

More
20 Jan 2020 20:57 #155273 by jsskangas
I will tomorrow.
Just went to sleeping...

Please Log in or Create an account to join the conversation.

More
21 Jan 2020 11:37 #155310 by jsskangas
Hello

Here is some debug dump.


INFO CLASSICLADDER- Modbus I/O module received: Lgt=15 -> (Slave address-1 - Function code-3 ) A 0 0 5 0 0 0 0 0 0 0 E4 89
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 0 0 1 43 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 0 0 1 43 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 1 0 0 D3 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 1 0 0 D3 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-21 0 0 5 8F F5
INFO CLASSICLADDER- MODBUS Length we should receive=12 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
15 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=15 -> (Slave address-1 - Function code-3 ) A 0 0 5 0 0 0 0 0 0 0 E4 89
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 0 0 1 43 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 0 0 1 43 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 1 0 0 D3 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 1 0 0 D3 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-21 0 0 5 8F F5
INFO CLASSICLADDER- MODBUS Length we should receive=12 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
15 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=15 -> (Slave address-1 - Function code-3 ) A 0 0 5 0 0 0 0 0 0 0 E4 89
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 0 0 1 43 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 0 0 1 43 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 1 0 0 D3 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 1 0 0 D3 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-21 0 0 5 8F F5
INFO CLASSICLADDER- MODBUS Length we should receive=12 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
15 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=15 -> (Slave address-1 - Function code-3 ) A 0 0 5 0 0 0 0 0 0 0 E4 89
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 0 0 1 43 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 0 0 1 43 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 1 0 0 D3 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 1 0 0 D3 CA
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-21 0 0 5 8F F5
INFO CLASSICLADDER- MODBUS Length we should receive=12 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
15 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=15 -> (Slave address-1 - Function code-3 ) A 0 0 5 0 0 0 0 0 0 0 E4 89
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-6 Data-20 0 0 1 43 CA
INFO CLASSICLADDER- MODBUS Length we should receive=5 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
8 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=8 -> (Slave address-1 - Function code-6 ) 20 0 0 1 43 CA

Please Log in or Create an account to join the conversation.

More
21 Jan 2020 11:52 #155312 by cmorley
Replied by cmorley on topic Modbus communication error
Thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds
Powered by Kunena Forum