-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sd/sc to allow setting date/time in Click PLC #43
Conversation
Makes it more clear that there are a total of X bits, not an additional X bits + the starting one
Modeled after _set_ds Restricted it to only the writable SD registers
Modeled after C coils. Restricted writing to only writable SC addresses
I'll look into the test_driver.py and see about following up with additional tests for this. I didn't run |
Also I’ll send a commit over to update docs / user-facing on which sc/sd are writable |
Hello @ssweber With the Thanksgiving holiday, I'm only seeing this now. Thanks so much for the PR! An initial review looks good, but I want to double check the register value changes. I'm traveling next week but will be able to check this against real hardware 12/9. Also, I have a local work-in-progress branch adding
For now I'm just using |
@alexrudd2. I added in the tests to this branch and closed that PR. I was covering a coworkers job last week, but I should have time this week to run against a ClickPLC. |
... getting my bearings on how to use pytest :) |
Not sure how physical click would respond to setting all these as 1234. So revert.
Nice catch on the SD ranges. (I cherry-picked it as a83d9b1). I've invited you as collaborator so Github actions will run on this PR. Commit whatever you want in this branch, I'll likely squash-merge when we've got things fully tested. |
Finally got a chance to run this against my real PLC. (
|
Thanks again for the great code. |
Thanks for merging 😄 Great catch on the docs/reality mismatch. Will have to bring up on their support forum. |
Hello, Thanks for the library!
I wrote a short script to sync all my clicks on the network with my computer's clock. sync_clickplc_datetime.py I then realized that writing SD, and read/writing SC wasn't added yet. I added necessary changes / modeling them after the C and DS corresponding functions. I tested my script, and it did set correctly!
Let me know if it looks OK. Thanks