| 1234567891011121314151617181920212223242526272829303132333435363738394041 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.ComponentModel;
 
- using System.Data;
 
- using System.Drawing;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows.Forms;
 
- using YG.Device;
 
- namespace IMCS.UControl
 
- {
 
-     public partial class UserControl9 : UserControl
 
-     {
 
-         enum itemoperation
 
-         {
 
-             取=1,
 
-             取执行中, 取完成, 放, 放执行中, 放完成, 移动, 移动完成, 机器人故障
 
-         }
 
-         public UserControl9()
 
-         {
 
-             InitializeComponent();
 
-             this.Load += UserControl9_Load;
 
-         }
 
-         private void UserControl9_Load(object sender, EventArgs e)
 
-         {
 
-             weiLi.DeviceInit();
 
-         }
 
-         DeviceS7 weiLi = new DeviceS7(HslCommunication.Profinet.Siemens.SiemensPLCS.S1500, "192.168.0.10");
 
-         private void button1_Click(object sender, EventArgs e)
 
-         {
 
-             weiLi.DeviceSend("DB200.44", textBox1.Text.ObjectToShort());
 
-             weiLi.DeviceSend("DB200.46", textBox1.Text.ObjectToShort());
 
-             weiLi.DeviceSend("DB200.48", textBox1.Text.ObjectToShort());
 
-             weiLi.DeviceSend("DB200.50", ((int)itemoperation.移动).ObjectToShort());
 
-         }
 
-     }
 
- }
 
 
  |