Just thought I'd try a bit of pot-stirring here to see what floats to the surface.
Should the inclusion of empty error OBs in STEP7 programs be encouraged or advised?
Personally I'm against empty OBs. And yet I've seen examples when people begin developing S7 programs where the first thing they do is add a selection of error blocks to an as yet empty program. Usually if I challenge them about this the conversation goes something like -
"Why do you put all these blocks in there with no code in them?"
"It's so the PLC keeps running if there's a fault."
"Why do you want to keep it running if there's a fault?"
"So that I can keep working on the other bits of the program without having to fix things like hardware errors or I/O errors"
"How do you know if there are any hardware errors or I/O errors? By including these blocks with no code in them you're just hiding any faults."
"Oh, I'll check later by taking the blocks out."
Has anyone else observed this (or is a practitioner of this !?)
I just think it seems at odds with how I like to work - test early; test often; check for errors; remove them as you find them. I've no objection to the inclusion of the OBs - after all this is the CPU's way of telling us an error has arisen. I just don't see the point in deliberately making sure the message we're given is blank. A few lines of code in each block will keep the CPU running if necessary, and have the added advantage of identifying what and where the errors are.
Regards
Ken
Should the inclusion of empty error OBs in STEP7 programs be encouraged or advised?
Personally I'm against empty OBs. And yet I've seen examples when people begin developing S7 programs where the first thing they do is add a selection of error blocks to an as yet empty program. Usually if I challenge them about this the conversation goes something like -
"Why do you put all these blocks in there with no code in them?"
"It's so the PLC keeps running if there's a fault."
"Why do you want to keep it running if there's a fault?"
"So that I can keep working on the other bits of the program without having to fix things like hardware errors or I/O errors"
"How do you know if there are any hardware errors or I/O errors? By including these blocks with no code in them you're just hiding any faults."
"Oh, I'll check later by taking the blocks out."
Has anyone else observed this (or is a practitioner of this !?)
I just think it seems at odds with how I like to work - test early; test often; check for errors; remove them as you find them. I've no objection to the inclusion of the OBs - after all this is the CPU's way of telling us an error has arisen. I just don't see the point in deliberately making sure the message we're given is blank. A few lines of code in each block will keep the CPU running if necessary, and have the added advantage of identifying what and where the errors are.
Regards
Ken