Author Topic: PRINT #8?  (Read 11598 times)

StefanA

  • Newbie
  • *
  • Posts: 29
  • I'm a llama!
    • View Profile
PRINT #8?
« on: April 15, 2013, 10:53:27 AM »
I have some problems using the the PRINT #8 command. I want my Nano-10 to write a text file containing html code to it's extended memory. But how do I handle statements like <HTML> or <HEAD>? I can't get the PLC to write anything enclosed by < >. It works in simulation mode with the programming software but not
with a real PLC. I have used the PRINT#4 command to generate a web page stored on my PC with out any problems. Can PRINT#4 handle  <statement>
and PRINT #8 can't?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PRINT #8?
« Reply #1 on: April 15, 2013, 08:38:33 PM »
I think when the PRINT #8 was designed it wasn't ever conceived that it might be used to create a file with the HTML code and a string "<anytags>" where anytag that is not a valid tag is simply ignored.

If your purpose is to create HTML file, a workaround will be to add a space before the first '<'. Browser will ignore the space and the file can still be displayed properly.

« Last Edit: April 15, 2013, 08:40:00 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

StefanA

  • Newbie
  • *
  • Posts: 29
  • I'm a llama!
    • View Profile
Re:PRINT #8?
« Reply #2 on: April 16, 2013, 10:21:49 AM »
Thanks, now it works like a charm.