

Res = doc1.ReadHoldingRegisters(1, 0, 10, 1000)Ĭells(5, 7) = doc1.ReadResult() 'Show results for the requests

Set doc2 = CreateObject("Mbpoll.Document") Set doc1 = CreateObject("Mbpoll.Document") Set app = CreateObject("Mbpoll.Application") Start → All Programs → Modbus Poll → Excel Example This will show one of the windows.Īn example is also included with the Modbus Poll installation. Modbus Poll is hidden but you can show it by uncomment the "ShowWindow" line. One reading registers and another reading Coils. The Developer tab should now show in the ribbon (right most tab). On the right pane, under Main Tabs, check the Developer check box.On the left pane click Customize Ribbon.Note the ribbon is part of the Microsoft fluent user interface. Click popular and then select the show Developers tab in the ribbon check box.Click the Microsoft office button and then click Excel options.You should display the Developer tab or run in developer mode when you want to write macros. to interpret and show the modbus data according to your specific requirements. That means you can use any program that supports VBA (Visual Basic for Applications) such as Visual Basic, Excel etc. This is also called an Automation controller.Īn Automation server is an application that exposes programmable objects to other applications. Automation (formerly known as OLE Automation) makes it possible for one application to manipulate objects implemented in another application.Īn Automation client is an application that can manipulate exposed objects belonging to another application.
