Hi Chris,
On 11.04.2018 12:16, you wrote:
...
Software to close a relay at a given time, perhaps via the serial port?
...
Seven lines of "Python" and a relay circuit connected to com1, RTS-pin:
# import libraries:
import serial # see https://pythonhosted.org/pyserial/
import time # needed for time delay ("sleep()")
# Create a connection object to com1:
com = serial.Serial('com1', baudrate=9600, bytesize=serial.EIGHTBITS,
parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1,
xonxoff=0, rtscts=0 )
com.setRTS(True) # CLICK!
time.sleep(60) # Wait 60 sec. or whatever
com.setRTS(False) # CLACK!
com.close()
# END
Use the standard system tool "Windows Task Scheduler" to run it at a given
time. I did not check it on Windows, but on Linux (device name changed and
using cron) it works driving an old rtty-relay ("Kleinpolrelais") from
Siemens directly.
Peter, df3lp
|