Command ‘Insert branch right’

Symbol: 1ea8a46e7d3ed9cbc0a8640e019ae3a2_d7a9e0d37d723eefc0a8640e019484ab

Function: This command inserts a branch to the right of the selected point.

Call: Main menu SFC

The type of inserted branch depends on the selected element.

  • If the uppermost element of the selected elements is a transition or an alternative branch, then CODESYS inserts an alternative branch.
  • If the uppermost element of the selected elements is a step, a macro, a jump, or a parallel branch, then CODESYS inserts a parallel branch with the Branch<x> jump marker, where x is an incremental number. You can edit the default name of the jump marker or define the jump marker as a jump destination.
  • If a common element of an existing branch (horizontal line) is selected, then CODESYS inserts the new branch line as a branch line on the far right. If an entire branch line of an existing branch is selected, then CODESYS inserts the new branch line directly to the right as a new branch line.

Note

Please note: You can convert a branch into another type with the Alternative and Parallel commands.

Example of parallel branch

The following image shows a new inserted parallel branch generated by the Insert branch right command while the Step11 step was selected. CODESYS automatically inserts a step (Step2 in the example).

Processing in online mode: If t2 yields TRUE, then CODESYS executes Step2 immediately after step11 and before t3 is passed.

Thus, CODESYS processes both branch lines as opposed to alternative branches.

../_images/fa657fbe80f92a2fc0a8640e003237f0

Example of alternative branch

The following image shows a new inserted alternative branch generated by the Insert branch right command while the t4 transition was selected. CODESYS automatically inserts a step (Step32 in the example), a preceding transition, and a subsequent transition (t41, t42).

Processing in online mode: If Step3 is active, then CODESYS passes the subsequent transitions (t4, t41) from left to right. The first branch line of the main branch with the first transition yielding TRUE is passed. Therefore, only one branch line is processed as opposed to with a parallel branch.

../_images/45ae3bb980f87d8dc0a8640e01260fad

See also