资源简介
SyntecRemoteAPI_v1_1.0.12 该版本适合于控制器软件版本 10.116.0x
看好控制器软件版本再下载
![](http://www.nz998.com/pic/31504.jpg)
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Diagnostics;
using System.Threading;
using Syntec.Remote;
namespace SyntecRemoteClient
{
public partial class ExampleForm : Form
{
List m_CNC;
SyntecRemoteCNC API1 = null;
System.Windows.Forms.Timer m_tmr300ms;
public ExampleForm()
{
InitializeComponent();
RemoveUnusedProcess();
m_tmr300ms = new System.Windows.Forms.Timer();
m_tmr300ms.Interval = 300;
m_tmr300ms.Tick += new EventHandler( m_tmr300ms_Tick );
m_tmr300ms.Enabled = true;
buttonTimerOn.Enabled = false;
buttonTimerOff.Enabled = true;
m_CNC = new List();
// Add your CNCs‘ host-ip here
SyntecRemoteCNC cnc = new SyntecRemoteCNC( “10.10.80.163“ );
m_CNC.Add( cnc );
//cnc = new SyntecRemoteCNC( “10.10.1.207“ );
//m_CNC.Add( cnc );
//cnc = new SyntecRemoteCNC( “10.10.1.96“ );
//m_CNC.Add( cnc );
foreach( SyntecRemoteCNC tmp in m_CNC ) {
listBox1.Items.Add( tmp.Host );
}
}
private void m_tmr300ms_Tick( object sender EventArgs e )
{
if( m_CNC.Count >= 1 ) {
SyntecRemoteCNC cnc = m_CNC[ 0 ];
short DecPoint = 0;
string[] AxisName = null Unit = null;
float[] Mach = null Abs = null Rel = null Dist = null;
short result = cnc.READ_position( out AxisName out DecPoint out Unit out Mach out Abs out Rel out Dist );
if( result == 0 ) {
if( AxisName.Length > 0 ) {
label1.Text = AxisName[ 0 ] + “ : “ + Mach[ 0 ].ToString();
}
if( AxisName.Length > 1 ) {
label2.Text = AxisName[ 1 ] + “ : “ + Mach[ 1 ].ToString();
}
if( AxisName.Length > 2 ) {
label3.Text = AxisName[ 2 ] + “ : “ + Mach[ 2 ].ToString();
}
if( AxisName.Length > 3 ) {
label4.Text = AxisName[ 3 ] + “ : “ + Mach[ 3 ].ToString();
}
}
else {
label1.Text = “Err : “ + result.ToString();
label2.Text = “Err : “ + result.ToString();
label3.Text = “Err : “ + result.ToString();
label4.Text = “Err : “ + result.ToString();
}
}
}
private void btnTimerOn_Click( object sender EventArgs e )
{
m_tmr300ms.Enabled = true;
buttonTimerOn.Enabled = false;
buttonTimerOff.Enabled = true;
}
private void btnTimerOff_Click( object sender EventArgs e )
{
m_tmr300ms.Enabled = false;
buttonTimerOn.Enabled = true;
buttonTimerOff.Enabled = false;
}
~ExampleForm()
{
deinit();
RemoveUnusedProcess();
}
private void RemoveUnusedProcess()
{
Process[] process = Process.GetProcessesByName( “SyntecRemoteServer“ );
foreach( Process p in process ) {
p.Kill();
}
}
private
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-27 15:33 Example\
目录 0 2018-11-27 15:33 Example\bin_v1\
文件 753664 2017-07-24 21:07 Example\bin_v1\MMICommon32.dll
文件 241664 2017-07-24 21:07 Example\bin_v1\Syntec.OpenCNC.dll
文件 5621 2017-07-24 21:07 Example\Release.txt
目录 0 2018-11-27 15:33 Example\SyntecRemoteExample\
文件 39314 2017-07-24 21:08 Example\SyntecRemoteExample\ExampleForm.cs
文件 40727 2017-07-24 21:08 Example\SyntecRemoteExample\ExampleForm.Designer.cs
文件 5814 2017-07-24 21:08 Example\SyntecRemoteExample\ExampleForm.resx
文件 494 2017-07-24 21:08 Example\SyntecRemoteExample\Program.cs
目录 0 2018-11-27 15:33 Example\SyntecRemoteExample\Properties\
文件 1284 2017-07-24 21:08 Example\SyntecRemoteExample\Properties\AssemblyInfo.cs
文件 2871 2017-07-24 21:08 Example\SyntecRemoteExample\Properties\Resources.Designer.cs
文件 5612 2017-07-24 21:08 Example\SyntecRemoteExample\Properties\Resources.resx
文件 1103 2017-07-24 21:08 Example\SyntecRemoteExample\Properties\Settings.Designer.cs
文件 249 2017-07-24 21:08 Example\SyntecRemoteExample\Properties\Settings.settings
文件 4385 2017-07-24 21:08 Example\SyntecRemoteExample\SyntecRemoteExample.csproj
文件 878 2017-07-24 21:08 Example\SyntecRemoteExample\SyntecRemoteExample.sln
文件 776192 2017-07-24 21:08 Example\穝м夹非癸API砏.doc
相关资源
- 新代plc资料
- 新代数控车床程式手册V7.16
- 绝地求生雷达最新代码.sh
- 最新老虎淘宝客4.39+最新代理系统2.
- 新代系统 模拟器 6ta
- 新代数控PLC编程软件 LadEditor_2.29.3.z
- 新代API.rar
- FANUC和三菱新代三轴UG后处理自动换刀
- SyntecRemoteAPI_v3_1.0.12.zip
- 2018年统计用区划代码和城乡划分代码
- ALPHACAM后处理新代处理器24刀库
- 基于高斯过程分类和回归的最新代码
- 新代的API规则
- ALPHACAM后处理新代处理器
- 新代系统装机调试
- SyntecRemoteAPI_v2_1.0.12.zip
- 新代10MA系统操机教程
- vrep_remoteAPI
- UG三菱四轴后处理,新代AC轴后处理。
评论
共有 条评论