Monday, September 14, 2020

PLC 7-Segments font converter ladder diagram instruction

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.

PLC 7-Segments font converter ladder diagram instruction
A sample of this PLC program where PIC16F876 is selected as the PLC CPU.


PLC 7-Segments font converter ladder diagram instruction
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).
The example below use this instruction to display the input counting from the user - for example from push button.

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.

PLC 7-Segments font converter ladder diagram instruction
Ladder Diagram for this example

I set the PLC configuration as follow.



PLC Configuration

Click here to download this ladder diagram example.


No comments:

Post a Comment

Labels

ADC (10) Analog (14) Arduino (12) Atmega16 (19) Audio (2) AVR (20) Charger (1) Cortex-M0 (1) Counter (10) CPLD (25) Digital I/O (22) Display (34) EEPROM (2) Environment Sensor (1) esp8266 (2) Experiment Board (10) I2C (4) Interrupt (7) LCD (1) LDmicro (29) measurement and instrumentation (7) Microchip Studio (3) MikroC (1) One-Shot (3) OpAmp (1) PCB (31) PIC16 Microcontrollers (16) PIC16F877A (2) PIC16F887 MikroC (22) PLC (35) PWM (11) Regulator (1) RTC (2) Sensor (8) Shift Registers (5) SPI (5) Timer (34) UART (2) ultra-sonic sensor (1) USB (1) VHDL (21) xc8 (1) XC95108 (9) XC9536 (15) XC9572 (1) Xilinx (23) Xilinx ISE (22)