using System;
using Zaber.Motion;
using Zaber.Motion.Ascii;
namespace ZaberMotion
{
class Program
{
static Axis x_axis;
static Device device1;
public static void Main(string[] args)
{
Library.EnableDeviceDbStore();
using (var connection = Connection.OpenSerialPort("COM3"))
{
var deviceList = connection.DetectDevices();
Console.WriteLine($"Found {deviceList.Length} devices.");
var speed = x_axis.Settings.Get("maxspeed",Units.Velocity_MillimetresPerSecond);
Console.WriteLine("Maximum speed [mm/s]: {0}", speed);
x_axis.Settings.Set("maxspeed", speed /9.0,Units.Velocity_MillimetresPerSecond);
}
}
}
}
I am getting a null value for var speed. Simple mistake I am unsure how to fix. Any tips? The initializing of the device and all is successful
You need to define the device and axis before you can get the setting for the axis.
after:
include:
Mike McDonald
Zaber Technologies
[email protected]