资源简介
CNC_PMC_FOCAS1_DEMO
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
//using Focas1;
namespace GetAlmMsg
{
public partial class Form1 : Form
{
ushort cncHandle = 0;
private short preState = 0;
private Focas1.ODBST cncStatus = new Focas1.ODBST();
private Focas1.ODBAHIS alarmHis = new Focas1.ODBAHIS();
private String paramFromFile = ““;
public Form1()
{
InitializeComponent();
}
private void btnConnect_Click(object sender EventArgs e)
{
try
{
Focas1.focas_ret ret = (Focas1.focas_ret)Focas1.cnc_allclibhndl3(“192.168.18.8“ 8193 5 out cncHandle); //眔library handle
//Focas1.focas_ret ret = (Focas1.focas_ret)Focas1.cnc_allclibhndl3(textBox_IP.Text 8193 5 out cncHandle); //眔library handle
//textBox_IP
if (ret != Focas1.focas_ret.EW_OK)
{
this.rdpara.Enabled = false;
this.btnFileDown.Enabled = false;
this.btnUpload.Enabled = false;
throw new Exception(“Can‘t connect to CNC controller!“);
}
else
{
this.rdpara.Enabled = true;
this.btnFileDown.Enabled = true;
this.btnUpload.Enabled = true;
btnConnect.Enabled = false;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message “Message“);
}
}
private void butGetAlmNo_Click(object sender EventArgs e)
{
DoAlmRecord(false);
//short almNo = 0;
//string almDate = ““;
//string almMsg = ““;
//almMsg = GetAlarmMessage(ref almNo ref almDate);
//textBox1.Text = almDate;
//textBox2.Text = almNo.ToString();
//textBox3.Text = almMsg;
//DoAlmRecord(true);
}
private void Form1_FormClosed(object sender FormClosedEventArgs e)
{
if ( cncHandle != 0 )
Focas1.cnc_freelibhndl(cncHandle);
}
private void AlmTimer1_Tick(object sender EventArgs e)
{
Focas1.cnc_statinfo(cncHandle cncStatus);
//Record the start time of Alarm
if ( cncStatus.alarm==1 && preState==0 )
{
DoAlmRecord(false);
short almNo = 0;
string almStartTime = ““;
string almMsg = ““;
almMsg = GetAlarmMessage(ref almNo ref almStartTime);
textBox1.Text = almStartTime;
textBox2.Text = almNo.ToString();
textBox3.Text = almMsg;
DoAlmRecord(true);
}
//Record the end time of Alarm
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\
目录 0 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\
文件 7431 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Form1.Designer.cs
文件 8281 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Form1.cs
文件 5889 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Form1.resx
文件 3233 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\GetAlmMsg.csproj
文件 886 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\GetAlmMsg.sln
文件 452 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Program.cs
目录 0 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\
文件 1160 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\AssemblyInfo.cs
文件 2831 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\Resources.Designer.cs
文件 5496 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\Resources.resx
文件 1062 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\Settings.Designer.cs
文件 242 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\Properties\Settings.settings
文件 467493 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Backup\fwlib32.cs
文件 4410 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\CNC_PMC_FOCAS1_DEMO.csproj
文件 1330 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\CNC_PMC_FOCAS1_DEMO.sln
文件 3 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\CNC读取操作_法拉克.txt
文件 13768 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Form1.Designer.cs
文件 17812 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Form1.cs
文件 6081 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Form1.resx
文件 18432 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\GetAlmMsg.suo
文件 452 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Program.cs
目录 0 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\
文件 1160 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\AssemblyInfo.cs
文件 2795 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\Resources.Designer.cs
文件 5496 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\Resources.resx
文件 1083 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\Settings.Designer.cs
文件 242 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\Properties\Settings.settings
文件 40804 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\UpgradeLog.htm
目录 0 2020-08-14 15:24 CNC_PMC_FOCAS1_DEMO-master\bin\
............此处省略44个文件信息
- 上一篇:松下PLC 通讯(modbus)
- 下一篇:kepserver 连接 PLC代码
相关资源
- C# 资源管理器(支持右键菜单)
- C# 钢琴 (PianoDemo)
- C# 套打Demo
-
C# 开发BHO(Browser Helper ob
ject)插件 - c# + sqlite demo(增删改查)
- Autofac(IoC依赖注入容器)Demo
- C# 调用BarTender打印条码DEMO
- 汉王人脸通SDK v3.0 c#接收互联网数据
- C#调用Lucene方法-实现快速搜索
- Unity2D小游戏——炸弹人类似qq堂的小
- .Net C# 小程序卡券demo
- 神思ss628型USB二代身份证DEMOC#
- wpf 搜集整理demo源码(都是c#写的,惊
- C#H264格式视频解码
- winform c# mschart demo 范例
- C#调用SAP RFC 案例demo
- 12306抢票工具--抢票C# Demo
- WinForm C#Demo 会员与消费系统 进销存系
- Protogen编译protobuf demotools.rar
- C# RedisDemo Redisdll 全部DLL
- c#微信支付、微信企业支付到个人,微
- Asp.net Core 生成 PDF demo
- C#微信企业付款到银行卡demo真实可用
- WinFormSvgApplyDemo
- C# 数据库连接MySQL、SQL server并读取数
- Asp.Net版微信公众号开发源码Demo_90.r
- Asp.NetCoreDemo.rar
- C#接讯飞实现语音听写功能demowindows
- WPF经典DEMO.rar
- 佳能相机c#控制照相demo
评论
共有 条评论