3) Connecting The PLC To External Devices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

T100MD-888+ PLC Installation Guide

+ 12 to 24V DC - Power Supply for PLC


1N4007 (optional)
1000F 50V E.Cap (Optional) CPU Status Indicators Output LED Indicators (Red)

LCD Display Module

Contrast Adjust 14-pin LCD Display port

Two-wire + RS485 Jumper for 12V

To Host PC RS232C (COMM1) Analog 5V Ref. Adjust EEPROM Write-Protection when J2 at WP WP J1 J2 Enable Adjust D/A1

High current (20A) ground return 10A @24VDC PWM x 2 To Expansion Board

8 x ADC (10 bit, 0-5V) or 6 x ADC (10 bit, 0-5V) and 2 x DAC (8-bit, 0-5V)

T100MD+
Super PLC
Warning: Warranty Void if this label is damaged

4.200

Digital and Special Inputs

62256LP-12 CMOS RAM


4.575 (Optional battery-back Real Timer Clock & RAM) Input LED Indicators (Green) Digital Input Terminals

Figure 1 - T100MD-888+ and a LCD Module

1. Introduction
T100MD888+ is a new member in the highly popular T100MD+ PLC family. The basic unit comprises 8 analog I/Os, 8 digital Inputs and 8 digital outputs. Two of the digital outputs which can be defined as PWM outputs can each deliver up to 10A peak and 2A continuous, 24VDC current to the load. The 8 analog I/Os are configurable as 8 AI, no AO or 6 AI and 2 AO. All analog inputs are 10-bit resolution and all analog outputs are 8-bit resolution. T100MD888+ is expandable up to a total of 88 digital inputs and 88 digital outputs with the optional expansion module. It has an RS232 and an RS485 port, both of them are conversant in MODBUS protocol. The built-in LCD port allows simple interface to industry-standard LCD modules from 8 characters to 80 characters!

2. Physical Mounting & Wiring


The compactly designed T100MD888+ PLC can be easily installed in many kinds of plastic or metal enclosures. You need to use 4 PCB standoffs (or some screws and nuts) to support the controller and fasten it to a console box.

Analog I/O Ports: The 8 channels of analog I/Os are available via a DB15 connector along the left edge of the T100MD888+ PLC. The T100MD888+ PLC also supplies a +5V analog reference-voltage output and the analog ground on the female DB15 connector, as shown in the following pin-out diagram:
Signal A/D #1 A/D #2 A/D #3 A/D #4 A/D #5 A/D #6 A/D #7 or D/A #1 A/D #8 or D/A #2 Analog Ref. AVCC Analog ground AVSS Pin # 8 7 6 5 4 3 2 1 13 - 15 9 - 11

1 9

The specifications and programming methods for the analog I/Os are detailed in Section 7 of this Installation Guide. Digital I/O Ports: Detachable screw terminals are provided for quick connection to all digital inputs, outputs and power supply wires. Each block of screw terminals can easily be detached from the controller body, enabling easy replacement of the controller board when necessary. Since the terminal block for digital I/Os is inserted vertically to the board surface, you need to remove the terminal block before you can start wiring. Use a small flat-head screwdriver and insert underneath the terminal block, apply even pressure to raise the terminal block until it becomes loosened from the connecting-pin strip, as shown below:
Maximum AWG 24 wire Insulated crimp ferrules

Tightening screw

Connecting-pin strip Flat-head screw driver

Figure 2 - Removing Screw Terminal block Although wires of up to 24 AWG may be connected directly to the screw terminal, insulated crimp ferrules should be used to provide a good end termination to multistranded wires. Use of ferrules reduces the possibility of stray wire-strands shortcircuiting adjacent terminals and their use is therefore highly recommended. 10A Ground Terminals: Along the right edge of the T100MD888+ PLC you will see : a single two-pole terminal block marked 10A GND. This terminal should be connected to 0V of the PLCs power supply to provide a high current ground return path for the two 10A PWM outputs (7 & 8).

EEPROM Write Protection Jumper: The T100MD888+ PLC features an EEPROM write protection jumper J2. For normal programming, the jumper block for J2 should be placed at the Enable position. If J2 is placed at the WP position, the PLCs EEPROM is write-protected. In this case, the SAVE_EEP statement will not work and if you transfer a new program to the PLC, the new program will reside temporarily in RAM and will not be saved in the EEPROM. It will also be lost when the PLC powers down.

3. Power Supply
The T100MD888+ PLC requires a single regulated, 12 to 24V (+/- 5% ripple) DC power supply for both the CPU and the I/Os. It is recommended that whenever possible, use a higher power supply voltage since the voltage difference between ON and OFF state is wider for operation at higher voltage. To use the T100MD888+ at 12VDC you should place a jumper block on the two-pin header marked J1-12V near the power supply terminals. You must remember to remove the jumper when operating the PLC above 18V, otherwise the voltage regulator may overheat. Please use only industrial grade linear or switching regulated power supply from established manufacturers. Using a poorly-made switching power supply can give rise to a lot of problems if the noisy high frequency switching signals are not filtered properly. Note: If your application demands very stable analog I/Os you should choose a linear power supply instead of a switching power source for the CPU. Always place the power supply as near to the PLC as possible and use a separate pair of wire to connect the power to the PLC. Keep the power supply wires as short as possible and avoid running it along side high current cable in the same cable conduit. The T100MD-888+ PLC will be reset when the power supply voltage dips below 9V. It is a good idea to connect a 470F to 1000F, 50V electrolytic capacitor near the power supply connector to suppress any undesirable voltage glitches from conducting into the PLC. If other high current devices such as a frequency inverter were to affect the operation of the PLC, then you should also connect a diode before the capacitor to prevent reverse current which might flow back to the power supply, as shown in the following diagram:
1N4007

+24V DC Power Supply


470uF 50V +24V 0V

Surge suppressor (Recommended)

Figure 3 If the AC main is affected by nearby machines drawing large currents (such as large three-phase motors), you should use a surge-suppressor to prevent any unwanted noise voltage from being coupled into the T100MD power supply. The required current rating for the power supply depends mainly on the total output current, taking into consideration the peak current demand and the duty cycle of the operation. Normally, a 2A, 24V DC switching power supply should be sufficient. 3

4. LCD Display Module


The built-in 14-pin LCD DISPLAY MODULE PORT (hence the suffix MD) is compatible to the Hitachi HD44780 display controller which is a de facto industry standard. This allows low cost, easily available LCD modules from third-party manufacturers to be connected directly to the PLC to implement very economical man-machine interface. You simply connect the LCD module to the T100MDs LCD port using a 14-way IDC ribbon cable and header. Make sure that the pin number on the PLC matches that of the LCD module. Wrong cable connection can destroy the LCD port or LCD module. The +5V logic power required by the LCD module is supplied by the 14-pin header. However, NEVER connect the LCD backlight terminals to the +5V pin of the 14-pin header or the +5V output of the analog power supply as this will overheat the PLCs voltage regulators. For modules with LED backlight, you can simply connect the backlight terminals in series with a 150 to 220 5W resistor to the 24V power supply. The backlight wiring is illustrated in the Appendix section of this guide. You may use any of the industry standard 14-pin LCD modules. There are many different display sizes or character formats to choose from, e.g., 1x8, 1x16, 1x20, 2x16, 2x20, 1x40, 2x40 and 4x20. We strongly recommend those with Super-Twisted Nematics (STN) type which gives high contrast and wide viewing angle. The contrast of the LCD can be adjusted using the preset potentiometer R7 marked with the word contrast below the LCD connector. Programming the LCD Display The SETLCD y, x, string TBASIC command allows you to easily display any string of up to 20 characters on the yth line starting from the xth column. E.g., to display the message T100MD-888+ on the 3rd line starting from the 5th character position from the left end of the screen, you use the command: SETLCD 3, 5, T100MD-888+ Normally, y = 1,2,3, 4; x = 1, 2, . 20. Integers must be converted to strings using the STR$( ) or HEX$( ) before they can be displayed using SETLCD. You can use the concatenation operator + to combine a few components together in the command. E.g. SETLCD 1,1,Rm Temp = + STR$(ADC(1)/100,3)+CHR$(223)+C The function STR$(ADC(1)/100,3) reads the content of ADC channel #1, divides it by 100 and converts the result into a 3-digit string, the CHR$(223) appends a special character which corresponds to the o symbol. E.g. if ADC(1) returns the value 1234, the final string being displayed will be : Rm Temp = 012 oC. Special Commands For LCD Display 1. 2. 3. 4. 5. Action Clear screen No cursor Underline Cursor Blinking Cursor Underline + Blinking Cursor Command SETLCD 0,1, CHR$(1) SETLCD 0,1, CHR$(12) SETLCD 0,1, CHR$(14) SETLCD 0,1, CHR$(13) SETLCD 0,1, CHR$(15) 4

If you use the SETLCD command with line #0, then the strings will be treated as special instructions to be sent to the LCD module to program it for various modes of operation. This includes blinking cursor, underline cursor or no cursor as well as display shift mode. You have to refer to the LCD manufacturers data sheet for the detailed commands. Some of the most useful commands are listed below:

5. Digital Input Circuits


All inputs have green color LED indicators. Every 8 inputs are grouped together into a single strip of detachable screw terminal. All inputs are NPN types, meaning that to turn ON input, you should connect it to low-voltage rail (0V terminal) of the power supply as shown in the following diagram. The input numbers are marked on their screw terminals as well as on the PCB alongside the strip pin.
+24V

T100MD-1616
Input

Limit Switch (Normally Open)

T100MD-1616
NPN sensor Signal Input 0V 0V

Input = logic '1' when Limit Switch is closed

Input = logic '1' when object is sensed

Input Voltage for Logic 0: Open Circuit or +10V to +24VDC Input Voltage for Logic 1: 0V to +5V DC

6. Digital Output Circuits


All outputs have red color LED indicators. T100MD888+ PLC employs sink (NPN) type power transistor outputs that turn ON by sinking current from the load to the 0V terminal. Every 8 outputs are grouped together into a single strip of detachable screw terminal. Figure 3 shows the wiring diagram of the digital outputs.
T100MD-1616 Controller
0V 1 Power Supply 2 3 4 5 OUTPUTS 6 7 8 LOAD LOAD LOAD LOAD LOAD LOAD LOAD LOAD 0V

24V DC Power Supply +24V

Figure 4 - Transistor Output Interfacing to Load Output #7 & #8 can each sink up to 10A peak or 2A continuous current @24VDC! They can also be configured as PWM outputs to drive heating elements or proportional valve using the SETPWM command. 5

Outputs Electrical Specifications:


Output #7 & #8 Output Driver type Maximum Output Current: Continuous Output Current Output Voltage when OFF Output Voltage when ON: Inductive Back EMF Bypass N-Channel power MOSFET with low rDS = 0.1 10A 2A 1V @10A Yes Output #1 to #6 NPN Darlington Power Transistors 1.0A 350mA 1.2V @1A Yes

Resistor pulled up to 24V power rail

7. Analog I/Os
7.1 Analog Power Supply The analog section of the PLC shares the same 12 to 24VDC power supply as the CPU. It will generate a stable 5V (1% accuracy) regulated DC voltage which will be used internally as voltage reference and is available externally for use by other analog input devices. The reference voltage output is available on the analog I/O connector pins #13 - 15, and may be used as the source voltage for connecting to potentiometers. It is current-limited to 10mA by a 10 Ohm resistor RA3. If you need more current, you can replace RA3 with a lower resistance value. The analog reference voltage can be calibrated by adjusting the preset potentiometer on the circuit board marked Avcc Adj until the reference voltage of 5.00V is reached. 7.2 Analog Input #1 to #8 Each T100MD-888+ is equipped with 8 channels of built-in 10-bit A/D converters with a range of 0-5V full-scale. It is very easy to interface to other analog voltage or current input range by using external resistors as voltage dividers or current-tovoltage converters as shown in the following diagram:
0-20mA or 4-20mA Current loop 0.0 - 5.0V or 1.0 - 5.0V A/D #1 - #8 V1 : 0-10V A/D #1 - #8

R1=10K 1% R2=10K 1%

V2 :0-5V Analog 0V

130 1% 120 1%

Analog 0V

Converting 20mA current-loop to 0-5V

Converting 0-10V signal to 0-5V

Note that If the sensor has its own power supply, then you must connect the sensor ground to analog AVSS terminal to provide a common ground. All the analog inputs to the T100MD CPU are internally current-limited to guard against transient over-voltage damage. However, care should be taken to prevent applying excessive over-voltage to the analog inputs for a prolonged period of time which can lead to permanent damage of the ADC input. Using Potentiometer to Set Parameters A potentiometer can provide a very low cost means for users to input parameters to the PLC such as setting of temperatures, timers or counter values, etc. The following diagram shows how easy it is to implement such a device using the 5V voltage reference output and an analog input:
A/D#1

1K Potentiometer

+5V GND

Very accurate parameters can be set if the LCD display is used as visual feedback of the settings. Reading Analog Input Data The 8 analog input signals are read by the TBASIC command ADC(1) to ADC(8). For 10-bit resolution, the theoretical possible range is 0-1023. However, as explained in the programming manual, ADC(n) commands convert the result to a 12-bit number. This is done by multiplying the value by 4. Hence the data returned by ADC(n) command will be 0,4,8, 4092. 7.3 Analog Outputs T100MD888+ features 2 channels of 8-bit Digital-to-Analog converter. D/A #1 shares the same pin as A/D #7 and D/A #2 shares the same pin as A/D #8. These two pins by default are A/D inputs after power-on RESET. You may configure either one or both of them as D/A outputs by executing the setDAC command on the respective channel(s). Both D/A #1 and #2 are 0 to 5V signal level, high impedance unbuffered outputs. You need to connect them to external buffer amplifiers if you want to use them to deliver load current to drive external loads. Programming Analog Output You can use the TBASIC command SETDAC 1,x to set the analog output to a 12bit value x. (x = 0 to 4096). The actual analog outputs can only assume the value 0,16,32,484080 because of its 8-bit resolution, which is normalized to 12-bit by multiplying by 16. So if you execute SETDAC 1,20 the actual output will only be assigned a value =16.

Appendix: LCD Display For T100MD-888+: Wiring Instruction


TRi currently supplies two models of back-lit LCD display modules for use with the T100MD-888+ PLC. Each model is supplied with a 0.5m long 14-pin ribbon cable for connection to the T100MD-888+s LCD port. To use the LCD, simply plug the 14-pin plug onto the LCD port header, making sure that pin #1 (the colored wire) of the ribbon cable aligns with pin #1 of the port header. (Pin 1 is the pin with a square solder pad and the pin number is also printed on the PCB.) Wiring of the backlight differs slightly for the two models as shown below. It is assumed that the unit will be connected to the 24V power supply of the T100MD-888+ PLC. If you are using other voltages, then compute the values of the current limiting resistors to obtain the same backlight current.
A
MD-LCD216. 2 lines x 16 chars. Current = 90mA 220 5W

IMPORTANT!
Please ensure that the current limiting resistor is in place and functioning properly before turning on the power supply. Connecting the LED backlight to the 24V power supply without the current limiting resistor will definitely destroy the backlight unit. Also, please ensure that the polarity is connected correctly, because reverse connection is likely to damage the backlight unit as well. For MD-LCD420, the backlight is brought to a screw terminal via a small PCB. Use a multi-meter to check which terminal is connected to pin 15 (Anode) and 16 (Cathode-) if you are unsure of the polarity.

K
Pin 1

24V Power Supply

Current = 130mA 15 16

MD-LCD420 4 lines x 20 chars.

150 5W

Pin 1

24V Power Supply

You might also like