Crocodile Tears
Member
Edit to add - Logix Designer v30 / Controllogix L75
Guys, I'm sort of melting my brain here and I'm certain there has to be a better way to do this than what I'm coming up with, so bear with me.
I have a group of reclosers, 34 of them. I need to bring them up or down in order of a dynamic priority that I am assigning from my HMI. However, there is a higher priority that needs to be looked at first, I'm calling it a heirarchy. As in, if I bring the field online, Heirarchy 1 needs to check that the downstream (H2) are open so as to not have a massive inrush. Then I need to close the H1 group based on its assigned priority.
Once those are all closed, I can move on to the H2 group, check the H3s are open, and begin closing in the individual H2s in order of highest to lowest priority. So on and so forth. In a load shed scenario, I just have to work my way backwards, Dump lowest priority H4, loop through them until all are open, go to H3, and dump lowest priority until I get back into a balance load situation, even if that means working all the way up to dumping the H2 and H1 and just having a dead field.
So, the process is not that tough talking through, but I'm having a bit of a hard time determining how to sort through the priorities.
As in, I have UDTs that the priority maps 1-34 (1 highest, 34 lowest) from the HMI and then saves. I use a check sum to make sure I have no repeats (not the best way to check, but it works ok for my purposes / knowledge) The UDT also has the heirarchy in it, hard coded in the PLC 1-4 depending on what recloser it is.
What I'm trying to figure out is how to effectively sort through the 1-34 list that gets separated four times. As in, If I'm in H2 I have to ignore the other priorities in H3 that might actually be higher, as H2 needs to occur first in order for me to not possibly spike amperages.
I was thinking about, based on the heirarchy H1 - H4, moving the specific priority into a P1 - P4 array of DINTs. Then I would have four DINTS P1[0] - P1[33], P2[0-33] and so on. These would be filled with the various assignments, but mostly full of zeros. 0,0,0,0,0, 6,0,0,2,0,0,0,19,0,0,4, just as a sort of example of what I would expect to see.
I think what I need to do is figure out a way to loop those individual arrays and ignore the zeros, figure out the non zero values, and determine how to sort them from low to high or high to low depending on the scenario, and then based on their newly assigned 1,2,3,4 values, actuate the reclosers. Then I need to associate the new value with the appropriate recloser and open / close.
Does this make any sense. Do I sound delusional? I feel delusional.
I really don't know where to start on the sorting of the DINT array, though. File Sort sort of makes sense to me, but I'm not certain how to maintain the association to the appropriate recloser, unless I'm failing to understand the operation of it. So, comment and criticize, please. Most of this project has been fine, but this is a spot I'm feeling a bit over my head. Thanks
Guys, I'm sort of melting my brain here and I'm certain there has to be a better way to do this than what I'm coming up with, so bear with me.
I have a group of reclosers, 34 of them. I need to bring them up or down in order of a dynamic priority that I am assigning from my HMI. However, there is a higher priority that needs to be looked at first, I'm calling it a heirarchy. As in, if I bring the field online, Heirarchy 1 needs to check that the downstream (H2) are open so as to not have a massive inrush. Then I need to close the H1 group based on its assigned priority.
Once those are all closed, I can move on to the H2 group, check the H3s are open, and begin closing in the individual H2s in order of highest to lowest priority. So on and so forth. In a load shed scenario, I just have to work my way backwards, Dump lowest priority H4, loop through them until all are open, go to H3, and dump lowest priority until I get back into a balance load situation, even if that means working all the way up to dumping the H2 and H1 and just having a dead field.
So, the process is not that tough talking through, but I'm having a bit of a hard time determining how to sort through the priorities.
As in, I have UDTs that the priority maps 1-34 (1 highest, 34 lowest) from the HMI and then saves. I use a check sum to make sure I have no repeats (not the best way to check, but it works ok for my purposes / knowledge) The UDT also has the heirarchy in it, hard coded in the PLC 1-4 depending on what recloser it is.
What I'm trying to figure out is how to effectively sort through the 1-34 list that gets separated four times. As in, If I'm in H2 I have to ignore the other priorities in H3 that might actually be higher, as H2 needs to occur first in order for me to not possibly spike amperages.
I was thinking about, based on the heirarchy H1 - H4, moving the specific priority into a P1 - P4 array of DINTs. Then I would have four DINTS P1[0] - P1[33], P2[0-33] and so on. These would be filled with the various assignments, but mostly full of zeros. 0,0,0,0,0, 6,0,0,2,0,0,0,19,0,0,4, just as a sort of example of what I would expect to see.
I think what I need to do is figure out a way to loop those individual arrays and ignore the zeros, figure out the non zero values, and determine how to sort them from low to high or high to low depending on the scenario, and then based on their newly assigned 1,2,3,4 values, actuate the reclosers. Then I need to associate the new value with the appropriate recloser and open / close.
Does this make any sense. Do I sound delusional? I feel delusional.
I really don't know where to start on the sorting of the DINT array, though. File Sort sort of makes sense to me, but I'm not certain how to maintain the association to the appropriate recloser, unless I'm failing to understand the operation of it. So, comment and criticize, please. Most of this project has been fine, but this is a spot I'm feeling a bit over my head. Thanks
Last edited: