40mpg
Member
This is maybe off topic, but I just had an interview at Amazon and was asked to do this question. I was blanked in the head, was wondering if anyone here wanna give it a shot.
1. User input an angle on the HMI (e.g 90 degrees)
2. Output an alarm when the angle formed between the minute hand and the hour hand on the clock matches the desired angle (e.g 3:00 o clock would form 90 degrees between the hour hand and the minute hand...then the logic needs to output an alarm)
3. Limit user input to 0-180 degrees
I said, user system clock...uhhhh...use an integer to represent the angle....and blah blah and I failed.
They assured me this is a similar use case in production...
I was trying to do this in ladder logic...but I guess you can do it in structure text too , or anything really.
1. User input an angle on the HMI (e.g 90 degrees)
2. Output an alarm when the angle formed between the minute hand and the hour hand on the clock matches the desired angle (e.g 3:00 o clock would form 90 degrees between the hour hand and the minute hand...then the logic needs to output an alarm)
3. Limit user input to 0-180 degrees
I said, user system clock...uhhhh...use an integer to represent the angle....and blah blah and I failed.
They assured me this is a similar use case in production...
I was trying to do this in ladder logic...but I guess you can do it in structure text too , or anything really.
Last edited: