TommyGoh

MrPLC Member
  • Content count

    3
  • Joined

  • Last visited

Everything posted by TommyGoh

  1. MITSUBISHI PLC TO VB SETDEVICE

    Hi, Have anybody knows how to SetDevice ? I only managed to make GetDevice working here on VB script here
  2. MITSUBISHI PLC TO VB SETDEVICE

    yeah. I have checked the files. But they have no references for SetDevice. Have tried SetDevice2 also. Still same problem
  3. MITSUBISHI PLC TO VB SETDEVICE

    yeah. i'm working with MX Components. and doing it with VB i managed to make the GetDevice working. but not successful with SetDevice. Here's the code         Dim lData(20) As Long 'Monitor device value storage         Dim lRet As Long 'Return value         lRet = AxActEasyIF1.GetDevice("Y001", lData(0))         lRet = AxActEasyIF1.GetDevice("Y002", lData(1))         lRet = AxActEasyIF1.GetDevice("Y003", lData(2))         lRet = AxActEasyIF1.GetDevice("Y004", lData(3))         lRet = AxActEasyIF1.GetDevice("Y005", lData(4))         lRet = AxActEasyIF1.GetDevice("Y006", lData(5))         lRet = AxActEasyIF1.GetDevice("Y007", lData(6))         lRet = AxActEasyIF1.GetDevice("Y008", lData(7))         lRet = AxActEasyIF1.GetDevice("X0", lData(13))         lRet = AxActEasyIF1.GetDevice("X1", lData(14))         lRet = AxActEasyIF1.GetDevice("X2", lData(15))         lRet = AxActEasyIF1.GetDevice("X3", lData(16))         lRet = AxActEasyIF1.GetDevice("X4", lData(17))         lRet = AxActEasyIF1.GetDevice("X5", lData(18))         lRet = AxActEasyIF1.GetDevice("X6", lData(19))         lRet = AxActEasyIF1.GetDevice("X7", lData(20))         lRet = AxActEasyIF1.GetDevice("D1", lData(8))         lRet = AxActEasyIF1.GetDevice("D2", lData(9))         lRet = AxActEasyIF1.GetDevice("D3", lData(10))         lRet = AxActEasyIF1.GetDevice("D4", lData(11))         lRet = AxActEasyIF1.GetDevice("D5", lData(12))         If lRet <> 0 Then             txtStatus.Text = "Error occurrence (Error code: " + (lRet).ToString + ")" 'Display the error code at error         End If         If cb1.Checked Then             lRet = AxActEasyIF1.SetDevice("Y001", 1)             System.Console.WriteLine(lData(0))         End If   Am I missing something ? Or do I set wrongly ?