Internet PLC Forum

General => Technical support => Topic started by: hamidraza on October 12, 2011, 03:40:14 AM

Title: HMI
Post 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.
Title: Re:HMI
Post by: support on October 12, 2011, 08:16:02 AM
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.
Title: HMI sticky note
Post by: hamidraza on October 13, 2011, 12:51:20 AM
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
Title: Re:HMI sticky note
Post by: support on October 13, 2011, 09:15:09 AM
of course, you didn't erase line 2. You simply added line 3.
Title: erase HMI message
Post by: hamidraza on October 16, 2011, 09:01:28 PM
How to erase HMI message once written.
Title: Re:HMI
Post by: support on October 17, 2011, 09:59:07 AM
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