Pages

Thursday, September 24, 2020

PLC piecewise linear table and 7-segments instruction

With the piecewise linear table again, I use this instruction to create a map of characters from 0 to F presenting a hexadecimal values.

The host PC UART terminal send the ASCII character within a range of 0 to 15 to the PLC. These value will be converted by the PLC piecewise linear table instruction before it's sent to the 7-Segment display.

PLC piecewise linear table and 7-segments instruction
Piecewise linear table instruction setting

The ladder diagram program made up of a few rungs as listed below.

PLC piecewise linear table and 7-segments instruction
Ladder diagram example

The PLC hardware made up of a few components, a 7-segment display, clock and reset circuit. We assume that the user use a USB-serial converter to make a communication between the PLC and the host PC.


PLC piecewise linear table and 7-segments instruction
Schematic diagram

I made a photo of sample of the running program of PLC.



A sample of running program. The UART send a list of character ended with letter 'A'.

Click here to download the zip file of this ladder diagram example.


No comments:

Post a Comment