Skip to main content

Motoman NX100 remote control ability research library

Project description

Motoman NX100 - Remote Control

Yaskawa Motoman NX100 industrial robot remote control ability research for machine vision control development. See Youtube demo video.

Actual tasks will be here Uenian33 - nx100_robotic_tasks.

Table of contents

Documents

Documents for development

Youtube videos

These videos are part of documentation.

Infrastructure

This is planned infrastructure for robot project with computing server.
infra-image

Install

  1. You can change robot parameters via importing 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  
    
  2. Import available contents like below examples or run web server.
    • Web interface opens from http://localhost:8080/ which looks something like this in below image.
    import nx100_remote_control
    from nx100_remote_control.module import WebServer
    
    nx100_remote_control.MOCK_RESPONSE = True 
    
    WebServer.run(addr="localhost", port=8080)
    
    • Use MOCK_RESPONSE = True to run without attached robot.
    • Replace "localhost" with "0.0.0.0" to make web server available to local network devices.

web-interface-image

Lint, Test, Build

Must have installed: pip install flake8 pytest
Lint: flake8 ./nx100_remote_control --count --select=E9,F63,F7,F82 --show-source --statistics
Test: pytest
Build: python -m build

Programs

Testing.py => Used for development and testing individual commands.
WebServer.py => Hosts small web page having control possibilities (repository readme photo)
XboxController.py => As name says, can use controller to control robot, just demo.

MoveL

Quick sample for MovL command to do linear movement with robot. See MoveL object for more details or read 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
))

Use MoveL.MoveL object to see options for motion_speed_selection_ and for coordinate_specification_

Then to wait for move to be completed you can use callback function as example:

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
)

So this will exec _callback_success if position reached in given timeout or run _callback_failed if not.

Another commander class way

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')

Arduino gripper

Arduino folder contains code and sketch for custom Gripper integrated for NX100 Motoman.

Ladder changes

NX100 ladder config had by default GRP meaning grouped signals so had to ungroup them to gain access to output relay #30052 ladder-config

Idea here was that I needed to be able to control relay #30052 with stock #10022 universal output signal but also with network input #22012 signal and this needed STR + NOT handling for both cases (see image ladder line 0359)

Python sample

Work in progress with gripper.

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()

Arduino code

Obvious bits are one input and two outputs. Hardware decisions don't matter, code can be changed accordingly.

  • PC817 is used to bring NX100 IO card UNIVERSAL OUTPUT signal as input for Arduino.
  • Two relays are used to short circuit NX100 input signal line's to switch on/off UNIVERSAL INPUT signal.

Sketch

Electrical-drawing

Custom part sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nx100-remote-control-1.0.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

nx100_remote_control-1.0.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file nx100-remote-control-1.0.0.tar.gz.

File metadata

  • Download URL: nx100-remote-control-1.0.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for nx100-remote-control-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dbac53c55f2ffce442370476d9b5bcc7ed7f4c7d52157ef6a09252f81dff35f1
MD5 347b15a3dc20fdeae1091d2811225652
BLAKE2b-256 83f35a1130bbadd15d5ee17197116601d1aacae4a5bd14dbafa662c1868486cc

See more details on using hashes here.

File details

Details for the file nx100_remote_control-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nx100_remote_control-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for nx100_remote_control-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a798d0aec2de6dff3fa70242198d61225500d6df683ae7de3c1f0e4f7a1a5173
MD5 e1bf44eb52d9f370f363b655ecc25298
BLAKE2b-256 19c96237d07d618e3c969b1d0d210d6ecb2df122406737d345c5c1ed77c99507

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page