| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal User Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | I just read the tutorial for creating your own plugin, and the example works fine (I program in VB.NET). I want to develop a plugin so that MP can communicate with a device using the ethernet protocol ModbusTCP. I have an ActiveX for the ModbusTCP communication. How can I call that ActiveX when a button in MP is pressed to activate a lamp,.... I try to put the ommand under ButtonOne but it doesn't work. The dialog doesn't appear. The code for the communication is correct because this works as EXE. Private Sub OnButtonOne() klant = New System.Net.Sockets.TcpClient(address, port) master = Modbus.Device.ModbusIpMaster.CreateTcp(klant) ''activeX Dim numInputs, startAddress As UShort Dim inputs(3) As UShort numInputs = 2 startAddress = 51 inputs = master.ReadHoldingRegisters(1, startAddress, numInputs) tekst = CStr(inputs(0)) Dim dlg As GUIDialogOK = CType(GUIWindowManager.GetWindow(CType(GUIWindow.W indow.WINDOW_DIALOG_OK, Integer)), GUIDialogOK) dlg.SetHeading("Button has been pressed") dlg.SetLine(1, tekst) dlg.SetLine(2, String.Empty) dlg.SetLine(3, String.Empty) dlg.DoModal(GUIWindowManager.ActiveWindow) End Sub Have I to use the ActiveX in another way. Regards. |
| | |
![]() |
| Bookmarks |
| Tags |
| automation, home, modbustcp, plugin |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| X10 Home Automation Plugin Problem | damian | General Support | 6 | 2006-04-12 08:01 |
| Home automation 'My Ambience' | snowflake | Plugins | 3 | 2005-10-29 17:46 |
| Home Automation | Anonymous | Improvement Suggestions | 2 | 2005-03-30 08:58 |
| X10 Home Automation Plugin | devo | Plugins | 19 | 2005-02-25 23:58 |
| Home automation, using “My News” | Anonymous | Plugins | 0 | 2004-12-28 17:53 |