MDS100-BW User Manual

MDS100-BW User Manual

Share on Social Networks

Share Link

Use permanent link to share in social media

Share with a friend

Please login to send this presentation by email!

Embed in your website

Select page to start with

1. Only use the differentiated version {dCusF} so that the message is sent only once when condition =TRUE. To display a chan ging data you can use a clock pulse (not faster than 0.2s) to periodica lly refresh the display as follow: {dCusF} Clk:0.5s Fn_#1 Special Instructions for MDS100-BW A string sent to MDS100-BW which begins with the question mark “?” will be treated as special instruction for the MDS100-BW and will not be printed. The following table describe the various instructions fo r manipulating the MDS100-BW display: Instruction Action ?C Clear screen (Execution time: 2 milliscond) ?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 ( Default ) ?3 Turn ON both underline an d 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. 10=Max for 24V. 25 = Max for 12V. ?ir ID-Read: returns the current network ID of the MDS100-BW as a 2-digit hexadecimal string. ?iwxx ID Write: You can use this command to change the network ID of the MDS100-BW to hex value “xx”. 4 Installation Guide for MDS100-BW - Serial LCD Display MDS100 +24V 0V -RS485+ LCD Module 12V or 24V DC Power Supply + - PC or PLC RS485 + - J1 J2 MDS100-BW comprises a daughter board (the “ control board ”) that is “piggy-back” to a 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 damaged. Messages to be disp layed on the LCD are sent from the PLC to the MDS100- BW via their respective RS485 ports at either 38,400 or 9,600 bits per second. With an appropriate RS232 to RS485 converter (e.g. ) a host PC can also send commands and messages to the MDS100-BW. If Jumper J1 is open when power-on, it is set to 38,400 bps. If J1 is shorted when power- on then the baud rate is set to 9600. Al ways use the maximum baud rate (38,400bps for T100MD+ or MX+) for best performance. For short distances of less than 2m, any ordinary pair of cables can be used to co nnect the RS485. Make sure that the “+” and “-” terminals of both RS485 terminals are correct ly connected to each other. For longer distances (of up to 1200m) you should use netw ork-grade shielded twisted-pair cables. Power Supply and Backlighting of MDS100-BW MDS100-BW may be powered by the same 12 to 24V DC power supply of the PLC. It employs the PWM technique to control the am ount 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 important that you leave J2 open for DC24V power supply. If you short J2 when using DC24V, the LCD backlight is much brighter but excessive heat will be genera ted on the MDS control board, and unless forced air cooling is implemented, the curre nt limiting resistors on the MDS100 control board can burn out as a result. Y ou can adjust the brightness of the backlight by software, using special instruction “ ?Bnn ” described later. When the MDS100-BW is first powered ON a 4 lines sign-on message should be displayed for 1 second. On the 4 th line of the display it indicates the network ID address of the device. This ID address is needed when using it with the NETCMD$ command and can be changed using the command “?iwxx” sent from the host. 1

2. Displaying Messages About 1 second after displaying the sign-on message the LCD screen will be cleared and it is ready to display messages. A blinking cursor will appear at the top left corner of the screen and the cursor mark s the starting position wher e messages will be displayed. It is easy to display any character on the LCD. If the MDS100-BW is connected to the M or F-series PLC’s RS485 port, simply use the “P RINT #3” statement to display a string of alphanumeric or special characters on th e LCD screen at a specified row and column address as follow: PRINT #3 “?Pxxyy[text to be printed]” xx = Column number (01 to 20), yy = Row number (01 to 04) For example, if you execute: PRINT #3 “?P0203Good Morning!!” the text “Good Morning!!” will be displayed at 3 rd row of the display starting from the 2 nd character position. Displaying Messages Using NETCMD$ command The MDS100-BW can accept messages embedde d within a “host link command” sent to it in a form similar to the PLC’s host link command protocols. Such message format contains the MDS100-BW’s ID and error checking “Frame Check Sequence” (FCS) characters. Only messages with correct ID and FCS will be accepted for display. Other characters will be discarded. This allow multiple MDS100-BWs to be used in a network environment with other PLCs as well. If the MDS100-BW is to be used with a PC, you can download sample code in Visual Basic from The M- or F-series PLCs have built-in networking command “NETCMD$” for this purpose. To use the NETCMD$, first note down the ID address of the MDS100-BW in use. The ID is displayed in hexadecimal notation (01 to FF) on the 4th line of the sign on message when the MDS100-BW is first powered ON. Simp ly append the string “@nn” (where nn is the ID) in front of the coordinates and message string to be displayed. Then create a custom function (e.g. function #99, assumi ng ID = F0) which can be called by other functions, as follow: The string to be displayed, including the coor dinates “?Pxxyy” are constructed within the caller function as X$ and then passed to function #99 by executing a “CALL 99” command. Function #99 will then add the network header “@F0” (where ID = F0 in this example) to the string and invoke the NETCMD$ to send out the complete network message string (with FCS appended) to th e MDS100-BW. When a good message has been received by MDS100-BW controller the actual content of the message will be extracted and displayed on the LCD. A respon se string which includes the ‘@’ symbol, the ID and the FCS will be returned to the PL C as acknowledgment via A$. If there are any missing characters then the message w ill be aborted and NETCMD$ will receive an empty string (hence its length = 0). If an error occur the message will be re-sent a second time by function #99. 2 E.g. To display a message such as the cu rrent room temperature, do the following: X$= ”?P0103Room Temp=” + STR$(ADC(1)/100)+CHR$(&HDF)+“C” CALL 99 If Analog Digital Converter #1 returns a value of 1200, then the LCD will display the message at column #1, row #3: Room Temp=12 0 C Special “degree” ( 0 ) character can be found on the LCD ASCII table on page 4 with ASCII code = DF 16 or 223 10 . 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 will simply be ignored. MDS-100-BW can accept no more than 20 display characters from the PLC at any one time. After displaying the string, the cursor is placed back to the position specified by the last “?Pxxyy” . 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 can use the STR$(n, d) function which can generate fixed number of digits. Otherwise, you could in sert some blank-spaces at the end of the message strings which will erase the charac ters occupied by the previous message. X$ = “A = ” + STR$(A) + “ ” Using MDS100-BW In a Network: More than one MDS100-BW can be multi- dropped on the RS485 network with each MDS100-BW programmed with a different ID . This opens up great possibility for sophisticated controls where remote LCDs can be sprinkled over a distributed network of control elements. If you have an Auto485 then the easiest way is to use HyperTerminal on a PC to send “?iwxx” command to the MD S100-BW (one unit at a time). If you only have the M or F PLCs then use th e TRiLOGI program: “CFG-MDS.PC6” ( http://www.tri- ”) to change the default ID of the Network MDS100-BW. Note : MDS100-BW with Firmware version >= r45 also supports “BROADCAST” mode. Simply precede any string to be broadcast to ALL connected devices with “@00”. Do not append FCS and ‘ * ’ character. MDS100-BW will not send response to a broadcast message, so you should use PRINT inst ead of NETCMD$ command to broadcast. 1) When powered up, MDS100-BW is in non-networked mode and will display any data it receives. But the moment it receives a network message with the header “@nn” where nn corresponds to its ID it immediately enters into network mode and will only accept messages that are sent as correctly formatted string with “@nn” header and good FCS. It will no longer accept just any strings sent using the PRINT #3. Only power-on reset can change it back to non-network mode. All MDS100-BW can be forced into network mode by the command “?ne” which offers a quick way of putting multiple MDS100-BWs into netw ork mode simultaneously. 2) NEVER use the non-differentiated form{C usFn} to send out string to MDS100-BW. {CusFn} will be executed at every scan of the ladder logic as long as its execution condition is TRUE. 3 A$ = NETCMD$(3, “@F0”+X$) ‘ID = F0 IF LEN (A$) = 0 ‘ command failure. A$ = NETCMD$(3, “@F0”+X$) ‘ Try a 2 nd time ENDIF Custom Function #99 IMPORTANT


  • 814 Total Views
  • 588 Website Views
  • 226 Embeded Views


  • 0 Social Shares
  • 0 Dislikes

Share count

  • 0 Facebook
  • 0 Twitter
  • 0 LinkedIn
  • 0 Google+