PURPOSE: This laboratory exercise is a continuation of LAB 4. The purpose will be to controlLAB 5: Automated Measuring Station
OBJECTIVE: The main objective of
this laboratory is implementing a TD 200 unit to control an
automated measuring station. The system
should do the following via the TD 200:
1. Initiate the HOME position of the measuring station.
2. Activate the system to begin scanning a part to be measured.
3. Display when the part is being scanned.
4. Display the measured values in inches and millimeters.
5. Provide interruption or EMERGENCY STOP condition.
PROCEDURE: Modify the program developed in lab 6 to accommodate the following.
1. Define 4 data bytes
corresponding to the required step sequence bit pattern;
Change your program so that VB 200, VB210, VB 220, VB 230 and
VB240
are used for stop, step1, step 2, step 3, and step 4 respectively.
2. Create a start SCAN condition using F1 on the TD 200 ( M0.0)
3. Create an EMERGENCY stop condition using F2 on the TD 200 (M0.1)
4. Create data blocks
for performing the following functions:
a. Display: PRESS F1 TO START SCAN F2 TO STOP (for
system control)
a. Display : MOVING TO HOME (when stepper motor is running
ccw);
b. Display: ACTIVATING SCAN (when stepper motor is running
cw AND
optical sensor is active);
c. Display MEASURED VALUE: X.XXXX INCHES
d. Display MEASURED VALUE: X.XXXX mm
e. REDISPLAY PRESS F1 TO START F2 TO STOP AT END OF SCAN.
5. Use the MULTIPLY function
to multiply the contents of counter by 5 represention the
linear resolution of the table based on leadscrew geometry. You will
need to set the number
of significant digits to 4 in the TD 200. (This value will be moved to
a data block to show the linear position).
(NOTE: USE DATA BLOCK VW250 TO STORE THE NUMBER 5...e.g. VW250
5)
EXAMPLE:
EXAMPLE SHOWING MOVE STATEMENT TO TRANSFER "ANGULAR DEGREES" TO
VD68 CORRESPONDING TO TEXT DISPLAY MESSAGE:
6.
MOVE THE DATA ONLY WHEN THE OPTICAL SENSOR IS ACTIVE .
7.
Program an on delay timer (T32) to create a one shot "clock pulse" from
a counter at a time interval
of 1 millisecond. NOTE: SET THE TIMER TO 1 (MAXIMUM SPEED).
8.
Use on counter to count step sequences and a second counter to count pulses
during scanning;
9.
Use the Move Byte function to move the required data byte to drive the
motor depending on the
counter value being used to count step sequences.
10. Using
the second counter AND the optical sensor, Display the units in both inches
and mm for the
duration of the scan cycle.
11. Activate
scan in reverse direction and compare the results to determine
if any error occurs (e.g. too few or to many steps generated).
12. Modify your program
to compensate for any error (if required) and be prepared to
explain why any modification was necessary.
13. Submit a written
laboratory report, following the usual format.
14. NOTE: MAKE
SURE THAT THE SYSTEM DOES NOT "CRASH" . PROXIMITY SWITCHES
ARE MOUNTED AT THE LIMITS OF THE Y TABLE POSITION. USE THESE SWITCHES
TO
DISABLE MOTION WHEN EITHER IS TRUE. REMEMBER TO TURN OFF THE STEPPER
MOTOR
IN THE STOPPED POSITION.
The following four step in put sequence provides CW rotation as viewed
from then nameplate end
of the motor. To reverse the direction, step sequence is 1,4,3,2,1.
STEP SWITCH 1
SWITCH 2 SWITCH 3
SWITCH 4
1
ON
OFF
ON
OFF
2
ON
OFF
OFF
ON
3
OFF
ON
OFF
ON
4
OFF
ON
ON
OFF
1
ON
OFF
ON
OFF
SUPPLEMENTAL SUPPORTING DIAGRAMS
AND EXAMPLES
WIRING DIAGRAM
MOVE FUNCTIONS
EXAMPLE OF USING COUNTER WITH IF CONDITION (----| = = I |-----)
TO MOVE DATA
FROM A VARIABLE BYTE (VB210) TO OUTPUT BYTE (QBX).
NOTE: IF COUNTER 0 (C0) IS EQUAL TO 3, THEN THE CONTENTS
OF VB10 WILL BE
MOVED TO OUTPUT BYTE (QB0) AS SHOWN IN NETWORK 1 BELOW.
Description of operation: MOV_B
The Move Byte (MOV_B) box moves the input byte (IN) to the output byte (OUT). The input byte is not altered by the move.
Note: For this lab QB0 WILL NOT BE USED! CHECK THE MEASURING
SYSTEM FOR APPROPRIATE ADDRESSING.
USE MB30 AS
A TEMPORARY REGISTER, AND USE THE APPROPRIATE Q BITS TO CONTROL THE STEPPER
MOTOR.
Operands:
IN (byte): VB, IB, QB, MB, SMB, SB, AC, Constant, *VD, *AC
OUT (byte): VB, IB, QB, MB, SMB, SB, AC, *VD, *AC
Description of operation:
DATA BLOCKS: YOU WILL NEED TO CREATE DATA BLOCKS TO STORE
THE CONTENTS OF
THE BIT PATTERNS REQUIRED TO INDEX THE STEPPER MOTOR. ONE BLOCK
WILL BE REQUIRED
FOR EACH BIT PATTERN AS SHOWN BELOW:
//
//DATA BLOCK TITLE COMMENTS
//
//Press F1 for help and example data block
//
VB200 0 // DATA
FOR TURNING MOTOR COILS OFF (BINARY 0000)
VB210 10 // DATA
FOR FIRST STEP SEQUENCE (BINARY 1010)
VB220 9 // DATA
FOR SECOND STEP SEQUENCE (BINARY 1001)
VB230 5 // DATA
FOR THIRD STEP SEQUENCE (BINARY 0101)
VB240 6 // DATA
FOR FOURTH STEP SEQUENCE (BINARY 0110)
VW250 5 // Multiplier
Representing .0005 inches per pulse
VW260 254 //
Multiplier Representing 25.4 mm per inch