Ladder diagram 7-Segments font converter (7SEG) instruction get a value from a source, and converts it to 7-segment display at a PLC specific output port. This instruction could display a number and also an ASCII character.
A sample of this PLC program where PIC16F876 is selected as the PLC CPU. |
A commercial sample of a low inch 7-Segments and its pins out |
A 7-Segment comes with different sizes, colors and terminology - common anode (CA) and common cathode (CC).
7SEG instruction symbol |
We must set the property of this instruction as desired.
7SEG instruction property setting |
- Destination - is any output port from the selected MCU.
- Source - is a the input value to display on the destination port.
- Common - is the 7-Segment terminology, a common anode (A) or a common cathode (C).
An input contact fed a high counting pulse into a circular counter up that store the content up to 16 values. When the content of the counter reach 16, the output coil alert for three seconds. This three-second delay made by a turn off delay instruction.
Ladder Diagram for this example |
I set the PLC configuration as follow.
No comments:
Post a Comment