Recently I wanted to purchase PCDK but I was bored waiting a quotation from Fanuc that has never come.
I passed a couple of hours and found that no need of PCDK to communicate from a .NET app.
Here is a small C# program retrieving and displaying the joint positions of a robot:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FRRobot;
namespace fanuc2
{
class Program
{
static void Main(string[] args)
{
FRCRobot mobjRobot = new FRCRobot();
//Connect to your robot
mobjRobot.ConnectEx("127.0.0.1:3002",false,10,1);
bool connected = mobjRobot.IsConnected;
FRCCurPosition CP=mobjRobot.CurPosition;
FRCCurGroupPosition CGP=CP.Group[(short) 1, FRECurPositionConstants.frJointDisplayType];
int G=0;
do
{
CGP.Refresh();
FRCJoint CJ=CGP.Formats[FRETypeCodeConstants.frJoint];
Console.Write(G++);
Console.Write(" ");
for (short i = 0; i < CJ.Count; i++)
{
double F=CJ[(short)(i+1)];
Console.Write(F.ToString("N3"));
Console.Write(" ");
}
Console.WriteLine("");
}
while(true);
}
}
}
Do not forget to add the following reference in the visual studio project properties : COM Fanuc Robotics Controller Interface.