Hacker News new | ask | show | jobs
by Kim_Bruning 928 days ago
I can't do the nuances justice here for sure. But to make a long story short:

PLCs replace relay circuits for Industrial Electrical technicians (hence: Ladder). And make no mistake: relay circuits are important, and is something they are very adept at!

However, this doesn't imply that they are automatically able to write or debug regular Python or C code or what have you.

-----

PS. If you let a PLC programmer at any language, they'll find a way to do ladder logic. Illustrative example (combining some features I've seen in textbooks and IRL, formatting included):

  if Tank_Level_Reached == True and EF132121 == False and Ready_To_Start == True and Finished == False and Belt == Not_Ready and Stage == 5 and Position_Left_Arm == Up :
    move_left = True
    move_right = False

   if Tank_Level_Reached == True and EF132121 == False and Ready_To_Start == True and Finished == False and Belt == Not_Ready and Stage == 5 and Position_Left_Arm == Down:
   move_left = False
   move_right = True

   if Tank_Level_Reached == True and EF132121 == False and Ready_To_Start == False and Finished == False and Belt == Not_Ready and Stage == 5 and (Position_Left_Arm == Down or Position_Left_Arm == Up):
    move_left = False
    move_right = False
etc ...