UnderAutomation
질문이요?

[email protected]

문의하기
UnderAutomation
⌘Q
Fanuc SDK documentation
Monitor task execution
Documentation home

Move robot remotely

Move a Fanuc robot from an external application using RMI motion commands, Stream Motion real-time streaming, or DPM with SNPX.

Move a Fanuc robot remotely using the SDK. There are several approaches depending on your application requirements.

RMI : TP-like motion commands

RMI (Remote Motion Interface) sends motion instructions similar to a TP program. Best for pick-and-place, welding paths, and multi-waypoint trajectories.

using System;
using UnderAutomation.Fanuc;
using UnderAutomation.Fanuc.Common;
using UnderAutomation.Fanuc.Rmi.Data;
using UnderAutomation.Fanuc.Rmi.TpInstructions;
public class RmiMotion
{
static void Main()
{
FanucRobot robot = new FanucRobot();
ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");
parameters.Rmi.Enable = true;
robot.Connect(parameters);
// Check status
RmiControllerStatusResponse status = robot.Rmi.GetStatus();
if (status.TPEnabled)
{
Console.WriteLine("Turn off the teach pendant before proceeding.");
return;
}
if (!status.ServoReady)
{
Console.WriteLine("Servos are not ready.");
return;
}
// Initialize RMI_MOVE
robot.Rmi.Initialize();
// Set speed override
robot.Rmi.SetOverride(80);
// Move to a start position
robot.Rmi.SendTpInstruction(new JointMotionJRepTpInstruction
{
SpeedType = RmiJointSpeedType.Percent,
Speed = 10,
TermType = RmiTerminationType.Fine,
Joints = new JointsPosition(0, 0, 0, 0, 0, 0)
}).WaitForCompletion();
// Approach
robot.Rmi.SendTpInstruction(new LinearMotionTpInstruction
{
SpeedType = RmiLinearSpeedType.MmSec,
Speed = 200,
TermType = RmiTerminationType.Cnt,
TermValue = 50,
Target = new CartesianPositionWithUserFrame(500, 200, 350, 0, 90, 0, 1, 0)
});
// Descend to pick position
robot.Rmi.SendTpInstruction(new LinearMotionTpInstruction
{
SpeedType = RmiLinearSpeedType.MmSec,
Speed = 50,
TermType = RmiTerminationType.Fine,
Target = new CartesianPositionWithUserFrame(500, 200, 300, 0, 90, 0, 1, 0)
}).WaitForCompletion();
// Activate gripper
robot.Rmi.SendTpInstruction(new CallProgramTpInstruction { ProgramName = "GRIP_ON" })
.WaitForCompletion();
// Retract
robot.Rmi.SendTpInstruction(new LinearMotionTpInstruction
{
SpeedType = RmiLinearSpeedType.MmSec,
Speed = 100,
TermType = RmiTerminationType.Fine,
Target = new CartesianPositionWithUserFrame(500, 200, 400, 0, 90, 0, 1, 0)
}).WaitForCompletion();
// Check HOLD state
if (robot.Rmi.IsInHoldState)
{
Console.WriteLine("Controller in HOLD. Calling Reset...");
robot.Rmi.Reset();
}
robot.Rmi.Abort();
robot.Disconnect();
}
}

Requirements: J992 (Remote Motion Interface) robot option.

See also: RMI Motion commands

Stream Motion : Real-time streaming (J519)

Stream Motion sends joint or Cartesian positions at up to 250 Hz via UDP. Best for real-time control, force feedback, and adaptive paths.

// Connect and start streaming
var parameters = new ConnectionParameters("192.168.0.1");
parameters.StreamMotion.Enable = true;
robot.Connect(parameters);
robot.StreamMotion.Start();
// Send a joint command
robot.StreamMotion.SendJointCommand(new MotionData
{
J1 = 0,
J2 = -30,
J3 = 45,
J4 = 0,
J5 = 60,
J6 = 0
});
// React to state updates (~125–250 Hz)
robot.StreamMotion.StateReceived += (s, e) =>
{
StatePacket state = e.State;
// state.JointPosition, state.CartesianPosition, state.Status...
};

Requirements: J519 (Stream Motion) robot option.

See also: Stream Motion

SNPX + DPM : Position register handshake

See : Move Robot with Mouse

FTP

If you have option ASCII Upload, you can build th TP program .ls file, download it via FTP and execute the task with Telnet, SNPX. or CGTP

See : TP editor with breakpoints

CGTP

CGTP allows you to create a new program, insert instructions, and execute it.

View as Markdown

Universal Robots, Fanuc, Yaskawa, ABB 또는 Staubli 로봇을 .NET, Python, LabVIEW 또는 Matlab 애플리케이션에 쉽게 통합

UnderAutomation
문의하기Legal

© All rights reserved.