Create a Subsystem instance
Before we connect to anything, we need to create a Subsystem instance from the Subsystem class so we can connect hardware to it. We use the ISubsystem.ConfiguredAxes property to create a simulated axis when no real axes are detected or an EtherCAT connection is not established.
public MainWindowViewModel()
{
//Create KINGSTAR Subsystem. It also starts the RTX64 Subsystem.
Subsystem = new Subsystem();
/*Set ConfiguredAxes property so that a simulated axis will be created
if no real axes are detected or an EtherCAT connection is not
established.*/
Subsystem.ConfiguredAxes = new List<AxisConfiguration>()
{ new AxisConfiguration() { Name = "Simulated Axis" } };
}