MP STUDIO 2 offers two ways to show values and characters on a 7-segment display (FND): a 4-digit or 6-digit 7-segment LED module built on the TM1637 chip.
FINI, FINT and FDATA functions write directly to the chip from the ladder. These are the same functions as in the earlier MP STUDIO.FSCR function. The value fields on a screen follow the values in the device memory automatically, and only the digits that change are sent to the chip.On the same glass, the editor shows a virtual 7-segment display during simulation and the characters the device sent to the chip during monitoring (V1.3.0 and later). For the module types you can use (clock type and decimal-point type) and photos of the modules, see the 7-Segment LED Guide.
| Item | Box mode (FINI·FINT·FDATA) | Screen mode (FSCR) |
|---|---|---|
| What sets the content | Function arguments in the ladder (digit, number of digits, dot) | 7-Segment Screen Editor (fixed characters, value fields) |
| When the chip is written | Every digit is rewritten on every scan while the rung is on. | Only the changed digits are sent, one digit per scan. All digits and the brightness are re-sent about once a second. |
| When the rung turns off | Nothing is sent, so the chip keeps showing its last characters. | The last screen stays, and its value fields keep updating. |
| Values that can be shown | Decimal integers (lower 4 digits), segment values | Decimal (sign, decimal point), hex, bit text, fixed characters |
| Values with too many digits | Only the lower digits are shown (12345 → 2345). | The whole value field is shown as bars, so a cut-off number is never shown. |
| 6-digit modules | Written in chip address order only. | Digit order matches the visible digits to the chip addresses. |
| Brightness | Fixed at 7 (maximum) | 0 to 7 for each display |
| 7-segment response (ACK) | Not read. No error occurs even if no module is connected. | Read on some models; a missing response is reported through the FSCR output and as No response in the editor. |
Each 7-segment display can use only one of the two modes. If you use box mode functions and FSCR on the same 7-segment display, the box mode cells turn red and the program cannot be compiled (see Checks and Warnings).
The terminals for the 7-segment display and the values to enter for the CLK and DIO arguments of FINI depend on the model. See the product pages in the table for the terminal locations and connector diagrams.
| Model | 7-segment terminals | CLK·DIO of FINI / Pins in the editor | 7-segment displays you can connect | Cannot be used together |
|---|---|---|---|---|
MPS-8A4R(T)-S · MPS-8A8R(T)-S · MPS-16A16R(T) | FND / ENCO connector CLK(A), DIO(B) — MPS-8A4R-S · MPS-8A4T-S · MPS-8A8R-S · MPS-8A8T-S · MPS-16A16R | The terminals are fixed. FINI accepts only 0 or 1, and the value is not used. | 1 | High-speed input channel 0 (encoder) on the same connector |
| MPA series | UART (channel 3) terminals — connect CLK to RXD and DIO to TXD — MPA Series | The terminals are fixed. The argument values of FINI are not used. | 1 | Serial 3 communication |
MPS-8A8R | PWM output terminals PWM0 to PWM5 — MPS-8A8R | PWM terminal number 0 to 5 (0 = PWM0) | 1 per CLK/DIO pair (up to 3) | PWM output on the same terminals |
MPS-16A8R8T | PWM output terminals PWM0, PWM1, PWM3 and PWM4 — MPS-16A8R8T | PWM terminal number 0, 1, 3 or 4 | 1 per CLK/DIO pair (up to 2) | PWM output on the same terminals |
MPS-16A8R(T) | Analog input terminals AI0 to AI3 — MPS-16A8R | AI terminal number 0 to 3 (0 = AI0) | 1 in box mode · 2 in screen mode, with no shared pins | Analog input on the same terminals |
MPS-16A8R(T)-R2 | 7-segment displays cannot be used. | — | — | — |
On MPS-16A8R(T), the 7-segment display works from V1.3.0 (in earlier versions, the device did not output the 7-segment signals).
MPS-8A8R and MPS-16A8R8T, each CLK/DIO pair of an executed FINI gets its own 7-segment display, and FINT and FDATA write to the display of the FINI executed last. MPS-16A8R(T) uses only the one pin pair of the FINI placed last in the program.FINI switches off serial 3 communication, and serial 3 cannot send or receive until the device is restarted.MPS-8A4T-S, the FND / ENCO connector has 4.7 kΩ pull-down resistors, so a 7-segment display does not work correctly. To use a 7-segment display, choose the 7-segment control option when you order (see MPS-8A4T-S).
Box mode writes directly to the 7-segment display with FINI, FINT and FDATA in the 7Segment category of the Functions panel. The chip is written on every scan in which the rung containing the function is on, and nothing is sent while the rung is off. The chip holds the characters it received, so the last characters stay on the display after the rung turns off.
| Function | Arguments | What it does |
|---|---|---|
FINI | CLK, DIO | Switches on the 7-segment display (brightness 7) and clears digits 1 to 4. Digits 5 and 6 are not cleared. |
FINT | IN, POSITION, LENGTH, DOT, ZERO, SIGN | Shows an integer in decimal. |
FDATA | DATA, POSITION | Shows a one-byte segment value as is in one digit. |
When FINT or FDATA runs normally, power continues to the right of the function. If an argument is invalid and nothing can be shown, the power to the right is cut.
MPS-8A4R(T)-S, MPS-8A8R(T)-S and MPS-16A16R(T), the 7-segment display switches on by itself when the device starts if the program has FINT or FDATA, so FINI is not required.FINI runs. If there is no FINI, the FINT and FDATA cells show an orange warning.FINI clears digits 1 to 4 every time it runs. If its rung is always on, the digits are cleared and rewritten on every scan, so use a rising edge or a similar condition so that FINI runs only once, when needed.POSITION (POS) is the chip address plus 1. On a 4-digit module, the chip addresses usually run from 0 to 3 starting at the left, so POS 1 is the leftmost digit and POS 4 is the rightmost. On 6-digit modules, the order of the digits and chip addresses varies by product, so in box mode, check that each character appears in the digit you want.
| Argument | Value | Description |
|---|---|---|
| IN | Byte, word or double word address, or a constant | The value to show. Only the lower 4 digits are shown. |
| POSITION | 1 to 6 | The POS of the ones digit. The tens, hundreds and thousands digits continue to its left. |
| LENGTH | 1 to 4 | The number of digits to show. If it is 0, nothing is shown. |
| DOT | 0 to 4 | Where to put the dot. The dot goes after the 1st to 4th digit, counted from the left of a 4-digit frame (4 = the ones digit); 0 means no dot. It does not depend on POSITION or LENGTH. |
| ZERO | TRUE, FALSE or a bit address | When on, empty leading digits are filled with 0. When off, leading zeros are left blank. |
| SIGN | TRUE, FALSE or a bit address | When on, the value is read as a signed number, and the digit to the left of the number shows - for a negative value or a blank for a positive one. |
-5 is shown as 251.12345 → 2345 with LENGTH 4).
FDATA writes the low byte of DATA as is to the digit at POSITION (1 to 4). Bits 0 to 6 are segments a to g, and bit 7 is the dot. Use it for shapes other than numbers and letters, or to switch individual segments on and off directly.
| Character | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | - | Blank |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DATA | 16#3F | 16#06 | 16#5B | 16#4F | 16#66 | 16#6D | 16#7D | 16#07 | 16#7F | 16#6F | 16#40 | 16#00 |
You can write DATA in any of these forms: 16#3F (hex), 63 (decimal) or 2#00111111 (binary). You can make the values for other characters in the Character table of the 7-Segment Screen Editor. To light the dot as well, add 16#80 to the value (for example, 1. = 16#86).
The 7-Segment Screen Editor is a window for laying out what the 7-segment display shows, on a glass shaped like the real module (V1.3.0 and later). Screens you make are shown with the FSCR function in the ladder.
Enter on an FSCR cell in the ladder, or double-click it, to open the editor with that display and screen selected.FSCR, click Open screen editor below the input box.FSCR when there are no 7-segment displays yet, display 1 is created and the editor opens automatically.FINI, FINT or FDATA cell and select Show 7-segment display. The editor opens, and the glass follows what the 7-segment display is currently showing.
The editor has no OK or Cancel button. Your changes are applied to the project right away, and you can undo or redo them with Ctrl+Z and Ctrl+Y. To keep them in the file, save the project (Ctrl+S). You can keep editing the ladder while the editor is open. Close the window with ✕ or Esc.
0,1,2,3, brightness 7 and screen 0.| Property | Description |
|---|---|
| ① Display no. | 1 to 8. The number you enter in DSP of FSCR. You can make up to 8 displays. |
| ② Digits | 4 digits or 6 digits |
| ③ Digit order | The chip address of each visible digit, from the left. Choose 0,1,2,3, 0,1,2,3,4,5 or 2,1,0,5,4,3 · common 6-digit module, or choose Custom and enter 0 to 5 in Chip addresses, separated by commas. |
| ④ Pins | Enter the CLK and DIO numbers here on MPS-8A8R, MPS-16A8R8T and MPS-16A8R(T). Usable pins are listed below the field. On models with fixed terminals, This model has fixed 7-segment pins, so only one display can be attached. is shown instead. |
| ⑤ Brightness | 0 to 7 (7 is the brightest) |
| ⑥ Look | Dot or Colon. Colon draws the dot of the second digit as a colon between two digits, as on a clock-type module. The values sent to the device are the same; only the drawing in the editor and in simulation changes. |
Click Remove this 7-segment display to delete the selected display. Each entry in the display list also shows its number of digits and screens.
If characters appear scrambled on a 6-digit module, the digit order does not match the module. Many common 6-digit modules are wired with the chip addresses in the order 2,1,0,5,4,3. The digit order is shown below the editor glass as chip N.
You can make several screens for one display. In Screens, + adds a screen, ⧉ duplicates it and − deletes it. Screens are identified by number (0 to 255), and you can change the number of the selected screen in Screen number above the glass. One display can have up to 255 screens. Press PgUp and PgDn to move to the previous and next screen.
The small glass in the list shows each screen with its preview values. During simulation or monitoring, the number of the screen currently on the 7-segment display is shown in green.
Click a digit on the glass and type a character to put a fixed character (fixed segments) in that digit. The cursor then moves one digit to the right.
0 to 9, A b C c d E F G H h I J L n o P q r S t U u y, - _ ° = and a space. A letter that can be drawn in only one case is entered in that shape (a → A, O → 0).. switches the dot of the previous character on or off.Backspace and Delete, and move between digits with ←, →, Home and End.K, M, V, W, X, Z, Korean characters and so on) are not entered, and the reason is shown below the glass. Draw such shapes one segment at a time in the Segment painter tab.The Segment painter tab edits the fixed segments of the selected digit segment by segment.
You cannot write fixed characters in a digit that has a value field. In such a digit, only the dot of the fixed segments lights up along with the value. Use this to light the colon of a clock-type module, or a fixed decimal point, together with a value field.
A value field is a place on the display that shows a value from the device memory.
Ctrl+Enter places a decimal value field.D10 or DD20), and Bit text takes a bit address (for example M5).| Property | Description |
|---|---|
| ① Display format | Switches between Dec, Hex and Bit text. |
| ② Source | The address or symbol to show. When you type a symbol name, you can pick it from a list. |
| ③ Start digit · Width | The first digit of the value field (1 = leftmost) and its number of digits. |
| ④ Sign (a - inside the width for negatives) | Decimal. Reads the value as a signed number and, for a negative value, writes - in one digit within the width. The width must be 2 digits or more. |
| ⑤ Fill leading digits with 0 | Decimal and hex. If the value is shorter than the width, fills the front with 0. On by default for hex. |
| ⑥ Decimal places | Decimal. Puts a dot this many digits from the right (value 1234 with 2 decimal places → 12.34). The digit with the dot and the digits to its right are shown even when they are 0 (value 5 → 0.05). |
| On text · Off text | Bit text. The characters shown when the bit is on or off. The defaults are the shapes On and OFF, which appear as 0n and 0FF in the text box (O and 0 look the same on a 7-segment display). You can also enter segment values in hex in the box on the right. |
| ⑦ Preview values | The values drawn on the editor glass. They are not saved in the project and do not affect the device. |
0 to 9 and A b C d E F.Alt+←→ and change the width with Alt+Shift+←→.Delete.Value fields on this screen below the glass lists the value fields on the screen with their type, source, digit and width. Click a row to select that value field. The bottom row, At most ≈ 60 µs per scan · N scans when the whole screen changes, shows the longest time screen mode adds to a scan and how many scans it takes to show the whole screen when every digit changes. With two or more displays, the displays take turns sending, so the number of scans grows accordingly.
The Character table tab is a tool for making the value of one 7-segment digit by clicking segments. It does not change the screen you are editing. Use the buttons at the bottom to choose where the value goes.
16#3F), Dec and Binary values of the shape. Click the ⧉ button to copy a value.. dot · Del clear · Ctrl+C copy hex).FDATA selected in the ladder, click this to put the hex value in that cell. Load into the painter loads the current value of that cell into the painter.
Ctrl+Enter puts the value into the DATA cell of FDATA if that cell is selected, and otherwise into the fixed segments of the selected digit. You can undo either with Ctrl+Z.
Click 7-segment only at the top of the window to turn the editor into a small window with only the glass. Use it to watch the 7-segment display during simulation or monitoring while you look at the ladder. Click Full view to return to the full window.
Screens are shown with the FSCR function (V1.3.0 and later). Choose FSCR: Show Screen in the 7Segment category of the Functions panel, or type FSCR 1 0 in the Insert Function window (Ctrl+E).
| Argument | Description |
|---|---|
| DSP | The 7-segment display number (1 to 8). Only a constant can be used. |
| PAGE | The number of the screen to show (0 to 255). A constant or a word address can be used. |
FINI is not needed either.FSCR turns on when the screen is in the screen list and the 7-segment display responds. MPS-8A8R and MPS-16A8R8T do not read the response from the 7-segment display, so on these models the output turns on whenever the screen exists.D20) for PAGE, you can switch screens by changing that value. If the number is not in the screen list, the last screen stays on the display and the output turns off.FSCR for the same display are on in the same scan, the screen chosen by the later FSCR is shown.FSCR, DSP and PAGE are filled in with the first display and the first screen. When you edit the DSP or PAGE cell, the displays and screens appear as small pictures below the input box, so you can pick one.If you open the 7-Segment Screen Editor during simulation, the glass shows the characters the simulator sent to the 7-segment display (V1.3.0 and later). Both screen mode and box mode are simulated. For how to start and stop simulation, see Phase 8 · Simulation.
At first, the editor follows the screen that is on the 7-segment display. If you select another screen, it stops following, and 7-segment display N is now showing screen M. It differs from screen K, which you are editing. appears below the glass along with Go to that screen. Click Go to that screen to follow the screen on the display again.
When simulation is off, a Start simulation button appears below the glass.
The 7-segment displays that FINI, FINT and FDATA write to are listed under Box mode (FINI·FINT·FDATA) in the list on the left. Select an entry to show that 7-segment display on the glass in the center (read only). Click a character on the glass to copy its shape to the Character table.
If you open the 7-Segment Screen Editor while monitoring a real device, the glass shows the characters the device sent to the 7-segment display (V1.3.0 and later). The status chip shows PLC display · Screen N, and From the 7-segment shadow in device RAM — exactly what was sent to the chip appears below the glass.
FINI with different pins.| Status | Meaning |
|---|---|
| On | The 7-segment display is on and showing a screen. |
| Off | The 7-segment display has not been switched on yet. |
| No response | The 7-segment display is not responding. The device looks for it again about once a second. Check the connection and wiring of the module. |
| Lines not ready | The device has not set up the 7-segment signal lines yet. |
| Different program on PLC | The program on the device is different from this project. Download the project to show the display. |
| PLC program unknown | There is no record of downloading this project over the current connection. Download the project to show the display. |
| Checking device program | MP STUDIO 2 is checking whether the program on the device is the same as this project. |
| TX buffer too small · not read | The TX buffer of the active serial port is smaller than 10 bytes. Increase the SERIAL value in Setting → Data Memory to 10 or more. |
| Keeps changing · cannot read consistently | The display keeps changing while it is being read, so the characters read in two parts cannot be matched up. Turn on Merge monitor reads in Setting → Communication Port, and increase the TX buffer of the serial port to 14 bytes or more. |
| PLC not answering · unknown | The PLC is not responding to monitoring. |
| No new value · unknown | Monitoring continues, but no new 7-segment values arrive. |
| Not switched on yet · display unknown | The device program has started but has not switched on the 7-segment display yet. |
| Shadow values look wrong | The values read from the device are not in the form of a 7-segment record. The device may contain a different program. |
| Several 7-segment pin pairs | The box mode 7-segment display is not shown because there are two or more FINI with different pins. |
MPS-8A8R and MPS-16A8R8T do not read the response from the 7-segment display, so No response is never shown. Instead, This model does not read the chip response (ACK), so a disconnected chip cannot be detected — the screen is re-sent every second. appears below the glass.
If there is a problem with a 7-segment cell, the cell turns red (the program cannot be compiled) or its address turns orange (a warning; the program can still be compiled). Hover over the cell to see the reason. When you select the cell, the Inspector shows the same reason.
| Case | Shown in | Reason shown on the cell (beginning) |
|---|---|---|
LENGTH of FINT is 0 | Orange | FINT LEN 0 reads as 0, so FINT always takes its error path … |
POSITION of FINT is outside 1 to 6, or POSITION of FDATA is outside 1 to 4 | Orange | FINT POS … / FDATA POS … is a value the device does not accept, so it takes the error path … |
With the POSITION, LENGTH and SIGN of FINT, the number or sign goes past the left end | Orange | FINT POS … with LEN …: … / FINT SIGN is on, which needs one more cell to the left of the digits for the sign … |
FINT or FDATA is used without FINI on a model that needs FINI | Orange | FINT is used but the program has no FINI. … |
FINI and serial 3 communication are used together on the MPA series | Orange | When this FINI runs, serial 3 communication is switched off. … |
CLK or DIO of FINI is a number that cannot be used on the model | Red | The numbers that can be used are shown with it. |
FSCR is used when no 7-segment screens exist | Red | No 7-segment screens are defined, so FSCR has nothing to show. |
DSP or PAGE of FSCR is not in the table | Red | The DSP value … of FSCR is not in the 7-segment table. … / The PAGE value … of FSCR is not in the screen list of 7-segment display …. |
| A second display is called on a model with fixed terminals | Red | This model can drive only one 7-segment display, so display … cannot be used. … |
Box mode functions are used on a 7-segment display that FSCR draws | Red | This 7-segment display is drawn by a screen (FSCR) — remove FINI. … / … move the … value into a field of the screen. |
The definition of the display that FSCR calls has a problem | Red | The same text as in the problem list of the editor |
If a 7-segment screen definition has a problem, it is listed in the problem list at the bottom of the editor, and the FSCR cells that use that table turn red and cannot be compiled. Click a row to go to that display, screen or value field. If there are no problems, No problems is shown.
| Problem | Text shown in the problem list |
|---|---|
| The source is empty | No value to show has been chosen. Enter an address or a symbol. |
| The source cannot be read | … cannot be read as an address or a symbol, so its value cannot be shown. |
| The display format does not match the data type of the source | … cannot be read in this display format. … |
| The address does not exist on the model or with the memory settings | … is not an address on this model with these memory settings. |
| Value fields overlap | The value field overlaps an earlier one, so the two values would overwrite each other. |
| A value field goes past the last digit | The value field goes off the display, so part of it would not be visible. |
| A signed value field has a width of 1 | A signed value field must be at least 2 wide for the number to show. |
| Too many decimal places | With decimal places …, the point would not show in this value field. … |
| The on or off text is longer than the width | The on/off segments are longer than the value field and would be cut off. |
| Two displays or two screens have the same number | Two 7-segment displays have the same number, so … / Two screens have the same number, so … |
| A pin that cannot be used, or a pin used twice | … pin … cannot be used on this model. … / CLK and DIO are the same pin, so … / It uses the same pin as 7-segment display …, so the signals of the two displays mix. … |
| The model cannot use a 7-segment display | This model has no 7-segment lines (CLK, DIO), so 7-segment screens cannot be used. |
This example connects a 4-digit module to the FND / ENCO connector of MPS-8A8R(T)-S and shows the value of D0 with two decimal places. On this model, the 7-segment display switches on without FINI.
| Rung | Contents |
|---|---|
| 0 | @ON (NO) → FINT D0 4 4 2 TRUE FALSE |
| 1 | @ON (NO) → MOVE 1234 D0 |
FINT D0 4 4 2 TRUE FALSE writes the ones digit of D0 to POS 4 (the rightmost digit), shows 4 digits, puts a dot after the second digit and fills the leading digits with 0.12.34. If you change 1234 in rung 1 to 5, 00.05 is shown.
In this example on MPS-8A8R(T)-S, screen 0 shows the run value D10, screen 1 shows Er with the error code D11, and the display switches to screen 1 when P0 turns on.
D10 in Source (start digit 1 · width 4).Er. Then click digit 3, click Add value field → Dec, set Source to D11 and the width to 2, and turn on Fill leading digits with 0.| Rung | Contents |
|---|---|
| 0 | P0 (NC) → FSCR 1 0 |
| 1 | P0 (NO) → FSCR 1 1 |
| 2 | @ON (NO) → MOVE 1234 D10 |
| 3 | @ON (NO) → MOVE 5 D11 |
In simulation, the display shows 1234 while P0 is off and Er05 when P0 is on. Instead of rungs 0 and 1, you can also write a single rung, @ON (NO) → FSCR 1 D20, and switch screens with the value of D20 (0 or 1).
| Symptom | What to check |
|---|---|
| Nothing appears on the 7-segment display of the device | If the status in the display list of the editor is No response, check that the VCC, GND, CLK and DIO wiring of the module matches the connector diagram on the product page, and that CLK and DIO are not swapped. In box mode on a model that needs FINI, use simulation to check that the rung that runs FINI turns on. |
| The characters on a 6-digit module are out of order | In screen mode, try changing Digit order to 2,1,0,5,4,3. If that does not help, enter the order of your module with Custom. |
| Bars (‾ or _) appear instead of numbers | The value does not fit in the width of the value field. Make the field wider or check the value. |
| In box mode, only part of the number is shown and the rung to the right of the function is off | The combination of POSITION, LENGTH and SIGN pushes the number or sign past the left end. Check the orange warning on the cell. |
| The box mode 7-segment display stays off after the module is plugged back in | A module that is plugged back in starts in the off state. In box mode, run FINI again, or restart the device if the program has no FINI. In screen mode, the display comes back within about 1 second. |
| Serial 3 communication stops on the MPA series | The 7-segment display uses the same UART terminals as serial 3, so the two cannot be used together. Running FINI switches off serial 3 communication. Move the serial communication to another channel. |
| The device 7-segment display does not appear in the editor during monitoring | Look up the reason shown below the glass in Display Status and Reasons. |