Skip to content

Homing and Limiting

Kanta HORIO edited this page Oct 9, 2020 · 5 revisions

/goUntil (int)motorID (bool)ACT (float)speed

Argument

Argument Range Description
motorID 1-4, 255 motor ID
ACT 0-1 Refer to the table below
speed -15625 - 15625 [step/s]
ACT Description
0 Reset the ABS_POS register
1 Copy the value of the ASB_POS register to the MARK register

Executable timing

Always

Description

Produce a motion at specified speed and direction. When the HOME switch turn-on event occurs (the HOME switch terminal is closed), process ABS_POS according to the ACT value. Then softStop, but if the SW_MODE is set to 0 in the /setSwMode command, it will be a hardStop instead of a softStop. This command will keep the BUSY state until the motor stops.

/releaseSw (int)motorID (bool)ACT (bool)DIR

Argument

Argument Range Description
motorID 1-4, 255 motor ID
ACT 0-1 Refer to the table below
DIR 0-1 Refer to the table below
ACT Description
0 Reset the ABS_POS register
1 Copy the value of the ASB_POS register to the MARK register
DIR Motor direction
1 Forward
0 Reverse

Executable timing

Always

Description

Produce a motion at minimum speed (5[step/s] by default) in the specified direction until the HOME switch pin becomes open. Then it will perform processing according to the value of ACT. Also cause a hardStop.

/getHomeSw (int)motorID

Argument

Argument Range Description
motorID 1-4, 255 motor ID

Executable timing

Always

Description

Gets the status of the HOME switch, closed or opened.

Response

/homeSw (int)motorID (bool)swState (bool)direction
Argument Range Description
motorID 1-4, 255 motor ID
swState 0-1 State
direction 0-1 direction
swState State
0 Open, Unresponsive state.
1 Closed, Reactive state.
direction Motor direction
1 Forward
0 Reverse

/enableHomeSwReport (int)motorID (bool)enable

Argument

Argument Range Description
motorID 1-4, 255 motor ID
enable 0-1 1:Enable, 0:Disable

Executable timing

Always

Description

The following message is sent automatically when there is a change in the status of the HOME switch terminal of the specified motor.

/homeSw (int)motorID (bool)swState (bool)direction
Argument Range Description
motorID 1-4, 255 motor ID
swState 0-1 State
swState State
0 Open, Unresponsive state.
1 Closed, Reactive state.
direction Motor direction
1 Forward
0 Reverse

Initial value

0 (Disabled)

/setHomeSwMode (int)motorID (bool)SW_MODE

Argument

Argument Range Description
motorID 1-4, 255 motor ID
SW_MODE 0-1 state
SW_MODE Switch mode
0 HardStop interrupt (stop immediately)
1 User disposal (not stop)

Executable timing

HiZ state

Description

Specifies a switch mode, whether to stop immediately when the HOME switch react (falling edge).

Initial value

1 (User disposal)

/getHomeSwMode (int)motorID

Argument

Argument Range Description
motorID 1-4, 255 motor ID

Executable timing

Always

Description

Get the Switch mode which described above.

Response

/swMode (int)motorID (bool)swMode
Argument Range Description
motorID 1-4, 255 motor ID
swMode 0-1

/goHome (int)motorID

Argument

Argument Range Description
motorID 1-4, 255 motor ID

Executable timing

When the motor is not BUSY

Description

Produces a motion to the HOME position (zero position) following with the speed profile.

/goMark (int)motorID

Argument

Argument Range Description
motorID 1-4, 255 motor ID

Executable timing

When the motor is not BUSY

Description

Produces a motion to the MARK position following with the speed profile.

/setMark (int)motorID (int)MARK

Argument

Argument Range Description
motorID 1-4, 255 motor ID
MARK

Executable timing

Always

Description

Set the MARK register as a specified position.

/getMark (int)motorID

Argument

Argument Range Description
motorID 1-4, 255 motor ID

Executable timing

Always

Description

Get the MARK position.

Response

/mark (int)motorID (int)MARK
Argument Range Description
motorID 1-4, 255 motor ID
MARK Position of the MARK
Clone this wiki locally