Skip to main content

Build the FAI Check Sheet

Build the First Article Inspection​

Reference Materials: Asset settings, including Enable Quality Triggers

Creating Assets​

Assets are configured by navigating to Configuration > Ops > Assets.

assets

Once an asset has been created, it can be duplicated or exported. All configuration information such as mode links, state links, item links are duplicated / exported along with the asset. Exported assets can then be transferred between gateways such as from dev to prod.

FieldDescription
Asset NameThe name of the asset. Asset names must be unique within the parent.
Asset TypeUsed for defining the type of an asset, akin to the ISA-95 hierarchy (e.g. enterprise, site, region). To configure asset types, use the edit button next to the right of the asset group dropdown. Ticking Mobile on an asset type makes its assets carriers, such as totes or carts, that lots can be on; see Transports (Mobile Assets).
Asset GroupAn asset can be associated with a group such as 'shredders'. Grouping allows for analysis of assets that may not be in the same hierarchical area but need to be reported similarly. For instance, assets like 'box formers' across different lines can be grouped under a single asset group for consolidated reporting.

To add an asset to a group, simply select the group from the dropdown. If the group doesn't exist, start typing the name of the group into the dropdown and select 'create'.
Sort OrderDetermines the asset's position relative to others.
EnabledEnable or disable this asset
OEE EnabledOne of the primary uses of an asset in Kanoa Ops is enabling it for OEE tracking. An OEE_Enabled Asset refers to any physical piece of equipment such as a production line, vessel reactor or process cell where operational data such as counts and equipment can be obtained and needs to be monitored.

If an asset is OEE_Enabled, targets can be set for performance, availability, quality, and overall threshold that are used in visual indicators while an asset is in production. An instance of our assetOEE tag UDT is also created in the [Kanoa] tag provider that provides a mechanism for connecting the physical machine to our MES. See the [Configuring Tags] section below.
Process TypeWhen asset is 'OEE Enabled', asset process type can be configured as 'discrete, continuous or batch. Assets of type batch are configured differently for OEE performance calculation
Enable Quality TriggersWhen asset is 'OEE Enabled', enabling this setting will cause changes to this asset mode or shift to check if a quality check should be scheduled.

Kanoa only watches assets for quality triggers when you ask it to, so it doesn't spend effort on assets that never need checks.

Enable quality triggers on the machines
  1. Navigate to Configuration → Ops → Assets and select CoreForge\Philadelphia\Machining\Machine 1.
  2. Select Enable Quality Triggers and save. The option is only available on OEE-enabled assets.
  3. Repeat for Machine 2 through Machine 8.

The FAI needs both an asset, to know which machine and operator it belongs to, and an item, to know which tolerance applies.

Create the check sheet
  1. In Configuration → Quality → Check Sheets, add Machining - First Article Inspection in the CoreForge\Operations folder.
  2. On the Info tab, enter:
    • Description: First article inspection for machined parts at the start of a production run or after changeover.
    • Procedure: Machining FAI Procedure
    • Document: https://44110182.fs1.hubspotusercontent-na1.net/hubfs/44110182/Demo/workInstructionSample260120.pdf
    • Instructions: Measure the first part produced after starting the run. Enter all required dimensional measurements and complete the visual defect check before continuing production.
  3. On the Settings tab, select Asset Required with the CoreForge\Philadelphia\Machining area, and Item Required with the CoreForge\WIP\Machined class.

Use Instructions for short guidance in the form, and Document to link to a controlled procedure or work instruction.

Add the check items

All three are Type Check, Enabled and Required.

Check itemData typeMeasurementsAggregationUnitsSpecification
DiameterFloat3AveragemmThe attribute's tolerance (below)
LengthFloat2MaxmmRange, min 100, max 200
Visual Defect CheckString1Text (below)

Diameter's specification comes from an attribute:

  1. Click Assign Attribute and pick CoreForge\Machining\FAI Diameter.
  2. Then, in the Specification section under Tolerance, choose Use Attribute Tolerance. It only shows up once the attribute is assigned. Leave Dynamic cleared.

Visual Defect Check's specification is Text, with these options:

  • Pass: No visible defects
  • Warning: Minor cosmetic defect
  • Fail: Burrs present, Surface damage, Incorrect finish

With more than one measurement, Kanoa keeps every reading and evaluates the aggregate. Length readings of 150 and 205 give a Max of 205, which fails.

Diameter uses the attribute because its spec changes with the part family. Length uses a fixed range on the check item because it's the same for every part.

Reference Materials: Check Item Settings - Data Properties

Check Item Settings - Data Properties​

Configure Check Items

  • Number of Measurements: Set the # of measurements to be taken for this check. Allows for within-subgroup variance analysis.
  • Assign Attribute: Attributes are used to associate a check with a tolerance spec and a data source tag path. A check reads its value from either an attribute or its own data source tag, so Assign Attribute is hidden while a data source tag is set.
  • Data Source Tag: A tag the check reads its value from without an attribute, for a value that isn't specific to an asset (a utility supply temperature, say). Type the tag path or browse for it with the tag button. Like an attribute's data source, the tag is read when the check is triggered by a trigger check, and on an auto check sheet. Shown when the check has no attribute.
    • Scale Factor: The tag value is multiplied by this; empty is 1.
    • Ignore Zero Values: A zero read from the tag is treated as no value.
  • Dynamic: When enabled, this check item will only be shown when a valid tolerance can be found for the associated attribute. Usage is to prevent displaying checks that may not be valid for certain items (products/materials).
  • Units: Define engineering units for data display. Standard units are added for you, including °C, °F, µm, mL, kPa, N·m, pH, ppm, µS/cm, Ω and kΩ; any other unit can be typed in, with any symbol.
  • Format: Enter a format string for data presentation following the custom numeric string format i.e. #,##0.##
  • Persistent: When enabled, persistence will copy over the value entered the last time this check was taken. If asset and/or item is required, it will use previous value for that asset/item combination.

Specification​

  • Tolerance: Only shown if check datatype is a String or Number. Number choices are: 'Attribute Tolerance' (if check item is associated with an attribute), 'Tolerance', 'Set Point' and 'Range'. String choices are: 'Regex'.
  • Range: A value outside the range is saved as a failed check. Optional Entry Limits (Lower and Upper Entry Limit) go further: a value outside them is refused when it is entered, with a message, rather than saved. Set the entry limits to the range itself to make the range strict, so a value outside it can't be entered at all. A value between the entry limits but outside the range is still accepted and saved as failed. The entry limits are shown in red when they sit inside the range.

Check Your Work​

Check your work

Copy this script into the Ignition Designer Script Console (Tools → Script Console) and run it. It checks that Machine 1 to Machine 8 have Enable Quality Triggers selected, the FAI's folder, Info tab, asset and item settings, and each check item's data type, measurements, aggregation, units and specification. Each check prints PASS or FAIL with what to fix. It doesn't change anything.

Show the check script
checkLesson-faiBuild.py
# Kanoa Quality Training - check "Build the FAI Check Sheet" (First Article Inspection, lesson 2)
#
# Run in the Ignition Designer Script Console (Tools > Script Console), in the
# project that inherits KANOA_SCRIPTS. It only reads; it changes nothing.
# Every check prints PASS or FAIL with what to fix, then a summary.

import re

MACHINES = ['CoreForge\\Philadelphia\\Machining\\Machine %d' % n for n in range(1, 9)]
SHEET = 'Machining - First Article Inspection'
FOLDER = 'CoreForge\\Operations'
AREA = 'CoreForge\\Philadelphia\\Machining'
ITEM_CLASS = 'CoreForge\\WIP\\Machined'
DOCUMENT = 'https://44110182.fs1.hubspotusercontent-na1.net/hubfs/44110182/Demo/workInstructionSample260120.pdf'
PROCEDURE = 'Machining FAI Procedure'
ATTRIBUTE = 'CoreForge\\Machining\\FAI Diameter'
VISUAL = {'PASS': ['No visible defects'], 'WARNING': ['Minor cosmetic defect'],
'FAIL': ['Burrs present', 'Incorrect finish', 'Surface damage'], 'NEUTRAL': []}
ITEMS = [
# name, data type, measurements, aggregation, units
('Diameter', 'Float', 3, 'AVG', 'mm'),
('Length', 'Float', 2, 'MAX', 'mm'),
('Visual Defect Check', 'String', 1, None, None),
]

results = []

def check(ok, what, fix=None):
results.append(bool(ok))
if ok:
print 'PASS %s' % what
else:
print 'FAIL %s' % what
if fix:
print ' -> %s' % fix

def note(what):
print 'NOTE %s' % what

def field(row, *names):
for n in names:
if n in row and row[n] is not None:
return row[n]
return None

def text(v):
return '' if v is None else unicode(v).strip()

def key(v):
return ' '.join(text(v).lower().split())

def truthy(v):
return str(v).lower() in ('true', '1', 'yes')

def num(v):
try:
return float(v)
except:
return None

def rows(data):
# Kanoa returns a dataset, a list of dictionaries, or None
if data is None:
return []
if hasattr(data, 'getRowCount'):
cols = list(data.getColumnNames())
return [dict((c, data.getValueAt(i, c)) for c in cols) for i in range(data.getRowCount())]
return [dict(r) for r in data]

def findSheet(name):
"""All versions of a check sheet, and the one to check: the Released version, or else the newest.
A revision renames the archived version '<name> - N' and the open one '<name> - In Revision',
so the other versions are found by their master sheet, not by name."""
sheets = rows(system.kanoa.quality.sheet.getSheets({}))
named = [s for s in sheets if text(field(s, 'chkShtName')) == name] or \
[s for s in sheets if key(field(s, 'chkShtName')) == key(name)]
if not named:
return None, []
masters = set(text(field(s, 'masterChkShtId', 'chkShtId')) for s in named)
versions = [s for s in sheets if text(field(s, 'masterChkShtId', 'chkShtId')) in masters]
versions.sort(key=lambda s: num(field(s, 'chkShtVersionNumber')) or 0)
released = [s for s in versions if text(field(s, 'chkShtVersionStateName')) == 'Released']
return (released or versions)[-1], versions

def findItem(items, name):
exact = [i for i in items if text(field(i, 'chkItemName')) == name]
close = [i for i in items if key(field(i, 'chkItemName')) == key(name)]
return (exact or close or [None])[0]

def pickList(value):
"""The responses in each result category of a Text pick list."""
out = {}
for cat in ('PASS', 'WARNING', 'FAIL', 'NEUTRAL'):
m = re.search(r"""['"]%s['"]\s*:\s*\[(.*?)\]""" % cat, text(value))
found = re.findall(r"""'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)\"""", m.group(1)) if m else []
out[cat] = sorted(a or b for a, b in found)
return out

def spec(item):
try:
return dict(system.util.jsonDecode(text(field(item, 'specification')))) if text(field(item, 'specification')) else {}
except:
return {}

def enableQuality(assetPath):
"""The asset's Enable Quality Triggers setting, stored in its Line/Enable Quality tag."""
try:
path = system.kanoa.asset.getAssetTagPath({'assetPath': assetPath}) + '/Line/Enable Quality'
qv = system.tag.readBlocking([path])[0]
return qv.value if qv.quality.isGood() else None
except:
return None

print '=' * 70
print 'Kanoa Quality Training - Build the FAI Check Sheet check'
print '=' * 70

# 1. Quality triggers on the machines
print '\n-- Enable Quality Triggers'
off = [p.split('\\')[-1] for p in MACHINES if not truthy(enableQuality(p))]
check(not off, 'Machine 1 to Machine 8 have Enable Quality Triggers selected',
'Not selected on %s. In Configuration > Ops > Assets, select each one, select Enable Quality Triggers and save.' % ', '.join(off))

# 2. The check sheet and its settings
print '\n-- Check sheet'
sheet, versions = findSheet(SHEET)
if sheet is None:
check(False, 'Check sheet %s exists' % SHEET,
'In Configuration > Quality > Check Sheets, add %s in the %s folder.' % (SHEET, FOLDER))
else:
actual = text(field(sheet, 'chkShtName'))
check(actual == SHEET, 'Check sheet %s exists' % SHEET, "Found '%s'. Rename it to %s." % (actual, SHEET))
folder = text(field(sheet, 'chkShtTypePath'))
check(folder == FOLDER, 'It is in the %s folder' % FOLDER,
"It's in '%s'. On the Settings tab, set the folder to %s." % (folder or 'no folder', FOLDER))

missingInfo = [label for col, label in (('description', 'Description'), ('instructions', 'Instructions'))
if not text(field(sheet, col))]
if text(field(sheet, 'procName')) != PROCEDURE:
missingInfo.append('Procedure (%s)' % PROCEDURE)
if text(field(sheet, 'fileURL')) != DOCUMENT:
missingInfo.append('Document (the work instruction link)')
check(not missingInfo, 'The Info tab has the description, procedure, document and instructions',
'On the Info tab, enter %s as in the lesson.' % ', '.join(missingInfo))

chkShtId = field(sheet, 'chkShtId')
check(truthy(field(sheet, 'assetReqd')), 'Asset Required is selected', 'On the Settings tab, select Asset Required.')
assets = [text(field(r, 'assetPath')) for r in rows(system.kanoa.quality.sheet.getAssets(chkShtId))]
check(AREA in assets, 'Assets are limited to the Machining area',
'Under Asset Required, choose %s.%s' % (AREA, (' Now: %s.' % ', '.join(assets)) if assets else ''))
check(truthy(field(sheet, 'itemReqd')), 'Item Required is selected', 'On the Settings tab, select Item Required.')
classes = [text(field(r, 'itemClassPath')) for r in rows(system.kanoa.quality.sheet.getItemClasses(chkShtId))]
check(ITEM_CLASS in classes, 'Items are limited to the %s class' % ITEM_CLASS,
'Under Item Required, choose the item class %s.%s' % (ITEM_CLASS, (' Now: %s.' % ', '.join(classes)) if classes else ''))

# 3. Check items
print '\n-- Check items'
items = rows(system.kanoa.quality.config.getChecks({'chkShtId': chkShtId}))
for name, dataType, meas, agg, units in ITEMS:
item = findItem(items, name)
if item is None:
check(False, '%s exists' % name, 'On the Checks tab, add a check item named %s.' % name)
continue
problems = []
actual = text(field(item, 'chkItemName'))
if actual != name:
problems.append("rename '%s' to %s" % (actual, name))
if text(field(item, 'chkItemTypeName')) != 'Check':
problems.append('set Type to Check')
if text(field(item, 'dataTypeName')) != dataType:
problems.append("set Data Type to %s (it's %s)" % (dataType, text(field(item, 'dataTypeName')) or 'blank'))
if not truthy(field(item, 'enabled')):
problems.append('select Enabled')
if not truthy(field(item, 'required')):
problems.append('select Required')
if int(num(field(item, 'measCount')) or 1) != meas:
problems.append("set Number of Measurements to %d (it's %s)" % (meas, text(field(item, 'measCount')) or 'blank'))
if agg and text(field(item, 'measAggregate')).upper() != agg:
problems.append("set the aggregation to %s (it's %s)" % ('Average' if agg == 'AVG' else 'Max', text(field(item, 'measAggregate')) or 'blank'))
if units and text(field(item, 'engUnitName')) != units:
problems.append("set Units to %s (it's %s)" % (units, text(field(item, 'engUnitName')) or 'blank'))
check(not problems, '%s: %s, %d measurement(s)%s' % (name, dataType, meas, (', ' + units) if units else ''),
'; '.join(problems).capitalize() + '.')

s = spec(item)
if name == 'Diameter':
attr = text(field(item, 'attributePath'))
check(attr == ATTRIBUTE, 'Diameter uses the attribute %s' % ATTRIBUTE,
"Its attribute is '%s'. Under Assign Attribute, choose %s." % (attr or 'none', ATTRIBUTE))
check(text(s.get('specType')) == 'attributeTolerance', 'Diameter uses the Attribute Tolerance',
"Its specification is '%s'. Under Specification, choose Attribute Tolerance." % (text(s.get('specType')) or 'none'))
check(not truthy(field(item, 'dynamic')), 'Diameter has Dynamic cleared', 'Edit Diameter and clear Dynamic.')
elif name == 'Length':
r = dict(s.get('range') or {})
ok = text(s.get('specType')) == 'range' and num(r.get('min')) == 100 and num(r.get('max')) == 200
check(ok, 'Length uses the range 100 to 200',
'Under Specification, choose Range with min 100 and max 200.')
else:
responses = pickList(field(item, 'pickListValues'))
wrong = [cat for cat in VISUAL if responses[cat] != VISUAL[cat]]
check(text(field(item, 'pickListName')) == 'Text' and not wrong, 'Visual Defect Check has its five responses',
'Under Entry Options, choose Text: No visible defects (Pass), Minor cosmetic defect (Warning), '
'Burrs present, Surface damage and Incorrect finish (Fail).')

passed = results.count(True)
print '\n' + '=' * 70
print 'Result: %d of %d checks passed' % (passed, len(results))
if passed == len(results):
print 'All good. Your FAI check sheet is built. You add its trigger in the next lesson.'
else:
print 'Fix the FAIL items above, then run this again.'
print '=' * 70