资源简介
SyntecRemoteAPI_v2_1.0.12 该版本适合于控制器软件版本 10.116.16x
看好控制器软件版本再下载
代码片段和文件信息
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 2017-02-22 16:42 Example\
目录 0 2017-02-22 16:42 Example\bin_v2\
文件 1015808 2016-09-20 13:49 Example\bin_v2\MMICommon32.dll
文件 90112 2016-09-20 13:49 Example\bin_v2\OCAPI.dll
文件 466944 2016-09-20 13:49 Example\bin_v2\OCUser.dll
文件 335872 2016-09-20 13:49 Example\bin_v2\Syntec.OpenCNC.dll
文件 36864 2017-02-22 16:40 Example\bin_v2\Syntec.RemoteCNC.dll
文件 53248 2017-02-22 16:40 Example\bin_v2\Syntec.RemoteObj.dll
文件 5621 2017-02-22 14:39 Example\Release.txt
目录 0 2017-02-22 16:42 Example\SyntecRemoteExample\
文件 39314 2016-09-20 13:49 Example\SyntecRemoteExample\ExampleForm.cs
文件 40727 2016-09-20 13:49 Example\SyntecRemoteExample\ExampleForm.Designer.cs
文件 5814 2016-09-20 13:49 Example\SyntecRemoteExample\ExampleForm.resx
文件 494 2016-09-20 13:49 Example\SyntecRemoteExample\Program.cs
目录 0 2017-02-22 16:42 Example\SyntecRemoteExample\Properties\
文件 1284 2016-09-20 13:49 Example\SyntecRemoteExample\Properties\AssemblyInfo.cs
文件 2871 2016-09-20 13:49 Example\SyntecRemoteExample\Properties\Resources.Designer.cs
文件 5612 2016-09-20 13:49 Example\SyntecRemoteExample\Properties\Resources.resx
文件 1103 2016-09-20 13:49 Example\SyntecRemoteExample\Properties\Settings.Designer.cs
文件 249 2016-09-20 13:49 Example\SyntecRemoteExample\Properties\Settings.settings
文件 4385 2017-02-22 16:39 Example\SyntecRemoteExample\SyntecRemoteExample_KrnlAPI_116.16.csproj
文件 908 2016-09-20 13:49 Example\SyntecRemoteExample\SyntecRemoteExample_KrnlAPI_116.16.sln
文件 776192 2017-02-22 14:33 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_v1_1.0.12.zip
- 新代10MA系统操机教程
- vrep_remoteAPI
- UG三菱四轴后处理,新代AC轴后处理。
评论
共有 条评论