![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]()
|
New Here? Please read this important info!!!
![]() |
#1 |
Member
|
Being a better programmer
So. I am no longer an apprentice, as my name suggests. I am quite a number of years into being a PLC programmer in various ways.
I now am finding I am using perhaps not the best working practices simply due to not getting much education these days and getting over problems on the fly. I wanted to start a little series of trying to sharpen my skills. I have a project using WinCC in TIA portal. Never used WinCC, never used TIA Portal. The project is now complete but I have access pretty much every week and want to use it to work on my skills. So, I am going to explain how I did something, and I wondered if you had comments on the technique and practices and if I am being a bit rubbish and how to improve. I need to load a HMI screen in sequence for checks by the operator. The checks can be configured on an admin screen on the HMI. When the operator starts the checks I have some code in the PLC checking which check sequence they have started then load the data into the a DB in the PLC from a master DB. This "HMI DB" is then shown on the HMI. When the user selects "next", I move the data back and load the next check to the "HMI DB". No scripting in the HMI, single tags on data fields then load everything on click, but in the PLC. Is this good practice? I am thinking more and more that it is a long winded painful way to do something. How would you do it? Is my explanation as bad as it looks? I realised half way through typing that explaining this isnt as easy as I had thought |
![]() |
![]() |
#2 |
Supporting Member
![]() ![]() Join Date: Jul 2016
Location: Manchester
Posts: 163
|
Keeping software simple and easy for others to understand is key.
Yes, there is better/faster/cleaner ways of doing it with a small script in the HMI. However will the maintenance understand it? If you leave the company will others be able to follow what you have done. The way you've done it maybe long winded and use more memory than necessary, but if it's easy to follow what's happening and it works. All is good. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Jun 2013
Location: MI
Posts: 2,039
|
Doing it that way is common in automotive facilities in America. They do it that way so that someone can make changes to the HMI without actually knowing how to use the HMI software. They want every system to be able to be handled by the stereotypical "dumb" sparkie who can barely be trusted in LAD, because that way they don't have to pay enough to hire competent staff.
Is it a best practice? Depends what you're optimizing for. It isn't how I'd prefer to do things, but it sure isn't wrong. |
![]() |
![]() |
#4 | ||
Member
|
Quote:
Quote:
Maybe I should look at it. Would make my PLC code much more lightweight. Just feel it is invisible processing that the engineers have to look in 2 places to see, but it does mean my PLC does a lot more work and read writes. The screens work lovely and the customer is very happy. I need to clean up the way I do things but when time is tight and I am working later into the night I tend to have weird and wonderful ideas. Sometimes I look back and go... why the hell is that in it's own DB with a completely new type of name? You already created a DB for those type of flags. Meh, I guess you have to learn and use the time available to you. Still want to be better though. My PLC writing skills are sharper than ever and is building up at a good rate, just my efficiency and know how of more diverse stuff isn't what it could be. |
||
![]() |
![]() |
#5 | |
Member
![]() ![]() Join Date: Nov 2016
Location: NL
Posts: 237
|
Quote:
Just keep that attitude until retirement. That may sound a bit condescending, but it is actually what discriminates an excellent craftsman from a good or average one. |
|
![]() |
![]() |
#6 |
Member
|
I will try. Hitting a bit of a wall recently with trying to learn. Finding projects that are actually interesting and have time to do properly and learn and develop is hard. Maybe in the next few years.
|
![]() |
![]() |
#7 |
Member
![]() ![]() Join Date: Aug 2015
Location: Illinois
Posts: 648
|
I've been programming for 42 years, and I always find a better way to do something!
I think the key to being a good programmer is the ability to make your programs flow in the logical sense. Meaning I always try to make my programs flow in the way the end user would think of Starting and getting to the End. I also try to comment my programs in a way that it can not be misunderstood. There have been times when I need to reevaluate a program I wrote 25 years ago, and the comments help me to understand how I was thinking when I wrote that program. I don't comment a program for someone else, I comment the program for ME! There is always more than 1 one to skin a cat, but I do think some ways are better than others. As long as you work toward programming with the lease amount of steps, memory, and make sure at least you can debug it, I think would be a good working program. Learning more than a single program language will also help in understanding how programs should be built. This is just an opinion of an OLD MAN.
__________________
David M. Camp Unlocking the power of IOT in Oil & Gas! |
![]() |
![]() |
Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TT (timer timing) in CX Programmer | mbruins | LIVE PLC Questions And Answers | 4 | September 1st, 2017 07:45 AM |
GE LM90 gurus, why would a programmer do this? | TConnolly | LIVE PLC Questions And Answers | 8 | October 19th, 2013 10:40 PM |
Need help writing programmer connect PLC to PC | Dung_AT | LIVE PLC Questions And Answers | 2 | December 3rd, 2006 10:11 PM |
Need help write programmer connect PLC to PC | Dung_AT | LIVE PLC Questions And Answers | 0 | December 1st, 2006 09:15 PM |
Omron CX Programmer DIFU clarification | Johnny T | LIVE PLC Questions And Answers | 9 | January 5th, 2006 03:33 AM |