Evaluating the Production Report
The production report lists the produced pieces or the processed tickets in an chronological sequence with the additional information, as for example knitting time.
Call-up parameters:
Note regarding the filters:
All of the filters were implemented as "weak" filters.
This means that a piece or ticket will always appear completely in the result table when the filter for this piece or ticket was fulfilled at any time.
Example:
Filtered by shift 2 and 3.
(== display only the pieces knitted during shift 2 or 3)
- A fabric piece was started during shift 1 at 7:55 pm.
- At 8:00 pm starts shift 2
- At 8:10 pm the piece is finished.
It is not filtered out because it was knitted (partially) during shift 2.
(A "strong filter" would have completely rejected such sectioned pieces.)
Parameter | Type | Description |
---|---|---|
__sSchema | text | Schema of the secondary database tables. When working with temporary tables, _sDestSchema must always be “== ‘‘. |
_sTable_Prefix | text, | Prefix of the secondary database tables |
_aSortorder | text[] | Sorting (Array of column names) Example:
|
_bGroupByTicketUid | boolean | If = true tickets are grouped and evaluated The times of all pieces are summed. COMPLETE counts closed tickets instead of pieces. |
_aFilterShift | integer[] | Filter by shift(s) Issue only shift 1 and 3 e.g: ARRAY[1,3] |
_aFilterUsername | text[] | Filter by users (knitter) Example: ARRAY[‚User_1,'User_3'] |
_aFilterPattern | text[] | Filter by patterns Example: ARRAY['S-kUuG01','P-Sjo9v3'] |
_aFilterSeq | text[] | Filter by sequences Example: ARRAY['SEQ-WNJhP3','SEQ-wMWzx2'] |
_aFilterTicketUid | bigint[][] | Filter by internal ticket UID Example: ARRAY[3374994314,3738720541] |
_aFilterTicketProductionId | text[] | Filter by ID production ticket Example: ARRAY['2E0Hl4-H8T803-cId-8','2E0Hl4-H8T803-cId-8'] |
_aFilterTicketProductionsub1Id | text[] | Filter by ticket production sub1ID Example: ARRAY['SubId_2','SubId_21'] |
_aFilterTicketProductionsub2Id | text[] | Filter by ticket production sub2ID Example: ARRAY['-'] |
_aFilterTicketCustomerId | text[] | Filter by ticket customer ID Example: ARRAY['cId-2','cId-4'] |
_aFilterTicketArticleid | text[] | Filter by ticket article ID Example: ARRAY['H8T803'] |
_aFilterUserState | Smallint[] | Filter by user state Example: ARRAY[4,3] |
_aFilterSintralState | Smallint[] | Filter by Sintral state Example: ARRAY[4,3] |
_xFilterMinDuration | interval | Filter out the fabrics which were active for less than x seconds. |
_bFilterUseOnlyNettoTime | boolean | Include only net times. ( == Machine has the productive flag == Time from loading pattern until Stop by piece counter is 0 ) |
_bFilterUseOnlyProductiveTicketTime | boolean | If == true, the times with service tickets or of producing without ticket will be filtered out. |
Return Table
Notes:
The return table contains additional debug columns as well as columns that are only needed by the pattern statistics (internally it uses the production report UDF)
The column names of these columns are between square brackets.
Example: [MIN_UID]
Some columns return arrays as return value.
Often times these have only one entry.
For each of these arrays there can be situations, where there are several entries.
Examples:
-
AGG_TICKET_DATA
To which ticket belongs a knitted piece.
As tickets are loaded asynchronously, it is perfectly possible (due to an operating error at the machine) that 2 production tickets were active while one piece was being knitted. -
AGG_SCHIFT_STATES
A shift change can happen while a piece is being knitted.
Column | Type | Content |
---|---|---|
MC_ID | integer | SKR machine ID |
MC_SORT_ID | smallint | For alphabetical sorting by machine name (The machine name can be determined with the help of the MC_ID) |
AGG_TICKET_DATA | text[] | Ticket Data Current format: |
AGG_SEQ_NAME | text[] | Sequence name (n) |
AGG_PATTERN_NAME | text[] | Pattern name (n) |
START_TIME | timestamp without time zone | Time, when the piece or ticket was started |
END_TIME | timestamp without time zone | Time, when the piece or ticket was finished |
DURATION | interval | Time period, during which the piece or ticket was active |
KNIT_DURATION | interval | Time period, during which the machine was running |
TIME_ADJUST | interval | Specifies the time adjustments at the machine during the evaluated time period, which were added up by the SKR. With unusual large times that are far beyond the precision of a quartz clock, you should determine the cause. Unusual causes can be defects of the real time clocks or incorrect manual changes of the time settings at the PPS server or also at the machine. To maintain these times small, ensure that the time zone setting of the machine is correct and that the machine is always connected with SKR. Via the EventList report (EventType 101, EventID 1), you can determine when larger time differences occurred. |
COMPLETE | boolean | The piece / ticket was completely processed (or canceled) |
AGG_SHIFT_STATES | smallint[] | Active shifts during the processing of the piece or ticket |
AGG_USER_STATES | smallint[] | Active user states during the processing of the piece or ticket |
AGG_SINTRAL_STATES | smallint[] | Sintral states during the processing of the piece or ticket |
AGG_USER_NAME | smallint[] | Active users during the processing of the piece or ticket |
[MIN_UID] | bigint | Debug info: |
[MAX_UID] | bigint | Debug info: |
[COUNT] | integer | Debug info: |
[LOOP_CHG_COUNT] | integer | Debug info: |
[TICKET_UID_CHG] | integer | Debug info: |
[AGG_TICKET_UID] | bigint[] | Debug info: Active ticket UID’s |
[AGG_TICKET_CUSTOMER_ID] | bigint[] | Debug info: Active ticket CUSTOMER ID‘s |
[AGG_TICKET_ARTICLE_ID] | text[] | Debug info: Active ticket ARTICLE ID‘s |
[AGG_TICKET_PRODUCTION_ID] | text[] | Debug info: Active ticket PRODUCTION ID‘s |
[AGG_TICKET_PRODUCTION_SUB1_ID] | text[] | Debug info: Active ticket PRODUCTION_SUB1_ID‘s |
[AGG_TICKET_PRODUCTION_SUB2_ID] | text[] | Debug info: Active ticket PRODUCTION_SUB2_ID‘s |
Code example "sample_production_report.sql"
Important:
It is assumed that the evaluation auxiliary tables report_01.sample_xxxxxxxx are already generated.
Generating evaluation auxiliary tables (cursor run - UDF)
For a productive system, enter an empty field ‘‘ instead of report_01, schema. But it must be identical to that which was specified when generating the auxiliary tables.
select skrpps_02.skr_mcid2mcname( "MC_ID",'skr'::cstring) AS "MC_NAME"
,*
from skrpps_02.eval_production_report(
'report_01' -- Schema
,'sample' –- Table Name Prefix
,ARRAY['MC_SORT_ID','START_TIME'] – Sorting according to…
,false –- Group by tickets?
,NULL -- ARRAY[2,3] -- Filter by shift
,NULL -- ARRAY['User_3','User_4'] -- Selection/Filter UserName
,NULL -- ARRAY['S-kUuG0','P-Sjo9v3'] -- Selection/Filter Pattern
,NULL -- ARRAY['SEQ-WNJhP3','SEQ-9bEqD1'] -- Selection/Filter Sequences
,NULL -- ARRAY[3374994314,3738720541] -- Selection/Filter FilterTicketUid bigint[]
,NULL -- ARRAY['2E0Hl4-H8T803-cId-8','2E0Hl4-H8T803-cId-8'] -- Selection/Filter FilterTicketProductionId text[]
,NULL -- ARRAY['SubId_2','SubId_21'] -- Selection/Filter FilterTicketProductionSub1Id text[]
,NULL -- ARRAY['-'] -- Selection/Filter FilterTicketProductionSub2Id text[]
,NULL -- ARRAY['cId-2','cId-4'] -- Selection/Filter FilterTicketCustomerId text[]
,NULL -- ARRAY['H8T803'] -- Selection/Filter FilterTicketArticleId text[]
,NULL -- ARRAY[4,3] -- Selection/Filter UserState
,NULL -- ARRAY[4,3] – Selection/Filter SintralState
,'00:00:01' -- FilterMinDuration Filter-out fabric pieces or tickets with a duration shorter than the specified value.
-- (e.g. in order to keep times after ending a ticket and before starting the next out of the report in case of the Auto Production Mode
,false – Evaluate net times only if true. (== Machine has set the Productive flag == Time from pattern loaded state to Piece Counter is zero)
,false – If == false, all times allocated to service tickets will be filtered-out.
);