Example #1
0
        public void OpenEthernetCommunication()
        {
            CL3IF_ETHERNET_SETTING ethernetSetting = new CL3IF_ETHERNET_SETTING();

            ethernetSetting.ipAddress    = new byte[4];
            ethernetSetting.ipAddress[0] = 192;
            ethernetSetting.ipAddress[1] = 168;
            ethernetSetting.ipAddress[2] = 0;
            ethernetSetting.ipAddress[3] = 1;
            ethernetSetting.portNo       = 24685;
            ethernetSetting.reserved     = new byte[2];
            ethernetSetting.reserved[0]  = 0x00;
            ethernetSetting.reserved[1]  = 0x00;

            int returnCode = KeyenceHigh.CL3IF_OpenEthernetCommunication(CurrentDeviceId, ref ethernetSetting, 10000);

            SetDeviceStatement(returnCode, DeviceStatus.Ethernet);
            _deviceData[CurrentDeviceId].EthernetSetting = ethernetSetting;
        }
Example #2
0
 public DeviceData()
 {
     EthernetSetting = new CL3IF_ETHERNET_SETTING();
 }
Example #3
0
 internal static extern int CL3IF_OpenEthernetCommunication(int deviceId, ref CL3IF_ETHERNET_SETTING ethernetSetting, uint timeout); //通讯连接