| View previous topic :: View next topic |
| Author |
Message |
Eremiaion Junior

Joined: 02 Apr 2019 Posts: 3
|
Posted: 02/04/2019 13:40 Post subject: Input combination |
|
|
| Hello all! I'm new to programming and I would have some help. I have a Schneider m221 plc and i use somachine basic for programming. The question is the following. How can i make calculations like combinations of 7 take 5? and here I am strictly referring to the IN. It can be made simple with NO and NC contacts, but from many program lines it does not move anymore, and the work is colossal. Can a user defined block be able to calculate the number of active IN and to activate an output depending of the numbers of IN? Or any other solution. Thank you very much |
|
| Back to top |
|
 |
vimy65 Junior

Joined: 07 Aug 2018 Posts: 2
|
Posted: 02/04/2019 17:36 Post subject: |
|
|
very simple..
if I1 active then a=1;
if I2 active then b=1;
..
if I7 active then h=1;
N=a=b=c+..+h;
if N>5
then Q1=1;
well this is the logik..you must adapt program... |
|
| Back to top |
|
 |
Eremiaion Junior

Joined: 02 Apr 2019 Posts: 3
|
Posted: 03/04/2019 12:26 Post subject: |
|
|
| Hello. Thancks, I already solve the problem. |
|
| Back to top |
|
 |
|