Sequence Beam LEGO MINDSTORMS NXT

序列軸
Sequence Beam

序列軸負責控制程式的流程並指出程式指令執行的順序. 與序列軸相連的指令都可被下載到NXT上. 不相連的指令將無法被下載.
The sequence beam controls the flow of your program. It indicates the sequence in which programming blocks will run. Blocks connected to the sequence beam can be downloaded to the NXT. Other blocks in the work area that are not connected to the sequence beam will not be downloaded.

Image of the starting point plus a move block and a sound block on a sequence beam

 

從起始點可以建立一條可同時執行的序列軸. 例如,主要的序列軸是控制機器人的前進動作,但第二條序列軸則是控制在機器人上方的手臂動作.
You can use the starting point to create additional sequence beams that will allow your program to run simultaneous tasks. For example, you might have the main sequence beam in your program controlling a robot’s forward motion but have a second sequence beam controlling a robotic arm that sits on top of the robot.

Image of a program with a main sequence beam and a parallel sequence beam coming out of the starting point perpendicularly and then turning to run parallel

 

建立平行的序列軸可以將滑鼠移到起始點上方或是軸的末端. 並以上下的方式拖曳滑鼠. 這個動作會拉出一條與主要程式指令相連的序列軸. 當下載執行該程式時,在兩條序列軸上的指令會同時執行.也可以使用資料線來傳輸兩條序列軸上的指令資料.
Create a parallel sequence beam by moving the mouse pointer over the starting point (or over the wire stub), and pressing and holding your mouse button while you move the mouse upwards or downwards. This will draw out a sequence beam that can be connected to programming blocks. When you download and run the program, the blocks on both sequence beams will run in parallel. You can use data wires to have the blocks on both sequence beams communicate with each other.

Image of the starting point with a new sequence beam being drawn upwards

 

不一定要從起始點開始產生新的序列軸.只需同時按下Shift按鍵並再主要序列軸上移動滑鼠上下.
You can also start a new sequence beam later in your program (i.e., not from the starting point). Do this by holding down the Shift key and moving your mouse pointer straight up or down from a position on the main sequence beam.

Image showing a mouse pointer, moving straight up or down, “drawing out” a new sequence beam from the master sequence beam