3) Connecting The PLC To External Devices
3) Connecting The PLC To External Devices
3) Connecting The PLC To External Devices
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
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!
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
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
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
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:
T100MD-1616
Input
T100MD-1616
NPN sensor Signal Input 0V 0V
Input Voltage for Logic 0: Open Circuit or +10V to +24VDC Input Voltage for Logic 1: 0V to +5V DC
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
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
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.
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
Current = 130mA 15 16
150 5W
Pin 1