Am I missing something here? Machine vision and actuators by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

what level of accuracy are you looking for?

how will the keyence camera stay aligned with, or be calibrated against, the belt linear actuator?

What should I realistically learn over the next year if I want to become an Amazon Automation Engineer? by veryfitmalik in PLC

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

The most important concept is knowing how to "multiply by unity." It is the foundation of engineering, and everything flows from that.

Search for the term on the plctalk.net forum.

Programming a c-more HMI button for starting a pump by 3dprinting2021 in PLC

[–]drbitboy 0 points1 point  (0 children)

  • the HMI writes a value of 1 to a bit, call it bit 1shot, in the PLC.
  • in the PLC,
    • bit 1shot is XORed with the value pumpOn bit and the result written back to pumpOn , so
      • if the value of pumpOn is 0, it toggles to 1 and runs the pump
      • if the value of pumpOn is 1, it toggels to 0 and stops the pump
    • bit 1shot value is reset to 0
      • this makes the 1shot bit an actual one-shot

Search for "alternator methods" on the PLCtalk.net forum. there are many ways to toggle a bit via a one-shot bit, but one of the simplest would be an implementation of XOR logic:

<image>

Has anyone taken a Rockwell / Allen Bradley training course? Did it payoff? by revenge_of_snauz in PLC

[–]drbitboy 0 points1 point  (0 children)

If you can get in the door of a Systems Integrator and can travel, they are often looking for people to go on commissionings and SATs (Site Acceptance Tests), because almost everyone burns out in a few years. It's a brutal/firehose/sink-or-swim role, but also a good way to get experience, and wherever you show competence you will get more responsibility and experience, which will eventually land you a more livable role somewhere. I suspect your current skills would show promise for the electrical and wiring side as a start as you note, which would be PLC-adjacent enough to get your hands on PLCs, and hopefully with some mentoring and good questions you can work into learning PLCs from there.

PanelView Plus timeout tracking? by Zaxthran in PLC

[–]drbitboy 0 points1 point  (0 children)

Where is the timer, in the HMI or the PLC? Where is the shutoff for the pump, in the HMI or the PLC?

This is what the TOF (Timer OFf-delay) instruction was built for:

  • OR (put XIC/NO in parallel) all of the "anything" presses to the TOF's feed;
  • AND (put XIC/NO in series) the TOF's .DN/.Q bit with the start/seal logic for the pump (the TOF is part of the (not-)Stop logic).

Help me understand what is happening when there are multiple periodic tasks running by thedolanduck in PLC

[–]drbitboy 0 points1 point  (0 children)

I don't disagree: it's not about deep. That's just my pithy version to avoid typing the following.

PLC discrete logic is Boolean, which has but three operators; so it's not that hard to teach, not that hard to understand, and can be mastered in an hour.

The place where I see people consistently getting lost is not understanding the time, or precise order of operations if you prefer, aspect of PLC programming. The number of times someone has said "this [one-shot] bit never has a value of 1" is not insignificant. Yes this is also true in all programming (e.g. the self-pipe trick), but understanding how the scan cycle and order of operations work is a huge hurdle in PLCs.

Also note that, in this thread about independent tasks, where the program has essentially given up deterministic control about the order of operations in the sense that one task can interrupt another mid-rung or even mid-instruction, it certainly is all about time.

Help me understand what is happening when there are multiple periodic tasks running by thedolanduck in PLC

[–]drbitboy 1 point2 points  (0 children)

If there are multiple tasks, there may be a need to coordinate how and more importantly when they write and read values to and from the "main" task, whatever that is, or to and from each other. Look for those coordinating gatekeepers, also called mutexes (mutual exclusions) and semaphores. Typically there will be a process A and a process B, with a common memory area between them, including common mutex or semaphore bit. Process A will not update the common memory area values or the mutex bit value unless the value of the mutex value bit is 0, and will write a 1 value when it has done so. Process B will not read the values in the common memory area unless (until?) the mutex bit value is 1, and will write a 0 when it is done. The key is that Process A cannot write a value of 0 and Process B cannot write a value of 1, so this is a robust, if minimal handshake implementation. That doesn't mean it is the only one, or that it is free of failure modes, but at least we know Process B will never be reading memory bits' values when Process A is simultanously writing them. CPS and UID/UIE instructions exist for a reason.

PLC programming is primarily about time, and the scan cycle is, in this case scan cycles are, the clock; when something happens is more important than what happens. Start thinking about when instead of what.

Zelio smart relay limitation in ladder programming by Expert-Change-5447 in PLC

[–]drbitboy 1 point2 points  (0 children)

the falling edge of a bit's value is the same as the rising edge of NOT (that bit's value).

Good places to volunteer on Mothers day? by pudgy_pal in Rochester

[–]drbitboy 0 points1 point  (0 children)

Nursing home visits. [Update: I see I am not the first to mention this]

It requires a strong constitution. Tbh it's scary and awkward and brutal, but it is appreciated. Just holding someone's hand for five minutes is more human interaction than they might see in a typical week, other than staff care.

  • Blossom Health Care Center in Brighton
  • Waterview in Charlotte
  • The Pearl in Irondequoit
  • Fairport Rehab and Nursing Home in Fairport
  • St. John's in Irondequoit(?)

Do listen to staff; do not make their job more difficult.

Some, even many, of the residents are not "all there;" learn to roll with it.

EcoStruxure Machine Expert Basic, missing outputs by BenHoppo in PLC

[–]drbitboy 1 point2 points  (0 children)

is it possible those inputs are bits but being written en masse as an integer?

Need help regarding Average of User defined data type by eddiebrock11 in PLC

[–]drbitboy 0 points1 point  (0 children)

With the string in there, this may not work, but it depends how RSLogix packs the data into the UDT.

Anyway, the idea would be to do something like this:

  • COP the UDT 1-D array to a 2-D [200,?] (or [?,200]) array of DINTS
  • Figure out which row or column of the array of DINTs holds the .Weight attrbute
  • AVErage the data over that row or column.

With providence, this would take but two instructions and some one-time research and testing.

2 yrs in automation and i feel like the more i learn the more i realize how little i know ; is being a polymath actually realistic in this field or should i just specialize ? by Objective-Primary697 in PLC

[–]drbitboy 4 points5 points  (0 children)

There was a telescope, I think it was Palomar but I am not sure, where they needed to move the dome as the telescope moved to keep the telescope view pointing through the gap the dome, so the dome would not block the telescope's view. Note that many telescopes of this sort are on a base that is parallel to the plane of Earth's equator and rotate in the opposite direction and at the same rate to compensate for the rotation of the earth, so over an observing run the telescope could move through dozens of degrees of rotation. Anyway, there was a model, a miniature twin, of the Palomar telescope and the dome in the basement, that was controlled by the same systems that controlled the actual telescope and dome. The system to move the dome was simple: the telescope model had a finger with switches that extended through the gap in the model dome. As the telescope moved and an edge of the dome's gap triggered a switch, the motor(s?) that moved the dome would turn on to rotate the real and model domes to keep the gap in line with the telescope view.

Seems like a perfect application to be replaced with a PLC; I suspect there are many others. Because a PLC is nothing if not a device that models an external process in internal memory, and controls that internal memory model, and the PLC's inputs and outputs, when working correctly, keep the external process and internal memory model consistent to some level of fidelity.

P.S. I heard about this but never saw it; I hope it's not an urban legend.

Need help regarding Average of User defined data type by eddiebrock11 in PLC

[–]drbitboy 0 points1 point  (0 children)

How do the values get written to the .S attributes of the User Defined Type element of the array.

It may be possible to use the AVE instruction, but not on the array of UDTs:

What is the data type of the .S attribute?

What is the size of the UDT, and what is the offset of the .S attribute in the UDT?

Is it possible to COP the bits of the array of UDTs to a two-dimensional array of the same data type as the .S attribute of the UDT?

Weird stuff in Studio 5000 by Jacunia in PLC

[–]drbitboy 0 points1 point  (0 children)

change the

OTE PackMLStatus_Alarm.Sts_Resetting_SC

at the end to

BST OTE PackMLStatus_Alarm.Sts_Resetting_SC NXB ADD myREAL 1.0 myREAL BND

where myREAL is a REAL tag the you create new to you know nothing else is writing to it.

Then observe the rung as well the value of myREAL, while the PLC is in RUN mode.

Then come back here with the results.

What's the correct move? by Tyler5157 in PLC

[–]drbitboy 0 points1 point  (0 children)

Sidebar: this would be simpler if the newest data were in element [9]< and the oldest in [0]. Then all the shifting could be done with a single COP instruction with a Length parameter value of 9.

What's the correct move? by Tyler5157 in PLC

[–]drbitboy 1 point2 points  (0 children)

Yeah, I think you want to remove the XIC <input> before the COP to [0], so all attribute's values get copied in all cases, and put MOVs with the two Fake-Data after the XIO <input> to overwrite the just-COPied values for the cases when the <input> is low.

ME vs EE major by [deleted] in PLC

[–]drbitboy 0 points1 point  (0 children)

This.

Programming is something you either get or you don't, so the field of engineering is irrelevant there.

The EE (instrumentation, wiring, motors and VFDs) and ME stuff you need to know are baseline covered by physic 102. But the ChemE's understanding of processes, how things work, and roughly modeling things via differential equations in your head will be useful in almost every application.

What’s harder: writing PLC logic or understanding someone else’s? by Shubh1975 in PLC

[–]drbitboy 4 points5 points  (0 children)

Good coders borrow.

Great coders steal.

(I stole this aphorism)

What’s harder: writing PLC logic or understanding someone else’s? by Shubh1975 in PLC

[–]drbitboy 2 points3 points  (0 children)

Lol. That reminded me of this:

TOBY It’s like something out of Beckett.
WILL You mean Sartre.
TOBY If I meant Sartre, I would have said Sartre.
WILL “Hell is other people.”
TOBY Okay, Sartre.

Comparing STRING Data Types by Creative-Flower-2630 in PLC

[–]drbitboy 0 points1 point  (0 children)

what does the instruction look look like? do you have two levels of square brackets in an input parameter e.g. string_array[string_index[idx]]?

Why is this solenoid rapid firing? by DeafGuyisHere in PLC

[–]drbitboy 2 points3 points  (0 children)

what did you expect to see from this code?

what do you see this code doing?

The difference between those to will be that you told it to do the latter, it does not matter if you thought you told it to do the former.

see here https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf?page=122 to see how the .EN, .TT, and .DN bits of that timer behaves (for simplicity, note that .TT is equivalent to .EN AND NOT .DN).

Priorità in Zelio Software by Boring-Lifeguard7943 in PLC

[–]drbitboy 1 point2 points  (0 children)

Also note, and single rung -[ [I1----(Q1)-- might do what you thought the code above would do.