A certain type of pump can appear in four different states: stopped, quarter, half and full power. The pump can be controlled with the three commands: start, stop and service.
States
In the To PC box on the Bit Map I/O tab, the bits to be used for the object's states are defined, that is, which bit or bit combination the PLC program will send to the PC in order to give the component a particular state. A state is defined by placing a - symbol in the box.
When bit 0 and bit 1 are set, this will create 4 states which correspond to the possible 0 and 1 combinations (00, 01, 10, 11), that is, the pattern can be interpreted as a binary number corresponding to the decimal numbers 0, 1, 2 and 3. The system designer can set any number of the 32 bits (provided that the selected external type supports 32 bits); setting two bits gives four states regardless of which bit positions are chosen. If two bits are set differently, it merely gives 4 other whole numbers (bit 1 and bit 3, for example, will give the numbers 0, 2, 8 and 10). In order to save addresses in the PLC, however, it is recommended that the bits are packed.
Commands
In the From PC box on the Bit Map I/O tab, the bits to be used to send commands to the PLC are defined. Command bits are also defined with a - symbol.
As above for the state bits, setting two bits gives 4 possibilities. Setting one gives two possibilities. To obtain three commands, use the button marked Commands below the heading Single Bits. If the box is checked, this means that the two bits are perceived as single, individual bits, that is, the valid bit combinations are then 00, 01 and 10 whereas 11 will be interpreted as 10.
Note that the system will always write one data word (that is, 8, 16 or 32 bits dependent on the selected external type) at a time. The sending of a command means that the 8, 16 or 32 bits are sent to the PLC, even if only one or two bits have been defined as command bits. Therefore the digital command bits cannot be compressed to less than one object in the PLC; otherwise the bits from the neighbouring object will be re-set (to zeros). Always allocate a word (8, 16 or 32 bits) for an object’s command.
Alarms and alarm acknowledgement
In the To PC box on the Alarm In/Ack tab, a + symbol is set for every alarm the PLC needs to send to the PC.
In addition, a * symbol can be set if an acknowledgement needs to be sent from the PLC to the system. Only one asterisk is needed in order to acknowledge all alarms from the PLC. If several asterisks are set, all other asterisks are ignored.
As the pump may be overheated, an alarm indication bit is necessary.
Also, as it is necessary to be able to acknowledge the alarm from the process (for example, by stopping the pump), an acknowledge bit is also defined.
The alarm can also be acknowledged from the PC. The acknowledgement is exclusively internal: the alarm is marked as being acknowledged in the Alarm List.
Alarm acknowledgement
A * symbol is set to mark that the acknowledgement is to be sent back to the PLC system.
When the operator acknowledges an alarm on the screen, the acknowledge bit will be sent to the PLC which can ensure that the following takes place:
The reason why the acknowledge signal must return to the system is that the data collection program would not otherwise be informed that the alarm is acknowledged - the alarm would remain unacknowledged in the system.
When an acknowledge signal is sent out to the PLC, the system simultaneously sends the most recent combination of the defined commands, that is, the most recent commands are repeated in connection with the acknowledgement. This is to avoid that the acknowledge signal deletes a recently sent command before the PLC program has registered it, which could happen if zero bits were sent to the command positions.