Building a snap with EAL

Hello,

I have built a snap using C# and 2.3.0.0. The snap builds fine, and it runs but i never get any connection

Console.WriteLine("Creating EAL connection");

var conn = new EAL.EALConnection.EALConnection();

Console.WriteLine("Connecting to drive");

// Connects to drive
conn.Connect("192.168.1.11");

while (true)
{
    Console.WriteLine("Reading S-0-0380");

    var dc_bus_voltage = conn.Parameter.ReadDataFloat("S-0-0380");

    Console.WriteLine("S-0-0380: {0}", dc_bus_voltage);

    //Console.WriteLine("Hello World! {0}", DateTime.Now);
    System.Threading.Thread.Sleep(10000);
}

I can ping the drive from the web interface in the core, and the logbook shows this:

I added the network-bind plug but as i interpret it need something else?

Attached are the snapcraft.yaml and the compiled sample.

 

 

Best reply by nickH

Hello, 

I'm not sure why your snap does not work. But you could use the DRIVE Connect App to do tasks like this. Then you can just use the Data Layer to read and write Drive parameters. 

See also this nice HowTo to access Drive parameters in the Data Layer with Node Red for example. A possibility would be to start from this HowTo and from there you could go on and use the SDK for ctrlX AUTOMATION to access the Drive parameters through the Data Layer.

Best regards,

Nick 

View original
snapcraft.yaml.txt
975B
drive-eal_1.0.0_arm64.snap.zip
4.95MB
3 replies