IKnowNotHow
Member
Gday guys,
I could do with a little help from some experts...
Trying to write a program to monitor what's in a number lanes.
Currently, each lane is given an ID code (by the operator), and then whatever enters that lane is tallied up in the PLC.
I wish to compare across 10 lanes, and if any have the same ID codes, I'd like the respective counts in those lanes to be added together, giving me a combined total for that ID Code while it's running (which I can then use for other purposes).
I also want the total of the 'single' lanes as well.
At different times the operator may enter a new code in any lane, or may even shuffle the order of ID codes around into different lanes, (say move whats in lane 3 to lane 7, say going from a combination of lanes 2, 3 & 9 to the combination of lanes 2, 7 & 9) so it would need to be able to grab the details for the new combination, as well as the total for the new lane id.
Ive tried to do it in structured text but haven't been able to nail it successfully.
Does anyone have any sample code on something along the same lines, or have any advice on how best to go about it?
Appreciate any help and thanks for any assistance you may be able to offer.
I could do with a little help from some experts...
Trying to write a program to monitor what's in a number lanes.
Currently, each lane is given an ID code (by the operator), and then whatever enters that lane is tallied up in the PLC.
I wish to compare across 10 lanes, and if any have the same ID codes, I'd like the respective counts in those lanes to be added together, giving me a combined total for that ID Code while it's running (which I can then use for other purposes).
I also want the total of the 'single' lanes as well.
At different times the operator may enter a new code in any lane, or may even shuffle the order of ID codes around into different lanes, (say move whats in lane 3 to lane 7, say going from a combination of lanes 2, 3 & 9 to the combination of lanes 2, 7 & 9) so it would need to be able to grab the details for the new combination, as well as the total for the new lane id.
Ive tried to do it in structured text but haven't been able to nail it successfully.
Does anyone have any sample code on something along the same lines, or have any advice on how best to go about it?
Appreciate any help and thanks for any assistance you may be able to offer.