Package: nx100-remote-control
Motoman NX100 - Remote ControlYaskawa Motoman NX100 industrial robot remote control ability research for machine vision control development.
SeeYoutube demo video.Actual tasks will be hereUenian33 - nx100_robotic_tasks.Table of contentsDocumentsYoutube videosInfrastructureNX100 ConfigsInstallLint, Test, BuildProgramsMoveLMoveJArduino gripperLadder changesPython sampleArduino codeSketchReleasingDocumentsDocuments for developmentUenian33 - nx100_robotic_tasksEnd goal. This repository will be control origin for this robot in the future.Ethernet Server Function ManualThis document has information about http socket working.Concurrent I/O ManualRemote IO signal outputs, inputs, all other IO signals and ladder programming information.Youtube videosThese videos are part of documentation.Youtube first demo promorelated to remote control software side.Custom hardware Gripperrelated to first test of working gripper.Calibrating and testing ML pipelinerelated to first tests with machine learning based control.InfrastructureThis is planned infrastructure for robot project with computing server.NX100 Configs- 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.Log into NX100 with Yaskawa emperor password from security menu. Same menu as you use to login to maintenance mode.System info -> Security -> Select Management Mode ->
But do not enter Management Mode password but instead Yaskawa emperor password.Do your own research to find required password.Enable following FD parametersAll supported parameters list:NX100 / NXC100 PARAMETER LISTFD078 => bit set to 1 (Ethernet WWW)Connect ethernet cable.LAN0 (next to serial COM port)LAN1 should be occupied by default, that wire goes to pendant.Specify ethernet configuration ip, mask, default gateway.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.InstallInstall or upgrade existing packagepipinstallnx100-remote-control
pipinstall--upgradenx100-remote-controlYou can change robot parameters via importing nx100_remote_control.importnx100_remote_controlnx100_remote_control.NX100_IP_ADDRESS='192.168.2.28'nx100_remote_control.NX100_TCP_PORT=80nx100_remote_control.MOCK_RESPONSE=FalseImport available contents like below examples or run web server.Web interface opens fromhttp://localhost:8080/which looks something like this in below image.importnx100_remote_controlfromnx100_remote_control.moduleimportWebServernx100_remote_control.MOCK_RESPONSE=TrueWebServer.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.Lint, Test, BuildMust have installed:pip install flake8 pytestLint:flake8 ./nx100_remote_control --count --select=E9,F63,F7,F82 --show-source --statisticsTest:pytestBuild:python -m buildProgramsTesting.py=> Used for development and testing individual commands.XboxController.py=> As name says, can use controller to control robot, just demo.MoveLQuick sample for MovL command to do linear movement with robot.
See MoveL object for more details or readEthernet Server Function Manual.fromnx100_remote_control.moduleimportCommands,Utilsfromnx100_remote_control.objectsimportMoveLCommands.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 formotion_speed_selection_and forcoordinate_specification_Then to wait for move to be completed you can use callback function as example:fromnx100_remote_control.moduleimportCommands,Utilsfromnx100_remote_control.objectsimportMoveLdefcallback_success():print('MoveL position has been reached')defcallback_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_successif position reached in given timeout or run_callback_failedif not.Another commander class wayfromnx100_remote_control.moduleimportLinearMove,Utilsfromnx100_remote_control.objectsimportMoveLmove_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')MoveJQuick sample for MovJ command to do joint motion movement with robot.
ReadEthernet Server Function Manualfor more details about MOVJ- !!! BE CAREFUL WITH MOVJ COMMAND AND IT'S SPEED SETTING !!!Speed is given as percentage from 1 to 100.Start running it with lower speed.fromnx100_remote_control.moduleimportJointMove,Utilsfromnx100_remote_control.objectsimportMoveJmove_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 gripperArduino folder contains code and sketch for custom Gripper integrated for NX100 Motoman.Ladder changesNX100 ladder config had by default GRP meaning grouped signals so had to ungroup them
to gain access to output relay #30052Idea 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 sampleWork in progress with gripper.fromnx100_remote_control.moduleimportGripperGripper.write_gripper_close()Gripper.write_gripper_open()Gripper.read_gripper_closed_command_register()Gripper.read_gripper_acknowledge()Gripper.read_gripper_hit()Arduino codeObvious 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.SketchCustom part sourcesL298 Stepper DriverLM2596 Step Down ModulePC817 Opto-isolatorHC-SR04 SonarReleasing- Remember to increment setup.cfg version before release tag!