0% found this document useful (0 votes)
65 views6 pages

Lab 12: Lockout/Tagout Procedure: Background Information

This lab covers designing a lockout/tagout system to allow users to document new lockouts, unlock existing lockouts, check the status of isolation points, and export records. The system uses a LockoutTable dataset containing employee IDs, isolation points, lockout times, and unlock times. The user can sign in with their employee ID, create a new lockout by selecting an isolation point from a list and setting the lockout time, unlock existing lockouts by selecting from locked isolation points, and check the status of isolation points by selecting one from the list.

Uploaded by

api-299763595
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views6 pages

Lab 12: Lockout/Tagout Procedure: Background Information

This lab covers designing a lockout/tagout system to allow users to document new lockouts, unlock existing lockouts, check the status of isolation points, and export records. The system uses a LockoutTable dataset containing employee IDs, isolation points, lockout times, and unlock times. The user can sign in with their employee ID, create a new lockout by selecting an isolation point from a list and setting the lockout time, unlock existing lockouts by selecting from locked isolation points, and check the status of isolation points by selecting one from the list.

Uploaded by

api-299763595
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Lab 12: Lockout/Tagout Procedure

Background Information
As an engineer, one of your most important jobs will be to ensure
the safety of the public and those working around you. The
National Society of Professional Engineers says that in the
fulfillment of their professional duties, [Engineers] shall hold
paramount the safety, health, and welfare of the public. One of
the most common ways to ensure safe a safe work environment is
control of hazardous energy (Lockout/ Tagout) procedures. At
every company and for every engineer, these procedures will
present themselves differently. Here a few examples of how
lockout/tagout procedures may prevent themselves for different
industries:
Locking a steam valve closed to prevent injuries to workers who are repairing a connection in a
chemical manufacturing plant
Turning off and locking an electrical control panel to prevent electrocution during repair of an
existing system or installation of a new system
Disabling a jammed conveyer system to prevent injury if the conveyer suddenly becomes
operational during repair at a manufacturing facility
In this lab, we will be designing a system to allow users to document new lockouts, unlock existing
lockouts, check the state of an isolation point (the actual point at which a lockout/tagout procedure is
performed), and export the records of a user or isolation point. You will need to download
LockoutTable.mat from the meta site and save it in your current MATLAB directory.
Part A. Employee Sign-In
Your task in Part A to allow an employee to sign into the lockout/tagout system using their Employee ID.
Make sure to check that the number they enter is a valid Employee ID at the company before allowing
them to access the system.
Step 1: Create a new Matlab script file and save it in Models I folder. Copy the commands below to the
beginning of your code.
clear; clc; close all;
load LockoutTable;
warning('off','all');

You should now see 3 new variables in your workspace: EmployeeID, LockoutTable, and
possible_isolation_point. EmployeeID contains all of the IDs for employees currently working at the
company. Open possible_isolation_point and look at the values stored in the vector:
'BKR001'

'BKR002'

'BKR003'

'BKR004'

...

This vector contains all of the isolation points where a lockout/tagout procedure may be needed at the
company. Notice that each ID contains the type of isolation point and a unique number (BKR = Breaker,
PMP= Pump, SFT = Shaft, VAL = Valve).

Now open LockoutTable and look at the values stored in the dataset:

Take note of the following values in the dataset:

LockoutTable.EmployeeID: Employee responsible for each lockout/tagout


LockoutTable.IsolaitonPoint: Specific isolation point that was locked and tagged
LockoutTable.LockoutTime: 30 minutes after the time the user records the lockout
LockoutTable.UnlockTime: The time the user records the unlock. In our case, always between 0
and 8 hours after the original lockout/tagout

Step 2: Ask the user to enter their Employee ID and save it as a new variable called ID. Create a while
loop to continue prompting the user for a new ID until the number entered matches a value in the
EmployeeID vector.
Hint: you can use the isempty function with a find command in MATLAB to see if the ID exists
in the list. If isempty(find()) = 1, then the ID the user entered is not valid.
Copy the following command into your while loop if the Employee ID cannot be found:
errordlg('Employee ID not found.');

Before moving to Step 2, run your code using the Employee IDs below. Check your answers with your
TA before moving to Part 2.
Employee ID
101618
101721
104847

Result (ID Exists/ ID Not Found)

What effect does the errordlg function have on your program?

Part B. Lockout/Tagout System


For Part B, we will be writing code to allow the user to create a new lockout, unlock, check an isolation
point state, and find records for past lockout/tagouts.
Step 1: Write a menu statement to ask the employee what they would like to do within the program using
the following choices:
user_choices = {'New Lockout','Unlock','Check Isolation Point
State','Find Record','Logout'};

Add another while loop before your menu statement that exits when the user chooses Logout. Check
that your menu statement works with your while loop before moving on. Write a switch statement with a
case for each user choice. Just create the structure for the switch but leave it empty at this point, we will
be adding to it in Steps 2-5.
Step 2: Add the following code under the first case of your switch. This code should execute if the
employee selects New Lockout from the menu.

Find the row number of first empty row at the end of the LockoutTable dataset. Hint: What
command have we used in the past to determine the length of a vector?
We will now ask the user to select the Isolation Point they would like to lockout/tagout. With
larger lists of values, a list dialog box can be much more user friendly than a menu statement.
Copy the following 2 lines into the Command Window. Note the similarities between listdlg and
a menu statement.
Classes = {'Chemistry','Biology','Models I','Calculus'};
choice = listdlg('PromptString','Favorite
Class?','SelectionMode','single','ListString', Classes)

What value is stored in choice if you select Models I? _________


Copy and paste the line of code below into your script file and update it for our program. Update
the title and replace the Classes vector with the vector you loaded at the beginning of the lab
containing all the possible isolation points. Do not adjust what is in red.
IP_overall = listdlg('PromptString','Favorite
Class?','SelectionMode','single','ListString', Classes);

Finally, we will need to set the time the Employee decides to lockout the Isolation Point. To give
them time to actually lock the isolation point, we will record the Lockout Time to be 30 minutes
after they lockout in our program. Copy the following commands into your Command Window
and paste the results below:
datetime('now')

Results:
datetime('now')+minutes(10)

Results:

Add a line of code to your script to calculate the lockout time. Remember that we want the time
to be 30 minutes after they have decided to lockout/tagout in the program.
Update LockoutTable by adding a new lockout/tagout record to the end of the dataset using the
information we have found. Record the EmployeeID, IsolationPoint, and LockoutTime in the
Table.
Write an fprintf statement to tell the employee that the Isolation Point was successfully locked.
Your output should look similar to the line below:
Isolation Point VAL006 has been successfully locked out.

Run your program using Employee ID 101618 and Isolation Point PMP002.
Copy and Paste the last row of LockoutTable:

Step 3: We will now write the code to unlock an Isolation Point that is locked. This code should execute
if the employee selects Unlock from the original menu statement.

Open the LockoutTable dataset. What value is stored in LockoutTable.UnlockTime if the


Isolation point is locked? _____

Find the rows in LockoutTable that contain an Isolation Point that is currently locked and save the
positions in a new vector Unlocked_rows. The following conditional will be true when the
value of LockoutTable.UnlockTime is NaT.
isnat(LockoutTable.UnlockTime) == 1

Copy the listdlg command from Step 1 and update it to allow the employee to select which
isolation point they would like to unlock. Call this variable Unlock_Selection. Be sure to only
include the isolation points that are currently locked. You should have this information from the
find command you just wrote.
Copy and paste the following line of code into your program.
Unlock_Row_LockoutTable = Unlocked_rows(Unlock_Selection);

What is this line of code necessary? Consider the values stored in each of the three
variables:

During lockout/tagout procedures, it is crucial to check in with the person who originally locked
out the isolation point before it is unlocked. Not doing so could result in something being
unlocked before it is safe to do so. The company we are programming for would like to try to
prevent this by letting an Employee know if they are unlocking an isolation point that they did not
originally lock.
Write a conditional statement to check if the ID number of the employee currently logged in is
the same as the employee who originally locked the isolation point the user is trying to unlock. If
it is the same employee, unlock the isolation point by writing the current time into
LockoutTable.UnlockTime. If it is not the same employee, write a menu statement telling the
employee they did originally lock the isolation point and ask if they would like to continue. If
they would like to continue, unlock the isolation point by writing the current time into
LockoutTable.UnlockTime. If not, do nothing. The isolation point will remain locked.
After unlocking the isolation point, add an fprintf statement like in Step 1 to show that the
isolation point has been successfully unlocked.

Step 4: Now, we will allow the user to determine if a selected isolation point is currently locked or
unlocked. This portion of the code should execute if the employee selects Check Isolation Point State
from the original menu.

Copy and paste the listdlg command you used in Step 1 into your script. From all possible
isolation points, the user should be able to select one to receive information about.
Find all of the positions in LockoutTable that match the isolation point the user would like
information about and store the positions in a new vector called CheckState_Positions. Use
string compare to help find the positions.
Copy and paste the block of code below into your script file:
index = 1;
locked = 0;
while index <= length(CheckState_Positions)
if isnat(LockoutTable.UnlockTime(CheckState_Positions(n)));
locked = 1;
break
end
index = index+1;
end

Open LockoutTable and answer the following questions about the code above:
What is the final value of locked for Isolation Point VAL008? What does this say
about the current state of Valve 008?

What is the final value of locked for Isolation Point SFT008? What does this say
about the current state of Shaft 008?

Create a conditional statement to print whether the isolation point is locked or unlocked
using an fprintf statement. If it is locked, you should also display the Employee ID of the
person who initiated the lockout/ tagout. Use the examples below to format your output:
Isolation Point VAL010 is currently in normal operation.
Isolation Point VAL003 is currently locked by employee 101991.

Step 5: Finally, we will allow the employee to export information about lockout/tagout procedures. This
portion of the program will execute is the user selects Find Record in the original menu.

Create a new menu statement to ask the employee how they would like to find records. They
should be able to choose between searching by Employee ID Number or by Isolation Point.
If the employee chooses to search by Employee ID number, ask them to input the ID number they
would like to find activity for and then find the columns in LockoutTable corresponding to that
user. Create a new dataset, Report, with all rows from LockoutTable that correspond to the
specified Employee ID.
If the employee chooses to search by Isolation point, use the listdlg command to allow them to
select with point they would like to generate the report for. Then, find the positions in
LockoutTable corresponding to the selected Isolation Point (Hint: Use string compare in your
find command). Create a new dataset, Report, with all rows from LockoutTable that correspond
to the specified Isolation Point.

Step 6: Copy and paste the following line of code into the end of your code. This will clear up your
workspace and make it more user friendly by eliminating unnecessary variables.
clearvars -except LockoutTable Report

Part C. Testing
Follow the scenario below and paste your results into the Word document.
An employee (ID Number 101618) has been asked by their boss to use your program to complete
the following tasks. Note: Do not exit the program between tasks.

Pump 4 (PMP004) will be cleaned this evening and needs to be locked out. Lock the pump
and paste your results from the Command Window below.

Your boss noticed that Breaker 3 (BKR003) was locked out this morning when he arrived.
He would like to know whether it is still locked and, if so, what employee originally
completed the lockout/tagout procedure.

You just finished unlocking Valve 8 (VAL008). Unlock the valve in the program and paste
the results from the Command Window below. Should you have asked another employee
before unlocking this valve or did you lock it originally?

Speaking of Valve 8, your boss wants to make sure that it hasnt been locked out too often.
Generate a report showing your boss the times it has been locked out. Logout of the
program and copy and paste Report into the box below.

Copy and paste the last 6 rows of LockoutTable below.

Copy and Paste your code below:


Part D. Submission

Upload this Word document with all tables and questions answered to your individual section
site.

You might also like