I am writing a program that will run on both lathe and machining centers. How best can I initialize the API without doing during loading. Should I call a class for each machine type or can I call each (and close them) within the same class?
Added example of current method for just Lathe...
using Okuma.CLDATAPI.DataAPI;
using Okuma.CLDATAPI.Enumerations;
using Okuma.CLDATAPI.Structures;
using Okuma.CLDATAPI.DataAPI.MacMan;
public class LatheDutyOnline
{
private CMachine Objl;
private CVariables Objlv;
private CIO IO;
private CATC ObjAtc;
private CAxis objaxis;
private CBallScrew objBS;
private CProgram objProgram;
private CSpec objSpec;
private CSpindle objSpindle;
private void Form1_Load(System.Object sender, System.EventArgs e)
{
Objl = new CMachine();
Objl.Init();
Objlv = new CVariables();
IO = new CIO();
ObjAtc = new CATC();
objaxis = new CAxis();
objBS = new CBallScrew();
objProgram = new CProgram();
objSpec = new CSpec();
objSpindle = new CSpindle();
}