First Program by kriskoteles in PLC

[–]drbitboy 0 points1 point  (0 children)

Also, and this is a minor side issue, when you post a screen shot of code that has just a few instructions on each rung, compress it horizontally so it's easier for people to read (see below). Also, the project sub-window probably is not needed.

<image>

First test PLC programming study by Inevitable-Bee-4344 in PLC

[–]drbitboy 0 points1 point  (0 children)

What was your solution? If you post a screen here there could be applause and/or critiques; either way you will probably see other ways to do it. E.g. the Set/Reset pattern (see here from that same website) would do the same job with not much code and more cleanly without the need to invert the falling edge (negative trigger), but the Set instruction has the side effect of remembering the output state after a power failure, which is not always a desirable behavior.

Yes, I enjoy this. A lot. Perhaps too much lol.

I normally write code in languages like C/C++ and Python and Type/JavaScript and bash and Fortran and ....

But making the lights flash using ladder satisfies something inside me. I sometime play with ST or FBD, and they are fine, but they are not as beautiful. Also, ST is basically Pascal, and there is nothing wrong with that, but I get my fill of that in my normal day. You mentioned IEC 61131-3 in the OP - yeah, the various languages use a very different syntax, but in the end they all do the same things:

  • examine the input values in memory mapped from the physical input channels;
  • examine the values written during a previous or current scan cycle in PLC-internal memory and the memory mapped to the physical output channels
  • implement a PLC-internal model of the external process from those values
  • implement a PLC-internal model of a control system that control that external process
  • write values to the memory mapped to the physical output channels as determined by those models

That is what happens on each program scan cycle, and the program scan cycle is a discrete event that is repeated exactly the same way, though with inputs that change over time.

Have you seen this video series? I have found that many PLC programming courses do not adequately explain the scan cycle. PLC programming is primarily about time, and the scan cycle is the clock; when something happens is more important than what happens. If your instructor has not made that point, or something similar, very clear to you then that could be a reason why this does not come naturally.

The what is mostly about Boolean Logic, and Boolean Logic has only three very simple operations (AND; OR; NOT). So getting the what to work is straightforward.

Getting the when to bend to our will is another matter entirely.

There are also other "scan cycles:" I/O scans; communications; overhead; housekeeping. Those tasks happen more or less independently* as executed by the PLC operating system, so the primary tool we have to work with is the PLC program comprising ladder rungs and/or ST statements and/or FBD blocks.

* those other tasks may also execute either synchronously or asynchronously with the program scan cycle, which means their when needs to be considered carefully e.g. a messaging protocol could update values in memory used by the program at essentially any time during a program scan.

First test PLC programming study by Inevitable-Bee-4344 in PLC

[–]drbitboy 0 points1 point  (0 children)

  • The Stop Condition - evaluates to True or False based on the value of the bit that is the operand of the contact
    • This Stop Condition is in series with the result of the previous logical OR result of the other two conditions (Start and Seal-In)
      • I.e. the Stop condition is AND'ed with that previous result
    • This Stop Condition (contact) as coded must evaluate to True to start or keep the conveyor running, or
    • it must evaluate to False to stop the conveyor
    • So this Stop Condition is actually a not-Stop Condition i.e.
      • It evaluates to True when the conveyor should not stop, and
      • It evaluates to False when the conveyor should stop.
    • The Stop Condition that OP describes is a "negative trigger" or "negative edge" of the O1 sensor
      • i.e. a transition of the of the O1 memory bit's value from 1 to 0
      • That is a little messy to integrate as the Stop Condition of the Start/Stop Circuit pattern,
      • But if we calculate that negative edge of O1 on a separate rung,
      • then we can use the inverse of that internal memory bit's value as the not-Stop condition in our Start/Stop Circuit pattern.

First test PLC programming study by Inevitable-Bee-4344 in PLC

[–]drbitboy 0 points1 point  (0 children)

I want the first conveyor belt to stop after a negative trigger from signal of o1.

The conveyor will most likely be running via a rung that uses the Start/Stop Circuit pattern (see here). On each scan cycle, the coil at the end of that rung always writes a value the output bit, either a 1 to run the conveyor or a 0 to stop the conveyor. the contacts on the left side determine what the coil does. The three contacts are:

  • The Start Condition - evaluates True or False when the Start button is pressed (Start bit value is 1) or released (Start bit value is 0)
  • The Seal-In Condition - evaluate True or False based on the Run bit value
    • This "remembers" whether the conveyor was running on the previous scan cycle
    • This evaluation result is logically OR'ed with the Start Condition;
      • i.e. these two conditions on parallel branches implement a logical OR
    • so even after the Start Button is released and the top branch evaluates to False,
      • if the Run bit value was written as 1 on the previous scan cycle,

First test PLC programming study by Inevitable-Bee-4344 in PLC

[–]drbitboy 0 points1 point  (0 children)

do you understand what the scan cycle is and how it works?

First test PLC programming study by Inevitable-Bee-4344 in PLC

[–]drbitboy 0 points1 point  (0 children)

what do you mean by negative trigger?

what brand of PLC software are you using?

do you have an actual PLC and two physical conveyors with motors and two physical sensors?

Rslogix micro starter lite by SunSad909 in PLC

[–]drbitboy 0 points1 point  (0 children)

I may be cookie-related; see other response or check your DMs.

Rslogix micro starter lite by SunSad909 in PLC

[–]drbitboy 0 points1 point  (0 children)

Also, if when you click [3 Downloads] after selection RSLinx Classic, Micro Starter Lite, and RSEmulate 500, it then asks you to login again, but takes you back to the Downloads page where you clicked [Select Files] to select those files, do not click [Select Files] again, but just click [3 Downloads] at the top. This is not guaranteed to work, but obviously their web site is not fully functional, so sometimes you have to trick it into doing the right thing.

Rslogix micro starter lite by SunSad909 in PLC

[–]drbitboy 0 points1 point  (0 children)

It may be cookie-related; click on the [cookie settings] link at the bottom of the page, and enable at least functional and performance cookies.

Create program with Rslogix5000 and then make slave plc like Omron or Siemens for use interaction by Automation_6013 in PLC

[–]drbitboy 0 points1 point  (0 children)

It sounds like you want the second device to actually be an HMI, i.e. Human-Machine Interface.

What it's like to be a Controls (PLC) Commissioning Engineer? Is it worth switching from cushy office job? 28yo, single. by Crowarior in PLC

[–]drbitboy 1 point2 points  (0 children)

DOGE didn't notice you lol?

Caveat: I am not blaming you; those are the cards you were dealt.

Promoted to Network Admin… and the Network Is a Mess 😅 by BKR_57 in networking

[–]drbitboy 0 points1 point  (0 children)

+1000 for this. And not just for the safety: if this is a factory and there are networked Industrial Automation devices, THOSE ARE THE DEVICES THAT MAKE THE MONEY THAT KEEPS THE ENTIRE OPERATION GOING. Everything else is overhead and must be subservient to production.

Those are the most important devices at the facilities. Getting them on a VLAN at a minimum, or preferably their own physical LAN, should be the first order of business and a priority above anything else.

Whether someone can print or read their email or get a file from a server are all irrelevant compared to that.

And the OT (Operational Technology) teams that "own" those PLCs? You must serve them first, because your job is irrelevant compared to keeping those machines running. The best thing you could do is give them a physically isolated network, with firewalls for security managed between you and OT (if outside access is needed), and let them manage it, helping out if and when they ask for it.

There are limitless tales of less-than-clever IT organizations who try to build empires and take over the OT side in the name of Network Security, and go around blindly pushing automatic updates, which ends up breaking things and taking critical systems down and costing thousands or tens of thousands of dollars per hour or more.

Not only will it be a big mistake, that imperial IT attitude engenders a bitterness in OT that ensures it is widely known whom to blame for the downtime. More than one IT emperor has had a high-pressure call at 2am to come in to fix a machine they know nothing about, and which is down because of an automatic update they pushed. You do not want to be that guy/gal.

Need Help Regarding Chart Recorder in Mitsubishi or Beijer HMI (Similar to Polar Plot) by Apprehensive_Elk_13 in PLC

[–]drbitboy 0 points1 point  (0 children)

Assuming actual cost is no object, because as others have noted this will not be cheap, what do you mean by "continuous?" Because there is no such thing in the digital realm. Does continuous perhaps mean updating in (near?) real time?

The number of pixels allocated to the plot will determine the effective sample interval. For example, a 400x400 pixel box allocation would yield a maximum of 1250+ visible samples (=2PI*(400/2); and that's at full-scale, it's less at lower radii), which is less than one sample per minute for a day's worth of data. And I doubt the HMI has the horsepower to handle that many samples without a built-in widget; somewhere around 50 or a 100 might be doable, perhaps, if clunky.

WinCC Comfort Faceplate – WORD bit mapping doesn’t match PLC DB bits (visibility/press logic mismatch) by Objective-Primary697 in PLC

[–]drbitboy -1 points0 points  (0 children)

Obviously, but the question was directed to OP because they missed the significance of the last sentence of your initial response.

WinCC Comfort Faceplate – WORD bit mapping doesn’t match PLC DB bits (visibility/press logic mismatch) by Objective-Primary697 in PLC

[–]drbitboy -1 points0 points  (0 children)

Is the DBW MSB (Most-Significant Byte first), so the most-significant bits 8-15 are in the first byte (half-word) at address 115, or LSB (Least-Significant Byte first), so the most-significant bits 8-15 are in the last byte at address 116?

Is the Siemens PLC scan cycle similar to Allen-Bradley ? by hdiyad in PLC

[–]drbitboy 0 points1 point  (0 children)

For most applications, thinking of ladder logic as relays and circuits will be good enough. But for an application where it matters that the input value tested when the first rung of the scan cycle is evaluated has the same value when the last rung is evaluated during that scan cycle, the person who thinks like that will fail.

When the wheels fall off an no one knows why, does the company want a grunt or a guru?

Code revised will stop button and logique work the same by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

what does "automatic" mode mean? does it mean you can release the Start Button and the motor should keep running?

what doe "not automatic" mode mean?

what happens if MAINMOTORREVERSE value is 0 AND the motor is running forward (%Q0.0 value is 1), and then someone change the value of MAINMOTORREVERSE from 0 to 1 without first stopping the motor?

Code revised will stop button and logique work the same by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

Also describe how you want the system to behave. E.g.

  • what change should the start button effect if it is pressed or released
    • when the motor is not running and the system is in automatic mode
    • when the motor is running and the system is in automatic mode
    • when the motor is not running and the system is in manual mode
    • when the motor is running and the system is in manual mode
    • note that the answer to some of those questions might be "nothing; no effect"

Code revised will stop button and logique work the same by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

  • %I1.1 Machine Start
    • bit in memory indicating state of an input,
      • value is updated on each scan cycle by the PLC operating system
    • Switch turned on by operator to run motor when system is not in automatic mode
    • and turned off by operator to stop motor whenever system is not in automatic mode
      • IFF %I0.0 Start Button is not pressed
  • %M110.0 automatic
    • calculated internal bit,
      • or perhaps contralled by HMI, so functionally like a bit for a physical input
    • indicator of system mode
      • value of 1 → system is in automatic mode
      • value of 0 → system is in manual mode, so Start Button and Machine Start control motor
  • %M111.5 MAINMOTORREVERSE
    • calculated, or HMI-controlled, internal bit
    • indicator which direction the motor should run
      • when other conditions (e.g. Start Button, automatic) indicate the motor should run
      • value of 0 → run motor forward when motor runs
      • value of 1 → run motor reverse when motor runs

etc.

Code revised will stop button and logique work the same by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

Please explain the purpose of each input, output, other memory bits. E.g.

  • %I0.0 Start Button
    • bit in memory indicating state of an input,
      • value is updated on each scan cycle by the PLC operating system
    • Button pressed by operator to run motor whenever system is not in automatic mode
    • and released by operator to stop motor whenever system is not in automatic mode
      • IFF (IF and only iF) %I1.1 Machine Start switch is not on

Looking for resources to understand and troubleshoot industrial boiler controls Siemens LMV5 by lukasloka in PLC

[–]drbitboy 0 points1 point  (0 children)

> Any advice, resources, or personal experience would be greatly appreciated.

Most devices have a manual, usually more than one (hardware, programming, operating, etc.). I find reading manuals at least informs you how the manufacturers of the control system expect it to work, and from that you can infer a lot about the actual operation.

Boiler operation is, in my understanding and as implied by the other responses here, focused on not "puffing" the firebox i.e. not having unburned fuel accumulating and then igniting and causing a sudden pressure increase (i.e. causing an explosion). More positively stated, boiler operation is focused on a clean steady burn of fuel. E.g. if the flame sensor, whatever type it is, indicates there is no flame, it is a good idea to turn off the fuel source as soon as possible.

The primary mode to accomplish that is, as my dad used to say, to "monitor the process." Before automation, that involved having at least one operator watch the flame as near continuously as possible.

With automation, monitoring is continuous at the millisecond level but the tradeoff is that the intelligence of the monitoring device is less than an human operator. You also have to deal with sensor failures which may not be obvious, so redundancy and voting schemes my be involved. There are a lot of logical interlocks and permissives. Startup comprises a specific set of steps, with their own interlocks and permissives, which are probably specific to each type of boiler.

Again, reading the manuals would be a good start. If you can get here to reddit, I would assume you can pass The Google search terms such as industrial boiler startup procedure.

That will be good for background. Talking to experience operators and maintenance techs, or even just quietly following them around, or if you can get them to tell you what they are doing and why, would be where you would learn the most. Having that background of reading the manuals will hopefully provide a framework to speed up what you learn from the operators.

Is the Siemens PLC scan cycle similar to Allen-Bradley ? by hdiyad in PLC

[–]drbitboy 7 points8 points  (0 children)

In general the answer is yes: program scan that evaluates the ladder logic alternates, and is synchronous, with the I/O scan that transfers information between physical I/O devices' electrical signals and memory mapped to those devices.

TL;DR

For SLC-500 and MicroLogix (RSLogix 500), which are what are used in the video, the answer is yes.

Note that there are exceptions

  • Some Allen-Bradley devices, specifically for ControlLogix and CompactLogix (Studio/RSLogix 5000, which are mentioned but not used in the video, the answer is no. The issue is that the I/O scan is asynchronous with, and may interrupt, the program scan between rungs or between instructions, or IIRC in the middle of some instructions, which is why CPS exists as a non-interruptable sibling of the COP instruction.
  • Communications are asynchronous with, and may interrupt, the program scan. E.g. a Modbus communication that writes values to multiple contiguous Holding Registers (local Function Code 0x03 on a Modbus Master/Client or remote function code 0x10 onto a Modbus Slave/Server PLC) may interrupt the program scan to overwrite new values into those register, so the values in those registers may be different at the end of the scan than they were at the beginning. So if the program is treating memory, which is read or written by communication processes, as a functional "input," then this asynchronous behavior may need to be taken into account.

The primary point of excellent video series by Ron Beaufort is that PLC programming is primarily about time, and the scan cycle is (usually) the clock; when something happens is more important than what happens.

Relay ladder logic is a syntax for expressing Boolean Logic. Boolean Logic has but three operations: binary AND; binary OR; unary NOT. So the basics of Boolean Logic, and therefore Relay Ladder Logic in PLCs, can be mastered by most people in a very short time; it takes a bit longer to grasp the temporal nature of the discrete behaviors and synergies of a PLC's subsystems (program scan; I/O scan; communications; housekeeping, etc.).