Internet PLC Forum
General => Technical support => Topic started by: meiya777 on August 28, 2005, 03:35:49 AM
-
Am very new to PLC, and waiting for my first T100MD. Just want to know how I can make a simple menu on the LCD-420 with UP/DOWN button as inputs? Make it clear for you:
Option 1: print GOOD MORNING
Option 2: print GOOD AFTERNOON
Option 3: print GOOD EVENING
Option 4: print GOOD NIGHT
User choose any of the options, and PLC will execute the command and send it to LCD-420
-
You can use an input as up button and another input as down button:
Up C1
|--||-------[UpCtr]
Down C1
|--||-------[DnCtr]
Up Fn_#1
|--||------{dCusF}
| Down |
|--||----+
C1 is an up/down counter with SV = 3. So when you press the Up button or down button more than 4 times it will scroll to 0 or SV.
Fn_#1 is a custom function which will check the value of C1 (ctrpv[1] if using counter #1) and determine what message to send to LCD.
There are other ways of doing it, e.g. instead of using a counter such as C1, you can use any variable as a counter.
E.g. X = X + 1
If X >= 4 THEN return : ENDIF
That way you can forbid scrolling beyond the limit.
You can simulate the above in your education version of TRiLOGI software before your T100MD+ arrived.