Mark 05JUL05 - I have 3 shifts: 12-7:00, 8-3:00, 4-11:00. I’d like to record total tonnage and peak output (both tallied in the PLC) for each shift, every shift. What would be the best way to do this?
shectman 06JUL05 - Here is one way to do that:
You select “update/select last” when you configure the downtime
Then create another group configured to “insert new record” on a
trigger which is tied to PLC logic which goes true for a minute at the
end of each shift.
So #1 items are configured as timers or counters and #2 can just have
one dummy item. #2’s sole purpose is to insert a new record at the
end of shift. Since #1 is set to update “last” record it
automatically starts tallying the new last record. Therefore, what was
the last record now becomes the second to last record and it retains the
last shift’s info. And the last record is now the current shifts info.
Remember to set your timer items to retentive. This way the last
values remain when the trigger goes false.
Hope this helps.
shectman 06JUL05 - One thing I forgot to mention is that each OPC item can be configured as a timer or counter. Therefore, in my above example the #1 items could be configured as retentive timers or counters as desired. This would be the case where you are totalizing part count or times. But as you mentioned in your example, the totalization and peak output is being done by the PLC. Therefore just map these values in #1.
Click here for a description on how to attack this problem using FactorySQL and the SQL database instead of the PLC.
The totalizing logic can be handled in the PLC or with FactorySQL Event meters. Event Meter’s are simply OPC items that increment their column in the database whenever the value goes from false to true. They are quicker and easier to set up than PLC logic. You can use this to connect to a photoeye, for example, to keep count of passing objects in the database. Keep in mind that high speed or critical applications of this should be handled in the PLC.