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.

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 April 4th, 2021, 05:46 PM   #46
bulletin blues
Lifetime Supporting Member
United States

bulletin blues is offline
 
bulletin blues's Avatar
 
Join Date: Mar 2003
Location: out there
Posts: 213
As an electrician, I could probably hook this up with as little as 120 jumpers and 25 well tuned pnuematic timers, Keep It Simple. Y'all overcomplicate things.
__________________
_____
  Reply With Quote
Old April 4th, 2021, 06:58 PM   #47
_Dock_
Member
United States

_Dock_ is offline
 
Join Date: Sep 2015
Location: KY
Posts: 478
My favorite tape measure is a 16’ Stanley fat max.
  Reply With Quote
Old April 4th, 2021, 07:11 PM   #48
kalabdel
Member
Canada

kalabdel is offline
 
Join Date: Feb 2015
Location: Ontario
Posts: 720
Quote:
Originally Posted by _Dock_ View Post
My favorite tape measure is a 16’ Stanley fat max.
25' and 8m/26'. I buy them anytime they:re on sale. I have no idea how many I now own but for sure too many.
  Reply With Quote
Old April 4th, 2021, 07:55 PM   #49
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,602
Quote:
Originally Posted by jhenson29 View Post
Iím more talking about all of the variable declarations and such at the top while the LAD was allowed to reference global variable registers.

Sure...itís all equal for small/trivial examples. Everything is fast for small n too...
Sorry, I was not trying to suggest code golf as a metric; I know the declarations are hidden/separate in LAD. When I look at that ST-ish code, even if I cut it down, I still see roughly the same "instruction" count i.e. baker's dozen.

Quote:
Iím not sure it helps to point out that theyíre all Turing complete.
Sorry, the "Turing complete" reference was intended only to make the point that products written in either LAD or ST behave in the same way; any differences in execution would be meaningless. I'm not suggesting anyone code in Logo.

My own personal preference would depend on the application. For example, PLCs are a hobby for me and my real job in procedural/OO* languages, so ST would be a step back, while LAD is novel. But those are purely subjective metrics; they do not suggest to me in the least that one is better than the other. If I had an actual project, I would likely go with ST for the simple reason that its textual nature would be easier to integrate with Git, specifically the [git diff] command, and also because I was more familiar with the style. For this particular task, the OP asked for ladder. Those are all subjective or application-specific reasons.

To state that LAD is obsolete or that people are obsessed*** with it, because the miracle of ST exists, does not make any sense; at a minimum it is wrong.

* I think those are the right terms
** although there was a recent thread about integrating LAD into Git
*** Certainly some are one-trick ponies, but the circus (industry) is big enough that it does not matter.

P.S. the C version has a bug and will not work as written.
  Reply With Quote
Old April 4th, 2021, 08:09 PM   #50
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 1,201
Quote:
Originally Posted by bulletin blues View Post
As an electrician, I could probably hook this up with as little as 120 jumpers and 25 well tuned pnuematic timers, Keep It Simple. Y'all overcomplicate things.
One of my guys carries two DIN timers in his truck. Reckons if we ever have a PLC failure at a pump station or one of the smaller treatment plants we look after, he can get the essentials running again with that and a couple of relays. He has done it once before...
  Reply With Quote
Old April 4th, 2021, 08:23 PM   #51
jhenson29
Member
United States

jhenson29 is offline
 
Join Date: Mar 2021
Location: St. Louis, MO
Posts: 59
Quote:
Originally Posted by drbitboy View Post
Sorry, I was not trying to suggest code golf as a metric; I know the declarations are hidden/separate in LAD. When I look at that ST-ish code, even if I cut it down, I still see roughly the same "instruction" count i.e. baker's dozen.

Sorry, the "Turing complete" reference was intended only to make the point that products written in either LAD or ST behave in the same way; any differences in execution would be meaningless. I'm not suggesting anyone code in Logo.

My own personal preference would depend on the application. For example, PLCs are a hobby for me and my real job in procedural/OO* languages, so ST would be a step back, while LAD is novel. But those are purely subjective metrics; they do not suggest to me in the least that one is better than the other. If I had an actual project, I would likely go with ST for the simple reason that its textual nature would be easier to integrate with Git, specifically the [git diff] command, and also because I was more familiar with the style. For this particular task, the OP asked for ladder. Those are all subjective or application-specific reasons.

To state that LAD is obsolete or that people are obsessed*** with it, because the miracle of ST exists, does not make any sense; at a minimum it is wrong.

* I think those are the right terms
** although there was a recent thread about integrating LAD into Git
*** Certainly some are one-trick ponies, but the circus (industry) is big enough that it does not matter.

P.S. the C version has a bug and will not work as written.
Sorry, I was specifically irked that you were showing the longer example of ST with extra fluff that was omitted from the LAD and suggesting equivalence.

Yes, VCS is one of the reasons text is better than graphical languages.

I didnít say that ST is a miracle or that I even like it (in fact, I think I explicitly said I donít like it in one post). I prefer structural typing and languages that allow both OOP* and FP (OOP for behavior modeling and FP for data transformations). But out the the IEC languages, ST is my preference. LAD just exists as a vague reference to electrical schematics and relay logic.

Iíll leave it as, simple LAD and simple ST may have no difference, but the most complicated LAD looks roughly equivalent in ST while the most complicated ST looks like a train wreck in LAD. So why bother supporting multiple languages?

*For anyone interested, TwinCAT has IEC with OO extensions, function passing (IIRC), runtime memory allocation, and recursive functions (have to use pointers) (and itís free)
  Reply With Quote
Old April 4th, 2021, 08:38 PM   #52
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,602
Yeah, I noticed your "least worst" description.



Quote:
Originally Posted by jhenson29 View Post
*For anyone interested, TwinCAT has IEC with OO extensions, function passing (IIRC), runtime memory allocation, and recursive functions (have to use pointers) (and it’s free)

woo hoo, now that's interesting (subjectively, to me )
  Reply With Quote
Old April 4th, 2021, 08:58 PM   #53
jhenson29
Member
United States

jhenson29 is offline
 
Join Date: Mar 2021
Location: St. Louis, MO
Posts: 59
Quote:
Originally Posted by drbitboy View Post
Yeah, I noticed your "least worst" description.

woo hoo, now that's interesting (subjectively, to me )
For the record, itís not supposed to support recursive functions. But if you use an FB with a method, the method can call itself if you pass itís own FB pointer to it. TwinCAT canít stop what it doesnít know about...

And it also supports recursive data definitions using pointers (no special trickery there) which is nice for tree structures (especially with runtime memory).
  Reply With Quote
Old April 4th, 2021, 11:30 PM   #54
greenlantern
Member
United States

greenlantern is offline
 
Join Date: Apr 2021
Location: tx
Posts: 4
Thank you everyone for your attempt to help solving the challenging question!

Special thanks to Mr. drbitboy and Mr. jhenson29 for coming through with the two different approach solutions. I am really great full for your help!

But to address the your thoughts on the reason behind the question;

I am an electrical engineer with old history of experience in ladder logic. I have applied for a position recently to a company that provided me with this question as part of the first step in the interview. They have informed me that they are willing to train if need be but still wanted to provide this question along with other questions which I answered already.

So again thank you soo much!
  Reply With Quote
Old April 5th, 2021, 03:46 AM   #55
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Leipzig, Germany
Posts: 1,231
Did you get it right/get the job?
  Reply With Quote
Old April 5th, 2021, 04:23 AM   #56
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 3,097
I once applied for a job with a large company and they sent me their standard preliminary test document where I was supposed to answer the questions & send it back, just like the OP's question, there were a number of obscure scenarios with little information, I wrote on those questions garbage in garbage out & sent it back, I was called in for an interview (I suppose it was curiosity on the chief engineers part), he asked me why I wrote those comments & I explained that yes those questions could possibly be answered, however, as the information was lacking in the questions then it could not be answered only by assumption, he then realised that I had done work for their company commissioning a number of plants as a contractor, he was the guy that pulled me off a job to look at a system because they had a problem on a small Siemens PLC & none of their guys could find the problem, I promptly sorted it out. I didn't get the job, then again I would not have accepted it, I felt that the document he himself had compiled gave me an insight to the type of boss I would struggle to work with.
  Reply With Quote
Old April 5th, 2021, 06:36 AM   #57
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,602
Quote:
Originally Posted by greenlantern View Post
...
So again thank you soo much!

You're welcome, but that was a very basic problem, so if you get the job, then you probably need to make use of the offered training.
  Reply With Quote
Old April 5th, 2021, 06:46 AM   #58
I_Automation
Member
United States

I_Automation is offline
 
I_Automation's Avatar
 
Join Date: Jun 2020
Location: Detroit, Michigan USA
Posts: 534
Quote:
Originally Posted by parky View Post
I once applied for a job with a large company ...
I applied for a job at a shop here in Detroit and their employment 'test' was I was taken to a down machine in the shop and told to find the problem, and see if it concurred with what their guy found.

Talking to their guy it was obvious he knew nothing about controls, and they just wanted troubleshooting of their machine for free by posting help wanted for a controls engineer.

I told them if I was hired the repair would be cost about $150 in parts and a half hour, otherwise if they wanted my consultation on the job my consultation fee was $350 per hour, 4 hour minimum.

Found out later from other this was the standard practice for this shop. "Help Wanted" = Free Servicecall.
  Reply With Quote
Old April 5th, 2021, 06:48 AM   #59
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 7,437
Quote:
Originally Posted by kalabdel View Post
25' and 8m/26'. I buy them anytime they:re on sale. I have no idea how many I now own but for sure too many.
Way too big, they are too hard to fold in half when I need to divide a length
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Old April 5th, 2021, 06:58 AM   #60
I_Automation
Member
United States

I_Automation is offline
 
I_Automation's Avatar
 
Join Date: Jun 2020
Location: Detroit, Michigan USA
Posts: 534
Quote:
Originally Posted by geniusintraining View Post
Way too big, they are too hard to fold in half when I need to divide a length
I have gone through so many tape measures I just go to the dollar store and buy a few at a time.

For $1 I can cut it for pieces, lose it or just never find it. ( I know I have to have at least a dozen in my house but still have to search when I need one)
  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
PLC basic question Karoly LIVE PLC Questions And Answers 2 June 2nd, 2012 11:16 PM
MPI comunication Manuel Raposo LIVE PLC Questions And Answers 22 July 16th, 2007 07:24 AM
[S5-155U CPU948]About PLC Communication Question. apple LIVE PLC Questions And Answers 2 July 20th, 2006 06:07 AM
plc5 with AB 1771-DB basic module, its urgent plz help me nileshsurya LIVE PLC Questions And Answers 6 July 20th, 2005 02:45 AM
Question re:PLC to PLC interaction. c0met LIVE PLC Questions And Answers 5 March 22nd, 2004 12:16 PM


All times are GMT -4. The time now is 01:55 PM.


.