
— Start the test service as below.
[root@OpenIL:~]# nservo_run -f /root/nservo_example/hss248_ec_config_pp.xml &
— Check whether the status of the slave has been transferred from "PREOP" to "OP".
[root@OpenIL:~]# ethercat slaves
0 0:0 OP + 2HSS458-EC
— Check whether the phase of the master has been transferred from "Idle" to "Operation".
[root@OpenIL:~]# ethercat master | grep Phase
Phase: Operation
— Run below commands to test whether the motor works.
◦ Get current mode of axle 0.
[root@OpenIL:~]# nservo_client -a 0 -c get_mode
get_mode of the axle 0 : Profile Position Mode
◦ Get current position of axle 0.
[root@OpenIL:~]# nservo_client -a 0 -c get_position
get_current_position of the axle 0 : 0
◦ Get the profile speed of axle 0.
[root@OpenIL:~]# nservo_client -a 0 -c get_profile_speed
get_profile_speed of the axle 0 : 800000
The value 800000 means 200 revolutions per second.
◦ Set profile speed of axle 0.
[root@OpenIL:~]# nservo_client -a 0 -c set_profile_speed:20000
set_profile_speed of the axle 0 : 20000
Set profile speed to 5 revolutions per second.
◦ Set target position of axle 0
[root@OpenIL:~]# nservo_client -c set_position:400000
set_position of the axle 0 : 400000
The value 400000 means that the motor will turn 100 rounds.
(target_position:400000 - current_position:0) / 4000 = 100
◦ Get current speed of axle 0
[root@OpenIL:~]# nservo_client -a 0 -c get_speed
get_speed of the axle 0 : 19999
◦ Get target position of axle 0
[root@OpenIL:~]# nservo_client -a 0 -c get_target_position
get_target_position of the axle 0 : 400000
NXP Semiconductors
nxp-servo
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
162 / 199