130-28176 Parallax Inc, 130-28176 Datasheet - Page 142

KIT PARTS PROCESS CONTROL

130-28176

Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 130-28176

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Challenge 4-4 Solution
Your code may look like this:
Challenge 4-5 Solution
Assuming it requires 3 seconds for a box to pass, add this code block to the
subroutine:
Challenge 4-6 Solution
Chapter 4-7 Solution
Run_Control:
ENDIF
Period : T = 1.8 Divisions x 1 ms/Division = 1.8 ms
Cycles/Sec (Hz): 1/period = 1/1.8 ms = 555.6 cycles/second
Encoder: 555.6 cycles/sec x 60 sec = 60 seconds/minute = 33,336 cycles/minute
(33,336 cycles/minute)(8040 revolutions/minute) = 4 cycles/revolution
To declarations, add:
Red_LED
Green_LED
To the Main Routine’s
RPMIndicator
DO
LOOP
IF (Opto_SW = 0) THEN
PAUSE 500
IF (Start_SW = 0) AND (Stop_SW = 1) THEN
IF (Opto_SW = 0) THEN
ENDIF
GOSUB ReadSP
GOSUB ReadTach
GOSUB RPMIndicator
GOSUB DisplayData
Edge_Flag = 1
HIGH Box_Det
PIN
PIN
, right after the call for
11
10
DO...LOOP
' Allow to stabilize
' Box STILL detected?
' True, set flag
' Energize LED
' Box detected?
, add a call for a new subroutine named
ReadTach
' Start pressed, Stop NOT pressed
.
Count_Box

Related parts for 130-28176