Help with a complex bit of math (Step7)

Join Date
Aug 2007
Location
Saint Augustine, FL
Posts
178
Hello. I'm still on my first major project in S7 and have a rather simple problem that I can't quite put into S7 terms.

The problem is simple: Given a set of 12 points (circuit breakers in this case), that the user has divided up into two group (priority 1, priority 2) and then into 12 unique sequences, how can I confirm that there are no duplicates in the sittings. That is to say, there can't be two Sequence-2's in Priority Group 1.

(In my past PLC efforts, I've done this by comparing the sum and products of the series to known results, which worked well. But, the "Priority group" requirement this time wrenches that idea).

So, no arrays, i guess. No looping either. Recursion seems unlikely. Anybody offer to give me a push down the right direction, so I don't have to enter in 154 different rungs to look at each condition explicitly?

- m
 
if (a == pri) and (b == pri) and (a == b) return false
if (a == pri) and (c == pri) and (a == c) return false
if (a == pri) and (d == pri) and (a == d) return false
.
.
if (b == pri) and (c == pri) and (b == c) return false
if (b == pri) and (d == pri) and (b == d) return false
.
.
if (a == sec) and (b == sec) and (a == b) return false
.
.
 
I'm none the wiser I'm afraid. If you can specify an algorithm then I'm sure it can be coded. Maybe it's not worth the effort coding a tricky algorithm so I'd go with the 154 rungs.
 
mainstreetmark,
Do you want to detect more than one bit being active in each of the primary and secondary group?
If yes, it will be much less than 154 rungs.

Or do you need to watch all possible pairs of bits for belonging to the same group and being both active?
(Probably, this is the same task).
Clarify, please.
 
Last edited:
Yeah. Basically, the user can assign a breaker to one of two groups, and give it a priority within that group. I cannot have repeated priorities.

Pri1: 1,2,4,5 Pri2: 1,2,3,12 <-- valid
Pri1: 1,1,4,5 Pri2: 1,4,5,6 <-- invalid (two #1's under Pri1)
 
How do they enter the priority?
instead of entering the breaker number into a group and priorty can you enter the group and priority into the breaker #

breaker 1 = 11 or 12 or 00 then each breaker can only have one entry.
 
No, the order must be controllable. In a loss of utility power, the customer must decide which order the loads would be shed in. So, a fixed priority isn't possible, as customer needs may change (and is indeeed part of the spec).
 

Similar Topics

I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
0
Views
19
Hi all I need help on this As in my project used Schneider TM241 controller. Now I want to communicate Elite energy meter with controller by...
Replies
3
Views
82
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
110
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
52
Hi, We have an application that has a device that goes through a reboot (appears un-graceful) What then happens is the MVI module appears to hang...
Replies
0
Views
59
Back
Top Bottom