Vai al contenuto

Opening a Trigger Window from a FDB Module

Let us assume that you have an FBD module, also containing the following instructions. Opening a Trigger Window from a FDB Module-image_0Let us also assume that you want to know the values of C, D, and K, just before the ST k instruction is executed.Provided that you can never place a trigger in a block representing a variable such as Opening a Trigger Window from a FDB Module-image_0you must select the first available block preceding the selected variable. In the example of the above figure, you must move the cursor to network 3, and click the ADD block.You can click Debug>Add/Remove text trigger.Else, you can also insert trigger on the whole line; this means you’ll hit the trigger just before the first instruction of that line is executed. To do so, select the row by clicking the gray button on the left (the one with the row number inside) and add the trigger.In both cases, the color of the selected block turns to green, a white circle with a number inside appears in the middle of the block, and the related trigger window pops up. Opening a Trigger Window from a FDB Module-image_0When pre-processing FBD source code, the compiler translates it into IL instructions. The ADD instruction in network 3 is expanded to:LD kADD 1ST kWhen you add a trigger to an FBD block, you actually place the trigger before the first statement of its IL equivalent code.