界面布局设置
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HexcalMC.Base
|
||||
{
|
||||
public class DebugDfn
|
||||
{
|
||||
public static string strDebugFile = Application.StartupPath + "\\File\\Debug.txt";
|
||||
public static string strDebugSavePath = Application.StartupPath + "\\File\\DebugFiles";
|
||||
public static string strDebugFileTemp = Application.StartupPath + "\\File\\DebugTemp.txt"; //临时存储,用于菜单查看
|
||||
static string strStartTime = ""; //程序启动时间
|
||||
static string strEndTime = ""; //程序关闭时间
|
||||
|
||||
public static RichTextBox textBox_Msg;
|
||||
|
||||
|
||||
//=================================================================
|
||||
public static void StartDebugObj()
|
||||
{
|
||||
System.IO.TextWriter log = new System.IO.StreamWriter(DebugDfn.strDebugFile);
|
||||
TextWriterTraceListener logger = new TextWriterTraceListener(log);
|
||||
Trace.Listeners.Add(logger);
|
||||
strStartTime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
|
||||
}
|
||||
|
||||
public static void SaveDebugFile()
|
||||
{
|
||||
AddLog("软件关闭!");
|
||||
strEndTime = DateTime.Now.ToString("yyyy.MM.dd HH-mm-ss");
|
||||
string CopyFileName = strDebugSavePath + "\\DebugFiles\\" + "Debug(" + strStartTime + " To " +
|
||||
strEndTime + ")" + ".txt";
|
||||
if (File.Exists(strDebugFile))
|
||||
File.Copy(strDebugFile, CopyFileName, true);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
#region 信息显示
|
||||
|
||||
public static void AddLog(string str)
|
||||
{
|
||||
MyBase.TraceWriteLine(str);
|
||||
}
|
||||
|
||||
public static void AddLogText(string str, Color m_Color = new Color())
|
||||
{
|
||||
MyBase.TraceWriteLine(str);
|
||||
try
|
||||
{
|
||||
textBox_Msg.BeginInvoke((EventHandler)delegate
|
||||
{
|
||||
Color SetColor = Color.White;
|
||||
if (m_Color == new Color())
|
||||
{
|
||||
if (str.ToUpper().Contains("ERROR") || str.ToUpper().Contains("错误") ||
|
||||
str.ToUpper().Contains("出错") || str.ToUpper().Contains("EXCEPTION") ||
|
||||
str.ToUpper().Contains("异常") || str.ToUpper().Contains("失败"))
|
||||
{
|
||||
SetColor = Color.Red;
|
||||
}
|
||||
else if (str.ToUpper().Contains("WARNING") || str.ToUpper().Contains("警告"))
|
||||
{
|
||||
SetColor = Color.DarkOrange;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetColor = m_Color;
|
||||
}
|
||||
|
||||
string strText = DateTime.Now.ToString("HH:mm:ss.ff") + "--" + str + Environment.NewLine;
|
||||
textBox_Msg.SelectionStart = textBox_Msg.TextLength;
|
||||
if (string.IsNullOrEmpty(str))
|
||||
SetText(textBox_Msg, str, SetColor, false, 16);
|
||||
else
|
||||
SetText(textBox_Msg, strText, SetColor, false, 16);
|
||||
if (textBox_Msg.Lines.Length > 800)
|
||||
{
|
||||
textBox_Msg.Select(0, textBox_Msg.TextLength / 2);
|
||||
textBox_Msg.Cut();
|
||||
}
|
||||
|
||||
textBox_Msg.ScrollToCaret();
|
||||
});
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetText(RichTextBox m_RichTextBox, string strText, Color m_Color, bool bBold = false,
|
||||
float Size = 16)
|
||||
{
|
||||
m_RichTextBox.Invoke(((EventHandler)delegate
|
||||
{
|
||||
SetFont(m_RichTextBox, m_Color, bBold, Size);
|
||||
m_RichTextBox.SelectedText = strText;
|
||||
}));
|
||||
}
|
||||
|
||||
public static void SetFont(RichTextBox m_RichTextBox, Color m_Color, bool bBold = false, float Size = 16)
|
||||
{
|
||||
m_RichTextBox.SelectionColor = m_Color;
|
||||
if (bBold)
|
||||
m_RichTextBox.SelectionFont = new System.Drawing.Font("Segoe UI", Size, System.Drawing.FontStyle.Bold,
|
||||
System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
|
||||
else
|
||||
m_RichTextBox.SelectionFont = new System.Drawing.Font("Segoe UI", Size,
|
||||
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
|
||||
}
|
||||
|
||||
public static void SetErrorColor(Color InColor)
|
||||
{
|
||||
if (textBox_Msg != null)
|
||||
{
|
||||
textBox_Msg.BeginInvoke((EventHandler)delegate { textBox_Msg.BackColor = InColor; });
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HexcalMC.Hexcal
|
||||
{
|
||||
public class TcpIpServer
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用模式,默认=1,接收任意数据显示;2=前两个字节为数据长度
|
||||
/// </summary>
|
||||
public int UseMode = 1;
|
||||
|
||||
string strServerIP = "127.0.0.1"; //服务器的IP地址
|
||||
string strServerPort = "8080"; //端口号
|
||||
public enum EnumTcpIpServer : int
|
||||
{
|
||||
StartListen = 1,
|
||||
ClientConnect = 2,
|
||||
SocketException = 8,
|
||||
ConnectException = 9,
|
||||
Exception = -1
|
||||
}
|
||||
|
||||
#region 510,增加时钟,判断是否有断掉的连接。
|
||||
|
||||
System.Windows.Forms.Timer ServerTimer = new System.Windows.Forms.Timer();
|
||||
|
||||
private void ServerTimerLoop(object sender, EventArgs e)
|
||||
{
|
||||
ServerTimer.Interval = 20000; //监听timer的间隔
|
||||
if (DictSocket != null)
|
||||
{
|
||||
if (DictSocket.Count != 0)
|
||||
{
|
||||
DictSocket.Values.ToArray();
|
||||
for (int i = DictSocket.Values.ToArray().Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (DictSocket.Values.ToArray()[i].Poll(10, SelectMode.SelectRead)) //10毫秒,检查套接字状态, SelectMode 参数指定要监视的套接字的类别。
|
||||
{
|
||||
// DictSocket.Remove(DictSocket.Keys.ToArray()[i]);
|
||||
|
||||
RaisedStatus(EnumTcpIpServer.ConnectException,
|
||||
"连接已断开:" + DictSocket.Keys.ToArray()[i]); //刷新界面显示,触发一个连接异常状态枚举,并将消息传递为异常的状态
|
||||
RemoveSocketClient(DictSocket.Keys.ToArray()[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Thread m_WatchThread = null; // 负责监听客户端连接请求的线程;
|
||||
Socket m_WatchSocket = null;
|
||||
Dictionary<string, Thread> DictThread = new Dictionary<string, Thread>();
|
||||
Dictionary<string, Socket> DictSocket = new Dictionary<string, Socket>();
|
||||
bool bStartListen = false;
|
||||
|
||||
public string[] SocketNames
|
||||
{
|
||||
get { return (string[])DictSocket.Keys.ToArray(); }
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
public TcpIpServer(string ServerIP, string ServerPort)
|
||||
{
|
||||
strServerIP = ServerIP;
|
||||
strServerPort = ServerPort;
|
||||
}
|
||||
|
||||
public bool StartListen()
|
||||
{
|
||||
try
|
||||
{
|
||||
ServerTimer.Tick += new EventHandler(ServerTimerLoop); //510,增加时钟,判断是否有断掉的连接。
|
||||
ServerTimer.Start();
|
||||
|
||||
m_WatchSocket =
|
||||
new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); //创建负责监听的套接字,注意其中的参数;
|
||||
IPAddress m_IpAddr = IPAddress.Parse(strServerIP); //获得文本框中的IP对象;
|
||||
IPEndPoint m_EndPoint = new IPEndPoint(m_IpAddr, int.Parse(strServerPort)); //创建包含ip和端口号的网络节点对象;
|
||||
try
|
||||
{
|
||||
m_WatchSocket.Bind(m_EndPoint); // 将负责监听的套接字绑定到唯一的ip和端口上;
|
||||
}
|
||||
catch (SocketException se)
|
||||
{
|
||||
MessageBox.Show("异常:" + se.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
bStartListen = true;
|
||||
m_WatchSocket.Listen(10); // 设置监听队列的长度
|
||||
m_WatchThread = new Thread(WatchThread); // 创建负责监听的线程
|
||||
m_WatchThread.IsBackground = true;
|
||||
m_WatchThread.Start();
|
||||
RaisedStatus(EnumTcpIpServer.StartListen, "服务器启动监听成功!IP=" + strServerIP + ", Port=" + strServerPort);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("启动服务器监听失败:" + ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopListen()
|
||||
{
|
||||
try
|
||||
{
|
||||
bStartListen = false;
|
||||
m_WatchSocket.Close();
|
||||
m_WatchSocket.Dispose();
|
||||
m_WatchSocket = null;
|
||||
|
||||
DictThread.Clear();
|
||||
DictSocket.Clear();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public bool ConnectStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_WatchSocket == null)
|
||||
return false;
|
||||
return m_WatchSocket.Connected && m_WatchThread != null;
|
||||
}
|
||||
}
|
||||
|
||||
public bool WatchStatus
|
||||
{
|
||||
get { return bStartListen; }
|
||||
}
|
||||
|
||||
//监听线程
|
||||
void WatchThread()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (bStartListen) // 持续不断的监听客户端的连接请求;
|
||||
{
|
||||
// 开始监听客户端连接请求,Accept方法会阻断当前的线程;
|
||||
Socket sokClient = m_WatchSocket.Accept(); // 一旦监听到一个客户端的请求,就返回一个与该客户端通信的套接字;
|
||||
|
||||
|
||||
#region 510,在新建连接时,判断以前的连接是否正常存在。
|
||||
|
||||
if (DictSocket != null)
|
||||
{
|
||||
if (DictSocket.Count != 0)
|
||||
{
|
||||
DictSocket.Values.ToArray();
|
||||
for (int i = DictSocket.Values.ToArray().Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (DictSocket.Values.ToArray()[i].Poll(10, SelectMode.SelectRead))
|
||||
{
|
||||
//DictSocket.Remove(DictSocket.Keys.ToArray()[i]);
|
||||
RemoveSocketClient(DictSocket.Keys.ToArray()[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
DictSocket.Add(sokClient.RemoteEndPoint.ToString(), sokClient); // 将与客户端连接的套接字对象添加到集合中;
|
||||
RaisedStatus(EnumTcpIpServer.ClientConnect,
|
||||
"客户端连接成功!RemoteEndPoint=" + sokClient.RemoteEndPoint.ToString());
|
||||
|
||||
Thread thread = new Thread(ReceiveThread);
|
||||
thread.IsBackground = true;
|
||||
thread.Start(sokClient);
|
||||
|
||||
DictThread.Add(sokClient.RemoteEndPoint.ToString(), thread); // 将新建的线程 添加 到线程的集合中去。
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//接收线程
|
||||
void ReceiveThread(object sokObj)
|
||||
{
|
||||
Socket sokClient = sokObj as Socket;
|
||||
while (bStartListen)
|
||||
{
|
||||
// 定义一个2M的缓存区;
|
||||
byte[] arrMsgRec = new byte[sokClient.Available];
|
||||
// 将接受到的数据存入到输入 arrMsgRec中;
|
||||
int length = -1;
|
||||
try
|
||||
{
|
||||
length = sokClient.Receive(arrMsgRec); // 接收数据,并返回数据的长度;
|
||||
}
|
||||
catch (SocketException se)
|
||||
{
|
||||
RaisedStatus(EnumTcpIpServer.SocketException, "异常:SocketException=" + se.Message);
|
||||
RemoveSocketClient(sokClient.RemoteEndPoint.ToString());
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
RaisedStatus(EnumTcpIpServer.ConnectException, "异常:Exception=" + ex.Message);
|
||||
RemoveSocketClient(sokClient.RemoteEndPoint.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (UseMode == 1)
|
||||
{
|
||||
if (length > 0)
|
||||
{
|
||||
// TcpIpDfn.SongLiang_arrMsgRec = arrMsgRec; //510
|
||||
string strData = System.Text.Encoding.Default.GetString(arrMsgRec); // 将接受到的字节数据转化成字符串;
|
||||
//strData = strData.Substring(0, length);
|
||||
//RaisedMessage(sokClient.RemoteEndPoint.ToString(), strData.Replace("\0", "<0>"));
|
||||
RaisedMessage(sokClient.RemoteEndPoint.ToString(), strData.Replace("\0", "."));
|
||||
}
|
||||
}
|
||||
else if (UseMode == 2)
|
||||
{
|
||||
if (length > 0 && arrMsgRec.Length > 2)
|
||||
{
|
||||
// TcpIpDfn.SongLiang_arrMsgRec = arrMsgRec; //510
|
||||
string strData =
|
||||
System.Text.Encoding.Default.GetString(arrMsgRec, 2,
|
||||
arrMsgRec.Length - 2); // 将接受到的字节数据转化成字符串;
|
||||
|
||||
RaisedMessage(sokClient.RemoteEndPoint.ToString(), strData);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
RaisedStatus(EnumTcpIpServer.Exception, "获取Socket数据异常:ex=" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//删除客户端对象
|
||||
void RemoveSocketClient(string strRemoteEndPoint)
|
||||
{
|
||||
// 从通信套接字集合中 删除被中断连接的通信套接字;
|
||||
DictSocket.Remove(strRemoteEndPoint);
|
||||
|
||||
// 从通信线程集合中 删除被中断连接的通信线程对象;
|
||||
DictThread.Remove(strRemoteEndPoint);
|
||||
}
|
||||
|
||||
//发送消息
|
||||
public void SendMessage(string strSocketKey, string strMsg)
|
||||
{
|
||||
byte[] arrMsg = System.Text.Encoding.Default.GetBytes(strMsg);
|
||||
DictSocket[strSocketKey].Send(arrMsg);
|
||||
}
|
||||
|
||||
public void SendMessage(string strSocketKey, byte[] arrMsg)
|
||||
{
|
||||
DictSocket[strSocketKey].Send(arrMsg);
|
||||
}
|
||||
|
||||
/// <summary> 发送数据函数(字符串, 自动添加长度(byte格式))</summary>
|
||||
public string SendMessage2(string strSocketKey, string strMsg)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (DictSocket[strSocketKey].Connected)
|
||||
{
|
||||
byte[] arrLength = new byte[2];
|
||||
arrLength = BitConverter.GetBytes(Convert.ToInt16(strMsg.Length));
|
||||
byte[] WriteBuffer = Encoding.Default.GetBytes(strMsg);
|
||||
WriteBuffer = arrLength.Concat(WriteBuffer).ToArray();
|
||||
|
||||
DictSocket[strSocketKey].Send(WriteBuffer);
|
||||
return "";
|
||||
}
|
||||
|
||||
return "NotConnect";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "error:" + ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public void SendMessageToAllClients(string strMsg)
|
||||
{
|
||||
byte[] arrMsg = System.Text.Encoding.Default.GetBytes(strMsg);
|
||||
foreach (Socket soc in DictSocket.Values)
|
||||
{
|
||||
soc.Send(arrMsg);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendMessageToAllClients(byte[] arrMsg)
|
||||
{
|
||||
foreach (Socket soc in DictSocket.Values)
|
||||
{
|
||||
soc.Send(arrMsg);
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void EventHandler_RaisedStatus(EnumTcpIpServer Type, string Msg);
|
||||
|
||||
public event EventHandler_RaisedStatus OnRaisedStatus;
|
||||
|
||||
// 异步或同步触发自定义事件,并在目标控件是 Windows Forms 控件的情况下添加到目标控件的消息队列中。它主要的目的是使得自定义事件处理程序在UI线程上执行,以避免线程上的卡顿或UI更新问题。
|
||||
private void RaisedStatus(EnumTcpIpServer ReturnType, string Msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (OnRaisedStatus != null)
|
||||
{
|
||||
if (OnRaisedStatus.Target is System.Windows.Forms.Control)
|
||||
{
|
||||
Control targetForm = OnRaisedStatus.Target as System.Windows.Forms.Control;
|
||||
targetForm.BeginInvoke(OnRaisedStatus, new object[] { ReturnType, Msg });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnRaisedStatus(ReturnType, Msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void EventHandler_RaisedMessage(string ClientIP, string Msg);
|
||||
|
||||
public event EventHandler_RaisedMessage OnRaisedMessage;
|
||||
|
||||
private void RaisedMessage(string ClientIP, string Msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (OnRaisedMessage != null)
|
||||
{
|
||||
if (OnRaisedMessage.Target is System.Windows.Forms.Control)
|
||||
{
|
||||
Control targetForm = OnRaisedMessage.Target as System.Windows.Forms.Control;
|
||||
targetForm.BeginInvoke(OnRaisedMessage, new object[] { ClientIP, Msg });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnRaisedMessage(ClientIP, Msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
@@ -10,12 +10,13 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>HexcalMC</RootNamespace>
|
||||
<AssemblyName>ACS_Motion</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -26,6 +27,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -35,6 +37,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -44,6 +47,7 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
@@ -53,15 +57,35 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ACS.SPiiPlusNET">
|
||||
<HintPath>bin\Debug\ACS.SPiiPlusNET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScottPlot, Version=4.1.68.0, Culture=neutral, PublicKeyToken=86698dc10387c39e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\ScottPlot.4.1.68\lib\net462\ScottPlot.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScottPlot.WinForms, Version=4.1.68.0, Culture=neutral, PublicKeyToken=5df1dfa5321e734b, processorArchitecture=MSIL">
|
||||
<HintPath>packages\ScottPlot.WinForms.4.1.68\lib\net461\ScottPlot.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Drawing.Common.4.7.2\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Telerik.WinControls, Version=2018.3.1016.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" />
|
||||
@@ -69,8 +93,12 @@
|
||||
<Reference Include="Telerik.WinControls.Scheduler, Version=2018.3.1016.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Telerik.WinControls.UI, Version=2018.3.1016.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="TelerikCommon, Version=2018.3.1016.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" />
|
||||
<Reference Include="TelerikData, Version=2018.3.1016.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Base\BaseFunction.cs" />
|
||||
<Compile Include="Base\DebugDfn.cs" />
|
||||
<Compile Include="Hexcal\TcpIpServer.cs" />
|
||||
<Compile Include="MainFrom.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -103,6 +131,8 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -140,6 +170,7 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Hexagon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexcalMC", "HexcalMC.csproj", "{19741897-37D8-43EE-94A2-637975035CEA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Debug|x64.Build.0 = Debug|x64
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Debug|x86.Build.0 = Debug|x86
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Release|x64.ActiveCfg = Release|x64
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Release|x64.Build.0 = Release|x64
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Release|x86.ActiveCfg = Release|x86
|
||||
{19741897-37D8-43EE-94A2-637975035CEA}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F9221603-B8A9-4B64-BFC6-C9D05D9943AC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Generated
+979
@@ -0,0 +1,979 @@
|
||||
namespace HexcalMC
|
||||
{
|
||||
partial class MainFrom
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrom));
|
||||
this.radLabelElement2 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement2 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radButtonElement5 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radTextBoxElement1 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.ribbonTab1 = new Telerik.WinControls.UI.RibbonTab();
|
||||
this.radRibbonBarGroup1 = new Telerik.WinControls.UI.RadRibbonBarGroup();
|
||||
this.rtb_motion = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radRibbonBarGroup4 = new Telerik.WinControls.UI.RadRibbonBarGroup();
|
||||
this.radRibbonBarButtonGroup4 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement5 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement8 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radRibbonBarButtonGroup5 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement6 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement9 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radRibbonBarButtonGroup6 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement7 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement10 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.ribbonTab2 = new Telerik.WinControls.UI.RibbonTab();
|
||||
this.radRibbonBarGroup2 = new Telerik.WinControls.UI.RadRibbonBarGroup();
|
||||
this.radButtonElement2 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radButtonElement3 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radRibbonBar1 = new Telerik.WinControls.UI.RadRibbonBar();
|
||||
this.radMenuItem2 = new Telerik.WinControls.UI.RadMenuItem();
|
||||
this.radMenuButtonItem3 = new Telerik.WinControls.UI.RadMenuButtonItem();
|
||||
this.radMenuButtonItem4 = new Telerik.WinControls.UI.RadMenuButtonItem();
|
||||
this.radButtonElement4 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radRibbonBarButtonGroup1 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement1 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement6 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radRibbonBarButtonGroup2 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement3 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radTextBoxElement7 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radRibbonBarButtonGroup3 = new Telerik.WinControls.UI.RadRibbonBarButtonGroup();
|
||||
this.radLabelElement4 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
this.radRibbonBarGroup3 = new Telerik.WinControls.UI.RadRibbonBarGroup();
|
||||
this.radTextBoxElement3 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radButtonElement6 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radTextBoxElement4 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radButtonElement7 = new Telerik.WinControls.UI.RadButtonElement();
|
||||
this.radTextBoxElement5 = new Telerik.WinControls.UI.RadTextBoxElement();
|
||||
this.radStatusStrip1 = new Telerik.WinControls.UI.RadStatusStrip();
|
||||
this.radMenuButtonItem1 = new Telerik.WinControls.UI.RadMenuButtonItem();
|
||||
this.radMenuItem1 = new Telerik.WinControls.UI.RadMenuItem();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.formsPlot1 = new ScottPlot.FormsPlot();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.txtPort = new System.Windows.Forms.TextBox();
|
||||
this.txtIP = new System.Windows.Forms.TextBox();
|
||||
this.btn_ACSStop = new System.Windows.Forms.Button();
|
||||
this.btn_ACSStart = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.btn_HexcalStop = new System.Windows.Forms.Button();
|
||||
this.btn_HexcalStart = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox_Msg = new System.Windows.Forms.TextBox();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.btnDisable = new System.Windows.Forms.Button();
|
||||
this.btnEnable = new System.Windows.Forms.Button();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.grpMst = new System.Windows.Forms.GroupBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.lblEnable = new System.Windows.Forms.Label();
|
||||
this.lblInPos = new System.Windows.Forms.Label();
|
||||
this.lblAcc = new System.Windows.Forms.Label();
|
||||
this.lblMoving = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.groupBox7 = new System.Windows.Forms.GroupBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
this.grpMst.SuspendLayout();
|
||||
this.groupBox7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// radLabelElement2
|
||||
//
|
||||
this.radLabelElement2.Name = "radLabelElement2";
|
||||
this.radLabelElement2.Text = "radLabelElement1";
|
||||
this.radLabelElement2.TextWrap = true;
|
||||
this.radLabelElement2.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement2
|
||||
//
|
||||
this.radTextBoxElement2.AutoSize = false;
|
||||
this.radTextBoxElement2.Bounds = new System.Drawing.Rectangle(0, 0, 80, 20);
|
||||
this.radTextBoxElement2.Margin = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||
this.radTextBoxElement2.MinSize = new System.Drawing.Size(80, 0);
|
||||
this.radTextBoxElement2.Name = "radTextBoxElement2";
|
||||
this.radTextBoxElement2.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement2.Text = "45.8530";
|
||||
this.radTextBoxElement2.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement2.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radButtonElement5
|
||||
//
|
||||
this.radButtonElement5.Name = "radButtonElement5";
|
||||
this.radButtonElement5.StretchHorizontally = false;
|
||||
this.radButtonElement5.StretchVertically = false;
|
||||
this.radButtonElement5.Text = "X";
|
||||
this.radButtonElement5.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement1
|
||||
//
|
||||
this.radTextBoxElement1.MinSize = new System.Drawing.Size(80, 0);
|
||||
this.radTextBoxElement1.Name = "radTextBoxElement1";
|
||||
this.radTextBoxElement1.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement1.Text = "45.2330";
|
||||
this.radTextBoxElement1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// ribbonTab1
|
||||
//
|
||||
this.ribbonTab1.AutoEllipsis = false;
|
||||
this.ribbonTab1.DisabledTextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
|
||||
this.ribbonTab1.IsSelected = true;
|
||||
this.ribbonTab1.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radRibbonBarGroup1,
|
||||
this.radRibbonBarGroup4});
|
||||
this.ribbonTab1.Name = "ribbonTab1";
|
||||
this.ribbonTab1.Text = "常用";
|
||||
this.ribbonTab1.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
|
||||
this.ribbonTab1.UseCompatibleTextRendering = false;
|
||||
this.ribbonTab1.UseMnemonic = false;
|
||||
//
|
||||
// radRibbonBarGroup1
|
||||
//
|
||||
this.radRibbonBarGroup1.Alignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radRibbonBarGroup1.AutoSize = false;
|
||||
this.radRibbonBarGroup1.Bounds = new System.Drawing.Rectangle(0, 0, 110, 100);
|
||||
this.radRibbonBarGroup1.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.rtb_motion});
|
||||
this.radRibbonBarGroup1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.radRibbonBarGroup1.MaxSize = new System.Drawing.Size(110, 100);
|
||||
this.radRibbonBarGroup1.MinSize = new System.Drawing.Size(110, 100);
|
||||
this.radRibbonBarGroup1.Name = "radRibbonBarGroup1";
|
||||
this.radRibbonBarGroup1.Text = "运动控制";
|
||||
this.radRibbonBarGroup1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// rtb_motion
|
||||
//
|
||||
this.rtb_motion.Alignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.rtb_motion.Image = global::HexcalMC.Properties.Resources.motion;
|
||||
this.rtb_motion.Name = "rtb_motion";
|
||||
this.rtb_motion.Text = "ACS调试";
|
||||
this.rtb_motion.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.rtb_motion.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.rtb_motion.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.rtb_motion.UseCompatibleTextRendering = false;
|
||||
this.rtb_motion.Click += new System.EventHandler(this.rtb_motion_Click);
|
||||
//
|
||||
// radRibbonBarGroup4
|
||||
//
|
||||
this.radRibbonBarGroup4.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radRibbonBarButtonGroup4,
|
||||
this.radRibbonBarButtonGroup5,
|
||||
this.radRibbonBarButtonGroup6});
|
||||
this.radRibbonBarGroup4.MaxSize = new System.Drawing.Size(110, 100);
|
||||
this.radRibbonBarGroup4.MinSize = new System.Drawing.Size(110, 100);
|
||||
this.radRibbonBarGroup4.Name = "radRibbonBarGroup4";
|
||||
this.radRibbonBarGroup4.Orientation = System.Windows.Forms.Orientation.Vertical;
|
||||
this.radRibbonBarGroup4.Text = "机台位置";
|
||||
//
|
||||
// radRibbonBarButtonGroup4
|
||||
//
|
||||
this.radRibbonBarButtonGroup4.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement5,
|
||||
this.radTextBoxElement8});
|
||||
this.radRibbonBarButtonGroup4.Name = "radRibbonBarButtonGroup4";
|
||||
//
|
||||
// radLabelElement5
|
||||
//
|
||||
this.radLabelElement5.Margin = new System.Windows.Forms.Padding(0, 0, 10, 0);
|
||||
this.radLabelElement5.Name = "radLabelElement5";
|
||||
this.radLabelElement5.Text = "X";
|
||||
this.radLabelElement5.TextWrap = true;
|
||||
//
|
||||
// radTextBoxElement8
|
||||
//
|
||||
this.radTextBoxElement8.MinSize = new System.Drawing.Size(80, 0);
|
||||
this.radTextBoxElement8.Name = "radTextBoxElement8";
|
||||
this.radTextBoxElement8.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement8.Text = "45.230";
|
||||
this.radTextBoxElement8.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
//
|
||||
// radRibbonBarButtonGroup5
|
||||
//
|
||||
this.radRibbonBarButtonGroup5.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement6,
|
||||
this.radTextBoxElement9});
|
||||
this.radRibbonBarButtonGroup5.Name = "radRibbonBarButtonGroup5";
|
||||
//
|
||||
// radLabelElement6
|
||||
//
|
||||
this.radLabelElement6.Margin = new System.Windows.Forms.Padding(0, 0, 10, 0);
|
||||
this.radLabelElement6.Name = "radLabelElement6";
|
||||
this.radLabelElement6.Text = "Y";
|
||||
this.radLabelElement6.TextWrap = true;
|
||||
//
|
||||
// radTextBoxElement9
|
||||
//
|
||||
this.radTextBoxElement9.MinSize = new System.Drawing.Size(80, 0);
|
||||
this.radTextBoxElement9.Name = "radTextBoxElement9";
|
||||
this.radTextBoxElement9.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement9.Text = "60.000";
|
||||
this.radTextBoxElement9.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
//
|
||||
// radRibbonBarButtonGroup6
|
||||
//
|
||||
this.radRibbonBarButtonGroup6.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement7,
|
||||
this.radTextBoxElement10});
|
||||
this.radRibbonBarButtonGroup6.Name = "radRibbonBarButtonGroup6";
|
||||
//
|
||||
// radLabelElement7
|
||||
//
|
||||
this.radLabelElement7.Margin = new System.Windows.Forms.Padding(0, 0, 10, 0);
|
||||
this.radLabelElement7.Name = "radLabelElement7";
|
||||
this.radLabelElement7.Text = "Z";
|
||||
this.radLabelElement7.TextWrap = true;
|
||||
//
|
||||
// radTextBoxElement10
|
||||
//
|
||||
this.radTextBoxElement10.MinSize = new System.Drawing.Size(80, 0);
|
||||
this.radTextBoxElement10.Name = "radTextBoxElement10";
|
||||
this.radTextBoxElement10.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement10.Text = "-50.000";
|
||||
this.radTextBoxElement10.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
//
|
||||
// ribbonTab2
|
||||
//
|
||||
this.ribbonTab2.AutoEllipsis = false;
|
||||
this.ribbonTab2.DisabledTextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
|
||||
this.ribbonTab2.IsSelected = false;
|
||||
this.ribbonTab2.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radRibbonBarGroup2});
|
||||
this.ribbonTab2.Name = "ribbonTab2";
|
||||
this.ribbonTab2.Text = "帮助";
|
||||
this.ribbonTab2.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
|
||||
this.ribbonTab2.UseCompatibleTextRendering = false;
|
||||
this.ribbonTab2.UseMnemonic = false;
|
||||
//
|
||||
// radRibbonBarGroup2
|
||||
//
|
||||
this.radRibbonBarGroup2.AutoSize = false;
|
||||
this.radRibbonBarGroup2.Bounds = new System.Drawing.Rectangle(0, 0, 80, 100);
|
||||
this.radRibbonBarGroup2.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radButtonElement2,
|
||||
this.radButtonElement3});
|
||||
this.radRibbonBarGroup2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.radRibbonBarGroup2.MaxSize = new System.Drawing.Size(0, 0);
|
||||
this.radRibbonBarGroup2.MinSize = new System.Drawing.Size(0, 0);
|
||||
this.radRibbonBarGroup2.Name = "radRibbonBarGroup2";
|
||||
this.radRibbonBarGroup2.Text = "帮助";
|
||||
this.radRibbonBarGroup2.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radButtonElement2
|
||||
//
|
||||
this.radButtonElement2.Image = global::HexcalMC.Properties.Resources.about;
|
||||
this.radButtonElement2.Name = "radButtonElement2";
|
||||
this.radButtonElement2.Text = "关于";
|
||||
this.radButtonElement2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radButtonElement2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.radButtonElement2.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.radButtonElement2.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radButtonElement3
|
||||
//
|
||||
this.radButtonElement3.Image = global::HexcalMC.Properties.Resources.help;
|
||||
this.radButtonElement3.Name = "radButtonElement3";
|
||||
this.radButtonElement3.Text = "帮助";
|
||||
this.radButtonElement3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
|
||||
this.radButtonElement3.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radRibbonBar1
|
||||
//
|
||||
this.radRibbonBar1.CommandTabs.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.ribbonTab1,
|
||||
this.ribbonTab2});
|
||||
//
|
||||
//
|
||||
//
|
||||
this.radRibbonBar1.ExitButton.Text = "Exit";
|
||||
this.radRibbonBar1.ExitButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.radRibbonBar1.Location = new System.Drawing.Point(0, 0);
|
||||
this.radRibbonBar1.Name = "radRibbonBar1";
|
||||
//
|
||||
//
|
||||
//
|
||||
this.radRibbonBar1.OptionsButton.Text = "Options";
|
||||
this.radRibbonBar1.OptionsButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.radRibbonBar1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
|
||||
this.radRibbonBar1.Size = new System.Drawing.Size(1016, 176);
|
||||
this.radRibbonBar1.StartMenuItems.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radMenuItem2});
|
||||
this.radRibbonBar1.TabIndex = 0;
|
||||
this.radRibbonBar1.Text = "直线电机平台运动补偿软件";
|
||||
//
|
||||
// radMenuItem2
|
||||
//
|
||||
this.radMenuItem2.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radMenuButtonItem3,
|
||||
this.radMenuButtonItem4});
|
||||
this.radMenuItem2.Name = "radMenuItem2";
|
||||
this.radMenuItem2.Text = "关于";
|
||||
//
|
||||
// radMenuButtonItem3
|
||||
//
|
||||
this.radMenuButtonItem3.Name = "radMenuButtonItem3";
|
||||
this.radMenuButtonItem3.Text = "帮助";
|
||||
//
|
||||
// radMenuButtonItem4
|
||||
//
|
||||
this.radMenuButtonItem4.Name = "radMenuButtonItem4";
|
||||
this.radMenuButtonItem4.Text = "关于";
|
||||
//
|
||||
// radButtonElement4
|
||||
//
|
||||
this.radButtonElement4.Name = "radButtonElement4";
|
||||
this.radButtonElement4.StretchHorizontally = false;
|
||||
this.radButtonElement4.StretchVertically = false;
|
||||
this.radButtonElement4.Text = "X";
|
||||
this.radButtonElement4.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radRibbonBarButtonGroup1
|
||||
//
|
||||
this.radRibbonBarButtonGroup1.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement1,
|
||||
this.radTextBoxElement6});
|
||||
this.radRibbonBarButtonGroup1.Name = "radRibbonBarButtonGroup1";
|
||||
this.radRibbonBarButtonGroup1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.radRibbonBarButtonGroup1.Text = "radRibbonBarButtonGroup1";
|
||||
this.radRibbonBarButtonGroup1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radLabelElement1
|
||||
//
|
||||
this.radLabelElement1.Name = "radLabelElement1";
|
||||
this.radLabelElement1.Text = "radLabelElement1";
|
||||
this.radLabelElement1.TextWrap = true;
|
||||
this.radLabelElement1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement6
|
||||
//
|
||||
this.radTextBoxElement6.Name = "radTextBoxElement6";
|
||||
this.radTextBoxElement6.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement6.Text = "radTextBoxElement6";
|
||||
this.radTextBoxElement6.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement6.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radRibbonBarButtonGroup2
|
||||
//
|
||||
this.radRibbonBarButtonGroup2.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement3,
|
||||
this.radTextBoxElement7});
|
||||
this.radRibbonBarButtonGroup2.Name = "radRibbonBarButtonGroup2";
|
||||
this.radRibbonBarButtonGroup2.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.radRibbonBarButtonGroup2.Text = "radRibbonBarButtonGroup2";
|
||||
this.radRibbonBarButtonGroup2.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radLabelElement3
|
||||
//
|
||||
this.radLabelElement3.Name = "radLabelElement3";
|
||||
this.radLabelElement3.Text = "radLabelElement3";
|
||||
this.radLabelElement3.TextWrap = true;
|
||||
this.radLabelElement3.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement7
|
||||
//
|
||||
this.radTextBoxElement7.Name = "radTextBoxElement7";
|
||||
this.radTextBoxElement7.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement7.Text = "radTextBoxElement7";
|
||||
this.radTextBoxElement7.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement7.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radRibbonBarButtonGroup3
|
||||
//
|
||||
this.radRibbonBarButtonGroup3.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radLabelElement4});
|
||||
this.radRibbonBarButtonGroup3.Name = "radRibbonBarButtonGroup3";
|
||||
this.radRibbonBarButtonGroup3.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.radRibbonBarButtonGroup3.Text = "radRibbonBarButtonGroup3";
|
||||
this.radRibbonBarButtonGroup3.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radLabelElement4
|
||||
//
|
||||
this.radLabelElement4.Name = "radLabelElement4";
|
||||
this.radLabelElement4.Text = "radLabelElement4";
|
||||
this.radLabelElement4.TextWrap = true;
|
||||
this.radLabelElement4.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radRibbonBarGroup3
|
||||
//
|
||||
this.radRibbonBarGroup3.AutoSize = true;
|
||||
this.radRibbonBarGroup3.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radButtonElement4,
|
||||
this.radRibbonBarButtonGroup1,
|
||||
this.radRibbonBarButtonGroup2,
|
||||
this.radRibbonBarButtonGroup3});
|
||||
this.radRibbonBarGroup3.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.radRibbonBarGroup3.MaxSize = new System.Drawing.Size(0, 0);
|
||||
this.radRibbonBarGroup3.MinSize = new System.Drawing.Size(0, 99);
|
||||
this.radRibbonBarGroup3.Name = "radRibbonBarGroup3";
|
||||
this.radRibbonBarGroup3.Orientation = System.Windows.Forms.Orientation.Vertical;
|
||||
this.radRibbonBarGroup3.ShouldPaint = false;
|
||||
this.radRibbonBarGroup3.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
|
||||
this.radRibbonBarGroup3.StretchHorizontally = false;
|
||||
this.radRibbonBarGroup3.StretchVertically = false;
|
||||
this.radRibbonBarGroup3.Text = "机台位置";
|
||||
this.radRibbonBarGroup3.TextOrientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.radRibbonBarGroup3.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement3
|
||||
//
|
||||
this.radTextBoxElement3.MinSize = new System.Drawing.Size(140, 0);
|
||||
this.radTextBoxElement3.Name = "radTextBoxElement3";
|
||||
this.radTextBoxElement3.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement3.Text = "45.2330";
|
||||
this.radTextBoxElement3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement3.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radButtonElement6
|
||||
//
|
||||
this.radButtonElement6.AutoSize = false;
|
||||
this.radButtonElement6.Bounds = new System.Drawing.Rectangle(0, 0, 140, 14);
|
||||
this.radButtonElement6.Name = "radButtonElement6";
|
||||
this.radButtonElement6.Text = "Y";
|
||||
this.radButtonElement6.TextAlignment = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.radButtonElement6.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement4
|
||||
//
|
||||
this.radTextBoxElement4.MinSize = new System.Drawing.Size(140, 0);
|
||||
this.radTextBoxElement4.Name = "radTextBoxElement4";
|
||||
this.radTextBoxElement4.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement4.Text = "50.000";
|
||||
this.radTextBoxElement4.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement4.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radButtonElement7
|
||||
//
|
||||
this.radButtonElement7.Name = "radButtonElement7";
|
||||
this.radButtonElement7.Text = "Z";
|
||||
this.radButtonElement7.TextAlignment = System.Drawing.ContentAlignment.BottomLeft;
|
||||
this.radButtonElement7.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radTextBoxElement5
|
||||
//
|
||||
this.radTextBoxElement5.MinSize = new System.Drawing.Size(140, 0);
|
||||
this.radTextBoxElement5.Name = "radTextBoxElement5";
|
||||
this.radTextBoxElement5.Padding = new System.Windows.Forms.Padding(0, 2, 0, 1);
|
||||
this.radTextBoxElement5.Text = "-60.000";
|
||||
this.radTextBoxElement5.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
|
||||
this.radTextBoxElement5.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radStatusStrip1
|
||||
//
|
||||
this.radStatusStrip1.Location = new System.Drawing.Point(0, 737);
|
||||
this.radStatusStrip1.Name = "radStatusStrip1";
|
||||
this.radStatusStrip1.Size = new System.Drawing.Size(1016, 26);
|
||||
this.radStatusStrip1.TabIndex = 1;
|
||||
//
|
||||
// radMenuButtonItem1
|
||||
//
|
||||
this.radMenuButtonItem1.Name = "radMenuButtonItem1";
|
||||
this.radMenuButtonItem1.Text = "帮助";
|
||||
this.radMenuButtonItem1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// radMenuItem1
|
||||
//
|
||||
this.radMenuItem1.Items.AddRange(new Telerik.WinControls.RadItem[] {
|
||||
this.radMenuButtonItem1});
|
||||
this.radMenuItem1.Name = "radMenuItem1";
|
||||
this.radMenuItem1.Text = "帮助";
|
||||
this.radMenuItem1.UseCompatibleTextRendering = false;
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 176);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.splitContainer1.Panel1.Controls.Add(this.groupBox7);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.groupBox5);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.groupBox4);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.groupBox3);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1016, 561);
|
||||
this.splitContainer1.SplitterDistance = 746;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.formsPlot1);
|
||||
this.groupBox4.Location = new System.Drawing.Point(13, 296);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(730, 259);
|
||||
this.groupBox4.TabIndex = 2;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "轨迹点";
|
||||
//
|
||||
// formsPlot1
|
||||
//
|
||||
this.formsPlot1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.formsPlot1.Location = new System.Drawing.Point(3, 18);
|
||||
this.formsPlot1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.formsPlot1.Name = "formsPlot1";
|
||||
this.formsPlot1.Size = new System.Drawing.Size(724, 238);
|
||||
this.formsPlot1.TabIndex = 0;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.txtPort);
|
||||
this.groupBox2.Controls.Add(this.txtIP);
|
||||
this.groupBox2.Controls.Add(this.btn_ACSStop);
|
||||
this.groupBox2.Controls.Add(this.btn_ACSStart);
|
||||
this.groupBox2.Controls.Add(this.label2);
|
||||
this.groupBox2.Controls.Add(this.label1);
|
||||
this.groupBox2.Location = new System.Drawing.Point(17, 21);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(209, 114);
|
||||
this.groupBox2.TabIndex = 1;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "ACS通讯设置";
|
||||
//
|
||||
// txtPort
|
||||
//
|
||||
this.txtPort.Location = new System.Drawing.Point(88, 52);
|
||||
this.txtPort.Name = "txtPort";
|
||||
this.txtPort.Size = new System.Drawing.Size(91, 21);
|
||||
this.txtPort.TabIndex = 21;
|
||||
this.txtPort.Text = "701";
|
||||
//
|
||||
// txtIP
|
||||
//
|
||||
this.txtIP.Location = new System.Drawing.Point(88, 29);
|
||||
this.txtIP.Name = "txtIP";
|
||||
this.txtIP.Size = new System.Drawing.Size(91, 21);
|
||||
this.txtIP.TabIndex = 22;
|
||||
this.txtIP.Text = "10.0.0.100";
|
||||
//
|
||||
// btn_ACSStop
|
||||
//
|
||||
this.btn_ACSStop.Location = new System.Drawing.Point(98, 77);
|
||||
this.btn_ACSStop.Name = "btn_ACSStop";
|
||||
this.btn_ACSStop.Size = new System.Drawing.Size(81, 23);
|
||||
this.btn_ACSStop.TabIndex = 20;
|
||||
this.btn_ACSStop.Text = "断开";
|
||||
this.btn_ACSStop.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_ACSStart
|
||||
//
|
||||
this.btn_ACSStart.Location = new System.Drawing.Point(6, 77);
|
||||
this.btn_ACSStart.Name = "btn_ACSStart";
|
||||
this.btn_ACSStart.Size = new System.Drawing.Size(81, 23);
|
||||
this.btn_ACSStart.TabIndex = 19;
|
||||
this.btn_ACSStart.Text = "连接";
|
||||
this.btn_ACSStart.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 56);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(33, 13);
|
||||
this.label2.TabIndex = 17;
|
||||
this.label2.Text = "端口";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 33);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(71, 13);
|
||||
this.label1.TabIndex = 18;
|
||||
this.label1.Text = "目标设备 IP";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.textBox2);
|
||||
this.groupBox1.Controls.Add(this.textBox3);
|
||||
this.groupBox1.Controls.Add(this.btn_HexcalStop);
|
||||
this.groupBox1.Controls.Add(this.btn_HexcalStart);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Location = new System.Drawing.Point(14, 19);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(211, 114);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Hexcal通讯设置";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(100, 52);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(91, 21);
|
||||
this.textBox2.TabIndex = 27;
|
||||
this.textBox2.Text = "1234";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(100, 29);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(91, 21);
|
||||
this.textBox3.TabIndex = 28;
|
||||
this.textBox3.Text = "10.0.0.1";
|
||||
//
|
||||
// btn_HexcalStop
|
||||
//
|
||||
this.btn_HexcalStop.Location = new System.Drawing.Point(110, 77);
|
||||
this.btn_HexcalStop.Name = "btn_HexcalStop";
|
||||
this.btn_HexcalStop.Size = new System.Drawing.Size(81, 23);
|
||||
this.btn_HexcalStop.TabIndex = 26;
|
||||
this.btn_HexcalStop.Text = "关闭";
|
||||
this.btn_HexcalStop.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_HexcalStart
|
||||
//
|
||||
this.btn_HexcalStart.Location = new System.Drawing.Point(18, 77);
|
||||
this.btn_HexcalStart.Name = "btn_HexcalStart";
|
||||
this.btn_HexcalStart.Size = new System.Drawing.Size(81, 23);
|
||||
this.btn_HexcalStart.TabIndex = 25;
|
||||
this.btn_HexcalStart.Text = "启动";
|
||||
this.btn_HexcalStart.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 56);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(33, 13);
|
||||
this.label3.TabIndex = 23;
|
||||
this.label3.Text = "端口";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 33);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(71, 13);
|
||||
this.label4.TabIndex = 24;
|
||||
this.label4.Text = "目标设备 IP";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.AutoSize = true;
|
||||
this.groupBox3.Controls.Add(this.textBox_Msg);
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox3.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(266, 561);
|
||||
this.groupBox3.TabIndex = 0;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "交互信息";
|
||||
//
|
||||
// textBox_Msg
|
||||
//
|
||||
this.textBox_Msg.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox_Msg.Location = new System.Drawing.Point(3, 18);
|
||||
this.textBox_Msg.Multiline = true;
|
||||
this.textBox_Msg.Name = "textBox_Msg";
|
||||
this.textBox_Msg.Size = new System.Drawing.Size(260, 540);
|
||||
this.textBox_Msg.TabIndex = 0;
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.grpMst);
|
||||
this.groupBox5.Controls.Add(this.groupBox6);
|
||||
this.groupBox5.Controls.Add(this.groupBox2);
|
||||
this.groupBox5.Location = new System.Drawing.Point(13, 136);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(731, 154);
|
||||
this.groupBox5.TabIndex = 3;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "运动平台";
|
||||
//
|
||||
// btnDisable
|
||||
//
|
||||
this.btnDisable.Location = new System.Drawing.Point(6, 52);
|
||||
this.btnDisable.Name = "btnDisable";
|
||||
this.btnDisable.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnDisable.TabIndex = 8;
|
||||
this.btnDisable.Text = "单轴取消";
|
||||
this.btnDisable.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnEnable
|
||||
//
|
||||
this.btnEnable.Location = new System.Drawing.Point(6, 23);
|
||||
this.btnEnable.Name = "btnEnable";
|
||||
this.btnEnable.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnEnable.TabIndex = 9;
|
||||
this.btnEnable.Text = "单轴使能";
|
||||
this.btnEnable.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.btnEnable);
|
||||
this.groupBox6.Controls.Add(this.btnDisable);
|
||||
this.groupBox6.Location = new System.Drawing.Point(233, 31);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(93, 104);
|
||||
this.groupBox6.TabIndex = 10;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "轴使能";
|
||||
//
|
||||
// grpMst
|
||||
//
|
||||
this.grpMst.Controls.Add(this.label16);
|
||||
this.grpMst.Controls.Add(this.label15);
|
||||
this.grpMst.Controls.Add(this.label14);
|
||||
this.grpMst.Controls.Add(this.lblEnable);
|
||||
this.grpMst.Controls.Add(this.lblInPos);
|
||||
this.grpMst.Controls.Add(this.lblAcc);
|
||||
this.grpMst.Controls.Add(this.lblMoving);
|
||||
this.grpMst.Controls.Add(this.label13);
|
||||
this.grpMst.Location = new System.Drawing.Point(332, 28);
|
||||
this.grpMst.Name = "grpMst";
|
||||
this.grpMst.Size = new System.Drawing.Size(154, 107);
|
||||
this.grpMst.TabIndex = 11;
|
||||
this.grpMst.TabStop = false;
|
||||
this.grpMst.Text = "电机状态 (MST)";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Location = new System.Drawing.Point(9, 82);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(33, 13);
|
||||
this.label16.TabIndex = 5;
|
||||
this.label16.Text = "使能";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(9, 61);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(33, 13);
|
||||
this.label15.TabIndex = 5;
|
||||
this.label15.Text = "就位";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(9, 40);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(46, 13);
|
||||
this.label14.TabIndex = 5;
|
||||
this.label14.Text = "加速中";
|
||||
//
|
||||
// lblEnable
|
||||
//
|
||||
this.lblEnable.Image = ((System.Drawing.Image)(resources.GetObject("lblEnable.Image")));
|
||||
this.lblEnable.Location = new System.Drawing.Point(120, 80);
|
||||
this.lblEnable.Name = "lblEnable";
|
||||
this.lblEnable.Size = new System.Drawing.Size(19, 17);
|
||||
this.lblEnable.TabIndex = 5;
|
||||
//
|
||||
// lblInPos
|
||||
//
|
||||
this.lblInPos.Image = ((System.Drawing.Image)(resources.GetObject("lblInPos.Image")));
|
||||
this.lblInPos.Location = new System.Drawing.Point(120, 59);
|
||||
this.lblInPos.Name = "lblInPos";
|
||||
this.lblInPos.Size = new System.Drawing.Size(19, 17);
|
||||
this.lblInPos.TabIndex = 5;
|
||||
//
|
||||
// lblAcc
|
||||
//
|
||||
this.lblAcc.Image = ((System.Drawing.Image)(resources.GetObject("lblAcc.Image")));
|
||||
this.lblAcc.Location = new System.Drawing.Point(120, 38);
|
||||
this.lblAcc.Name = "lblAcc";
|
||||
this.lblAcc.Size = new System.Drawing.Size(19, 17);
|
||||
this.lblAcc.TabIndex = 5;
|
||||
//
|
||||
// lblMoving
|
||||
//
|
||||
this.lblMoving.Image = ((System.Drawing.Image)(resources.GetObject("lblMoving.Image")));
|
||||
this.lblMoving.Location = new System.Drawing.Point(120, 17);
|
||||
this.lblMoving.Name = "lblMoving";
|
||||
this.lblMoving.Size = new System.Drawing.Size(19, 17);
|
||||
this.lblMoving.TabIndex = 5;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(9, 19);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(46, 13);
|
||||
this.label13.TabIndex = 5;
|
||||
this.label13.Text = "运动中";
|
||||
//
|
||||
// groupBox7
|
||||
//
|
||||
this.groupBox7.Controls.Add(this.groupBox1);
|
||||
this.groupBox7.Location = new System.Drawing.Point(16, 18);
|
||||
this.groupBox7.Name = "groupBox7";
|
||||
this.groupBox7.Size = new System.Drawing.Size(702, 100);
|
||||
this.groupBox7.TabIndex = 4;
|
||||
this.groupBox7.TabStop = false;
|
||||
this.groupBox7.Text = "Hexcal接口";
|
||||
//
|
||||
// MainFrom
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1016, 763);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.radStatusStrip1);
|
||||
this.Controls.Add(this.radRibbonBar1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = null;
|
||||
this.Name = "MainFrom";
|
||||
//
|
||||
//
|
||||
//
|
||||
this.RootElement.ApplyShapeToControl = true;
|
||||
this.Text = "直线电机平台运动补偿软件";
|
||||
this.Load += new System.EventHandler(this.MainFrom_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.radRibbonBar1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).EndInit();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.grpMst.ResumeLayout(false);
|
||||
this.grpMst.PerformLayout();
|
||||
this.groupBox7.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement2;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement2;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement5;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement1;
|
||||
private Telerik.WinControls.UI.RibbonTab ribbonTab1;
|
||||
private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup1;
|
||||
private Telerik.WinControls.UI.RadButtonElement rtb_motion;
|
||||
private Telerik.WinControls.UI.RibbonTab ribbonTab2;
|
||||
private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup2;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement2;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement3;
|
||||
private Telerik.WinControls.UI.RadRibbonBar radRibbonBar1;
|
||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem2;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement4;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup1;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement1;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement6;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup2;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement3;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement7;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup3;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement4;
|
||||
private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup3;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement3;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement6;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement4;
|
||||
private Telerik.WinControls.UI.RadButtonElement radButtonElement7;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement5;
|
||||
private Telerik.WinControls.UI.RadStatusStrip radStatusStrip1;
|
||||
private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup4;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup4;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement5;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement8;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup5;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement6;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement9;
|
||||
private Telerik.WinControls.UI.RadRibbonBarButtonGroup radRibbonBarButtonGroup6;
|
||||
private Telerik.WinControls.UI.RadLabelElement radLabelElement7;
|
||||
private Telerik.WinControls.UI.RadTextBoxElement radTextBoxElement10;
|
||||
private Telerik.WinControls.UI.RadMenuButtonItem radMenuButtonItem1;
|
||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem1;
|
||||
private Telerik.WinControls.UI.RadMenuButtonItem radMenuButtonItem3;
|
||||
private Telerik.WinControls.UI.RadMenuButtonItem radMenuButtonItem4;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox txtPort;
|
||||
private System.Windows.Forms.TextBox txtIP;
|
||||
private System.Windows.Forms.Button btn_ACSStop;
|
||||
private System.Windows.Forms.Button btn_ACSStart;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBox_Msg;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Button btn_HexcalStop;
|
||||
private System.Windows.Forms.Button btn_HexcalStart;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private ScottPlot.FormsPlot formsPlot1;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.Button btnEnable;
|
||||
private System.Windows.Forms.Button btnDisable;
|
||||
private System.Windows.Forms.GroupBox groupBox7;
|
||||
private System.Windows.Forms.GroupBox grpMst;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Label lblEnable;
|
||||
private System.Windows.Forms.Label lblInPos;
|
||||
private System.Windows.Forms.Label lblAcc;
|
||||
private System.Windows.Forms.Label lblMoving;
|
||||
private System.Windows.Forms.Label label13;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using ACS.SPiiPlusNET;
|
||||
using HexcalMC.Hexcal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using HexcalMC.Base;
|
||||
|
||||
namespace HexcalMC
|
||||
{
|
||||
public partial class MainFrom : Telerik.WinControls.UI.RadRibbonForm
|
||||
{
|
||||
private TcpIpServer m_tcpIpServer; //创建tcpserver,用于接收hexcal传来的指令,并解析传递平台
|
||||
private Api _ACS;
|
||||
private bool m_bConnected = false;
|
||||
|
||||
public MainFrom()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void rtb_motion_Click(object sender, EventArgs e)
|
||||
{
|
||||
Motion motion = new Motion();
|
||||
motion.Show();
|
||||
}
|
||||
|
||||
private void MainFrom_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle; // 设置窗体边框样式为固定大小
|
||||
this.MaximizeBox = false; // 禁用窗体的最大化按钮
|
||||
|
||||
double[] dataX = new double[] { 1, 2, 3, 4, 5 };
|
||||
double[] dataY = new double[] { 1, 4, 9, 16, 25 };
|
||||
|
||||
formsPlot1.Plot.AddScatter(dataX, dataY);
|
||||
formsPlot1.Refresh();
|
||||
}
|
||||
|
||||
|
||||
//新建一个函数,用于启动tcpserver
|
||||
private void startServer()
|
||||
{
|
||||
//启动服务器,并获取L2数据,解析
|
||||
m_tcpIpServer = new TcpIpServer("100.0.0.1", Convert.ToString(1234));
|
||||
//启动监听
|
||||
if (m_tcpIpServer.StartListen())
|
||||
{
|
||||
//绑定两个事件 OnRaisedStatus 和OnRaisedMessage
|
||||
m_tcpIpServer.OnRaisedMessage += ReceiveMessage;
|
||||
m_tcpIpServer.OnRaisedStatus += ReceiveStatus;
|
||||
DebugDfn.AddLogText("L2服务端启动成功 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("L2系统服务端连接失败,请检查网络连接,重新打开软件", "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReceiveMessage(string ClientIP, string Msg) //接收的内容
|
||||
{
|
||||
//打印ClientIP 和 Msg
|
||||
DebugDfn.AddLogText("接收到" + ClientIP + ": " + Msg);
|
||||
|
||||
//根据源地址的不同,执行不同处理
|
||||
//如果 ClientIP 来自L2系统的话,执行解析
|
||||
switch (ClientIP)
|
||||
{
|
||||
case "172.19.153.80": //L2系统
|
||||
|
||||
//解析数据,更新L2Receive
|
||||
// L2Receive = L2Protocol.ParsePacket(Msg);
|
||||
|
||||
//todo 更新页面
|
||||
|
||||
break;
|
||||
case "127.0.0.1": //模拟长宽系统
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ReceiveStatus(TcpIpServer.EnumTcpIpServer iType, string Msg)
|
||||
{
|
||||
//记录到日志
|
||||
DebugDfn.AddLogText(iType + " : " + Msg);
|
||||
}
|
||||
|
||||
|
||||
private void SendMsgToHexcal(string Msg)
|
||||
{
|
||||
//发送数据
|
||||
m_tcpIpServer.SendMessageToAllClients(Msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="lblEnable.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk02BQAAAAAAADYEAAAoAAAAEAAAABAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAt7e3/7i4
|
||||
uP+8vLz/vb29/7+/v//BwcH/wsLC/8PDw//FxcX/xsbG/8fHx//IyMj/ycnJ/8rKyv/Ly8v/zMzM/83N
|
||||
zf/Ozs7/z8/P/9DQ0P/R0dH/0tLS/9PT0//U1NT/1dXV/9bW1v/X19f/2NjY/9nZ2f/a2tr/29vb/9zc
|
||||
3P/d3d3/3t7e/9/f3//g4OD/4eHh/+Tk5P/39/f/+Pj4//n5+f//////AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP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
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/ygo
|
||||
KCgmFwICAAIXJigoKCgoKCgXAgcPDw8PBwIXKCgoKCgPBw8PDw8PDw8PAgcoKCgfBxcXFw8PDw8PDw8C
|
||||
FygoBxcXFxcXFxcPDw8PDwImHw8XFxcXFxcXFw8PDw8HFwcXFxcXFxcXFxcXDw8PDwIHHx8fHx8fFxcX
|
||||
FxcPDw8ABx8fHx8fHx8XFxcXDw8PAg8fHx8fHx8fHxcXFw8PDwIfFx8lJSUfHx8XFxcXDwcXKA8lJSUl
|
||||
Hx8fFxcXFw8CJigfFyUlJR8fHxcXFxcHFygoKBcXJR8fHx8XFxcHDygoKCgoHw8XHx8fFw8HHygoKCgo
|
||||
KCgoHw8HBwcfKCgoKCg=
|
||||
</value>
|
||||
</data>
|
||||
<data name="lblInPos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk02BQAAAAAAADYEAAAoAAAAEAAAABAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAt7e3/7i4
|
||||
uP+8vLz/vb29/7+/v//BwcH/wsLC/8PDw//FxcX/xsbG/8fHx//IyMj/ycnJ/8rKyv/Ly8v/zMzM/83N
|
||||
zf/Ozs7/z8/P/9DQ0P/R0dH/0tLS/9PT0//U1NT/1dXV/9bW1v/X19f/2NjY/9nZ2f/a2tr/29vb/9zc
|
||||
3P/d3d3/3t7e/9/f3//g4OD/4eHh/+Tk5P/39/f/+Pj4//n5+f//////AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/A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P8AAAD/AAAA/wAAAP8AAAD/AAAA/ygo
|
||||
KCgmFwICAAIXJigoKCgoKCgXAgcPDw8PBwIXKCgoKCgPBw8PDw8PDw8PAgcoKCgfBxcXFw8PDw8PDw8C
|
||||
FygoBxcXFxcXFxcPDw8PDwImHw8XFxcXFxcXFw8PDw8HFwcXFxcXFxcXFxcXDw8PDwIHHx8fHx8fFxcX
|
||||
FxcPDw8ABx8fHx8fHx8XFxcXDw8PAg8fHx8fHx8fHxcXFw8PDwIfFx8lJSUfHx8XFxcXDwcXKA8lJSUl
|
||||
Hx8fFxcXFw8CJigfFyUlJR8fHxcXFxcHFygoKBcXJR8fHx8XFxcHDygoKCgoHw8XHx8fFw8HHygoKCgo
|
||||
KCgoHw8HBwcfKCgoKCg=
|
||||
</value>
|
||||
</data>
|
||||
<data name="lblAcc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk02BQAAAAAAADYEAAAoAAAAEAAAABAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAt7e3/7i4
|
||||
uP+8vLz/vb29/7+/v//BwcH/wsLC/8PDw//FxcX/xsbG/8fHx//IyMj/ycnJ/8rKyv/Ly8v/zMzM/83N
|
||||
zf/Ozs7/z8/P/9DQ0P/R0dH/0tLS/9PT0//U1NT/1dXV/9bW1v/X19f/2NjY/9nZ2f/a2tr/29vb/9zc
|
||||
3P/d3d3/3t7e/9/f3//g4OD/4eHh/+Tk5P/39/f/+Pj4//n5+f//////AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AA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KCgXAgcPDw8PBwIXKCgoKCgPBw8PDw8PDw8PAgcoKCgfBxcXFw8PDw8PDw8C
|
||||
FygoBxcXFxcXFxcPDw8PDwImHw8XFxcXFxcXFw8PDw8HFwcXFxcXFxcXFxcXDw8PDwIHHx8fHx8fFxcX
|
||||
FxcPDw8ABx8fHx8fHx8XFxcXDw8PAg8fHx8fHx8fHxcXFw8PDwIfFx8lJSUfHx8XFxcXDwcXKA8lJSUl
|
||||
Hx8fFxcXFw8CJigfFyUlJR8fHxcXFxcHFygoKBcXJR8fHx8XFxcHDygoKCgoHw8XHx8fFw8HHygoKCgo
|
||||
KCgoHw8HBwcfKCgoKCg=
|
||||
</value>
|
||||
</data>
|
||||
<data name="lblMoving.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk02BQAAAAAAADYEAAAoAAAAEAAAABAAAAABAAgAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAt7e3/7i4
|
||||
uP+8vLz/vb29/7+/v//BwcH/wsLC/8PDw//FxcX/xsbG/8fHx//IyMj/ycnJ/8rKyv/Ly8v/zMzM/83N
|
||||
zf/Ozs7/z8/P/9DQ0P/R0dH/0tLS/9PT0//U1NT/1dXV/9bW1v/X19f/2NjY/9nZ2f/a2tr/29vb/9zc
|
||||
3P/d3d3/3t7e/9/f3//g4OD/4eHh/+Tk5P/39/f/+Pj4//n5+f//////AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
|
||||
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
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PDw8C
|
||||
FygoBxcXFxcXFxcPDw8PDwImHw8XFxcXFxcXFw8PDw8HFwcXFxcXFxcXFxcXDw8PDwIHHx8fHx8fFxcX
|
||||
FxcPDw8ABx8fHx8fHx8XFxcXDw8PAg8fHx8fHx8fHxcXFw8PDwIfFx8lJSUfHx8XFxcXDwcXKA8lJSUl
|
||||
Hx8fFxcXFw8CJigfFyUlJR8fHxcXFxcHFygoKBcXJR8fHx8XFxcHDygoKCgoHw8XHx8fFw8HHygoKCgo
|
||||
KCgoHw8HBwcfKCgoKCg=
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AACt5tMNidzBKYTbviZ92LoOedi5AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAzO/jAbfp2C6J3MGShNu+h3zYujF52LkGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAACS3sYvgtq+anrYuquB2r22ftm7z4DZvKuL3MJWzvDkBM7w5AEAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AcAAAAHAAAABwAAAAcAAAAHAAAABwAAAAcAAYAHAAHgBwAB+AcAAfgHAAH/BwAB/8fAA
|
||||
f//wAH///AB///+Af///wH///+B////4f/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
+2305
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,971 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
using System.IO;
|
||||
using ACS.SPiiPlusNET; // ACS .NET Library
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace HexcalMC
|
||||
{
|
||||
public partial class Motion : Form
|
||||
{
|
||||
private Api _ACS;
|
||||
|
||||
private const int MAX_AXIS_COUNT = 32;
|
||||
private const int MAX_BUFFER_CNT = 64;
|
||||
|
||||
private const int MAX_UI_LIMIT_CNT = 8;
|
||||
private const int MAX_UI_IO_CNT = 8;
|
||||
|
||||
private int m_nTotalAxis = 0;
|
||||
private int m_nTotalBuffer = 0;
|
||||
private Axis[] m_arrAxisList = null;
|
||||
|
||||
private bool m_bConnected = false;
|
||||
|
||||
// For update values
|
||||
private MotorStates m_nMotorState; //运动状态
|
||||
private ProgramStates m_nProgramState; //程序状态
|
||||
private object m_objReadVar = null;
|
||||
private Array m_arrReadVector = null;
|
||||
private double m_lfRPos, m_lfFPos, m_lfPE, m_lfFVEL; //参考位置,反馈位置 位置误差 反馈速度 double类型
|
||||
private int m_nValues, m_nOutputState;
|
||||
|
||||
|
||||
private Label[] m_lblLeftLimit; //左限位
|
||||
private Label[] m_lblRightLimit; //右限位
|
||||
private Label[] m_lblInput;
|
||||
private Label[] m_lblOutput;
|
||||
private Button[] m_btnOutput;
|
||||
|
||||
public Motion()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_ACS = new Api(); //初始化 ACS运动控制类
|
||||
|
||||
// Register Event 注册时间
|
||||
_ACS.PHYSICALMOTIONEND += _ACS_PHYSICALMOTIONEND;
|
||||
_ACS.PROGRAMEND += _ACS_PROGRAMEND;
|
||||
}
|
||||
|
||||
#region Initialize
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
rdoTCP.Checked = true;
|
||||
btnOpen.Enabled = true;
|
||||
btnClose.Enabled = false;
|
||||
|
||||
m_lblLeftLimit = new Label[MAX_UI_LIMIT_CNT]; //左限位
|
||||
m_lblLeftLimit[0] = lblLL0;
|
||||
m_lblLeftLimit[1] = lblLL1;
|
||||
m_lblLeftLimit[2] = lblLL2;
|
||||
m_lblLeftLimit[3] = lblLL3;
|
||||
m_lblLeftLimit[4] = lblLL4;
|
||||
m_lblLeftLimit[5] = lblLL5;
|
||||
m_lblLeftLimit[6] = lblLL6;
|
||||
m_lblLeftLimit[7] = lblLL7;
|
||||
|
||||
m_lblRightLimit = new Label[MAX_UI_LIMIT_CNT]; //有限位
|
||||
m_lblRightLimit[0] = lblRL0;
|
||||
m_lblRightLimit[1] = lblRL1;
|
||||
m_lblRightLimit[2] = lblRL2;
|
||||
m_lblRightLimit[3] = lblRL3;
|
||||
m_lblRightLimit[4] = lblRL4;
|
||||
m_lblRightLimit[5] = lblRL5;
|
||||
m_lblRightLimit[6] = lblRL6;
|
||||
m_lblRightLimit[7] = lblRL7;
|
||||
|
||||
m_lblInput = new Label[MAX_UI_IO_CNT];
|
||||
m_lblInput[0] = lblIN0;
|
||||
m_lblInput[1] = lblIN1;
|
||||
m_lblInput[2] = lblIN2;
|
||||
m_lblInput[3] = lblIN3;
|
||||
m_lblInput[4] = lblIN4;
|
||||
m_lblInput[5] = lblIN5;
|
||||
m_lblInput[6] = lblIN6;
|
||||
m_lblInput[7] = lblIN7;
|
||||
|
||||
m_lblOutput = new Label[MAX_UI_IO_CNT];
|
||||
m_lblOutput[0] = lblOUT0;
|
||||
m_lblOutput[1] = lblOUT1;
|
||||
m_lblOutput[2] = lblOUT2;
|
||||
m_lblOutput[3] = lblOUT3;
|
||||
m_lblOutput[4] = lblOUT4;
|
||||
m_lblOutput[5] = lblOUT5;
|
||||
m_lblOutput[6] = lblOUT6;
|
||||
m_lblOutput[7] = lblOUT7;
|
||||
|
||||
m_btnOutput = new Button[MAX_UI_IO_CNT];
|
||||
m_btnOutput[0] = btnSW0;
|
||||
m_btnOutput[1] = btnSW1;
|
||||
m_btnOutput[2] = btnSW2;
|
||||
m_btnOutput[3] = btnSW3;
|
||||
m_btnOutput[4] = btnSW4;
|
||||
m_btnOutput[5] = btnSW5;
|
||||
m_btnOutput[6] = btnSW6;
|
||||
m_btnOutput[7] = btnSW7;
|
||||
|
||||
//m_nFault = new int[MAX_AXIS_COUNT];
|
||||
//Array.Clear(m_nFault, 0, MAX_AXIS_COUNT);
|
||||
m_nOutputState = 0;
|
||||
|
||||
// Clear connection list from SPiiPlus UserMode-Driver (UMD)
|
||||
//TernminateUMD_Connection();
|
||||
|
||||
#region 副屏显示功能
|
||||
// Screen[] screens = Screen.AllScreens;
|
||||
// Screen secondaryScreen = screens.Length > 1 ? screens[1] : screens[0]; // 如果有多个屏幕,选择第二个屏幕作为副屏幕
|
||||
//
|
||||
// // 创建一个新的窗体实例
|
||||
// Form secondaryForm = new Form();
|
||||
//
|
||||
// // 设置窗体的位置和大小以适应副屏幕
|
||||
// secondaryForm.StartPosition = FormStartPosition.Manual;
|
||||
// secondaryForm.Location = secondaryScreen.Bounds.Location;
|
||||
// secondaryForm.Size = secondaryScreen.Bounds.Size;
|
||||
//
|
||||
// // 可选:设置副屏窗体的标题、样式等其他属性
|
||||
// secondaryForm.Text = "副屏窗体";
|
||||
// // ... 其他属性设置
|
||||
//
|
||||
// // 显示副屏窗体
|
||||
// secondaryForm.Show();
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
private void rdoTCP_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtIP.Enabled = true;
|
||||
txtPort.Enabled = true;
|
||||
}
|
||||
|
||||
private void rdoSimu_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtIP.Enabled = false;
|
||||
txtPort.Enabled = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Communication - Open / Close
|
||||
|
||||
private void btnOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
string strTemp;
|
||||
int i;
|
||||
//double lfTemp = 0.0f;
|
||||
|
||||
try
|
||||
{
|
||||
if (rdoTCP.Checked)
|
||||
{
|
||||
// TCP/IP (Ethernet)
|
||||
_ACS.OpenCommEthernetTCP(
|
||||
txtIP.Text, // IP Address (Default : 10.0.0.100)
|
||||
Convert.ToInt32(txtPort.Text.Trim())); // TCP/IP Port nubmer (default : 701)
|
||||
}
|
||||
else if (rdoSimu.Checked)
|
||||
{
|
||||
// Simmulation mode
|
||||
_ACS.OpenCommSimulator();
|
||||
}
|
||||
|
||||
m_bConnected = true;
|
||||
|
||||
// Get Total number of axes
|
||||
// Using Transaction function : return string text from controller, we need to convert to integer value
|
||||
strTemp = _ACS.Transaction("?SYSINFO(13)");
|
||||
m_nTotalAxis = Convert.ToInt32(strTemp.Trim());
|
||||
|
||||
// Using Sysinfo function
|
||||
//_ACS.GetSysInfo(_ACS.ACSC_SYS_NAXES_KEY, out lfTemp);
|
||||
|
||||
// When we are using multi axes command (ex) ToPointM, HaltM, ...), we need to allocate the array size more 1.
|
||||
// Because of the last delimeter (-1)
|
||||
m_arrAxisList = new Axis[m_nTotalAxis + 1];
|
||||
for (i = 0; i < m_nTotalAxis; i++)
|
||||
{
|
||||
cboAxisNo.Items.Add(i.ToString());
|
||||
m_arrAxisList[i] = (Axis)i;
|
||||
}
|
||||
|
||||
// Insert '-1' at the last
|
||||
m_arrAxisList[m_nTotalAxis] = Axis.ACSC_NONE;
|
||||
cboAxisNo.SelectedIndex = 0;
|
||||
|
||||
// Update current motion paramter to UI.
|
||||
UpdateProfile();
|
||||
|
||||
strTemp = _ACS.Transaction("?SYSINFO(10)");
|
||||
m_nTotalBuffer = Convert.ToInt32(strTemp.Trim());
|
||||
for (i = 0; i < m_nTotalBuffer; i++)
|
||||
{
|
||||
cboBufferNo.Items.Add(i.ToString());
|
||||
}
|
||||
|
||||
cboBufferNo.SelectedIndex = 0;
|
||||
|
||||
btnOpen.Enabled = false;
|
||||
btnClose.Enabled = true;
|
||||
|
||||
// Set updating timer
|
||||
tmrMonitor.Interval = 50;
|
||||
tmrMonitor.Start();
|
||||
}
|
||||
|
||||
catch (COMException comex)
|
||||
{
|
||||
MessageBox.Show("Connection fail", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine("Connection fail" + comex.Message);
|
||||
|
||||
m_bConnected = false;
|
||||
return;
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (m_bConnected) _ACS.CloseComm();
|
||||
|
||||
tmrMonitor.Stop();
|
||||
|
||||
btnOpen.Enabled = true;
|
||||
btnClose.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Terminate connections from SPiiPlus User Mode Driver
|
||||
/// 终止来自 SPiiPlus 用户模式驱动程序的连接
|
||||
/// - Maximum connections up to 10 in UMD
|
||||
/// </summary>
|
||||
private void TernminateUMD_Connection()
|
||||
{
|
||||
try
|
||||
{
|
||||
string terminateExceptionConnName = "ACS.Framework.exe";
|
||||
|
||||
ACSC_CONNECTION_DESC[] connectionList = _ACS.GetConnectionsList();
|
||||
for (int index = 0; index < connectionList.Length; index++)
|
||||
{
|
||||
if (terminateExceptionConnName.CompareTo((string)connectionList[index].Application) != 0)
|
||||
_ACS.TerminateConnection(connectionList[index]);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update UI data from Controller
|
||||
|
||||
/// <summary>
|
||||
/// Update Motion Profile from Controller
|
||||
/// </summary>
|
||||
private void UpdateProfile()
|
||||
{
|
||||
if (m_bConnected)
|
||||
{
|
||||
txtVel.Text = _ACS.GetVelocity((Axis)cboAxisNo.SelectedIndex).ToString();
|
||||
txtAcc.Text = _ACS.GetAcceleration((Axis)cboAxisNo.SelectedIndex).ToString();
|
||||
txtDec.Text = _ACS.GetDeceleration((Axis)cboAxisNo.SelectedIndex).ToString();
|
||||
txtKdec.Text = _ACS.GetKillDeceleration((Axis)cboAxisNo.SelectedIndex).ToString();
|
||||
txtJerk.Text = _ACS.GetJerk((Axis)cboAxisNo.SelectedIndex).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void cboAxisNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateProfile();
|
||||
}
|
||||
|
||||
private void tmrMonitor_Tick(object sender, EventArgs e)
|
||||
{
|
||||
// Get selected axis number
|
||||
int iAxisNo = cboAxisNo.SelectedIndex;
|
||||
// Get selected buffer number
|
||||
int iBufferNo = cboBufferNo.SelectedIndex;
|
||||
|
||||
if (m_bConnected)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Instruction 1. Using library functions - acsc_GetFPosition, acsc_GetRPosition, ....
|
||||
// Instruction 2. Read ACS variable - Already defined almost things (FPOS, RPOS, ...)
|
||||
// Motion parameters and state is array (Max length is total number of axes)
|
||||
//
|
||||
// * Library function can read only 1 axis information, so if you want to read several axes, you have to call the function many times.
|
||||
// (This may cause communication delay.)
|
||||
// Recommand (if you want to read many axes) : read/write variable using ReadVariable, ReadVariableScalar, ReadVariableVector, ReadVariableMatrix
|
||||
|
||||
//
|
||||
// Get Motor State
|
||||
// ACSPL+ Variable : MST (integer)
|
||||
m_nMotorState = _ACS.GetMotorState((Axis)iAxisNo);
|
||||
|
||||
// Returned value is integer, you need to use bitmaks
|
||||
if ((m_nMotorState & MotorStates.ACSC_MST_MOVE) != 0) lblMoving.Image = Properties.Resources.On;
|
||||
else lblMoving.Image = Properties.Resources.Off; // 运动中
|
||||
if ((m_nMotorState & MotorStates.ACSC_MST_INPOS) != 0) lblInPos.Image = Properties.Resources.On;
|
||||
else lblInPos.Image = Properties.Resources.Off; // 就位
|
||||
if ((m_nMotorState & MotorStates.ACSC_MST_ACC) != 0) lblAcc.Image = Properties.Resources.On;
|
||||
else lblAcc.Image = Properties.Resources.Off; // 加速
|
||||
if ((m_nMotorState & MotorStates.ACSC_MST_ENABLE) != 0) lblEnable.Image = Properties.Resources.On;
|
||||
else lblEnable.Image = Properties.Resources.Off; // 使能
|
||||
|
||||
// Reference position
|
||||
// ACSPL+ Variable : RPOS (real)
|
||||
m_lfRPos = _ACS.GetRPosition((Axis)iAxisNo); // 参考位置
|
||||
|
||||
// Feedback position (Encoder value)
|
||||
// ACSPL+ Variable : FPO (real)
|
||||
m_lfFPos = _ACS.GetFPosition((Axis)iAxisNo); //反馈位置
|
||||
|
||||
// PE (Position Error)
|
||||
// There is no function in library. We need to use ReadVariable function
|
||||
m_lfPE = (double)_ACS.ReadVariable("PE", ProgramBuffer.ACSC_NONE, iAxisNo, iAxisNo); //位置误差
|
||||
|
||||
// Feedback Velocity
|
||||
m_lfFVEL = (double)_ACS.ReadVariable("FVEL", ProgramBuffer.ACSC_NONE, iAxisNo, iAxisNo); //实际速度
|
||||
|
||||
txtRPOS.Text = String.Format("{0:0.0000}", m_lfRPos);
|
||||
txtFPOS.Text = String.Format("{0:0.0000}", m_lfFPos);
|
||||
txtPE.Text = String.Format("{0:0.0000}", m_lfPE);
|
||||
txtFVEL.Text = String.Format("{0:0.0000}", m_lfFVEL);
|
||||
|
||||
// Program State 运动状态
|
||||
// State : Compiled, Running, Suspended, Autoroutine is running (ON syntax)
|
||||
//
|
||||
// ACSPL+ Variable : PST (integer)
|
||||
m_nProgramState = _ACS.GetProgramState((ProgramBuffer)iBufferNo);
|
||||
if ((m_nProgramState & ProgramStates.ACSC_PST_RUN) != 0)
|
||||
{
|
||||
lblPRG_Status_LED.Image = Properties.Resources.On;
|
||||
lblPRG_Status.Text = "Running";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblPRG_Status_LED.Image = Properties.Resources.Off;
|
||||
lblPRG_Status.Text = "Stop";
|
||||
}
|
||||
|
||||
// Read left/right hardware limits state
|
||||
// ACSPL+ Variable : FAULT (integer)
|
||||
m_objReadVar =
|
||||
_ACS.ReadVariableAsVector("FAULT", ProgramBuffer.ACSC_NONE, 0, m_nTotalAxis - 1, -1, -1);
|
||||
if (m_objReadVar != null)
|
||||
{
|
||||
m_arrReadVector = m_objReadVar as Array;
|
||||
if (m_arrReadVector != null)
|
||||
{
|
||||
for (int i = 0; i < m_nTotalAxis; i++)
|
||||
{
|
||||
UpdateLimitState(i, (int)m_arrReadVector.GetValue(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Read digital input/output (Port means all of bits)
|
||||
// If you want to read only 1 bit (not an integer), use "GetInput" function
|
||||
m_nValues = _ACS.GetInputPort(0); // _ACS.ReadVariableAsVector("IN", -1, 0, 0, -1, -1);
|
||||
UpdateIOState(m_nValues, true);
|
||||
|
||||
m_nOutputState = _ACS.GetOutputPort(0); // _ACS.ReadVariableAsVector("OUT", -1, 0, 0, -1, -1);
|
||||
UpdateIOState(m_nOutputState, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update limit state
|
||||
private void UpdateLimitState(int axisNo, int fault)
|
||||
{
|
||||
if (axisNo < MAX_UI_LIMIT_CNT)
|
||||
{
|
||||
if ((fault & (int)SafetyControlMasks.ACSC_SAFETY_LL) != 0)
|
||||
m_lblLeftLimit[axisNo].Image = Properties.Resources.Error;
|
||||
else m_lblLeftLimit[axisNo].Image = Properties.Resources.Off;
|
||||
if ((fault & (int)SafetyControlMasks.ACSC_SAFETY_RL) != 0)
|
||||
m_lblRightLimit[axisNo].Image = Properties.Resources.Error;
|
||||
else m_lblRightLimit[axisNo].Image = Properties.Resources.Off;
|
||||
}
|
||||
}
|
||||
|
||||
// Update general I/O stae
|
||||
private void UpdateIOState(int value, bool isInput)
|
||||
{
|
||||
int bitUpCnt = 0x01;
|
||||
|
||||
for (int i = 0; i < MAX_UI_IO_CNT; i++)
|
||||
{
|
||||
if (isInput)
|
||||
{
|
||||
// Input state
|
||||
if ((value & bitUpCnt) != 0) m_lblInput[i].Image = Properties.Resources.On;
|
||||
else m_lblInput[i].Image = Properties.Resources.Off;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Output state
|
||||
if ((value & bitUpCnt) != 0)
|
||||
{
|
||||
m_btnOutput[i].Text = "OFF";
|
||||
m_lblOutput[i].Image = Properties.Resources.On;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_btnOutput[i].Text = "ON";
|
||||
m_lblOutput[i].Image = Properties.Resources.Off;
|
||||
}
|
||||
}
|
||||
|
||||
// 0x01 => 0x02 => 0x04 => 0x08 ... increase bit number
|
||||
bitUpCnt = (0x01) << (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Motor Enable / Disable
|
||||
|
||||
private void btnEnable_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Enable selected axis
|
||||
_ACS.Enable((Axis)cboAxisNo.SelectedIndex);
|
||||
|
||||
// If you want to enable several axes,
|
||||
//
|
||||
// Ex) Eanble three axes (0, 1, 6)
|
||||
//
|
||||
// int[] AxisList = new int[] { 0, 1, 6, -1 }; !!!! Important !! Must insert '-1' at the last
|
||||
// _ACS.EnableM(AxisList);
|
||||
}
|
||||
|
||||
private void btnDisable_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Disable selected axis
|
||||
_ACS.Disable((Axis)cboAxisNo.SelectedIndex);
|
||||
// Disable multi axes : DisableM(int[] axisList)
|
||||
}
|
||||
|
||||
private void btnDisableAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Disable all of axes
|
||||
_ACS.DisableAll();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnSetZero_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Change current poisition as you want
|
||||
// SetFPosition(Axis number, new position)
|
||||
_ACS.SetFPosition((Axis)cboAxisNo.SelectedIndex, 0);
|
||||
}
|
||||
|
||||
#region Move to absolute position
|
||||
|
||||
private void btnPTP_Click(object sender, EventArgs e)
|
||||
{
|
||||
double lfTargetPos = 0.0f;
|
||||
try
|
||||
{
|
||||
if (txtPTP_Pos.Text.Length > 0)
|
||||
{
|
||||
lfTargetPos = Convert.ToDouble(txtPTP_Pos.Text);
|
||||
_ACS.ToPoint(
|
||||
0, // '0' - Absolute position
|
||||
(Axis)cboAxisNo.SelectedIndex, // Axis number
|
||||
lfTargetPos // Target position
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Move to relative position (from current position)
|
||||
|
||||
private void btnPTP_R_Neg_Click(object sender, EventArgs e)
|
||||
{
|
||||
double lfTargetPos = 0.0f;
|
||||
try
|
||||
{
|
||||
if (txtPTP_Pos.Text.Length > 0)
|
||||
{
|
||||
lfTargetPos = Convert.ToDouble(txtPTP_Pos.Text);
|
||||
if (lfTargetPos > 0)
|
||||
lfTargetPos = lfTargetPos * (-1); // Target position (from current position, step move)
|
||||
|
||||
_ACS.ToPoint(
|
||||
MotionFlags.ACSC_AMF_RELATIVE, // Flat
|
||||
(Axis)cboAxisNo.SelectedIndex, // Axis number
|
||||
lfTargetPos // Move distance
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnPTP_R_Pos_Click(object sender, EventArgs e)
|
||||
{
|
||||
double lfTargetPos = 0.0f;
|
||||
try
|
||||
{
|
||||
if (txtPTP_Pos.Text.Length > 0)
|
||||
{
|
||||
lfTargetPos = Convert.ToDouble(txtPTP_Pos.Text);
|
||||
if (lfTargetPos < 0) lfTargetPos = lfTargetPos * (-1);
|
||||
|
||||
_ACS.ToPoint(MotionFlags.ACSC_AMF_RELATIVE, (Axis)cboAxisNo.SelectedIndex, lfTargetPos);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Stop motion using deceleration (halt command)
|
||||
|
||||
private void btnHalt_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_ACS.Halt((Axis)cboAxisNo.SelectedIndex); //使用 halt 命令减速
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnHallAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// There is no halt all command, so you need to user HaltM function
|
||||
//
|
||||
// ex) You want to stop 0, 2, 5 axis
|
||||
// int[] m_arrAxisList = new int[] { 0, 2, 5, -1 };
|
||||
//
|
||||
if (m_arrAxisList != null) _ACS.HaltM(m_arrAxisList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region JOG Command
|
||||
|
||||
// Move negative direction
|
||||
private void btnJogNeg_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
double lfVelocity = 0.0f;
|
||||
|
||||
try
|
||||
{
|
||||
if (chkUseVel.Checked)
|
||||
{
|
||||
lfVelocity = Convert.ToDouble(txtJogVel.Text.Trim());
|
||||
if (lfVelocity > 0) lfVelocity = lfVelocity * (-1); // Negative direction : Using - (minus) velocity
|
||||
|
||||
_ACS.Jog(
|
||||
MotionFlags.ACSC_AMF_VELOCITY, // Velocity flag 速度标志
|
||||
(Axis)cboAxisNo.SelectedIndex, // Axis number
|
||||
lfVelocity // Velocity
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ACS.Jog(0, (Axis)cboAxisNo.SelectedIndex, (double)GlobalDirection.ACSC_NEGATIVE_DIRECTION);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
// 정방향 이동 동작
|
||||
private void btnJogPos_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
double lfVelocity = 0.0f;
|
||||
|
||||
try
|
||||
{
|
||||
if (chkUseVel.Checked)
|
||||
{
|
||||
lfVelocity = Convert.ToDouble(txtJogVel.Text.Trim());
|
||||
if (lfVelocity < 0) lfVelocity = lfVelocity * (-1);
|
||||
|
||||
_ACS.Jog(MotionFlags.ACSC_AMF_VELOCITY, (Axis)cboAxisNo.SelectedIndex, lfVelocity);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ACS.Jog(0, (Axis)cboAxisNo.SelectedIndex, (double)GlobalDirection.ACSC_POSITIVE_DIRECTION);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
// Stop JOG motion
|
||||
private void btnJog_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
_ACS.Halt((Axis)cboAxisNo.SelectedIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Run/Stop Buffer Program
|
||||
|
||||
private void btnRunBuffer_Click(object sender, EventArgs e)
|
||||
{
|
||||
string temp;
|
||||
|
||||
try
|
||||
{
|
||||
if (txtLabelName.Text.Length > 0)
|
||||
{
|
||||
temp = txtLabelName.Text.ToUpper();
|
||||
// Allow _ (Under bar) or A ~ Z characters
|
||||
if (temp[0] != 0x5F && (temp[0] < 0x41 || temp[0] > 0x5A))
|
||||
{
|
||||
MessageBox.Show("Wrong 'Label' name inputed.", "ERROR", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
// Run buffer program from label position
|
||||
_ACS.RunBuffer((ProgramBuffer)cboBufferNo.SelectedIndex, txtLabelName.Text.Trim());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Run buffer program from first line
|
||||
_ACS.RunBuffer((ProgramBuffer)cboBufferNo.SelectedIndex, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnStopBuffer_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Stop program
|
||||
_ACS.StopBuffer((ProgramBuffer)cboBufferNo.SelectedIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Change motion profile
|
||||
|
||||
private void TextBoxes_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double lfTemp = 0.0f;
|
||||
TextBox textBox = sender as TextBox;
|
||||
if (textBox != null)
|
||||
{
|
||||
// Allow numbers (0 ~ 9), . (DOT), Backspace
|
||||
if ((e.KeyChar >= 0x30 && e.KeyChar <= 0x39) || e.KeyChar == 0x2E || e.KeyChar == 0x08 ||
|
||||
e.KeyChar == (char)Keys.Return || e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
if ((e.KeyChar == 0x2E) && (textBox.Text.Contains(Convert.ToString(0x2E))))
|
||||
e.KeyChar = (char)0x00;
|
||||
if (e.KeyChar == (char)Keys.Return || e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
lfTemp = Convert.ToDouble(textBox.Text.Trim());
|
||||
switch (textBox.TabIndex)
|
||||
{
|
||||
// Immediately change value (On the fly) : SetVelocityImm()
|
||||
// Affect next motion : SetVelocity()
|
||||
|
||||
case 0:
|
||||
_ACS.SetVelocityImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 1:
|
||||
_ACS.SetAccelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 2:
|
||||
_ACS.SetDecelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 3:
|
||||
_ACS.SetKillDecelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 4:
|
||||
_ACS.SetJerkImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
}
|
||||
|
||||
textBox.SelectAll();
|
||||
}
|
||||
}
|
||||
else e.KeyChar = (char)0x00;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("TextBoxes_KeyPress() Error\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void TextBoxes_Enter(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
TextBox textBox = sender as TextBox;
|
||||
if (textBox != null) textBox.SelectAll();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("TextBoxes_Enter() Error\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void TextBoxes_Leave(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double lfTemp = 0.0f;
|
||||
|
||||
TextBox textBox = sender as TextBox;
|
||||
if (textBox == null) return;
|
||||
|
||||
lfTemp = Convert.ToDouble(textBox.Text.Trim());
|
||||
switch (textBox.TabIndex)
|
||||
{
|
||||
case 0:
|
||||
_ACS.SetVelocityImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 1:
|
||||
_ACS.SetAccelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 2:
|
||||
_ACS.SetDecelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 3:
|
||||
_ACS.SetKillDecelerationImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
case 4:
|
||||
_ACS.SetJerkImm((Axis)cboAxisNo.SelectedIndex, lfTemp);
|
||||
break;
|
||||
}
|
||||
|
||||
textBox.SelectAll();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("TextBoxes_Leave() Error\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region On and Off General Output
|
||||
|
||||
private void btnSW_Click(object sender, EventArgs e)
|
||||
{
|
||||
int nBitNo = 0x01;
|
||||
|
||||
try
|
||||
{
|
||||
Button btn = sender as Button;
|
||||
if (btn == null) return;
|
||||
|
||||
nBitNo = btn.TabIndex;
|
||||
nBitNo = (0x01) << nBitNo; //左移几位
|
||||
|
||||
if ((m_nOutputState & nBitNo) != 0)
|
||||
{
|
||||
// Set only 1 bit
|
||||
_ACS.SetOutput(
|
||||
0, // Port number
|
||||
btn.TabIndex, // Bit number
|
||||
0 // 0 = OFF, 1 = ON
|
||||
);
|
||||
|
||||
// If your I/O device is EtherCAT type, you cannot use this function
|
||||
// You can use WriteVariable function and Command function
|
||||
//
|
||||
// Ex) If EtherCAT mapped variable is 'EC_DOUT'
|
||||
// Want to ON bit '3'
|
||||
// _ACS.Command("EC_DOUT.3=1");
|
||||
}
|
||||
else
|
||||
{
|
||||
_ACS.SetOutput(0, btn.TabIndex, 1);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("btnSW_Click() Error\n" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event
|
||||
|
||||
private void btnEventMotionEnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
//_ACS.PHYSICALMOTIONEND +=_ACS_PHYSICALMOTIONEND;
|
||||
_ACS.EnableEvent(Interrupts.ACSC_INTR_PHYSICAL_MOTION_END);
|
||||
lstLog.Items.Add("PHYSICAL_MOTION_END event enabled");
|
||||
}
|
||||
|
||||
void _ACS_PHYSICALMOTIONEND(AxisMasks axis)
|
||||
{
|
||||
int bit = 0x01;
|
||||
int axisNo = 0;
|
||||
// Param value is bit number
|
||||
// Bit Number = Axis Number
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
if ((int)axis == bit)
|
||||
{
|
||||
axisNo = i;
|
||||
break;
|
||||
}
|
||||
|
||||
bit = bit << 1;
|
||||
}
|
||||
|
||||
// Add log to ListBox
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lstLog.Items.Add(String.Format(" - Axis {0}, Stoppped", axisNo));
|
||||
lstLog.SelectedIndex = lstLog.Items.Count - 1;
|
||||
});
|
||||
}
|
||||
|
||||
private void btnEventProgramEnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
//_ACS.PROGRAMEND += _ACS_PROGRAMEND;
|
||||
_ACS.EnableEvent(Interrupts.ACSC_INTR_PROGRAM_END);
|
||||
lstLog.Items.Add("PROGRAM_END event enabled");
|
||||
}
|
||||
|
||||
void _ACS_PROGRAMEND(BufferMasks buffer)
|
||||
{
|
||||
int bit = 0x01;
|
||||
int bufferNo = 0;
|
||||
// Param value is bit number
|
||||
// Bit Number = Axis Number
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
if ((int)buffer == bit)
|
||||
{
|
||||
bufferNo = i;
|
||||
break;
|
||||
}
|
||||
|
||||
bit = bit << 1;
|
||||
}
|
||||
|
||||
// Add log to ListBox
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lstLog.Items.Add(String.Format(" - Buffer {0}, Stoppped", bufferNo));
|
||||
lstLog.SelectedIndex = lstLog.Items.Count - 1;
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Communication Termial - Using Transaction function
|
||||
|
||||
private void txtCommand_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Enter)
|
||||
btnSend.PerformClick();
|
||||
}
|
||||
|
||||
private void btnSend_Click(object sender, EventArgs e)
|
||||
{
|
||||
string temp = string.Empty;
|
||||
if (m_bConnected)
|
||||
{
|
||||
try
|
||||
{
|
||||
AppendTextToTextBox("> " + txtCommand.Text.Trim());
|
||||
temp = _ACS.Transaction(txtCommand.Text.Trim());
|
||||
}
|
||||
catch (ACS.SPiiPlusNET.ACSException ex)
|
||||
{
|
||||
temp = String.Format("?{0}", ex.ErrorCode);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
AppendTextToTextBox(temp);
|
||||
AppendTextToTextBox(":");
|
||||
}
|
||||
}
|
||||
|
||||
txtCommand.Focus();
|
||||
txtCommand.SelectAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void AppendTextToTextBox(string text)
|
||||
{
|
||||
rtxtTerminal.AppendText(text);
|
||||
rtxtTerminal.AppendText(Environment.NewLine);
|
||||
rtxtTerminal.ScrollToCaret();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
//开发说明
|
||||
// V0.1 2023/04/10
|
||||
//---------------------------------------
|
||||
//1、初版构建
|
||||
//2、调用流程: 开启TCP服务端、连接到平台轴启用—》hexcal软件连接,开启校准通讯流程—》移动至到位后反馈—》hexcal逻辑处理—》hexcal校准完成关系—》软件关闭
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace HexcalMC
|
||||
{
|
||||
static class Program
|
||||
|
||||
Generated
+19
-23
@@ -1,30 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18408
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace HexcalMC.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace HexcalMC.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 919 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 512 B |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ScottPlot" version="4.1.68" targetFramework="net462" />
|
||||
<package id="ScottPlot.WinForms" version="4.1.68" targetFramework="net462" />
|
||||
<package id="System.Drawing.Common" version="4.7.2" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user