background image
<< Adding a Block | How Synchronization Points Work >>
<< Adding a Block | How Synchronization Points Work >>

Example of Nested Blocks

Blocks
8-7
If you have nested blocks and you click Stop Block:
¾
Robot inserts a stop timer command to stop timing the current block.
¾
The next block up in the hierarchy becomes the current block (that is, its name
is used as the prefix for emulation commands). Timing continues on this block
plus other blocks that may be above it in the nesting hierarchy.
Example of Nested Blocks
The following VU language example contains three blocks--
blockA
,
blockB
,
and
blockC
:
/* blockA begins with a Start Block command */
/* Start_Block "blockA" */
start_time ["blockA"];
...
/* Perform transaction in blockA */
http_nrecv ["blockA022"] 100 %% ; /* 411/8147 bytes */
http_disconnect(img4_yahoo_com_80_5);
/* blockB begins with a second Start Block command */
/* Start_Block "blockB" */
start_time ["blockB"];
/* Perform transaction in blockB */
http_nrecv ["blockB012"] 100 %% ; /* 5812 bytes */
http_disconnect(D141_217_90_3_80);
/* blockC begins with a third Start Block command */
/* Start_Block "blockC" */
start_time ["blockC"];
/* Perform transaction in blockC */
http_nrecv ["blockC054"] 100 %% ; /* 4577 bytes */
http_disconnect(D141_217_90_3_80_17);
/* A Stop Block command ends the current block (blockC) */
stop_time ["blockC"]; /* Stop_Block */
moe_si_umich_edu_80 = http_request ["blockB013"] ...;
...
/* Resume blockB transaction */
http_nrecv ["blockB018"] 100 %% ; /* 5076 bytes */
http_disconnect(moe_si_umich_edu_80);
/* A second Stop Block command ends the current block (blockB) */
stop_time ["blockB"]; /* Stop_Block */
ntdwwaag_v1_compuserve_com_80_38 = http_request ["BlockA023"]...;
...
/* Resume blockA transaction */
http_nrecv ["BlockA031"] 100 %% ; /* 3791/3787 bytes */
http_disconnect(ntdwwaag_v1_compuserve_com_80_38);
/* A third Stop Block command ends the current block (blockA) */
stop_time ["blockA"]; /* Stop_Block */