| M Series PLC | ![]() |
+44 (0) 118 9700010 sales@icc-gb.com |
|
|
|
MDS-100 - The Serial
LCD Message Display
(for T100MX PLC)

Connecting COMM3 to MDS100
1. Introduction
Modern machines often demand good man-machine interface. A message display system is an indispensable part of the man-machine interface and is becoming an essential part of modern control systems. The MDS-100 is specially designed to work with the T100MX PLC to provide a low cost solution for displaying alphanumeric characters on a 4 lines x 20 characters, high contrast, bright back-lit LCD screen. Although T100MD-1616 has a built-in LCD port, it can still utilize the MDS100 for additional display job, especially at a long distance and away from the machine.
MDS-100 comprises a daughter board (the control board) that is plugged onto the back (piggy-backed) of an industry standard 4x20 LCD module. The control board may be removed during installation of the LCD module but care must be taken to plug it back with all the pins correctly aligned before turning on the power, otherwise the LCD panel and/or the control board may be severly damaged.
| Jumper | J1 (Baud Rate) | J2 (Power Supply) |
| Open | 38400 bps | 24V |
| Short | 9600 bps | 12V |
Messages to be displayed on the LCD are sent from the PLC to the MDS-100 via their respective RS485 ports at either 38,400 or 9,600 bits per second, selected by the setting of Jumper J1 when power-on (see table). Always use the maximum baud rate (38,400bps for T100MX) for best performance. For short distances of less than 2m, any ordinary pair of cables can be used to connect the RS485 interfaces. Make sure that the + and - terminals of both RS485 terminals are correctly connected to each other.
For longer distances (of up to 1200m) you need to purchase network-grade shielded twisted-pair cables to connect the MDS100 to the T100MX PLC.
2. Power Supply and Backlighting of MDS100
MDS100 may be powered by the same 12 to 24V DC power supplies of the PLC. The requirements of the backlight current however restrict the working voltage range. MDS100 employs the PWM technique to control the amount of backlight current. When Jumper J2 is open during power-on, the PWM duty cycle is set to 10%. When jumper J2 is shorted, the PWM duty cycle is set to 25%. It is recommended that you leave J2 open for DC24V power supply and short it for DC12V. If you short J2 when using DC24V, the LCD backlight is much brighter (good for outdoor use) but more heat is also being generated on the MDS control board.
One remarkable feature of MDS100 is that you can adjust the brightness of the backlight by software, or even turn it OFF completely using special instruction ?Bnn described later. This opens up the possibility of using the backlight as a kind of attention signal to the operator to read the message when something is amiss or when operator attention is required. When everything works well the backlight is turned off automatically.
3. Displaying Messages
When power is supplied to the MDS100, its backlight should be turned-on and its LCD screen should display a sign-on message announcing its model number for about one second. After that the screen will be cleared and the MDS100 is ready to display messages. A blinking cursor will appear at the top left corner of the screen and the cursor marks the starting position where messages will be displayed.
It is extremely easy to display any character on the LCD. Since the MDS100 is connected to the T100MX PLC's RS485 port, simply use the PRINT #3 statement to display a string of alphanumeric or special characters on the LCD screen. Texts are displayed beginning at the default cursor position and extend towards the right end of the LCD screen. E.g.
PRINT#3 Room Temp=;ADC(1)/100; CHR$(&HDF); C
If analogue Digital Converter #1 returns a value of 1200, then in the above example the LCD will display the message:
Room Temp=12 o C
To display the special degree ( 0 ) character, please refer to the LCD ASCII table (see Figure 1.25) and you will find that the special character DF (Hex) or 223 (Dec)of the ASCII table corresponds to this symbol. You will need to use CHR$(&HDF) or CHR$(223) to represent this character.
Only as many characters which can be fitted on a single line will be displayed. Excess characters from the PRINT statement will simply be ignored. MDS-100 can accept no more than 20 characters from the PLC at any one time. After displaying the string, the cursor is placed back to the original position. That is to say, messages sent to the MDS100 will always be printed at exactly the same coordinates until being changed by the ?Pxxyy... command which will be described next.
4. Changing Display Coordinates
The command string:
?Pxxyy<message to be displayed>
allows you to print the message at the specific coordinates (xx,yy), where xx specifies the column # (01 to 20) and yy specifies the row # (01 to 04). The message to be displayed may follow next. This command changes the default cursor coordinates to the new coordinates (xx,yy) and display the string. E.g. the statement
PRINT #3 ?P0502Col 5; Line 2
will display the text string Col5; Line 2 at the coordinates (05,02). Thereafter, any text string sent to MDS100 without the ?Pxxyy prefix will be displayed starting from the 5th column, 2nd row of the LCD screen.
TIPS
If you need to display a number that may vary within a range of digits (e.g. it could range from 1 to 1000), you should insert some blank-spaces at the end of the message strings. This will erase the characters occupied by the previous message which could display more digit then the current message. e.g.
PRINT #3 A = ;A;
5. Special Instructions for MDS100
A string sent to MDS100 which begins with the question mark ? will be treated as special instruction for the MDS100 and will not be printed. The following table describe the various instructions for manipulating the MDS100 display:
| Instruction String | Action |
| ?C | Clear screen |
| ?Pxxyy | Change cursor position: xx = 01 to 20 (Column
#) yy = 01 to 04 (row #) E.g. ?P1403 puts the cursor at 14th position on the 3rd line. |
| ?0 | Turn OFF cursor |
| ?1 | Turn ON an underline cursor |
| ?2 | Turn ON a blinking block cursor |
| ?3 | Turn ON both underline and blinking block cursors |
| ?Ixx | Send an 8-bit data represented by the hexadecimal number xx to the IR register of the LCD module* |
| ?Dxx | Send an 8-bit data represented by the hexadecimal number xx to the DR register of the LCD module* |
| ?Bnn | Adjust %duty cycle of backlight current. nn =
00 to 25 00 = no backlight. 25 = brightest. |
| ?r | Enable the MDS100 to send back an OK response after receiving a message or instruction. You will rarely ever need to use this instruction except for testing whether the LCD's RS485 interface is working properly. |
* The LCD module is an industry standard display based on Hitachi HD44780 display controller and special characters may be created by sending instructions to its IR and DR registers. However, the process can be rather tedious and demands skillful programming. Documentation for these instructions may be obtained separately from the LCD module manufacturer.
IMPORTANT
MDS100 contains a microcomputer which accepts serial characters from the T100MX PLC at 38,400 bits per second. However, due to the slower interface of the LCD module, displaying characters on the LCD module is much slower than the serial communication speed. To avoid losing characters the MDS100's microcomputer stores any incoming characters into a 90 bytes FIFO buffer and then slowly translates them into control signals to activate the LCD display. The queue is shortened as and when a character is being delivered to the LCD module.
The 90 bytes buffer is adequate for most applications, unless you have issued many positioning instructions (using the ?Pxxyy command) within one CusFn. If more than 90 characters are being sent continuously to MDS-100, some characters in the FIFO buffer may be lost. If you experience lost-characters, then try to insert a delay in between messages to give MDS100 time to display the messages and clear up the buffers. Time delay can be provided using a timer and separate the messages into two CusFn to be activated at different times. You may also use a FOR..NEXT delay loop (not recommended because it waste unnecessary CPU time in idle loop)..
6. MDS100 in the PLC Network
The MDS100 does not have an ID and does not care who the sender or receiver is. It just displays any ASCII string it receives and hence can be used to snoop at the network traffic for diagnostic purposes. However, for the same reason it may not be used as a normal display for the T100MX linked to the RS485 network. If a display is needed in this case, you can use an RS232-to-RS485 converter and hook the MDS100 to COMM2 and set Jumper J1 to 9600 bps (also make sure that the converter is permanently set to transmit mode). You may also use COMM2 to display messages on commercial terminals or on third-party serial LCD modules with RS232 interface. The manufacturer may also introduce networkable MDS models in future.

ASCII Symbol Table for MDS100