Re: [foxboro] HTML ladder and sequence documentation

  • From: Kevin FitzGerrell <fitzgerrell@xxxxxxxxxxxxxxx>
  • To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>
  • Date: Wed, 12 Apr 2006 12:53:27 +1200 (NZST)

List,

If you just want to display ladder logic or sequence logic in a web browser,
it's easy to generate HTML pages to do so.  You can use the plb_dump program on
the cassandra site to turn the PLB blocks into an ascii format, and a simple
shell script to generate the html tags around the logic.

Script follows, but be sure to read it as text, not html, as the script has text
that will be interpreted as html tags:

#!/bin/ksh
echo "<html>\n<head>\n<title>PLB Index</title>\n</head>\n<body>\n<pre>\n" >
/opt/home/plb_out/index.html
echo "COMPOUND    BLOCK\n-------------------------------\n" >>
/opt/home/plb_out/index.html
cd /opt/fox/ciocfg
LADDERS=`ls */*.p | sed '/t/d' | sed 's/.p//' | sed 's%/%x%'`
for LADDER in $LADDERS
do
  COMP=${LADDER%%x*}
  BLOCK=${LADDER##*x}
  echo "<html>\n<head>\n<title>$COMP $BLOCK</title>\n</head>\n<body>\n<pre>\n" >
/opt/home/plb_out/$COMP_$BLOCK.html
  /opt/home/plb_dump $COMP $BLOCK >> /opt/home/plb_out/$COMP_$BLOCK.html
  echo "</pre>\n</body>\n<html>\n" >> /opt/home/plb_out/$COMP_$BLOCK.html
  echo "<a href=\"./$COMP_$BLOCK.html\">$COMP    $BLOCK</a>\n" >>
/opt/home/plb_out/index.html
done
echo "</pre>\n</body>\n<html>\n" >> /opt/home/plb_out/index.html

If this comes out too mangled, email me for a text copy.

Sequence logic is similar but easier, since the .s files already are in ascii.

Regards,

Kevin FitzGerrell
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: