Internet PLC Forum
General => Technical support => Topic started by: hamidraza on October 12, 2011, 03:40:14 AM
-
How to handle with HMI I/O's while using F1616BA with 40/40 Extension cards ; as the inputs for HMI starts from 57-66 while the sample code starts from input 0.
-
Look for examples in the folder:
C:\TRiLOGI\TL6\usr\samples\HMI\HMI57to72.PC6
For other combinations you can modify based on the same knowledge as other files on the above folder.
-
Dear sir
I am using sample code for scaning HMI key pad with 40/40 extension card placed at
c:\trilogi\TL6\usr\samples\HMI\HMI57to72.pc6
i am trying to modify display string customise function as
a= val(z$)
if(a<=24)
setLCD 2,1,"command no. "+str$(a)+" "
endif
if(a>24)
set LCD 3,1,"Wrong Command"
endif
z$=" "
the problem is even if condition no.2(a>24) gets false the LCD shows the same message
the note sticks on LCD
what should i do to get rid of this problem
-
of course, you didn't erase line 2. You simply added line 3.
-
How to erase HMI message once written.
-
You can either clear screen with SETLCD 0,0,CHR$(1) or you can overwrite the existing lines with spaces.
E.g. define a variable E$ = " " (20 spaces)
Then you can erase any line by:
SETLCD 1,1, E$ ' erase line 1
SETLCD 4,1, E$ ' erase line 4