1(a) Figure 1 ver onto a box that is transported to and from the robot on a conv
ID: 2250088 • Letter: 1
Question
1(a) Figure 1 ver onto a box that is transported to and from the robot on a conveyer a co A retractable arm on the conveyer that is normally extended stops the boxes at the appropriate point and a sensor on the conveyer connected to input 3 detects the arrival of a box - indicated by a high signal (value 1). The robot picks up a cover from a feeder and then waits for a box to be detected before placing the cover on the box. However if the box is the wrong way round, the robot has to rotate the cover through 180. The orientation of the box is detected by a second sensor on the conveyorconnected to input 4 - if the signal is high, the cover needs to rotated; otherwise no rotation is required. It then picks up an automatic screwdriver and inserts 6 screws in the locations indicated in Figure 1(a). To insert a screw, the robot moves to a point 50mm above the screw location, descends 50mm and then operates the screwdriver by sending a 2 second high-low-high pulse on output 4; this will cause a screw to be automatically fed to the screwdriver and then inserted. The robot then ascends 50mm before movin been inserted, the robot operates the retractable arm by sending a low signal of 1 second duration on output 6; this causes the arm to retract for sufficient time to allow the completed assembly to move away. The robot then returns the screwdriver to its original location. 2 g onto the next screw location. Once all the screws have Write an AML program to perform the assembly task, making full use of the flow control instructions to avoid duplicated code. You can assume the locations Feed', Driver, and Cover have been defined by the appropriate AML instructions. (Note that the screw locations have not been defined; they can be deduced from the dimensions given in Figure 1(a). When movin g to/from the pick or place locations (Feed, Driver, Cover), the robot has to go via a point vertically ofset by 100mm Sensors Retractable Arm 00mm Conveyor Cover 100mm 00mm Feeder for covers ‘Feed'. Figure 1(a) Figure 1(b) RobotExplanation / Answer
li $t0, 0xABCD9876 ;load the immediate value into register t0
sw $t0, 100($0) ; store the byte values left to right , starting loation 100
the bytes are numbered from 100 to 103 from left to right
lb $s5, 101($0) ; load the byte in 101th loation to register s5.
So the value of $s5 = 0xCD
Little-endian :
li $t0, 0xABCD9876 ;load the immediate value into register t0
sw $t0, 100($0) ; store the byte values right to left, starting loation 100
;the bytes are numbered from 100 to 103 from right to left.
lb $s5, 101($0) ; load the byte in 101th loation to register s5.
So the value of $s5 = 0x98
Thus, the final load byte(lb) instruction returns a different value depending
on the endianness of the machine.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.