Week 5 Lab (Lab 5)

docx

School

Conestoga College *

*We aren’t endorsed by this school

Course

PLCE1030

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

3

Uploaded by JudgeButterflyPerson1045

Report
CNTR2045 Week 5 Lab (Lab 5): FIFO Instructions This week we want to simulate a conveyor belt that will transport manufactured pylons and record their height in a FIFO. When these pylons are removed from the conveyor they are to be painted or rejected according to their height. Section 1: Collecting Data 1. Create a new file in Studio5000 and call it Lab5. 2. Add your Digital Input and Digital Output cards to the I/O configuration. Refer to Lab 1 if you don’t remember how to do that. We’ll need it so we can use the push buttons, lights and cylinders at our station. 3. In your main routine, add a free running timer with the tag HT_TIMER. Give it a preset of 100 ms. Refer to your Week 1 notes and lab if you don’t remember how to do this. 4. Create a controller tag called HEIGHT_SENSOR that is an alias for HT_TIMER.ACC. This tag is going to simulate the height of the pylons on the conveyor belt. 5. Download your program and verify that your free running timer is working and the value in HEIGHT_SENSOR is changing. Application Overview In our application we manufacture injection molded pylons. The pylons range in height from 12 to 100 centimeters. The system operates as follows: 1. The injection molding machine sends a pylon onto a FEED_CONV 2. When the pylon passes PE1 onto the MAIN_CONV, the pylon height is recorded in a 10- element array that is INT data type. 3. When the first pylon leaves the MAIN_CONV it activates PE2 and data is unloaded from the 10 element array to a tag named PAINT_CONTROL. 4. If the pylon that has just left the main conveyor is less than 12 cm, it is too small and a cylinder extends to remove the part from the conveyor. 5. If the pylon that has just left the main conveyor is between 12 and 20 cm, it must be spray painted amber for 5 seconds. 6. If the pylon that has just left the main conveyor is between 20 and 55 centimeters, it must be spray painted green for 5 seconds 7. If the pylon that has just left the main conveyor is greater than 55 cm, it must be spray painted blue for 5 seconds Conestoga College
CNTR2045 Section 2: Keeping Track of Parts Flow 1. Create a subroutine named TRACK. Don’t forget to call this subroutine from the MainRoutine. 2. Add a rung in the TRACK subroutine that includes an examine-on and a FFL. 3. Assign an internal BOOL tag named PE1 to the examine-on. Configure the FFL as follows: a. Source – HEIGHT_SENSOR b. FIFO – CONV_DATA[0]: Right click and create a 10 element INT array c. Control – HCTL: Right click and create as a single CONTROL data type tag d. Length – 10 e. Position – 0 4. Copy and paste the rung. 5. Modify the new rung as follows: a. Change PE1 to PE2 b. Double click the FFL at the top of the box and change it to FFU c. FIFO – Same as in the FFL d. Destination – PAINT_CONTROL (only one pylon can leave the conveyor at a time. Create the tag with the correct data type) e. Control – Same, Length – same, Position – same 6. Download your program and go online. 7. Launch a Watch window, then change it from Current Routine to Quick Watch. 8. Add PE1, then PE2, then CONV_DATA in that order. 9. Expand CONV_DATA by clicking the plus sign. The array should be filled with zeroes. The EM bit should be on on the FFL instruction. 10. Toggle PE1 on then off (use CTRL+T to make it faster) and inspect where the data shows up. 11. Toggle 2 more times so there are “3” objects on the conveyor. 12. Toggle PE2 and inspect the affect on the contents of the array. Conestoga College
CNTR2045 13. Toggle PE1 until the array is full. Note which control bit turns on. Section 3: Controlling the Conveyors The Main Conveyor should run if the normally opened Green PB at your station is pressed momentarily. When Start is released the conveyor should keep running until the normally closed Red PB is pressed. The FEED conveyor should only run if two conditions exist: The MAIN conveyor must be running and the conveyor must have less than 10 objects on it. We don’t have actual conveyors at our station so use internal bits to simulate the running conveyors 1. Add ladder logic in the TRACK routine to accomplish the above system behaviour. 2. Turn on the Red Light at your station if either the FEED or MAIN conveyor is running. Section 4: Painting the Pylons When a pylon passes by PE2 and exits the MAIN conveyor, the height of it will be transferred to the PAINT_CONTROL tag. You must develop ladder logic to accomplish the following: Test the height of the pylon that has just exited If it is greater than 55 cm make a 5 second timer time. Turn on the Blue light while the timer is timing If it is between 20 and 55 cm, turn on the Green light for 5 seconds If it is between 12 and 20 cm, turn on the Amber light for 5 seconds If it is less than 12 cm, the pylon is too short and needs to be rejected. Extend Cylinder C for 5 seconds to push the part into the reject bin. Important: The program must be repeatable. If you don’t write the code correctly and 2 pylons 75 cm exit, the first one will be painted red, the second one won’t be painted. To complete the lab: Generate a PDF of the ladder logic in all of yours routines Name the pdf LastName-FirstName-Lab5.pdf and submit it and the .ACD file in the Lab 5 Assignment folder on eConestoga by the end of the lab period Conestoga College
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help