Jump to content

New Poster and programmer


Recommended Posts

Hi first time user and poster, 1st a bit about my background

I have worked in the electrical engineering & electronics industry for over 30 years, repairing and rewiring electric motors, worked on power stations helping repair generators etc, then after being made redundant from that I went back to college and uni to improve my second favourite subject electronics, I learnt to program PIC microntrollers first in Assembler then using a C-compiler.

Ok I would like some comment on the program I have done so far for a project, I did a little bit of Ladder Logic programming in my time when I went back t Uni for an assignment so it is not completely un-new to me but this is my first serious attempt.

So I would like some feedback please on the attached program I have done so far...and don't worry about being too harsh, I won't be offended, best way to learn.

Hardware is, SM43-J-R20

The program at the moment does what it is supposed to, i have LEDS wired through the Relay O/P's to indicate this. It is not controlling anything at the moment as I am obviously still designing the rest of the program.

 

Regards

 Dave

25kN_Control_VER_3.vlp

Link to comment
Share on other sites

  • MVP 2023

And one other thing, and this is mostly my personal preference - others may feel differently - but I don't like any conditional subroutine calls. This includes subroutine calls from the HMI Link & Jumps tab. There can occasionally be specific requirements for this, but in my opinion it is poor programming practice. It can have unforeseen consequences by leaving coils in an uncontrolled state.

And my final thought is that you are using Set & Reset coils everywhere. Yes, Set & Reset coils are often necessary, but see if you can program with Direct coils instead. It can sometimes take a little additional thought, but you have much less likelihood of something getting stuck unexpectedly. The way I do it is to work backward from output to input. Examine a coil and think about all the conditions that you want that coil energized, then put those all in a single ladder rung, using intermediaries as needed. Programming this way is cleaner to work with. Just my way of doing things - YMMV.

Link to comment
Share on other sites

  • MVP 2023

Okay, last thing. NEVER use a Direct coil in more than one ladder rung. This includes Timer coils. You have TD 0 coil in 6 different places in your program. Either use 6 different timers or place all your activating conditions into a single ladder rung with the TD 0 coil.

Link to comment
Share on other sites

Hello Flex727,  thanks for the input, I will certainly take the advice and adapt where I can, still getting to grips with things, you have now given me thought as to rearanging things. Thanks again, can you reccomend any good reading matter on the subject I have downloaded all the Visilogic manuals etc.

Thanks Dave

Link to comment
Share on other sites

  • MVP 2023

Above all, take note of Flex's nice big red print here....(in case you don't know it is a clickable link).....:

Many of the forum members have been programming plcs for decades, yet still learn something new all the time.   Whether it be by solving someone else's problem, or having one of our own.  Try your best, constantly consult the help files to learn stuff, then ask the forum when stumped.  My advice in another post is also very relevant for anyone using plcs:

 

cheers, Aus

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.