
ptp
I'm trying to connect to EZ-B through code (Console Application) without success.
this is the code:Code:
namespace EZConsoleApplication1
{
using System;
using EZ_B;
internal class Program
{
private static EZB ezb;
private static void Main(string[] args)
{
ezb = new EZB();
Console.WriteLine("Connecting to EZ-B v4...");
ezb.Connect("192.168.18.54");
if (!ezb.IsConnected)
{
Console.WriteLine("Unable to connect to EZ-B v4");
return;
}
ezb.Servo.SetServoFineTune(Servo.ServoPortEnum.D0, 90);
Console.WriteLine("Done!");
ezb.Disconnect();
}
}
}
first i tried the EZ Windows SDK, then i used the nuget package.
the program compiles, no errors, but when i run i get the following exception/error:
also i tried to run the exe file outside Visual studio and the exception is the same.
machine:
Visual Studio 2013
Framework .net 4.5
the application needs to be compiled for x86 only.
Thanks