Jump to content

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

Share this post


Link to post
Share on other sites

Two problems I see right away.

1) The Start-Up Display opens automatically. Do not call it with SB 2.

2) Do not do this where you have a Timer Coil & Contact in the same ladder rung:

image.png.968c1f057f2715c6d78efd0fe477876b.png

Instead, do this:

image.png.f3d494ca70eec94f851d3f6db1ba8ba1.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Unitronics includes example projects with your VisiLogic installation and they have a YouTube channel. Check those out. Also, browse this forum.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...