123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- using BaseLibRWFile;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace HRT_Measure
- {
- public class PLCAxis
- {
- public static Ini newIni;
- //M01M02
- public static List<string> listM01M02_轴 = new List<string>();
- public static Dictionary<string, ClsAxis> dictM01M02_轴 = new Dictionary<string, ClsAxis>();
- //M03
- public static List<string> listM03_轴 = new List<string>();
- public static Dictionary<string, ClsAxis> dictM03_轴 = new Dictionary<string, ClsAxis>();
- //M04M05
- public static List<string> listM04M05_轴 = new List<string>();
- public static Dictionary<string, ClsAxis> dictM04M05_轴 = new Dictionary<string, ClsAxis>();
- public static void GetM01M02AxisAdd()
- {
- newIni = new Ini(Application.StartupPath + "\\Config\\PLCAxisM01M02.ini");
- string str = newIni.ReadIni("取料X轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxisX = new ClsAxis("M01M02", "取料X轴", str);
- dictM01M02_轴.Add("取料X轴", clsAxisX);
- str = newIni.ReadIni("取料Y轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxisY = new ClsAxis("M01M02", "取料Y轴", str);
- dictM01M02_轴.Add("取料Y轴", clsAxisY);
- str = newIni.ReadIni("取料Z轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxisZ = new ClsAxis("M01M02", "取料Z轴", str);
- dictM01M02_轴.Add("取料Z轴", clsAxisZ);
- str = newIni.ReadIni("取料R轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxisR = new ClsAxis("M01M02", "取料R轴", str);
- dictM01M02_轴.Add("取料R轴", clsAxisR);
- str = newIni.ReadIni("上料站X轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxis1 = new ClsAxis("M01M02", "上料站X轴", str);
- dictM01M02_轴.Add("上料站X轴", clsAxis1);
- str = newIni.ReadIni("上料站Y轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxis2 = new ClsAxis("M01M02", "上料站Y轴", str);
- dictM01M02_轴.Add("上料站Y轴", clsAxis2);
- str = newIni.ReadIni("上料站Z轴", "1", "20");
- listM01M02_轴.Add(str);
- ClsAxis clsAxis3 = new ClsAxis("M01M02", "上料站Z轴", str);
- dictM01M02_轴.Add("上料站Z轴", clsAxis3);
- }
- public static void GetM03AxisAdd()
- {
- newIni = new Ini(Application.StartupPath + "\\Config\\PLCAxisM03.ini");
- string str = newIni.ReadIni("压机流线伺服", "1", "20");
- listM03_轴.Add(str);
- ClsAxis clsAxis压机流线伺服 = new ClsAxis("M03", "压机流线伺服", str);
- dictM03_轴.Add("压机流线伺服", clsAxis压机流线伺服);
- str = newIni.ReadIni("压机前流线伺服", "1", "20");
- listM03_轴.Add(str);
- ClsAxis clsAxis压机前流线伺服 = new ClsAxis("M03", "压机前流线伺服", str);
- dictM03_轴.Add("压机前流线伺服", clsAxis压机前流线伺服);
- //str = newIni.ReadIni("取料X轴", "1", "20");
- //listM03_轴.Add(str);
- //ClsAxis clsAxisX = new ClsAxis("M03", "取料X轴", str);
- //dictM03_轴.Add("取料X轴", clsAxisX);
- //str = newIni.ReadIni("取料Y轴", "1", "20");
- //listM03_轴.Add(str);
- //ClsAxis clsAxisY = new ClsAxis("M03", "取料Y轴", str);
- //dictM03_轴.Add("取料Y轴", clsAxisY);
- //str = newIni.ReadIni("取料Z轴", "1", "20");
- //listM03_轴.Add(str);
- //ClsAxis clsAxisZ = new ClsAxis("M03", "取料Z轴", str);
- //dictM03_轴.Add("取料Z轴", clsAxisZ);
- //str = newIni.ReadIni("取料R轴", "1", "20");
- //listM03_轴.Add(str);
- //ClsAxis clsAxisR = new ClsAxis("M03", "取料R轴", str);
- //dictM03_轴.Add("取料R轴", clsAxisR);
- }
- public static void GetM04M05AxisAdd()
- {
- newIni = new Ini(Application.StartupPath + "\\Config\\PLCAxisM04M05.ini");
- string str = newIni.ReadIni("取料X轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxisX = new ClsAxis("M04M05", "取料X轴", str);
- dictM04M05_轴.Add("取料X轴", clsAxisX);
- str = newIni.ReadIni("取料Y轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxisY = new ClsAxis("M04M05", "取料Y轴", str);
- dictM04M05_轴.Add("取料Y轴", clsAxisY);
- str = newIni.ReadIni("装盘X轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis1 = new ClsAxis("M04M05", "装盘X轴", str);
- dictM04M05_轴.Add("装盘X轴", clsAxis1);
- str = newIni.ReadIni("装盘Y轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis2 = new ClsAxis("M04M05", "装盘Y轴", str);
- dictM04M05_轴.Add("装盘Y轴", clsAxis2);
- str = newIni.ReadIni("装盘Z轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis3 = new ClsAxis("M04M05", "装盘Z轴", str);
- dictM04M05_轴.Add("装盘Z轴", clsAxis3);
- str = newIni.ReadIni("下料站X轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis4 = new ClsAxis("M04M05", "下料站X轴", str);
- dictM04M05_轴.Add("下料站X轴", clsAxis4);
- str = newIni.ReadIni("下料站Y轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis5 = new ClsAxis("M04M05", "下料站Y轴", str);
- dictM04M05_轴.Add("下料站Y轴", clsAxis5);
- str = newIni.ReadIni("下料站Z轴", "1", "20");
- listM04M05_轴.Add(str);
- ClsAxis clsAxis6 = new ClsAxis("M04M05", "下料站Z轴", str);
- dictM04M05_轴.Add("下料站Z轴", clsAxis6);
- }
- }
- }
|