Seimens logosoft demo programming problem

Hi all. I am currently at a standstill trying to make the following circuit work. I have attached a screenshot of the circuit i have so far but cant get it to
work correctly. Quite new to this so any advice/help is appreciated.I will upload the question shortly due to the kb file limit 20260602_080052.jpg
 
Use LOGO to design and build the above system, using function block or ladder logic, which will control the operation as follows:



When the ‘push to make’ Start (not toggle) switch (I1) is pressed/released, and gets latched on (B1: RS latch), the start ‘fill’ solenoid A (Q1) will be energised and the tank will start to fill.

A flow meter 1 (B2: 1s pulse generator) can be used to increment the counter (B3: Up/down).

Tank level full sensor switch indicator (Q2) can be activated when the counter function on = 8 (e.g. use on/off flag: M1) causing the fill solenoid A (Q1) to be shut-off

When the tank is full, start the mixer motor (Q3) and run for 12 seconds (B4: off-delay timer).

When the 12 seconds has expired, stop the mixer (Q3) and energise ‘empty’ solenoid B (Q4) until the tank is empty

To monitor the tank emptying, pulses generated by a flow meter 2 (B5: 1s pulse generator) should be used to decrement the counter (B3: Up/down).

Tank empty can be detected using the empty sensor switch indicator (Q5) when the tank low level counter B3 function off = 1. (e.g. use on/off flag: M1)

When the ‘push to make’ Stop button (I2) is operated, the process must stop immediately, but can continue from where it left off, when restarted (I1).

The process should automatically reset and repeat until the stop switch is pressed
 
Hi all. I am currently at a standstill trying to make the following circuit work. I have attached a screenshot of the circuit i have so far but cant get it to
work correctly. Quite new to this so any advice/help is appreciated.I will upload the question shortly due to the kb file limit View attachment 82819

LOGO FBD is mostly a syntax for Boolean Algebra, in which there are only three operators: AND; OR; NOT. The rest of the blocks compound those three atomic operators.

That logic shows you probably understand AND and OR, but have not yet learned that positive logic cannot do everything, because there are not;) any NOT operators ([1] blocks or inverted inputs) in that logic.

The first thing you need to do is express, in Boolean-like terms, what states the three outputs (Fill pump; Mixer motor; Empty valve) should have in terms of the state of the system. For example:
  • the System is Started M flag value is 1 when the Start button has been pressed and the Stop button has not been pressed since
  • the System is Started M flag value is 0 when the Stop button has been pressed and the Start button has not been pressed since
  • the Fill Pump output value is 1 when the tank is NOT full and the System is Started M flag value is 1
  • the mixer timer is timing, or held in the expired state, when the System is Started M flag is 1 AND the tank is, or has been, full AND the tank is not (yet) empty
  • the Mixer Motor output value is 1 when the System is Started M flag value is 1 AND the tank is full AND the mixer timer is NOT expired
  • the Empty Valve output value is 1 when the System is Started M flag value is 1 AND the tank is NOT empty and the mixer timer is expired;
  • the Empty Valve output value transitions from 1 to 0 when the tank becomes empty (counter drops to 1 and counter output bit transitions from 1 to 0).
Then code that logic using the LOGO syntax.

The only problem with that example is that, if the mixer timer is a simple On-Delay timer, then it will reset if Stop is pressed, so the full mix duration will restart when Start is next pressed. To get around that, the Retentive On-Delay timer should be used, but then there will need to be an explicit reset of the timer when the tank becomes empty.
 
Do it one piece at a time. I would start with the tank level simulation using the Up/Down Counter. You have that already, I think, but I would clean it up and add comments to each block so it's easier to follow. Sometimes just describing what is happening give insight (see Rubber duck debugging - Wikipedia).
 
Ive been going back through it bit by bit and could do with someone not just pointing out my error but explaining it. Going back through it on my own im just going round and round
 
Ive been going back through it bit by bit and could do with someone not just pointing out my error but explaining it. Going back through it on my own im just going round and round
For starters, the Start button input I1 goes to an RS (Reset/Set) block that Starts the Fill pump. And there is no other way to Stop the fill pump other than resetting that RS block. So the only way to start or stop the Fill pump is via that RS block. But what if Stop was pressed during the mixing cycle, so when Start is next pressed, the system should be starting the mixer, not the Fill pump? So from the very start you can see that your present architecture cannot be made to implement the necessary logic to solve this assignment.

The code needs to keep track of the current state of the system (filling, mixing, emptying) internally, and that must be independent of the Start/Stop state of the overall system controlled by the Start and Stop buttons. So start there: wire the Start I1 and Stop I2 button inputs to an RS block, and label (add a comment to) that RS block as (of) Running. Note that the Start I1 and Stop I2 input will not need to be connected to any other blocks; everything else will be driven by the output of the Running.

What I am getting at is that there is only memory, and you will implement a model of the process in memory, and the blocks you choose along with the logic connections you make between them will allow the Logo device (or the simulator) to control that model in memory. So the first thing you will need is to create a data model, comprising bits in memory.

Some of those memory bits will be proxies for physical inputs (I1, I2, AI1, AI2, etc.) over which your logic has no control. Note that your logic does not access the physical electrical input signals directly, but only indirectly as bits in memory which are proxies for the physical electrical signals.

Some of those memory bits will be proxies for physical outputs (Q1, Q2, AQ1, AQ2, etc.), which proxies, and not the electrical signals, your logic will control; HOWSOMEVER, you must NEVER think that your logic controls the physical electrical output signals directly; the logic only controls bits in memory, which the Logo operating system will convert to electtrical signals.

Some of those memory bits will be neither proxies physical inputs nor proxies for physical outputs. Some are called Flags: M-flags for discrete, 1-bit values; AM-flags for analog multi-bit values. There are also the output states of the various blocks e.g. the Output Q of a Retentive On-Delay timer, that has a value of 1 or True when the timer accumulator value has reached the timer On-Delay preset value, and a value of 0 when the timer accumulator is less than the On-Delay preset value.

A PLC works by doing three things
  1. reading the physical electrical input signals, and putting the results into memory input proxies In and AIn.
  2. evaluating the user-supplied logic, which logic comprises the blocks and connections between them, in some pre-determined order during and event called a scan cycle, and writing the results of those evaluations to memory (Mn, AMn, Qn, AQn).
  3. reading the values in memory output proxies Qn and AQn, and converting those memory values into physical electrical output signals
One pass through those three steps is called a scan cycle; as soon as one scan cycle is complete, after some housekeeping activities over which the user program has no control another identical scan cycle starts, although values in memory may be different than for the previous scan cycle (e.g. timers accumulate time; input signals change; etc.).

That may oversimplify how PLCs work, but for 95% of tasks, and certainly for the current homework assignment of this thread, it is more than adequate.

Maybe you already know all of the above, or it has been explained in class, in which case your current syllabus is both rare and above average in quality. If not, I exhort you to start thinking about any PLC you interact with in that way. As my brother, with nearly four decades of experience in industry, says, "if you want to understand a PLC, you have to get stupid, because the PLC is stupid."

We are going to take this one step at a time. The first thing is to identify the memory the user logic/program will use: inputs; outputs; flags. Also figure out what else might be needed (e.g. a timer for mixing; a counter to model tank level). Then put all of those items on a tab in LogoSoft; don't connect anything yet. Use 1780424962136.png-Shift-S and drag to copy a screen-image rectangle, and post it into a response here. Here is an example of the model for the Up/Down-Counter-as-tank-level:

1780425174709.png​
 
P.S. the Retentive On-Delay timer of Logo does not work like the words describe; it is a fixed-time delay rising edge after, and initiated by, a rising edge input. The accumulation of time cannot be paused once it starts; it can only be reset to 0 by the R-pin.

It's closer to a latching relay [RS] with a delay on the Set pin.
 
There are many differences & problems from the OP's logic & the assignment text.
When the ‘push to make’ Start (not toggle) switch (I1) is pressed/released, and gets latched on (B1: RS latch), the start ‘fill’ solenoid A (Q1) will be energised and the tank will start to fill. (there is no pump mentioned)

A flow meter 1 (B2: 1s pulse generator) can be used to increment the counter (B3: Up/down).

Tank level full sensor switch indicator (Q2) can be activated when the counter function on = 8 (e.g. use on/off flag: M1) causing the fill solenoid A (Q1) to be shut-off

When the tank is full, start the mixer motor (Q3) and run for 12 seconds (B4: off-delay timer).

When the 12 seconds has expired, stop the mixer (Q3) and energise ‘empty’ solenoid B (Q4) until the tank is empty
(Again there is no pump mentioned)

To monitor the tank emptying, pulses generated by a flow meter 2 (B5: 1s pulse generator) should be used to decrement the counter (B3: Up/down).

Tank empty can be detected using the empty sensor switch indicator (Q5) when the tank low level counter B3 function off = 1. (e.g. use on/off flag: M1)

When the ‘push to make’ Stop button (I2) is operated, the process must stop immediately, but can continue from where it left off, when restarted (I1). (this is confusing, stops immediately but can be restarted but stops when stop switch has been pressed although could be achieved with extra logic see next text)

The process should automatically reset and repeat until the stop switch is pressed (As Above, does this mean repeat & stop when stop button pressed only when tank is empty i.e. continue to run after a stop & start button pressed but stop when tank empty).
Yet another confusing assignment from some academic institution.
 
Thanks for all the input. If someone could post their interpretation of what's required as a "circuit" on screen and talk me through it id appreciate it
 
Thanks for all the input. If someone could post their interpretation of what's required as a "circuit" on screen and talk me through it id appreciate it

What do tha' see at the bottom of Post #8? Duplicate it in your LOGO! IDE; replace the red blocks with inputs for testing; turn those inputs on and off and see how the blocks respond; use the help menu for each instruction to understand how each works, and how they work together. FYI that is about half of what is required for the entire assignment.

Despite OCD issues and a desire to show how smart we are, we don't do homework here. Not to put too fine a point on it, but one of us could be walking around a process tha' coded, and we don't want to get hurt or killed because tha' passed a course and got a job without actually understanding how a PLC works.

However, we will patiently walk and talk tha' through doing it tha'self.

That attached image is designed to help tha' understand how the Up/Down Counter works.
  • Duplicate this code
    • ensure the Input is configured as a Momentary)
  • Press the [Simulate] button in the toolbar
  • Click on the Input button a few dozen times
    • Observe how the count value behaves on each click
    • Observe that the behavior changes as the count value changes
  • Answer these queries
    • When the count value is 1, and the Input "Pulse Generator" Input button has 7 off→on transitions, how does the count change?
    • What happens to the Counter output (and the M-flag) on the last of those seven transitions?
    • What happens to the count on the next off→on transition? Why is that different from the first seven transitions?
    • What happens during and after six more off→transitions?
    • What happens after that?
    • What does this tell you about the memory allocated to the Up/Down Counter?
      • Do the Up/Down Counter's internal memory values persist across scan cycles, and do those values affect how the counter behaves when it sees an Off→On transition on its [Cnt] input pin?
        • I.e. does the Up/Down Counter remember its state across scan cycles?
    • Note that the Up/Down Counter increments but once per press of the Input button, even though the counter is evaluated many times, i.e. over many scan cycles, while the Input button and the counter's [Cnt] input pin are held in the On state for each press.
      • How do you think the Up/Down Counter "knows" to increment or decrement its count only at the initial On→Off transition of its [Cnt] input pin?
  • How can tha' use an Up/Down Counter and its output
    • to simulate the level in the tank?
    • to keep track of the state of the sequence for the assignment?
    • to program the PLC to stop filling when the simulated tank is "full?"
    • to stop emptying when the simulated tank is 'empty?"
    • to know when to run the mixer motor in the simulated tank?
This manual simulation exercise (input→counter→flag), of a single small part of the overall sequence, is something I suspect even experienced coders do all the time, because it solidifies the understanding of the temporal behavior of the individual blocks.

That's the ball game.

The main point I am trying to make is that it is difficult if not impossible for anyone to code all the steps (e.g. simulate tank, start/stop, fill, mix, empty, repeat) of a complete integrated sequence in one go. It is far easier to build one relatively independent part of the sequence at a time, and integrate those parts later, because the scan cycle ensures that all parts are evaluated continuously (actually discretely and repeatedly, but at a frequency that looks like it is being done continuously). There is little value in showing tha' how to program a fill/mix/empty/repeat sequence, because every other job will be different. It is far more valuable for tha' to learn how to approach designing and coding the control for any process.

If tha' still don't see it, ask questions, but don't post again until tha' have gone through the exercises above, take notes, think about what you are seeing. I would hope the course has provided guidance like this, but if not, then try it out.
 

Attachments

  • 1780486523002.png
    1780486523002.png
    67.2 KB · Views: 6
Thanks for the response. The course has not provided anything like you have tried to explain. The question is part of an assessment and I was literally told to download LOGO and"have a practice". I am an electrician doing a HNC and this is part of 1 assessment. It is distance learning with some notes available online and no feedback or help from tutors, not classroom based. Probably why I am not quite grasping it. With everything you have posted, I will start again.
 
This is what I have duplicated but replaced with Inputs I1 and I2. Set as momentary but when I toggle them nothing happens. I haven't added any text yet obviously
 

Attachments

  • 17804974831318334093002290715959.jpg
    17804974831318334093002290715959.jpg
    395.6 KB · Views: 7
This is what I have duplicated but replaced with Inputs I1 and I2. Set as momentary but when I toggle them nothing happens. I haven't added any text yet obviously

You need to hold the inputs down for an extended period for anything to happen, they are momentaries not toggle-switches.

Right-click on the input pin connection on B005 from B004 and select [Invert ...].

Right-click on the input pin connection on B001 from B006 and select [Invert ...].
 

Similar Topics

Hello dears, Any one can help me in this problem. Now I have a system for boiler plc S7-300 and hmi mp277 8" when operating it this massage...
2
Replies
803
Views
We are getting an error that says the configured module is 6ES7 414-4HJ04-0AB0, but the inserted module is 6ES7 414-5HJ06-0AB0. I dont know what...
0
Replies
626
Views
opening up a copy of my HMI program I can go to where the passwords are created but they are all asterisks. How can I view what is there? I see...
4
Replies
1,910
Views
I have installed ver 16 of tia portal and I am running in the 21 days grace period. My question is this, is it fully functional during that 21...
8
Replies
4,400
Views
Hi; In our corrugator plant, there are one Corrugator and five Flexo graphic printing machines. One of them is a BOBST brand French made...
1
Replies
2,571
Views
Top