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

Reply
 
Thread Tools Display Modes
Old December 24th, 2008, 03:51 PM   #1
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is offline
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,084
End of year contest

In the spirit of the Bad Hemingway and Faux Faulkner competions, I'd like to announce the first annual Bad Ladder competition. The idea is to create the most egregious example of obscure, misleading, downright ugly ladder logic you can think of. It can be an attempt to make a single rung do the work of an entire program. It can be something that renders a simple concept excruciatingly non-obvious. It can use analog instructions to perform a discrete task or vice-versa. It can break every rule of civilized programming, but still manage to work as specified.

The rules are simple:

1. Relay ladder logic only

2. The program must work. It must perform the task specified.

3. It must use instructions found in the majority of PLCs and be runnable on at least three PLC platforms from different vendors with no more edits than required to meet addressing and/or naming standards.
Judging criteria is totally subjective and entirely up to the discretion of the judges.

For this year's contest I nominate as judges, myself, BobB (the old pfhaart), Pierre, Bernie Carlton, and Terry Woods. This year's winner gets to nominate next year's judges.
  Reply With Quote
Old December 24th, 2008, 07:56 PM   #2
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,342
I am honored and humbled by Steve's nomination as a judge for this prestigious contest though my area of expertise would be AutomationDirect, SLC and Micrologix. If this actually generates entries in other than these platforms please feel free to ask to have me disqualified for that entry.

So in essence a Rube Goldberg of ladder logic.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old December 25th, 2008, 12:14 PM   #3
JeffKiper
Lifetime Supporting Member + Moderator
United States

JeffKiper is offline
 
JeffKiper's Avatar
 
Join Date: Jun 2006
Location: Indiana
Posts: 2,221
Have you guys been looking at the logic in my plant that I have to keep running?

Merry Christmas
__________________
There should be a minimum IQ before people can breed.

FS Eng (TV Rheinland, #11004/15, Machinery)
  Reply With Quote
Old December 25th, 2008, 02:50 PM   #4
BobB
Lifetime Supporting Member
Australia

BobB is online now
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,386
I am wondering what uniquely qualifies me as a judge for this contest? Bad code? Certainly was some terrible code when I was learning.

Thanks Steve.
__________________
The Old Pfhaart

  Reply With Quote
Old December 25th, 2008, 08:24 PM   #5
Wyo_Knott
Member
United States

Wyo_Knott is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 4
BobB,

I don't know when they were here at my plant but they have to have been looking at some of the logic crawing among the cobwebs of this organization. I'll have a hard time picking out the most *090^^% example.

Wyo_Knott

Last edited by Wyo_Knott; December 25th, 2008 at 08:27 PM. Reason: incomplete
  Reply With Quote
Old December 25th, 2008, 09:09 PM   #6
SMOKE
Member
United States

SMOKE is offline
 
SMOKE's Avatar
 
Join Date: May 2006
Location: East and West of Kaos
Posts: 475
Steve i might have to dust off my proficy software. I have done some things with the array move that baffles the best engineers.
Quote:
It must use instructions found in the majority of PLCs
Perhaps not but we can use jumps/lable and indirect right? What about UDT's and such.

Last edited by SMOKE; December 25th, 2008 at 09:22 PM.
  Reply With Quote
Old December 26th, 2008, 12:22 PM   #7
dahnuguy
Member
United States

dahnuguy is offline
 
Join Date: Mar 2007
Location: SC
Posts: 679
2. The program must work. It must perform the task specified.

I dont see any task specified...............not that I would be high on the solution list, but with the task declared, I would at least know what it was I wasn't so good at.
  Reply With Quote
Old December 26th, 2008, 01:39 PM   #8
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,342
I propose a particular function, the toggle.

We get so many requests here from people who don't perform even a simple search that it would be great to point to a particularly horrendous solution depending on their platform.

In case others did not understand my 'Rube Goldberg' reference in an earlier post he was an American cartoonist who proposed incredibly complex machines to perform very simple operations often including filling buckets of water and rolling bowling balls.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old December 26th, 2008, 02:18 PM   #9
dahnuguy
Member
United States

dahnuguy is offline
 
Join Date: Mar 2007
Location: SC
Posts: 679
Quote:
Originally Posted by bernie_carlton View Post
I propose a particular function, the toggle.

We get so many requests here from people who don't perform even a simple search that it would be great to point to a particularly horrendous solution depending on their platform.

In case others did not understand my 'Rube Goldberg' reference in an earlier post he was an American cartoonist who proposed incredibly complex machines to perform very simple operations often including filling buckets of water and rolling bowling balls.
Yeah I have seen Mr. Goldbergs work , frequently used in reference to government.

So are you proposing a bit of programing that further complicates the issue to a ridiculous degree in order to promote humor at the expense of the uninitiated?

I regret that I do have the time to join you on your quest, but I look forward to reading the results and struggling to decypher the solution in an attempt to better understand the "machine".
  Reply With Quote
Old December 26th, 2008, 02:25 PM   #10
Brian123
Member
United States

Brian123 is offline
 
Join Date: Sep 2007
Location: Nebraska
Posts: 297
Hi all,

Here is my entry for the contest. It is written for an AD 430 processor with a 16 point output card with a starting address of Y0. It would also work on other 400 series processors and 300 series processors. It should run on a 200 series processor; however, the 16 point output cards for the 200 series do not have the proper LED configuration for the program to work properly. This program should also be able to be adapted to an AB SLC 500 series processor, as the 16 point output modules have a very similar configuration as the AD 400 series cards.

I don't actually have the hardware here to test this program, so I am hoping someone can run this for me. If someone does test this, DO NOT have anything actually attached to the output card! Pull the terminal strip.

Extra points to anyone who can figure out what this program does without running it. It is small enough to be opened in the demo software for AD PLCs.

Brian

Edit: This was put together before bernie made his suggestion. This program does include a normal toggle, but it is used as a frequency divider. I don't know whether that counts.
Attached Files
File Type: zip 430 project.zip (3.4 KB, 25 views)

Last edited by Brian123; December 26th, 2008 at 02:28 PM.
  Reply With Quote
Old December 26th, 2008, 02:35 PM   #11
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is offline
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,084
I was willing to include any examples, but if limiting this year's contest to the toggle (aka flip-flop) function results in more responses, I'm all for it.

As a self-nominated judge, I'm not eligible for the grand prize, but here's a modest contribution to help stimulate the creative juices.


Pushbutton _____ _____ ______
--]P[-----| ADD |----------| > |--------| MOVE |
| | | | | |
R1 -| |- R1 R1-| | 0 -| |- R1
| | | | |______|
1 -|_____| 1-|_____|
_____ Out
----------| EQ |-------( )-
R1 -| |
| |
1 -|_____|


Last edited by Steve Bailey; December 26th, 2008 at 02:45 PM.
  Reply With Quote
Old December 26th, 2008, 03:35 PM   #12
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,111
I say the code in this thread is the winner

http://www.plctalk.net/qanda/showthread.php?t=25919
I don't see how this can be beat.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old December 26th, 2008, 03:49 PM   #13
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is offline
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,084
Peter, I did call this a Bad Ladder competition and specified RLL.
  Reply With Quote
Old December 26th, 2008, 06:43 PM   #14
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,342
If this does progress into an actual contest I propose, at least for the first few years, to nominate the simple requests placed here. The 'toggle' seemed the simplest but possibly followed by 'traffic-light', 'elevator/lift' and 'garage-entry-gate'.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old December 27th, 2008, 06:46 AM   #15
manmeetvirdi
Member
India

manmeetvirdi is offline
 
Join Date: Oct 2004
Location: India.
Posts: 750
Hi there
Enclosed is my entry for Toggle.

M100.0 is Always Off
I0.0 is Push Button
Q0.0 is Output

Instruction used:
1)MOVE.
2)Integer to Double integer converter.
3)Compare Double integer.
4)Rotate left double word.
5)Rotate right double word.
Attached Images
File Type: jpg c3.jpg (29.6 KB, 457 views)
__________________
Manmeet
  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
Problem with a script in flexible Combo LIVE PLC Questions And Answers 4 December 19th, 2008 06:38 AM
S7 - using Arrays with Multiplex Addressing in ProTool RMA LIVE PLC Questions And Answers 4 August 12th, 2005 08:39 AM
S7 BitCast function RMA LIVE PLC Questions And Answers 6 November 11th, 2004 05:20 AM
EXCEL Time Graph Kabir LIVE PLC Questions And Answers 17 April 9th, 2004 03:40 PM
Exact SP reached at end of heating ramp time JustDaveIII LIVE PLC Questions And Answers 12 October 17th, 2003 05:07 PM


All times are GMT -4. The time now is 09:45 PM.


.