You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old November 10th, 2018, 11:32 AM   #1
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 142
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
  Reply With Quote
Old November 10th, 2018, 12:30 PM   #2
Rob...
Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 145
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.
  Reply With Quote
Old November 10th, 2018, 08:34 PM   #3
mk42
Member
United States

mk42 is online now
 
Join Date: Jun 2013
Location: MI
Posts: 1,965
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.
  Reply With Quote
Old November 11th, 2018, 04:46 AM   #4
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 142
Quote:
Originally Posted by mk42 View Post
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.
You know I did it for that very reason. I expected the customer to change their mind as they expanded the system from the pricey Comfort panels to a cheap unit. This way I didnt need to rescript the HMI. It was dumb data showing device.

Quote:
Originally Posted by Rob... View Post
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.
Is it bad I hate scripting? I have never liked it. I have been maintenance, commissioning engineer, planning engineer. All across those roles I avoid scripting like the plague.

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.
  Reply With Quote
Old November 11th, 2018, 05:47 AM   #5
Toine
Member
Netherlands

Toine is offline
 
Join Date: Nov 2016
Location: NL
Posts: 212
Quote:
Originally Posted by bmw_apprentice View Post
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.

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.
  Reply With Quote
Old November 11th, 2018, 05:58 AM   #6
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 142
Quote:
Originally Posted by Toine View Post
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.
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.
  Reply With Quote
Old November 11th, 2018, 12:47 PM   #7
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 596
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

Marshall Electric / https://mei-tech.com/monitor-and-control

Please Download from our download section "Monitor and Control" .pdf.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
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


All times are GMT -5. The time now is 11:21 AM.


.