Friday, January 28, 2011
Handling Normally Closed Contacts
Handling Normally Closed Contacts
The complete command listing for this ladder rung including termination commands is:
LD IN1 ENTER
AND IN2 ENTER
STO OUT1 ENTER
The commands may be entered using a hand-held programmer, dedicated desktop programmer or a computer containing software that will allow it to operate as a programming device. Each controller command line contains (1) a command, (2) the object of the command and (3) a terminator (the ENTER key). In the case of the first line, LD is the command, IN1 is the object of the command and the ENTER key is the terminator.
Each line of code will typically consume one word of memory, although some of the more complicated commands will consume more than one word. Examples of commands that may consume more than one word of memory are math functions and timers, which will be discussed later.
To indicate a normally closed contact to the PLC, the term NOT is associated with the contact number. This may take different forms in different controllers depending on the program method used by the manufacturer. Using the same form as in the previous example, the command lines for this rung would appear as follows:
LD NOT IN1 ENTER
AND IN2 ENTER
STO OUT1 ENTER
As stated above, different PLC’s may use different commands to perform some functions. or instance, the Mitsubishi PLC uses the command LDI (LD INVERSE) instead of LD OT. This requires a single keystroke instead of two keystrokes to input the same command.
If the normally closed contact had been IN2 instead of IN1, the command lines would have to be modified as follows:
LD IN1 ENTER
AND NOT IN2 ENTER
STO OUT1 ENTER
If using the Mitsubishi PLC, the AND NOT command would be replaced with the ANI (AND INVERSE) command.