You are here

Flat Sequence

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/5b6e61df-b830-48cb-9764-94696cb47c80@1.3

Flat Sequences always execute left to right. A Flat Sequence structure starts with a single frame and allows a user to visualize the diagram sequences.

media/image46.png
Figure 5.45 Sequence Frame 

To add frames to a sequence, right click on the sequence structure and select either Add Frame After or Add Frame Before from the pop-up menu according to the program's needs.

media/image47.png
Figure 5.46 Adding Sequence Frames  

Add two more frames to the sequence structure to get a three frame sequence as shown in Three Frame Sequence.

media/image48.png
Figure 5.47 Three Frame Sequence 

From the Functions » Programming » Timing menu select Tick Count (ms) function.

media/image49.png
Figure 5.48 Tick Count Function 

Drop the Tick Count (ms) function in the frst (left most) frame of this sequence. Make a copy of the Tick Count function and place it on the third (right most) frame as shown in Start and Stop Tick Counts.

media/image50.png
Figure 5.49 Start and Stop Tick Counts  

Add a For Loop that iterates 5,000 times to the second frame. Add a subtract operator, an unsigned integer 32 output and complete the program as shown in Timing G Program. The execution of this program shows the time in milliseconds it took for the 2nd sequential frame to execute.

media/image51.png
Figure 5.50 Timing G Program