The Embedded Super PLCs -  Built For The OEMs - Easy to program, Powerful, Low Cost, Internet Enabled

E, H and M-series Programmable Logic ControllersLadder + Basic Programming SoftwarePLC Application Photos and Users' Application NotesContact Information, Distributor List and Testimonialdiscussions.gif (727 bytes)How to Place Order on-line or Off-Line

Click one of the above links

T100MX APPLICATION EXAMPLES

Programming the M-series built-in hardware is unbelievably easy using TRiLOGI. We present 5 examples here to illustrate our point. These are fully functional projects and they represent challenging tasks that demand powerful PLCs, yet programming them using TRiLOGI is totally effortless. Compare the following examples with the amount of programming effort needed on other makes of PLCs to handle the same tasks. You will quickly realize the big saving of programming time when using TRiLOGI together with the M-series PLCs!

1. (a) Display Alphanumeric Messages on built-in LCD Display  (For T100MD-1616 only)

Only T100MD-1616 has built-in interface for industry standard alphanumeric LCD module which can range from 1x8, 2x16, 2x20 or 4x20 types.

Assignment:

Every 1 second, display a message as follow:
     
where xx depends on reading of A/D #1 which is returned by function ADC(1).

Full scale A/D is 4096.
A/D range (0 to 4096) Temperature 0 to 50 degree C



Comments:

Every one second, the special bit Clk:1.0s closes and activates Function #1.

Within the Custom Function #1, ADC(1) reads the A/D converter #1 and converts into degrees. SETLCD displays the string.

1 (b) Display Alphanumeric Messages on External Serial LCD Display: MDS100

MDS100 is an optional 4 lines x 20 characters LCD display connected to the PLC's RS485 port (serial port #3).  Both T100MD-1616 and T100MX can use MDS100, although the only reason for T100MD user to use MDS100 will be to have more than 1 LCD display.

Every 1 second, display a message as follow:
     
where xx depends on reading of A/D #1 which is returned by function ADC(1).

Full scale A/D is 4096.
A/D range (0 to 4096) Temperature 0 to 50 degree C

Comments:

Every one second, the special bit Clk:1.0s closes and activates Function #1.

Within the Custom Function #1, ADC(1) reads the A/D converter #1 and converts into degrees. PRINT #3 displays the string.

2. Motion Control of Stepper Motor

T100MX generates pulses to feed to stepper motor driver. The maximum speed, acceleration/deceleration and total number of pulses to generate are definable using TBASIC.

Assignment:

  • Stepper motor to rotate 100,000 steps.
  • Maximum speed = 5000 pps,
  • Acceleration = 100 steps to reach full speed.
  • Display the # of steps moved on LCD Display model MDS100 every 0.5 seconds.
  • At the end of rotation, activate relay #20.

3. Activate Events at Scheduled Times

T100MX has Real Time Clock which keeps track of Date and Time and can be used to activate events at scheduled time.

Assignment:

  • Every day turn on output #1 at 19:00
  • Turn OFF output #1 at 7:00
  • On 1st Jan 2000 at 12:00 turn ON output #5
  • On the same day at 18:00 turn OFF output #5

Note :

1. Tim30s activates Function #1 every 30 seconds.

2. Output #1 is bit #0 of the variable output[1]. The statement SETBIT output[1],0 turns ON output #1.

3. Actually it may not be necessary to check the minute hand since when the RTC turns from 18:59 to 19:00, the output will be turned ON as long as TIME[1]=19. Only when TIME[1]=7, then output #1 needs to be changed.

4. Automatic Climate Control System

Assignment:
  • Read desired temperature setting (S) from a potentiometer connected to A/D #5.
  • Read current air temperature (T) from sensor attached to A/D #1 (T)
  • Turn ON cold air-conditioner (output #1)if T > S by more than 1.5 oC.
  • Turn ON hot air-conditioner if (output #2) if S > T by more than 1.5 oC.
  • Turn OFF both hot and cold air-conditioner if T is within + 1.5 oC of S.
  • Display both Set Point and Actual Temperature.

Full scale A/D is 4096.
Range of Set Point:

A/D #5 = 0 - 16.0 degree C
A/D #5 =4096 - 30.0 degree C
Range of Sensor:

ADC#1 =0 -10.0 degree C
ADC#1 = 4096 -  50.0 degree C

Comments:

One decimal place is used for temperature reading.

All temperature readings are x 10 times. Hence 16.0 degree C is
represented by 160, -10.0 degree C is represented by -100.

5. Closed-Loop PID Control of Heating Process

PID Controller Transfer Function:

Assignment:

  • Read desired set-point temperature from a potentiometer connected to A/D #5 (S) with temperature range between 50 oC - 200 oC
  • Measure the process temperature from a thermocouple + signal conditioner attached to A/D #1(T)
  • Compute the Error = S - T. Apply Proportional + Integral + Derivative (P.I.D) algorithm to compute output X.
  • Apply output X to Digital-to-Analog converter D/A #1 to control a variable position valve that feed fuel to the flame.
  • Sample and compute every 1 second.

Full scale A/D range is 4096.

Range of Set Point: A/D #5 = 0 => 50 C
A/D #5 =4096 => 200 C

Range of Sensor: ADC#1 =0 => 0 C
ADC#1 = 4096 =>300 C

Note:

  1. We use two decimal places to represent the gains KP, KI and KD. Each integer unit represents 0.01. Proportional gain KP = 5 is represented by variable P = 500. Likewise, Integral gains KI = 0.5 is represented by I = 50 and Differential gain = 0 means Differential term is not used (P.I. only). The integrator limits of + 2048 for the PIDDEF statement must be multiplied by 100 to be put on the same scale as the P,I and D parameters.
  2. The value returned by PIDcompute( ) function is then divided by 100 to get the real value of controller output. PIDcompute( ) returns a signed value which can vary from -limit to + limit. We choose the 50% D/A output (4096/2 = 2048) as the mean control point so that negative values from PIDcompute( ) means D/A output will be < 2048, positive values means D/A output will be > 2048.

Copyright 2001 Triangle Research International, Inc
All Rights Reserved