cancel
Showing results for 
Search instead for 
Did you mean: 

EVALKIT-ROBOT-1 / MODBUS RTU / QUESTION

Mhan.1
Associate

Hello Community

I try to test the EVELKIT-ROBOT-1 using MODBUS RTU.

I did it it's factory setting.

After I had connect all the cables, I powered up the EVALKIT.

Motor turned to its init position and stoped at some point.

And Motor hold that position even if I turned the sharft of the motor.

So I want to change the desired posiiton.

I send packets(? : I don't know whether MODBUS RTU also called it packet ) to the EVALKIT as you can see the figure that I uploaded.

The order that I send was (1) -> (2) -> (3) -> (4) -> (5) -> (2) -> (1) -> (6) -> (7).

Following response is the bottom side of figure.

here is my questions.

  1. I send packet(1) to EVALKIT after the motor aligned but the response implys it is not. why?
  2. is packet(7) wrong? ( Set the coil bit 0 at address 0 high to start motion ) Is it because of the discrete input bit 0 is not high?

please help..

Thanks

Minsoo

1 ACCEPTED SOLUTION

Accepted Solutions
Enrico Poli
ST Employee

Hi @Mhan.1​ ,

I see two errors in your command sequence.

In command #1 read discrete inputs the number of inputs is set 1. In the way the servo driver returns the "done" bit only. If you want to read the ALIGN input you should set at 2 the number of read inputs.

In the last command write single coil the MODBUS RTU protocol requires the 0xFF00 code for the ON condition and the 0x0000 code for the OFF.

In order to simplify your debug, I suggest you using some ready-to-use MODBUS interface like the qModMaster

View solution in original post

3 REPLIES 3
Enrico Poli
ST Employee

Hi @Mhan.1​ ,

I see two errors in your command sequence.

In command #1 read discrete inputs the number of inputs is set 1. In the way the servo driver returns the "done" bit only. If you want to read the ALIGN input you should set at 2 the number of read inputs.

In the last command write single coil the MODBUS RTU protocol requires the 0xFF00 code for the ON condition and the 0x0000 code for the OFF.

In order to simplify your debug, I suggest you using some ready-to-use MODBUS interface like the qModMaster

Mhan.1
Associate

Hi Enrico

Thanks for the correction and advice!

sdownsee
Associate II

Hi! Did this end up working for you? I'm trying to do the same with this kit (using Termite 3.4) but I can't get the motor to move. What modbus code did you use for the last line? Thank you