//泓格 I7565DNM 取得模組狀態 public uint I7565DNM_MODULE_STATUS(DeviceNetCtrl dnm) { byte cPort = Byte.Parse(portNo); //covert port id to byte byte DesMACID = dnm.getDesMACID(); //get macid return(I7565DNM_DotNET.I7565DNM.I7565DNM_GetSlaveStatus(cPort, DesMACID)); }
//泓格 I7565DNM 設備新增模組與設定連線 public uint I7565DNM_ADD_DEVICE(DeviceNetCtrl dnm) { byte ActiveBoardNo = Byte.Parse(portNo);//covert port id to byte uint result; byte DesMACID = dnm.getDesMACID(); byte Contype = dnm.ConType(); //Add Device Into Firmware result = I7565DNM_DotNET.I7565DNM.I7565DNM_AddDevice(ActiveBoardNo, DesMACID, 1000);//Explicit_EPR : [輸入] 預期的包速率。 (通常是 2500)。//參考範例給的值是1000 if (result != 0) { return(result); } // Configure Connection result = I7565DNM_DotNET.I7565DNM.I7565DNM_AddIOConnection(ActiveBoardNo, DesMACID, Contype, dnm.DeviceInputLen, dnm.DeviceOutputLen, dnm.EPR); return(result); }