Question: This is a Matlab code LOGIC AND CONDITIONALS 14. For the protection of both the operator of a zero-turn radius mower and the mower itself
LOGIC AND CONDITIONALS 14. 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 and the variables that will represent them are listed shown here: Variable Used Brake Seat Blades LeftNeutral RightNeutral Ignition Motor State True if brake on True if operator seated True if blades turning True if in neutral True if in neutral True if in run position True if motor enabled Interlock Description Brake switch Operator seat switch Blade power switch Left guide bar neutral switch Right guide bar neutral switch Ignition switch Motor power interlock For the motor to be enabled (thus capable of running), all 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 neutral position. If either guide lever is not in the neutral position, the brake must be off. If the blades are powered, the operator must be properly seated. Write a function that will accept all of the preceding variables except Motor, decide whether the motor should be enabled or not, and place true or false in Motor as the returned variable. Sample Input/Output If the parameters are set to 0,0,0,0,0,1, the Motor output will be 0 If the parameters are set to 0,1,0,1,1,1, the Motor output will be 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
