hafidz1977 / pymodbus

Automatically exported from code.google.com/p/pymodbus
0 stars 0 forks source link

Typo in exaple code on project home page #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run example code from web page

What is the expected output?

Value of coil.

What do you see instead?

Traceback (most recent call last):
  File "testclient.py", line 3, in <module>
    client = ModbusClient('127.0.0.1')
NameError: name 'ModbusClient' is not defined

What version of the product are you using? On what operating system?

Please provide any additional information below.

In example code on web page:

1  from pymodbus.client.sync import ModbusTcpClient
2 
3  client = ModbusClient('127.0.0.1')
4  client.write_coil(1, True)
5  result = client.read_coils(1,1)
6  print result.bits[0]
7  client.close()

Line 3 should read ModbusTcpClient instead of ModbusClient

Original issue reported on code.google.com by Grant.B....@gmail.com on 28 May 2013 at 7:07

GoogleCodeExporter commented 9 years ago
It is kind of embarrassing that I didn't notice that once in five years.

Original comment by Bashw...@gmail.com on 5 Jun 2013 at 4:39