I am intending to display today's date and time on Silicon Craft 2004 ModBus (SC2004MBS). I tried to left shift the value date string and pass to the device using write_registers() function. The code looks like this:
@defer.inlineCallbacks
def DtTm():
dt = datetime.datetime.now()
dd= dt.strftime('%d/%m/%Y')
da = [ord(c) for c in dd]
display = yield protocol.write_registers(10, da, unit=1)
The code block is called using Twisted callbacks. The output do show the result on the device but with some unwanted characters before each characters on the display screen.