Yaskawa Motoman NX100工业机器人遥控Python库。该库最初是为机器视觉控制开发项目开发的。在YouTube演示视频中查看更多信息。
开发文件
这些视频是文档的一部分。
- Do changes with your own risk! in case you brick your robot or your setup is different and it doesn't work. I cannot help. System info -> Security -> Select Management Mode ->
But do not enter Management Mode password but instead Yaskawa emperor password.
FD078 => bit set to 1 (Ethernet WWW)
LAN0 (next to serial COM port)

1. Power off NX100 -> press down pendant "MAIN MENU" button while powering on NX100
2. Release "MAIN MENU" after seeing Motoman screen on pendant.
3. Login with Yaskawa emperor password from System -> Security.
4. SYSTEM -> SETUP -> OPTION FUNCTION -> TCP -> "USED"
5. SYSTEM -> SETUP -> OPTION FUNCTION -> NETWORK -> Give details.
6. Under network also find HOST SETUP -> Provide address details.
7. See that your changes have been saved.
8. Reboot NX100 and ping your NX100 ip address.
9. Test out this library.
pip install nx100-remote-control
pip install --upgrade nx100-remote-control import nx100_remote_control
nx100_remote_control . NX100_IP_ADDRESS = '192.168.2.28'
nx100_remote_control . NX100_TCP_PORT = 80
nx100_remote_control . MOCK_RESPONSE = False http://localhost:8080/打开,在下面的图像中看起来像这样。 import nx100_remote_control
from nx100_remote_control . module import WebServer
nx100_remote_control . MOCK_RESPONSE = True
WebServer . run ( addr = "localhost" , port = 8080 )
必须已经安装: pip install flake8 pytest
棉绒: flake8 ./nx100_remote_control --count --select=E9,F63,F7,F82 --show-source --statistics
测试: pytest
构建: python -m build
Testing.py =>用于开发和测试单个命令。
XboxController.py =>如下所述,可以使用控制器来控制机器人,只是演示。请注意,运动很笨拙,因为NX100不支持实时控制。
MOVL命令的快速示例使用机器人进行线性运动。有关更多详细信息,请参见Movel对象或阅读Ethernet Server Function Manual 。
from nx100_remote_control . module import Commands , Utils
from nx100_remote_control . objects import MoveL
Commands . write_linear_move ( MoveL . MoveL (
MoveL . MoveL . motion_speed_selection_posture_speed ,
5 ,
MoveL . MoveL . coordinate_specification_base_coordinate ,
353.769 , 202.779 , 120.658 ,
- 1.34 , 35.78 , 27.84 ,
Utils . binary_to_decimal ( 0x00000001 ),
0 , 0 , 0 , 0 , 0 , 0 , 0
))使用movel.movel对象查看motion_speed_selection_的选项和coordinate_specification_
然后等待移动完成,您可以将回调函数用作示例:
from nx100_remote_control . module import Commands , Utils
from nx100_remote_control . objects import MoveL
def callback_success ():
print ( 'MoveL position has been reached' )
def callback_failed ():
print ( 'MoveL error or position not reached on given timeout' )
move_l = MoveL . MoveL (
MoveL . MoveL . motion_speed_selection_posture_speed ,
5 ,
MoveL . MoveL . coordinate_specification_base_coordinate ,
353.769 , 202.779 , 120.658 ,
- 1.34 , 35.78 , 27.84 ,
Utils . binary_to_decimal ( 0x00000001 ),
0 , 0 , 0 , 0 , 0 , 0 , 0
)
Commands . robot_in_target_point_callback (
move_l = move_l , timeout = 10 , _callback_success = callback_success , _callback_failed = callback_failed
)因此,如果在给定超时到达或运行_callback_failed位置(如果不是)中,这将执行_callback_success 。
另一个指挥官课程
from nx100_remote_control . module import LinearMove , Utils
from nx100_remote_control . objects import MoveL
move_l = MoveL . MoveL (
MoveL . MoveL . motion_speed_selection_posture_speed ,
5 ,
MoveL . MoveL . coordinate_specification_base_coordinate ,
352.769 , 202.779 , 120.658 ,
- 1.34 , 35.78 , 27.84 ,
Utils . binary_to_decimal ( 0x00000001 ),
0 , 0 , 0 , 0 , 0 , 0 , 0
)
linear_move = LinearMove . LinearMove ()
linear_move . go ( move_l = move_l , wait = True , poll_limit_seconds = 10 )
print ( 'finished' ) MOVJ命令的快速样本与机器人进行联合运动。阅读Ethernet Server Function Manual以获取有关MOVJ的更多详细信息
- !!! BE CAREFUL WITH MOVJ COMMAND AND IT'S SPEED SETTING !!! from nx100_remote_control . module import JointMove , Utils
from nx100_remote_control . objects import MoveJ
move_j = MoveJ . MoveJ (
25 , # speed %
MoveJ . MoveJ . coordinate_specification_base_coordinate ,
352.769 , 202.779 , 120.658 ,
- 1.34 , 35.78 , 27.84 ,
Utils . binary_to_decimal ( 0x00000001 ),
0 , 0 , 0 , 0 , 0 , 0 , 0
)
linear_move = JointMove . JointMove ()
linear_move . go ( move_j = move_j , wait = True , poll_limit_seconds = 10 )
print ( 'finished' )Arduino文件夹包含用于NX100 Motoman的自定义抓手的代码和草图。
NX100梯子配置默认为GRP表示分组信号,因此必须取消组以访问输出继电器#30052 
在这里的想法是,我需要能够控制带有库存#10022通用输出信号的继电器#30052,但也需要使用网络输入#22012信号,并且对于两种情况,这都需要STR +无法处理(请参见Image Ladder Line 0359)
与抓手一起工作。
from nx100_remote_control . module import Gripper
Gripper . write_gripper_close ()
Gripper . write_gripper_open ()
Gripper . read_gripper_closed_command_register ()
Gripper . read_gripper_acknowledge ()
Gripper . read_gripper_hit ()明显的位是一个输入和两个输出。硬件决策无关紧要,可以相应地更改代码。

自定义零件来源
- Remember to increment setup.cfg version before release tag!