Author Topic: Modify 0.htm  (Read 14662 times)

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Modify 0.htm
« on: April 23, 2014, 02:45:31 AM »
Hi. How display more DM in the 0.htm? Can I lock some DM that is for display purpose only while some can be edited?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Modify 0.htm
« Reply #1 on: April 23, 2014, 12:54:17 PM »
It is all in the Javascript. What it does is to use the /HOSTLINK/xxx command and Ajax to retrieve the data from the PLC. After that it is displayed on the browser. You can specify some of the text field as non editable so that they can only display and not changed.

We do have a Javascript webpage designed for FMD PLC which supports 8 DI, 8 DO and 8 DMs (all editable).

If you would like to receive the script you can write to support@triplc.com with the following info:

1) Your name and/or company name that purchase the products
2) If you have purchased the product from a distributor, please provide the name of the distributor.
3) Optional: some description of your project will be nice!
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modify 0.htm
« Reply #2 on: April 27, 2014, 09:52:24 PM »
Hi. How to display negative number from DM?

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modify 0.htm
« Reply #3 on: April 28, 2014, 02:12:40 AM »
Hi. Another question. Can I run 0.htm without running TLserver? Seems like the website will give a server error if

I did not run TL server if I attempt to run 0.htm.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Modify 0.htm
« Reply #4 on: April 28, 2014, 05:11:05 PM »
The FMD-HMI script you received should display negative DM on the field correctly.  

There is no need to run TLServer when you are working on the 0.htm that is on the PLC. TLServer is only used when you connect to the PLC via serial port.

What IP address did you enter into the browser?

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modify 0.htm
« Reply #5 on: April 29, 2014, 05:17:49 AM »
Hi. Was fiddling with 0.htm instead of the file that you sent. Will try that out. Some questions though.

1) how can I write a few dm to a single line in the text file using write?
2) can I create the text file in another directory instead of file service directory provided?
3) is TLserver needed if I need to append to a text file?

Thank you.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Modify 0.htm
« Reply #6 on: April 30, 2014, 07:07:22 AM »
1) You can use the PRINT #n statement but ends with a ";" to separate each variable.

Eg.

FOR I = 1 to 4
    PRINT #1  "DM[";I;"]=";DM;" ";
NEXT
PRINT #1     ' so that it ends with a carriage return

You can simulate the above using i-TRiLOGI simulator to see the end result immediately.

2)  TLServer 3.18 or later support creation of one level of sub folder below the C:\TRiLOGI\FileService" folder which is the base folder for the PLC to access. For security reasons we restrict the TLServer to only allow writing of data to the specific base folder or a sub folder below the base folder.

3)  Some kind of software is required in order for the PC to know what to do with the data that it receives via serial port or Ethernet port. TLServer is the readily available one. You can also write php scripts that resides on web server and the PLC can make a TCP socket connection to the web server and upload data. The PHP scripts will take the data and do whatever you want with it, such as storing as a text file or even insert into MySQL database on the server. This is how the PLC work with our  plclog.com experimental database server (http://www.plclog.com). You can download PC6 programming example (the link is provided in the PLClog user guide) to view how the PLC interacts with the PLCLOG.COM server to store data into the database.
« Last Edit: April 30, 2014, 07:09:00 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS