I wrote a similar program a few years back to time a door latch switch for a car door latch, testing the secondary and primary switch position (you know, the one that tells you "Door ajar" vs. door closed.) I believe I used a SLC5/03
It used a Quicksilver servo drive/motor combination to move a striker in, and I had to time the off-on-off-on.
This was the entire test - more detailed than yours, but perhaps you can use some bits from it. I know I had to learn the DII instruction to read the timing of the switch.
Part checks.
-part seated, both power and manual. 8mm prox
-child safety lever off before test
-screw in power motor (12mm prox) on power, not present on manual
-mylar tab
-enterprise cylinder.
-latch seated in nest
-threaded rod in place and shows threads
-black cap in place on power, not present on manual
-lock rod check (this was installed on request by JH, but is jumpered out in the logic, as there is no sensor yet. The HMI flashes a lock rod message when beginning test, and will until the sensor is installed or the HMI message is removed)
Engage strikers.
- Look to see both latch (servo position)and front catch (optic)on after engaging. (Return striker frt catch will return home, latch should stay closed. if doesn't, fail part.
Locked door test: Fire outside release, should not release
Child safety function test: Unlock door then fire inside release, should not release
CS effort test: Engage child safety (turning off). - check that there is a minimum effort (load cell) required to flick the CS lever, and that the effort is not excessive (air pressure switch)
Inside release test: Fire inside release should open - check travel and effort of inside release (travel with LDT, effort by the programmed torque of the inside release servo)
Engage strikers, pull back check to ensure latch does not return (Latch servo) front catch will return home optic.
Outside release test: Fire outside release, check effort (load cell to check minimum, air pressure switch to ensure that the pressure is not 'cranked up') and travel (LDT) . Check that the latch and front catch open.
POWER ONLY: engage strikers, fire power release solenoid, check for motor current in range, strikers should release
if all passed fire date stamp buck/shuttle and date stamp. (return both)
WIN 126 SEQUENCE:
1) Clamp part
2) Part checks.
-power only for screw 12mm prox
-part seated, both power and manual. 8mm prox
-enterprise cylinder.
-all optical/vision.
-latch seated.
-child safety off (optic)
3) Detent engage for power only.(on latch end)
4) Engage strikers.
- Look to see both latch (servo position)and front catch (optic)on after engaging. (Return striker frt catch will return home, latch should stay closed. if doesn't, fail part.
5) Fire outside release, should not release
6) Unlock then fire inside release, should not release
7) Engage child safety (turning off).
8) Fire inside release should open.
9) Engage strikers pull back check to ensure latch does not return (Latch servo) front catch will return home optic.
10) Fire 0/S check the latch and front catch open.
11) if all passed fire date stamp buck/shuttle and date stamp. (return both)
12) if part fails for anything: lock in clamps, release clamps with reset button keyed reset to reset station.
- Check efforts where load cell (minimum) present & pressure sensor