Quantcast
Channel: EVERDYN » STEP7
Viewing all articles
Browse latest Browse all 3

TUTORIAL : SIMATIC S7 WEB SERVER (3/3)

$
0
0

[link="http://www.everdyn.com/blog/"]From Everdyn's blog[/link]

Siemens shows in this video how to integrate a custom web page in a S7-1200.

In this tutorial, i will explain the same procedure for an S7-300 PLC but I would go further by explaining how to create a html page provides access to PLC variables.

 

This tutorial consists of three steps :

1st step: how to enable the web server integrated in the CPU.

2nd step: how to load a custom web page in the web server.

3rd : How to create an html file allowing access to PLC variables.

 

We saw last time how to enable the web server and how to integrate your own pages.

Now we will see how to do your own page and to read/write data from the PLC.

 

All the data are already store into an excel file.

We often have to give the data information to create  scada view.

The file lool like this :

BLOG-GB130418-IMG01

It contain : address, tag, Description for each information.

And the web page will look like this :

BLOG-GB130418-IMG02

 

It’s look like the excel file. You can do more friendly your  web page with picture … but don’t forget all the page will be store into the PLC memory card.

 

So 1st we will display data :

You can only acces to the data with is Tag name and not the adress.

For example, if you want to acces to DB101.DBX0.0, you have to write is name like this  ”CTA_10_TA”.CV_E_CTA10_PT_AL with DB101 named CTA_10_TA and DBX0.0 named CV_E_CTA10_PT_AL.

For exemple with this code line

<tr><td>DB101.DBX0.1<br></td><td>CV_E_CTA10_PT_AL<br></td><td>Defaut Présence tension armoire CTA 10<br></td><td>:=”CTA_10_TA”.CV_E_CTA10_PT_AL:<br></td></tr>

your html page will look like this

BLOG-GB130418-IMG05

 

Note : From your excel file containing tag, adress, … and with some concatenate you generate all the data in few time.

 

Now it should be interesting to modify data …

First, at the begining of your Html file, you have declare it as a writable data like this :

<!– AWP_In_Variable Name=’”CTA_10_TA”.CV_E_CTA10_PT_AL’ –>

The variable declaration is a comment Html file so it starts with <!-And ends with ->.

You have to do it for each data. But with excel and some concatenate it can be very fast to.

After this, you can use and write it in your html file like this :

 

<tr><td>DB103.DBD0<br></td><td>CV_E_CTA10_TT01_OFT<br></td><td>Offset Température d’air soufflé CTA10<br></td><td>:=”CTA_10_TR”.CV_E_CTA10_TT01_OFT:<br></td><td><form><input name=’”CTA_10_TR”.CV_E_CTA10_TT01_OFT’ type =”text”><input name =”send” type = “submit”><br></form></td></tr>

your html page will look like this

BLOG-GB130418-IMG06

 

 

It’s almost the same as before just with a new column where you can modify the data.

 Note: The software Blue Griffon (html editor) automatically replace the quote symbol with the word quote. This prevents the operation of html pages. I advise you to use another software (ex: notepad + +) wich is  not perform automatic correction.

 

I hope  this tutorial will be usefull.

The post TUTORIAL : SIMATIC S7 WEB SERVER (3/3) appeared first on EVERDYN.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images