# EGM setup. Not possible to open the UdpUc device

I am trying to set up EGM (Externally Guided Motion from ABB) for Position Guidance using C#. But when the code reaches EGMSetupUC it will always give the error:

41824: Not possible to open the UdpUc device

Description

It was not possible to open the external device EGMsensor: that was specified in the RAPID instruction EGMSetupUC.

Consequences

The program execution is stopped immediately.

Actions

Check if

1) The device name is spelled correctly.

2) The device is connected.

3) The device is up and running.

The robot code is the following:

PROC mainEGM()
! Move to start position. Fine point is a demand
MoveJ p10,v300,fine,tMarkerAuto;
Test_EGM;
ENDPROC

PROC Test_EGM()
EGMReset egmID1;
egmSt1:=EGMGetState(egmID1);
TPWrite "EGM state: "\Num:=egmSt1;

EGMGetId egmID1;
egmSt1:=EGMGetState(egmID1);
TPWrite "EGM state: "\Num:=egmSt1;

IF egmSt1 <= EGM_STATE_CONNECTED THEN
! Set up the EGM data source: UdpUc server using device "EGMsensor:" and configruation "default"
EGMSetupUC ROB_1, egmID1, "default", "EGMsensor", \pose, \CommTimeout:=5;
ENDIF
TPWrite "EGM state: "\Num:=egmSt1;
Stop;
...
ENDPROC


In C#

private void EGMProcess(object caller, DoWorkEventArgs e)
{
UdpClient mUdpServer = new UdpClient(mPort);
IPEndPoint sender = new IPEndPoint(IPAddress.Any, mPort);

Console.WriteLine("Waiting for EGMRobot message...");
var protomessage = mUdpServer.Receive(ref sender);
....
}


Robot program won't go past EGMSetupUC and C# program won't get out of Receive, then I am deducing they can't connect with each other. Both are on the same network, in other projects we have confirmed that UDP protocol works fine, and we have used RRI and socket communication with this robot.

It is most likely a parameter configuration issue. Can someone help us with this??

• I changed the name of the UDPUC device formerly called EGMsensor for UCdevice and in the EGMSetupUC call I wrote instead of "EGMsensor" "UCdevice:". I can't confirm this, but it could also be that EGMsensor was defined in Configuration->Comunication->Transmision Protocol as EGMSensor, and I've confirmed that it is case sensitive. I am not adding this as an answer because I don't know yet what the error was and I hope someone with more knowledge may explain it better for future reference. – Sxubach Sep 26 '18 at 10:45