Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

Re: LF: Windows software to drive a relay at a given time?

To: [email protected]
Subject: Re: LF: Windows software to drive a relay at a given time?
From: Roger Rehr W3SZ <[email protected]>
Date: Wed, 11 Apr 2018 13:24:05 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1523467447; bh=qnLTjyXGDBaCUHTUP5OXdiBy9lQOTDBzbPZncrTSLpM=; h=Received:Received:Reply-To:Subject:To:From:Message-ID:Date: MIME-Version:Content-Type; b=duOlkNEIaInQa7FyOkTUxxiaUyFLF6EsQQ9OmDt/1s5uAZJn+ovbCXHYnUvQ2Ye0j vjJn/uWOAZrn0TVWw+pFe2HBVMpcVjWRyP0LKLoL1w6z+ydLDgbL6fhY5/oRbDNl/M lEZUHlfcr9cX6QCq0qyT2/X8i/Pd/HZi80Jcv2X6hh8UrIp4ga5yYn7zYVlu1uy30z 33LGSdHpCLXkaIuS2or196upu5Q3Nr14pGk7gnxAWWdF5BLOK2uUl5WhThTOpKQM+u XBTY4O7TdVAuwuU3dKx/Qm38D6EidMkTdgGf2xpXQij8ee/rIb9F8NbOuteRQb7djH RJtdTHxlg6lJg==
In-reply-to: <[email protected]>
References: <[email protected]> <[email protected]>
Reply-to: [email protected]
Sender: [email protected]
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
Thanks Peter,

Concise and Elegant!

73,

Roger W3SZ

On 4/11/2018 1:03 PM, P. W. Schnoor wrote:
> 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
>


<Prev in Thread] Current Thread [Next in Thread>