Jump to content

The Importance of records and comments.....


Recommended Posts

  • MVP 2023

Hi all,

I had to revisit an older project and at the time of doing it, it was all a bit of a rush job to get something going.  I had done a writeup with basic details on how it worked, but had left out something crucial which I didn't think important at the time.

As part of what the project did, the plc was able to initiate booting of 2 PCs, try the first and if it didn't work then try the second.  I had inputs available to check if the boots were ok.  (Incidentally, these are simple usb switches set to go on via a little script after reaching the desktop)

All controlled by a count system run from SB15 that started from 0 and subsequently made many things happen using different types of compare.  In testing my mods I could not for the life of me figure out how a keypad input was resetting the count to 0.  I WANTED this to happen, and it had worked fine in the past, but I also had to add an external physical button doing the same thing.  Simple!   Add the input to the reset done via the keypad.  But there was NO (not NO, but NO..  🙂 ) reset linked to the keypad.  I spent a long while on the "figure it out merry-go-round" and eventually discovered that originally I'd been super clever.  I'd figured back then that if the PC initiation sequence occurred and they were already running for some reason, the full reset to 0 process would turn them off and completely stuff things up.  So the count reset was being done many stages INSIDE the PC boot checking subs....lots of if thens in action.  And all happening in two scans. 

I hadn't written a comment at all, nor noted it in the writeup, no doubt thinking at the time it was all plain as day.  But at first glance on the revisit, it was definitely a case of "How on earth are you doing this, there's nothing there!"  Even looked at development copies I'd done along the way back then, thinking I'd accidentally deleted an element in my mods.  Nup.

Forum members have often mentioned the need for full documentation at the time of doing a project, as one day when you come back to it, you'll have completely forgotten how it worked.  Also useful for anyone else who might have to take it over.  But sometimes very hard to do it all, especially on something quite complex.  I'm happy to admit the haste needed ages ago meant some of my recording went astray.

So endeth my lesson for the day.

cheers, Aus      👨‍🏫

PS  and this was a kind reminder from my PC at the time:

https://forum.unitronics.com/topic/7457-todays-lighthearted-reliefadd-yours-as-necessary/?do=findComment&comment=45494

 

  • Upvote 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.