Need to store some values at the end of sequence in excel sheet... means report
I need to generate report based on start date and end date which I ll give from HMI... The report should have certain datas ...these data's should be stored at each and every end of sequence cycle logic... At the end of sequence cycle I need to store some 24 parameters values in excel.....no need to generate every time..i Can able to generate when I need most... I can give timings from HMI. And the report should have.. These many cycles completed and values of 24 parameters at end of each cycle..... Please kindly guide how to make these report... Which is most required for production.. thanks in advance..
Voted best answer
I really don't have the time to supply full bodied answers with details down to the nanometers each time - but I'll make an exception and provide you with this additional information for the benefit of the AKS community and because "I said A... and will have to speak B..." :-)
0. Prerequisites are a running system with the Calculations option installed & licensed.
1. Create a lab log template and define storage capacity as required
(100 is just an example)
2. At "destination" of lab data, create a Log Configuration aspect and some property logs to match your storage requirements. In this demo I've used General Properties (of different data types) and added my lab logs there.
3. Define a triggering mechanism, e.g. on calendar time, cyclic time or OPC property change (in this case I use a general property but you might want to trigger on some controller property). The cycles property has been added for tracing purposes.
4. Create a Calculation aspect and setup
a) trigger & trace (optional)
b) inputs (the values you want to read & store)
c) outputs (the logs where to write the data)
d) calc script to generate data, quality and timestamp
All this is just an example - you can "play" as much as you like with data, quality and timestamps in the VB code - remember Calculations is a powerful scripting engine - read about it in the IM Configuration User's Guide, 3BUF001092-510)
Magnify and print and the picture below, most cells in the entire table has a distinct meaning & function!
5. Trigger the calculation!
6. Read the results from the logs (and watch the tracing and counters, et.c)
- Disable Settings.UpdateStatus to improve performance
- Learn about the Calculation's DisableOnError property's meaning (its default "true" and will disable your calculation at first error). You must create a VB6 or PG2 pushbutton, etc to write to it (or use an OPC DA client).
- Calculation Status Viewer provides an overview of all calculations and their statuses(having UpdateStatus set to false reduces the information a bit though).
With Basic History in 800xA you can log data synchronously (on time interval) or asynchronously (on event). The later is called "lab log" and can be collected/fed from a calculation aspect/service.
1. An OPC property becomes updated at end of production cycle
2. A calculation is triggered by 1.
3. The calc read 24 parameters via OPC DA and insert them into asynchronous logs in Basic History
4. Decide how to trigger report (time, OPC property)
5. Use Excel/DataDirect/ABBGetOPCHDA() function to recall data from the logs