Seimens logosoft demo programming problem

Hi drbitboy. No I dont. I kinda wish id done this HNC with a different company. You have been more help in the last couple days than them in total but I am invested. Apologies and I can understand your frustration with me. This is just one part of the whole thing
 
Ok done that and now the counters are moving
Excellent.

1780534390959.png​

A few things to take notice of:
  • When the count value is 8 i.e. at or above the On parameter value of 8+,
    • The output (B006 Counter Q) value is always True
    • This prevents the circuit as shown from counting up beyond a value of 8, even if I1 is held down
      • because the True output of the counter becomes False
        • at the inverted input bin of B001 AND (&),
      • which ensures the output of B001 & is False, so Q1 Fill Output is off
  • When the count value is 1 i.e. below the Off parameter value of 2
    • The output value Q is always False
  • When the count value is in the range [2:7], i.e. between those limits
    • The output value Q depends on the last limit reached by the count value:
      • If the count value was most recently 8 not 1, then the output value Q is True
      • If the count value was most recently 1 not 8, then the output value Q is False
  • Stated another way
    • Filling: when counting up from 1 (empty) to 7 (nearing full), the Up/Down Counter output value is False
    • Emptying: when counting down from 8 (full) to 2 (nearing empty), the Up/Down Counter output value is True
  • So the logic can use the B006 Up/Down Counter output Q value to keep track of whether the process should be Filling or Emptying
In fact, remove I2 and connect I1 both to B001 & and to B002 & (note that it is already connected to B001 &. When you press and hold I1, the count increments from 1 to 8, at which point B006 output Q value transitions to True, so the count then decrements from 8 to 1, at which point B006 output Q value transitions back to False, so the count then starts incrementing again, i.e. it repeats.

Also note that if you release I1 at any point, the B006 output Q value maintains (remembers in memory) its value, so it continues incrementing or decrement when I1 is pressed and held again.

So with this simple circuit, we have two behaviors (i) repeating, and (ii) re-starting from a previous state.

That means we can replace the momentary input I1 with [what?], and well over half of the assignment's behavior will have been implemented.
 
Replace I1 with a relay ?

Yes, exactly (y), a Latching Relay [RS] block, driven by [?] (two blocks).

The comment (label) on that [RS] block will be [?]; it is a good idea to get in the habit of putting comments in the code, even for homework assignments.

P.S. do you have any questions about the rest of the logic?

Then we need to add the Mixing step between the Filling and Emptying steps.

The Emptying step in the current code starts immediately on completion of the Filling step i.e. the "tank" becomes "full" i.e. the count increments from 7 to 8 i.e. the Up/Down Counter output transitions to True.

So we need to delay the start of the Emptying output for 12s to allow for the Mixing step. There are two approaches here:
  • EITHER construct logic to run the Mixing output for 12s after the tank is full,
    • and inhibit the Emptying output while the Mixer is running
      • which means adding a [NOT Mixing] connection to a third input pin on the existing B002& block,
  • OR construct logic to delay the Emptying output for 12s after the tank is full
    • and inhibit the Mixing output while the Emptying output is active.
I don't know which will be easier; it will most likely depend on the requirement to allow stopping the sequence and later restarting in the same step where it was stopped.

Background

This system has essentially only one input (Running*) and three outputs (Fill; Mix; Empty). In the physical system there would also be high and low level inputs, but for this simulated assignment we have a tank model using the Async Pulse Generator and Up/Down counter indicating whether tank was most recently Full or Empty.

* The latched Running input is a combination of the Start and Stop momentary inputs.

Note what we are doing here

Whenever Running is False, all outputs are off (False).

Whenever Running is on (True), exactly and only one of the outputs will be on (True), and the others will be off (False).

Since there are only three outputs, that means the logic needs only directly control two of the outputs based on tank level and timer values; the third output can be controlled by difference i.e. the third output will be on (True) when (i) the other two are both off (False i.e. NOT True), AND (ii) Running is on (True).

Each of the three outputs could be driven by some logical combination of Running, Tank Level, and a Timer. I'm not saying that would not work, but it would be more complex.

Also, I am guiding you down a road here. But it is not the only road. After we finish this, it would make sense for you to try to come up with an alternate approach, perhaps one that is easier to understand. For example, a cascade or stack of Latching Relay [RS] blocks might be another way to handle this, where each step's relay triggers (Sets) some events, which events in turn eventually trigger (Set) the next step's relay. Since a Latching Relay holds (latches) its state even when its Set pin becomes False, a stack of such relays would retain the current step in the sequence a restart after the Stop button input was pressed.
 
Yes. So now I need to add the next step, make alterations to allow the delay of emptying after filling for the mixing stage. This would be done at B006 ?
 
Yes, the code needs a timer (delay Emptying while Mixing as you say).

Why do you suggest B006 is related to the delay (I am trying to make you do the work, and provide less explicit direction)? How will the timer control the Mixing and/or the Emptying output? Remember the utility of the Boolean NOT operator!

On-Delay timer seems most straightforward. However, the assignment mentioned using an Off-Delay timer, and I see you used and Edge-Triggered Wiping Relay in your earlier logic. I suspect it could me made to work with any of those.

Make sure you know how each of those timers work by running temporary experiment off to the side of the existing code: feed a timer from an input(s); set a 3-5s preset/delay/pulse width; put it in Simulation mode, and play with the inputs to see how the timer behaves.

Also, while you might have success with one approach (type of timer) initially, it might be difficult to meet all the assignment objectives with that first choice and you would need to start over with another type: that is a normal part of the process. That time will not have been wasted, because even though it seems like a dead end, you will have learned more about the process, about how the blocks behave, and that learning will inform, and improve, your subsequent choices.

So poke around, try to figure out the next step, and come back here when you either have it, or get stuck.

[Don't read the rest of this, or at least don't think about it while you solve the initial timing problem and get an uninterrupted, repeating Fill/Mix/Empty cycle working.]

For example, say you use an On-Delay timer that starts when the tank is full, so the Fill output has turned off. The logic would be something like
  • Start/run 12s On-Delay timer while tank is not empty i.e.
    • while counter output is True when count stays at 8 for Mixing
      • On-delay timer will time from 0s with timer output False,
      • until expiry at 12s.
    • As counter output is True as decrements 7-2 for Emptying
      • On-delay timer will hold at expiry (12s) with timer output True.
    • until Counter count drops to 1, at which point
      • Counter output becomes False, and
      • timer should reset
That is pretty simple, but how does that logic handle the possibility of someone pressing the Stop input button during either Mixing or Emptying
  • If Stop is pressed during the Mixing,
    • the Mixer output would turn off (False), but
    • the Counter output would remain True,
    • so if the timer were driven directly and only by the Counter output B006,
      • then the timer would keep timing and expire while the process is stopped (not Running),
      • so when Start was pressed to restart,
        • the timer would indicate 12s of mixing had happened,
        • although actual mixing time would be much less,
        • and the logic would start emptying the tank.
    • If the timer is driven by the Counter output ANDed with the Running state
      • then the timer would reset to zero when Stop was pressed,
      • and restart timing the full 12s of Mixing when Start is pressed to restart
      • So that might be an acceptable result.
  • If Stop is pressed during the Emptying, i.e. after a complete Mixing step,
    • if the timer is driven by the Counter output ANDed with the running state (second option above)
      • then the timer would reset to zero when Stop was pressed,
      • and restart timing the full 12s of a second Mixing when Start is pressed to restart
      • which is probably not an acceptable result.
 
Ill have a try tonight. Needs to be submitted tomorrow so id better get it right.
Good luck! You are pretty close: there are less than half a dozen more blocks to implement and connect.

Btw, I noticed that my tank model uses one pulse generator driven by ORed Fill/Empty signals, while the assignment specified, and your original code implemented, two pulse generators, one driven by Fill and one driven by Empty, with the pulse generators' outputs ORed into the counter.

It could not matter less functionally, but it might be considered part of the assignment's requirement.
 

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