mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
first talk to Dieter hardware device interface
This commit is contained in:
parent
cdbd639c94
commit
132e71f16d
1 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,8 @@ class hardwareInterface():
|
||||||
if (self.loopcounter>15):
|
if (self.loopcounter>15):
|
||||||
self.loopcounter=0
|
self.loopcounter=0
|
||||||
# self.ser.write(b'hello world\n')
|
# self.ser.write(b'hello world\n')
|
||||||
self.ser.write(bytes("out"+str(self.outvalue)+"\n", "utf-8"))
|
s = "000" + str(self.outvalue)
|
||||||
|
self.ser.write(bytes("do"+s+"\n", "utf-8")) # set outputs of dieter, see https://github.com/uhi22/dieter
|
||||||
s = self.ser.read(100)
|
s = self.ser.read(100)
|
||||||
if (len(s)>0):
|
if (len(s)>0):
|
||||||
self.addToTrace(str(len(s)) + " bytes received: " + str(s, 'utf-8').strip())
|
self.addToTrace(str(len(s)) + " bytes received: " + str(s, 'utf-8').strip())
|
||||||
|
|
Loading…
Reference in a new issue