
Set doc = CreateObject("Mbpoll.Document") ' First a Modbus Poll document is needed. Read functions are associated with a Modbus Poll document. The following functions do the same as you setup in the read/write definition dialog (F8).
DISPLAY FLOAT IN MODBUS POLL SOFTWARE HOW TO
Address informationĮxample how to open a Modbus TCP/IP connectionĪpp.Connection = 1 ' Select Modbus TCP/IPĪpp.ResponseTimeout = 1000 ' Wait 1000ms until give up

Socket errorĢ1 = TCP/UDP Connection failed. Connect errorġ7 = TCP/UDP Connection failed. WSA start upġ3 = TCP/UDP Connection failed.
DISPLAY FLOAT IN MODBUS POLL SOFTWARE SERIAL
Serial port driver did not accept timeout settings.ġ2 = TCP/UDP Connection failed. Serial port driver did not accept port settings.ĥ = Serial port. Not possible to get current settings from port driver.Ĥ = Serial port.

Opens the connection selected with the Connection property.įor error 3-5: Please check if you have the latest serial port driver.ģ = Serial port. The ConnectTimeout specifies the length of time that Modbus Poll should wait for a TCP/IP connection to succeed. The ResponseTimeout specifies the length of time in ms that Modbus Poll should wait for a response from a slave device before giving up. A serial port or one of the Ethernet connections can be selected. The following properties and functions do the same as you setup in the connection dialog (F3).Ĭonnection selects the desired connection. 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).
