Now that we have covered the basic elements and logic functionality of FBDs, let's start to build our first Function Block routine. The following exercise will create a simple digital alarm routine using the Alarm Digital (ALMD) function block:
- Open the Controller Organizer pane, expand the tree by navigating to Tasks | Main Tasks | Main Program, and then right-click and select New Routine:
- Configure a new functional block diagram routine by setting the following values:
- Name:DIGITAL_ALARMS
- Description:Digital Alarms
- Type: Function Block Diagram
The following screenshot shows the New Routine form with the necessary fields completed:
- In order for our newly created routine to be executed with each scan of the Programmable Logic Controller (PLC), we need to add a reference to it in the MainRoutine program...