[?]: Negate output of counter

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
krneki
Posts: 21
Joined: Fri Jun 24, 2011 8:56 am

[?]: Negate output of counter

Post by krneki »

I need to negate output of counter down, so output Q0.5 will always be on 0 except when counter itself counts down from 2 to 0, then Q0.5 should be on 1.
I tried to solve that with |NOT|, but in that case, output Q0.5 will be on 1 by default, because counter is not initialized by M0.4 before program starts.

Image
krneki
Posts: 21
Joined: Fri Jun 24, 2011 8:56 am

Re: Negate output of counter

Post by krneki »

If we take a look at last network, imagine counter as box with bottles and Q0.5 as indicator for full box.
It should work like this: M0.5 inserts bottle into box.
When box is full, indicator Q0.5 is set to 1 (in all other cases, it's 0).
SHKODRAN
Posts: 199
Joined: Wed Dec 24, 2008 4:37 pm
Location: Europe

Re: [?]: Negate output of counter

Post by SHKODRAN »

Try like this , without siemens S_CD. :D

Code: Select all

      A     M    510.5
      JCN   END
      A     "CK1S"
      FP    M    510.0
      JNB   END
      L     MW   600
      +     -1
      T     MW   600

      L     MW   600
      L     0
      ==I   
      =     Q      0.5
      JCN   END
      L     10
      T     MW   600
END:  NOP   0