Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Background: For the protection of both the operator of a zero-turn radius mower

ID: 2079655 • Letter: B

Question

Background: For the protection of both the operator of a zero-turn radius mower and the mower itself, several safety interlocks must be implemented. These interlocks are shown in the table below with the state associated in each. For the motor to be enabled (thus capable of running), all of the following conditions must be true: The ignition switch must be set to "Run". If the operator is not properly seated, both guide levers must be in the locked neutral position. If either guide lever is not in the locked neutral position, the brake must be off. If the blades are powered, the operator must be properly seated. The goal of this program is to determine whether the motor should be enabled or not based on menu selections for all of interlock descriptions above it. If any selection is not chosen (user exits out of menu), the program should show an error the program should terminate before showing results. Algorithm Requirements: Fill in the algorithm template provided on blackboard. It can be typed or by hand. Save or scan the file to a .pdf file and include in your final .zip submission Coding Requirements: Include required documentation and header for the problem. Include menu selections for all interlock descriptions except Motor Power Interlock. The output of your program should look like the sample output displayed below with the same spacing, indentation and number of significant digits.

Explanation / Answer


p=('enter the brake switch status on/off ');
brake_switch=input(p,'s');
if (strcmp(brake_switch,'on')||strcmp(brake_switch,'off'))
else
    error('error in input')
end
p=('enter the operator seat status;seated/ not seated ');
Op_seat=input(p,'s');
if (strcmp(Op_seat,'seated')||strcmp(Op_seat,'not seated'))
else
    error('error in input')
end
p=('enter the brake power switch status;turning/off ');
blp_switch=input(p,'s');
if (strcmp(blp_switch,'turning')||strcmp(blp_switch,'off'))
else
    error('error in input')
end
p=('enter the left guide bar status;neutral/forward/back ');
l_g_b=input(p,'s');
if (strcmp(l_g_b,'neutral')||strcmp(l_g_b,'forward')||strcmp(l_g_b,'back'))
else
    error('error in input')
end
p=('enter the right guide bar status;neutral/forward/back ');
r_g_b=input(p,'s');
if (strcmp(r_g_b,'neutral')||strcmp(r_g_b,'forward')||strcmp(r_g_b,'back'))
else
    error('error in input')
end
p=('enter the ignition switch status;run/off ');
ig_switch=input(p,'s');
if (strcmp(ig_switch,'run')||strcmp(ig_switch,'off'))
else
    error('error in input')
end
p=('enter the motor power interlock status;enabled/disabled ');
mtp_interlock=input(p,'s');
if (strcmp(mtp_interlock,'enabled')||strcmp(mtp_interlock,'disabled'))
else
    error('error in input')
end
i=0;
if strcmp(ig_switch,'run')
       if strcmp(Op_seat,'not seated')%for not seated case
           if (strcmp(l_g_b,'neutral') && strcmp(r_g_b,'neutral'))
               disp('motor can be turned on');
               i=1;
               else
               if strcmp(brake_switch,'off')
                   disp('motor can be turned on')
                   i=1;
               end
           end
      else
           if strcmp(blp_switch,'turning') %for seated case
              
               disp('motor can be turned on')
               i=1;
           end
           if (strcmp(l_g_b,'neutral') && strcmp(r_g_b,'neutral'))
               disp('motor can be turned on')
               i=1;
           else
               if strcmp(brake_switch,'off')
                   disp('motor can be turned on')
                   i=1;
               end
           end
              
       end
end
if i~=1
    disp('motor cant be turned on')
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote