Module Configuration
Original instructions
At a Glance
The application used here as an example manages liquid levels in a tank. The tank is filled by a pump and drained using a valve. The different levels of the tank are measured with sensors placed above the tank. The tank should not be filled with more than 100 liters of liquid.
Once the tank is full, the pump stops, and the operator drains the tank manually.
This application requires the use of a BMEAHI0812 analog input module and a BMEAHO0412 analog output module.
Tank Management Grafcet
The application grafcet is as follows:
Using the Measurements
This example configures the BMEAHI0812 analog input module to retrieve the level of the liquid in the tank.
Step
Action
1
In the Project Browser and in Variables & FB instances, double-click Elementary variables.
2
Create the INT-type variable, Level.
3
In the Address column, enter the address associated with this variable.
In this example, consider that the sensor is connected to channel 0 of the BMEAHI0812 module. This module is in turn connected to slot 1 of rack 0. Therefore the address is: %MW0.1.0.
Illustration:
This variable can be used to check whether the level of liquid in the tank has reached maximum level.
The following line of code can be associated with the Level_Reached transition of the grafcet.
If the level of liquid in the tank reaches or exceeds the maximum level, the Level_Reached transition is enabled.
Using the Statuses
Program the With_fault transition to stop the pump in 3 cases:
To be able to use the bit, which will indicate whether the measure still falls within the upper tolerance area (%IWr.m.c.1.6), first define the display format and scale of the channel used.
Step
Action
1
Access the hardware configuration screen for the appropriate module.
2
The range 4...20 mA is pre-set for channel 0.
4
Access the Parameters dialog box for the channel in order to input the following parameters
The upper tolerance area will be 100...110 liters.
5
Confirm your changes by closing the dialog box.
6
Validate the change with Edit → Validate.
The code associated with the fault control transition looks like this: