@aryacode/dsh-engineering 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/cordis.patch.yml +1 -1
- package/package.json +1 -1
- package/vendor/resources/LICENSE-CONTENT.md +17 -0
- package/vendor/resources/SOURCE.json +6 -0
- package/vendor/resources/corpus/craft/craft-comments-and-intent.md +29 -0
- package/vendor/resources/corpus/craft/craft-debounce-and-filtering.md +29 -0
- package/vendor/resources/corpus/craft/craft-fault-handling.md +32 -0
- package/vendor/resources/corpus/craft/craft-naming.md +30 -0
- package/vendor/resources/corpus/craft/craft-review-checklist.md +29 -0
- package/vendor/resources/corpus/craft/craft-units-and-ranges.md +32 -0
- package/vendor/resources/corpus/iec/iec-ld-fbd-equivalence.md +31 -0
- package/vendor/resources/corpus/iec/iec-sequences-and-sfc.md +32 -0
- package/vendor/resources/corpus/iec/iec-st-structure.md +33 -0
- package/vendor/resources/corpus/iec/iec-state-machines.md +33 -0
- package/vendor/resources/corpus/iec/iec-task-model.md +31 -0
- package/vendor/resources/corpus/iec/iec-types-and-scaling.md +32 -0
- package/vendor/resources/corpus/optix/optix-alarms-and-trends.md +30 -0
- package/vendor/resources/corpus/optix/optix-bindings-and-expressions.md +30 -0
- package/vendor/resources/corpus/optix/optix-netlogic-usage.md +29 -0
- package/vendor/resources/corpus/optix/optix-ui-structure.md +29 -0
- package/vendor/resources/corpus/rockwell/rockwell-aoi-and-udt.md +32 -0
- package/vendor/resources/corpus/rockwell/rockwell-fault-and-alarm-words.md +31 -0
- package/vendor/resources/corpus/rockwell/rockwell-hmi-handshake.md +33 -0
- package/vendor/resources/corpus/rockwell/rockwell-program-structure.md +32 -0
- package/vendor/resources/corpus/rockwell/rockwell-safety-boundaries.md +31 -0
- package/vendor/resources/corpus/rockwell/rockwell-tag-naming.md +33 -0
- package/vendor/resources/corpus/view/view-alarm-presentation.md +32 -0
- package/vendor/resources/corpus/view/view-colour-and-contrast.md +31 -0
- package/vendor/resources/corpus/view/view-faceplates.md +32 -0
- package/vendor/resources/corpus/view/view-hpm-01.md +33 -0
- package/vendor/resources/corpus/view/view-navigation.md +31 -0
- package/vendor/resources/corpus/view/view-popup-patterns.md +31 -0
- package/vendor/resources/corpus/view/view-screen-hierarchy.md +31 -0
- package/vendor/resources/corpus/yaskawa/yaskawa-cam-and-gear.md +31 -0
- package/vendor/resources/corpus/yaskawa/yaskawa-error-handling.md +31 -0
- package/vendor/resources/corpus/yaskawa/yaskawa-motion-function-blocks.md +32 -0
- package/vendor/resources/corpus/yaskawa/yaskawa-pou-organisation.md +29 -0
- package/vendor/resources/corpus/yaskawa/yaskawa-task-rates.md +30 -0
- package/vendor/resources/index.json +873 -0
- package/vendor/resources/lib/index.d.ts +15 -17
- package/vendor/resources/lib/index.js +29 -42
- package/vendor/resources/lib/skill.d.ts +46 -0
- package/vendor/resources/lib/skill.js +74 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rockwell-hmi-handshake
|
|
3
|
+
title: The PLC–HMI handshake
|
|
4
|
+
domain: rockwell
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [Rockwell]
|
|
7
|
+
tags: [hmi, handshake, comms]
|
|
8
|
+
applies_to: [l5x, ftview]
|
|
9
|
+
rules: [ROCK-HMI-01, ROCK-HMI-02, ROCK-HMI-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
The HMI is a remote peer with a cable that can fail. Treat every command as a request with a status and a
|
|
14
|
+
timeout.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **ROCK-HMI-01** Commands are pulse or edge requests with a matching acknowledgement bit; the HMI clears
|
|
19
|
+
the request when it sees the acknowledgement, not on a timer.
|
|
20
|
+
- **ROCK-HMI-02** Detect comms loss: a heartbeat the HMI toggles must be watched by the PLC, and its loss
|
|
21
|
+
must put outputs in a defined state.
|
|
22
|
+
- **ROCK-HMI-03** Data the PLC owns stays in the PLC. The HMI displays copies; it does not write setpoints
|
|
23
|
+
that the PLC never validates.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Write the handshake as a small state pair (`Cmd` / `Sts`) and test it by unplugging the network, not by
|
|
28
|
+
clicking twice.
|
|
29
|
+
|
|
30
|
+
## Anti-patterns
|
|
31
|
+
|
|
32
|
+
A command bit left on across HMI screens; setpoints accepted with no range check; heartbeat watched by the
|
|
33
|
+
HMI but not the PLC.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rockwell-program-structure
|
|
3
|
+
title: Logix program structure that scales
|
|
4
|
+
domain: rockwell
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [Rockwell]
|
|
7
|
+
tags: [program, routine, aoi]
|
|
8
|
+
applies_to: [l5x]
|
|
9
|
+
rules: [ROCK-STRUCT-01, ROCK-STRUCT-02, ROCK-STRUCT-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
The controller organiser is a map of the machine. A reader should find the logic for a device by following
|
|
14
|
+
names, not by opening every routine.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **ROCK-STRUCT-01** One program per machine area, one main routine that reads as a table of contents, and
|
|
19
|
+
one routine per device or function. The main routine calls; it does not implement.
|
|
20
|
+
- **ROCK-STRUCT-02** Keep the main routine thin enough to read in one screen: JSRs or AOI calls with a
|
|
21
|
+
comment per call.
|
|
22
|
+
- **ROCK-STRUCT-03** Put reusable device logic in an AOI with a UDT for its state; one-off logic stays in
|
|
23
|
+
the routine that owns it.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
For inherited projects, map program → routines → devices before editing. Name new routines after the
|
|
28
|
+
function they perform (`Conveyor_Control`), not after the week they were added.
|
|
29
|
+
|
|
30
|
+
## Anti-patterns
|
|
31
|
+
|
|
32
|
+
A 900-rung main routine; JSR chains nobody can follow; the same motor logic pasted four times.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rockwell-safety-boundaries
|
|
3
|
+
title: Where safety does not belong
|
|
4
|
+
domain: rockwell
|
|
5
|
+
level: specialist
|
|
6
|
+
basis: [Rockwell]
|
|
7
|
+
tags: [safety, boundaries]
|
|
8
|
+
applies_to: [l5x]
|
|
9
|
+
rules: [ROCK-SAFE-01, ROCK-SAFE-02]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
A standard task cannot be trusted to remove power from a hazard. Safety functions belong in a certified
|
|
14
|
+
safety controller or hardwired circuit, not in the logic this bundle edits.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **ROCK-SAFE-01** Never move an E-stop, guard interlock or light curtain function into standard logic, and
|
|
19
|
+
never bypass one to make a sequence run.
|
|
20
|
+
- **ROCK-SAFE-02** Treat safety tags as read-only evidence: they may be read for indication, never forced
|
|
21
|
+
or overwritten.
|
|
22
|
+
|
|
23
|
+
## Apply
|
|
24
|
+
|
|
25
|
+
When a request asks for a change that would weaken a safety function, stop, explain the boundary and ask
|
|
26
|
+
for a safety review. The bundle's tools refuse protected targets; do not work around them.
|
|
27
|
+
|
|
28
|
+
## Anti-patterns
|
|
29
|
+
|
|
30
|
+
Using a standard output as a safety output; disabling a guard to test a cam; "temporarily" forcing an
|
|
31
|
+
interlock.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rockwell-tag-naming
|
|
3
|
+
title: Tag names that carry meaning
|
|
4
|
+
domain: rockwell
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [Rockwell]
|
|
7
|
+
tags: [naming, tags]
|
|
8
|
+
applies_to: [l5x, ftview]
|
|
9
|
+
rules: [ROCK-NAME-01, ROCK-NAME-02, ROCK-NAME-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
A tag name is the only documentation that survives every export. Make it say direction, owner and
|
|
14
|
+
meaning.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **ROCK-NAME-01** Prefix by direction and role: `In_` field input, `Out_` field output, `Cmd_` command to
|
|
19
|
+
equipment, `Sts_` status back, `Hmi_` operator interface, `Cfg_` configuration.
|
|
20
|
+
- **ROCK-NAME-02** One spelling per concept across PLC and HMI. If the HMI says `AutoMode`, the PLC does not
|
|
21
|
+
say `Auto_Mode_Cmd`.
|
|
22
|
+
- **ROCK-NAME-03** No abbreviations that are not in the plant's vocabulary; spell `Conveyor`, not `Cnvyr`.
|
|
23
|
+
Units belong in the name or the description, not both inconsistently.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
When a project has an established prefix scheme, follow it even if a better one exists: consistency beats
|
|
28
|
+
elegance in maintenance.
|
|
29
|
+
|
|
30
|
+
## Anti-patterns
|
|
31
|
+
|
|
32
|
+
`Tag1`, `Spare`, `Test`; names that change with the project version; HMI tags shadowing PLC tags with
|
|
33
|
+
different meaning.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-alarm-presentation
|
|
3
|
+
title: Alarm presentation the operator can use
|
|
4
|
+
domain: view
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [ISA-18.2]
|
|
7
|
+
tags: [alarms, banner, priority]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-ALM-01, VIEW-ALM-02, VIEW-ALM-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
An alarm is an abnormal condition requiring a timely response. Everything else is a message or a log
|
|
14
|
+
entry and must not compete for attention.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-ALM-01** Each alarm has a cause, a consequence and an action in its text. "Fault" is not an alarm
|
|
19
|
+
message.
|
|
20
|
+
- **VIEW-ALM-02** Present by priority, newest first, with a persistent banner for unacknowledged alarms.
|
|
21
|
+
Do not let the list scroll the operator past a trip.
|
|
22
|
+
- **VIEW-ALM-03** Acknowledge does not clear. The condition clears; the acknowledgement is recorded with
|
|
23
|
+
who and when.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Review the alarm list with the operator: for each entry, can they say what to do? If not, rewrite or
|
|
28
|
+
delete it.
|
|
29
|
+
|
|
30
|
+
## Anti-patterns
|
|
31
|
+
|
|
32
|
+
Alarm flood from one root cause; alarms that re-announce every scan; a silent alarm with no banner.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-colour-and-contrast
|
|
3
|
+
title: Colour, contrast and meaning
|
|
4
|
+
domain: view
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [ISA-101]
|
|
7
|
+
tags: [colour, contrast, accessibility]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-COLOR-01, VIEW-COLOR-02, VIEW-COLOR-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
Colour is a signal, and about one in twelve men cannot separate red from green. Meaning must survive a
|
|
14
|
+
greyscale screenshot.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-COLOR-01** Reserve red, amber and green for abnormal, warning and normal, and use them nowhere
|
|
19
|
+
else. If a brand colour is red, do not put it on a status object.
|
|
20
|
+
- **VIEW-COLOR-02** Never encode meaning in colour alone: pair it with text, an icon or a shape.
|
|
21
|
+
- **VIEW-COLOR-03** Keep text contrast high (dark text on light surfaces) and size readable at the panel's
|
|
22
|
+
viewing distance; the export's palette is the reference.
|
|
23
|
+
|
|
24
|
+
## Apply
|
|
25
|
+
|
|
26
|
+
Read the project's palette from the profile and reuse it. A new screen with a different grey is a
|
|
27
|
+
maintenance defect even if it is prettier.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
Rainbow trend pens; green buttons that are not "go"; white text on yellow.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-faceplates
|
|
3
|
+
title: Faceplates and reusable screen objects
|
|
4
|
+
domain: view
|
|
5
|
+
level: specialist
|
|
6
|
+
basis: [ISA-101, Rockwell]
|
|
7
|
+
tags: [faceplate, reuse, objects]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-FACE-01, VIEW-FACE-02, VIEW-FACE-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
A faceplate is a contract between the screen and the equipment: same layout, same readings, same
|
|
14
|
+
controls, whatever the device.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-FACE-01** One faceplate per equipment class (motor, valve, drive, loop), parameterised by tag.
|
|
19
|
+
Do not copy a faceplate and edit it for one device.
|
|
20
|
+
- **VIEW-FACE-02** Show the same state indications in the same place on every faceplate: running, faulted,
|
|
21
|
+
interlocked, mode.
|
|
22
|
+
- **VIEW-FACE-03** Keep operator controls on the faceplate only when the decision belongs there; manual
|
|
23
|
+
jogging often does not.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Inventory the faceplates before adding a screen; extending the class is cheaper than a new one-off.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
Faceplates that differ only in colour; device-specific logic inside a generic faceplate; two faceplates
|
|
32
|
+
for the same class.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-hpm-01
|
|
3
|
+
title: High-performance HMI: what changes on a plant floor
|
|
4
|
+
domain: view
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [ISA-101]
|
|
7
|
+
tags: [hmi, hierarchy, overview]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-HPM-01, VIEW-HPM-02, VIEW-HPM-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
The operator's job is to detect an abnormal situation and act. A screen that shows every value equally
|
|
14
|
+
makes that job harder, not easier.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-HPM-01** Lead with an overview: the process in its normal state, then detail on demand. A screen
|
|
19
|
+
that needs a tour to understand is a wall of data.
|
|
20
|
+
- **VIEW-HPM-02** Grey is the normal state. Use colour for deviation, never for decoration; a screen of
|
|
21
|
+
green boxes hides the one that turned red.
|
|
22
|
+
- **VIEW-HPM-03** One screen, one purpose. If a screen serves two tasks, split it or make the second a
|
|
23
|
+
popup.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
For each screen ask: what decision does the operator make here, and what do they need to see to make it?
|
|
28
|
+
Remove everything that does not serve that decision.
|
|
29
|
+
|
|
30
|
+
## Anti-patterns
|
|
31
|
+
|
|
32
|
+
3D bevels and gradients on process values; every tag on one screen; colour used to distinguish units
|
|
33
|
+
instead of state.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-navigation
|
|
3
|
+
title: Navigation that never traps the operator
|
|
4
|
+
domain: view
|
|
5
|
+
level: intro
|
|
6
|
+
basis: [ISA-101]
|
|
7
|
+
tags: [navigation, screens]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-NAV-01, VIEW-NAV-02, VIEW-NAV-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
The operator must always know where they are and how to get back to the overview, including under stress.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- **VIEW-NAV-01** Keep a persistent navigation area on every screen (header or footer), with the same
|
|
18
|
+
position and the same buttons.
|
|
19
|
+
- **VIEW-NAV-02** Always provide a way back to the overview that does not depend on a popup being closed
|
|
20
|
+
first.
|
|
21
|
+
- **VIEW-NAV-03** Name screens after the area they show, and number them consistently; the screen list is
|
|
22
|
+
part of the interface.
|
|
23
|
+
|
|
24
|
+
## Apply
|
|
25
|
+
|
|
26
|
+
Walk the navigation as the operator would during an alarm: from the overview to the faulted area and back
|
|
27
|
+
in two clicks.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
Hidden hotspots; a popup that disables the nav bar; the only way home being a hardware function key.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-popup-patterns
|
|
3
|
+
title: Popups and dialogs
|
|
4
|
+
domain: view
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [ISA-101]
|
|
7
|
+
tags: [popup, dialog, modal]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-POP-01, VIEW-POP-02, VIEW-POP-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
A popup interrupts. Use it for a decision or a focused entry, not for information that could live on the
|
|
14
|
+
screen.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-POP-01** Decide modal or modeless deliberately: modal when the answer changes what happens next,
|
|
19
|
+
modeless when the operator may keep watching the process.
|
|
20
|
+
- **VIEW-POP-02** Keep the action buttons in the same place and order as every other popup, and make cancel
|
|
21
|
+
the safe default.
|
|
22
|
+
- **VIEW-POP-03** A popup has a title that names the decision, and a size that does not cover the values it
|
|
23
|
+
is asking about.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Reuse the project's popup faceplate rather than building a one-off; the profile records the convention.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
Confirmation dialogs for reversible actions; popups that stack three deep; a popup with no visible close.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: view-screen-hierarchy
|
|
3
|
+
title: Screen hierarchy and count
|
|
4
|
+
domain: view
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [ISA-101]
|
|
7
|
+
tags: [hierarchy, screens, structure]
|
|
8
|
+
applies_to: [ftview, optix]
|
|
9
|
+
rules: [VIEW-HIER-01, VIEW-HIER-02, VIEW-HIER-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
Screens form a tree: overview, area, detail. The depth is a design decision, and every level must earn its
|
|
14
|
+
place.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **VIEW-HIER-01** Three levels are usually enough: overview, area, equipment. A fourth level is a sign
|
|
19
|
+
the area screen is doing too much.
|
|
20
|
+
- **VIEW-HIER-02** Number displays by level and area so the list reflects the tree, and never renumber a
|
|
21
|
+
published display.
|
|
22
|
+
- **VIEW-HIER-03** Every screen reachable from the overview, and every screen has a way back; no orphan
|
|
23
|
+
screens.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Draw the tree before adding screens; if a proposed screen has no parent, the hierarchy is wrong.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
A single screen with tabs; screens reachable only by a specific alarm; duplicate screens for shifts.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaskawa-cam-and-gear
|
|
3
|
+
title: Cams, gears and registration
|
|
4
|
+
domain: yaskawa
|
|
5
|
+
level: specialist
|
|
6
|
+
basis: [Yaskawa]
|
|
7
|
+
tags: [cam, gear, registration]
|
|
8
|
+
applies_to: [mwi]
|
|
9
|
+
rules: [YAS-CAM-01, YAS-CAM-02]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
A cam is a table and a phase. Changing the table changes the motion; changing the phase changes when it
|
|
14
|
+
happens. Keep them separate and identifiable.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **YAS-CAM-01** Name and version each cam profile, and record which profile the machine is running. A
|
|
19
|
+
profile loaded from a recipe must be validated before it is engaged.
|
|
20
|
+
- **YAS-CAM-02** Registration corrections are offsets applied to the phase, bounded and filtered; they do
|
|
21
|
+
not rewrite the cam table at runtime.
|
|
22
|
+
|
|
23
|
+
## Apply
|
|
24
|
+
|
|
25
|
+
Log profile id and offset at each engagement. When diagnosing a cut-quality complaint, read the active
|
|
26
|
+
profile before reading the code.
|
|
27
|
+
|
|
28
|
+
## Anti-patterns
|
|
29
|
+
|
|
30
|
+
Editing the table to trim a registration error; two profiles with the same name; offsets that accumulate
|
|
31
|
+
without a limit.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaskawa-error-handling
|
|
3
|
+
title: Errors, acknowledgements and retries
|
|
4
|
+
domain: yaskawa
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [Yaskawa]
|
|
7
|
+
tags: [error, reset, retry]
|
|
8
|
+
applies_to: [mwi]
|
|
9
|
+
rules: [YAS-ERR-01, YAS-ERR-02, YAS-ERR-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
An error has a cause, a reaction and a recovery. Without all three it is just a red light.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- **YAS-ERR-01** Record the first error with its source and timestamp; later errors are consequences.
|
|
18
|
+
- **YAS-ERR-02** Reset only what failed, and only when the cause is gone. A global reset that clears
|
|
19
|
+
everything hides the second fault.
|
|
20
|
+
- **YAS-ERR-03** Retry only idempotent operations, with a bounded count and a delay. Motion commands are
|
|
21
|
+
not idempotent.
|
|
22
|
+
|
|
23
|
+
## Apply
|
|
24
|
+
|
|
25
|
+
Keep one error table: code, text, severity, reaction, reset condition. The HMI and the code read the same
|
|
26
|
+
table.
|
|
27
|
+
|
|
28
|
+
## Anti-patterns
|
|
29
|
+
|
|
30
|
+
Resetting on a timer; retrying a move without checking `ErrorID`; error text that says "axis fault" with no
|
|
31
|
+
axis number.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaskawa-motion-function-blocks
|
|
3
|
+
title: Motion function blocks: execute, done, error
|
|
4
|
+
domain: yaskawa
|
|
5
|
+
level: specialist
|
|
6
|
+
basis: [Yaskawa]
|
|
7
|
+
tags: [motion, fb, execute]
|
|
8
|
+
applies_to: [mwi]
|
|
9
|
+
rules: [YAS-MOT-01, YAS-MOT-02, YAS-MOT-03]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
Motion FBs are asynchronous. `Execute` starts a job; `Done`, `Busy`, `Error` and `ErrorID` report it. The
|
|
14
|
+
scan that sets `Execute` is not the scan that finishes.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **YAS-MOT-01** Drive one FB per axis command and keep `Execute` true until `Done` or `Error`; a one-scan
|
|
19
|
+
pulse is a race.
|
|
20
|
+
- **YAS-MOT-02** Handle `Error` before issuing the next command, and map `ErrorID` to the operator message
|
|
21
|
+
in one place.
|
|
22
|
+
- **YAS-MOT-03** Re-arm with a fresh edge after a fault reset. Do not leave `Execute` latched across a
|
|
23
|
+
reset.
|
|
24
|
+
|
|
25
|
+
## Apply
|
|
26
|
+
|
|
27
|
+
Model each axis as `Idle → Commanded → Busy → Done/Faulted` and let the FB signals drive the transitions.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
Ignoring `Busy` and sending a second move; clearing `Error` by writing `Execute` false; one FB shared by two
|
|
32
|
+
axes.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaskawa-pou-organisation
|
|
3
|
+
title: Organising a MotionWorks IEC project
|
|
4
|
+
domain: yaskawa
|
|
5
|
+
level: practitioner
|
|
6
|
+
basis: [Yaskawa]
|
|
7
|
+
tags: [pou, organisation, program]
|
|
8
|
+
applies_to: [mwi]
|
|
9
|
+
rules: [YAS-POU-01, YAS-POU-02]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
MotionWorks projects mix programs, function blocks and functions. The project tree should say what runs,
|
|
14
|
+
what is reused, and what is a library.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **YAS-POU-01** One program per machine function, one function block per reusable device, and functions
|
|
19
|
+
for pure calculations. Do not put device logic in a function (no state).
|
|
20
|
+
- **YAS-POU-02** Keep the library blocks (motion, cam, communication) separate from application blocks, and
|
|
21
|
+
never edit a library block in place; wrap it.
|
|
22
|
+
|
|
23
|
+
## Apply
|
|
24
|
+
|
|
25
|
+
Read the task assignment before the code: which program runs in which task explains most timing bugs.
|
|
26
|
+
|
|
27
|
+
## Anti-patterns
|
|
28
|
+
|
|
29
|
+
All logic in one program; application code inside a vendor library block; a function with `VAR` state.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaskawa-task-rates
|
|
3
|
+
title: Task rates and motion determinism
|
|
4
|
+
domain: yaskawa
|
|
5
|
+
level: specialist
|
|
6
|
+
basis: [Yaskawa]
|
|
7
|
+
tags: [task, rate, jitter]
|
|
8
|
+
applies_to: [mwi]
|
|
9
|
+
rules: [YAS-TASK-01, YAS-TASK-02]
|
|
10
|
+
---
|
|
11
|
+
## Principle
|
|
12
|
+
|
|
13
|
+
Motion quality is a function of task jitter. A logic task that occasionally overruns is a motion problem
|
|
14
|
+
even when the motion code is correct.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- **YAS-TASK-01** Keep HMI, file and diagnostic work out of the motion task; communicate through a
|
|
19
|
+
double-buffered structure.
|
|
20
|
+
- **YAS-TASK-02** Measure the worst-case scan of each task under load, and set the watchdog from that
|
|
21
|
+
measurement.
|
|
22
|
+
|
|
23
|
+
## Apply
|
|
24
|
+
|
|
25
|
+
When a cam shows a periodic defect, compare the defect period with the task period before touching the
|
|
26
|
+
profile.
|
|
27
|
+
|
|
28
|
+
## Anti-patterns
|
|
29
|
+
|
|
30
|
+
A 1 ms motion task running string formatting; changing the task rate to "fix" jitter without measuring.
|