2 posts in this topic

Hi there!

i'm new in the forum. I start to work with S7 1200 CPU1214AC/DC/RLY firmware 4.4 i create my HTLM pages and download in to PLC. Everything work well i can read dat from DB or tags but if i try to write from my HTML dose't work. I find on line a tutorial from SIEMES i copy a couple of examples but dosen't work  i use a password but nothing. If i modify the variable from the SIEMENS page gave me when i type the IP i can change the variable.

Please some one can help me because i diden't know what my problem is 


Thank you soo much 


Share this post

Link to post
Share on other sites

Have you declare your variable with awp in you web page? 
In your plc, the tag checkbox Visible in HMI engineering must be checked.


Here is a demo web page which include few write option. Just cut/paste in a text file, rename it *.html




<!DOCTYPE html>
<html lang="en">
<!-- Web page must use utf-8 charct set -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="styles/MainStyle.css" />
<link rel="stylesheet" href="styles/Write.css" />
<script src="scripts/MainFunction.js"></script>
<script src="scripts/PLCTagFunction.js"></script>

<title>Siemens 1200 web demo</title>

<!-- this block is used in case of internet explorer version <9 is used. Only v9 include HTML5 -->
<!--[if lt IE 9]>
		<script type="text/javascript">

	<img src="images/Unit.jpg" alt="S7-200 unit" />This is a <b>SIEMENS</b> 1200 demo.</header>

<div id="MainDiv">
	<h4>Different syntax could be use for read and write variable</h4>
	Counter value is :=MW102:<br>
		<!-- *************** Use push button as variable input************* -->
	<!-- AWP_In_Variable Name="bResetPB" -->
	<form method="post">
		<input name="bResetPB" type="hidden" value=1>
		<input id="ResetOnePB" type="submit" value="Reset counter">
	<!-- *************** Use select list as variable input ************** -->
	<!--  AWP_In_Variable Name="bResetPB" -->
	<form method="post">
		<select name="bResetPB">
			<option value=1>Reset to zero</option>
			<option value=0>Do not reset</option>
		<input type="submit" value="Send request">
	<!-- *************** Use radio pb as variable input *************** -->
	<!--  AWP_In_Variable Name="bResetRequest" [Use="bResetPB"] -->
	<form method="post">
		<label for="bResetRequest">Do you want to reset counter?</label>
		<input type="radio" name="bResetRequest" value="1" checked="checked">yes
		<input type="radio" name="bResetRequest" value="0">no<br/>
		<input type="submit" value="Send request"/>
	<!-- *************** Use text for enter numeric value *************** -->
	<!-- CSS style is applied to input field for validate numeric value
	<!-- AWP_In_Variable Name="iSpeed" -->
	<form id="NumFieldForm" method="post">
		<label for="iSpeed">Speed reference: </label>
		<input name="iSpeed" type="number" min="10" max="1800" step="10" value="900" title="enter a value between 10 and  1800." required> RPM<br/>
		<input type="submit" value="Send new speed">
	<form id="NumFieldFormwText" method="post">
		<label for="iSpeed">Speed reference: </label>
		<input name="iSpeed" type="text" value=":=MW100:" required> RPM<br/>
		<input type="submit" value="Send new speed">
	<!-- *************** Use cursor for enter numeric value *************** -->
	<!-- AWP_In_Variable Name="iSpeed" -->
	<form method="post">
		<label for="iSpeed">Speed reference: (:=MW100:) </label>
		<input name="iSpeed" type="range" min="10" max="1800" value=":=MW100:">
		<input type="submit" value="Send new speed">

	Snapshot take at <script>WriteDate();</script>
	<div id="FooterDiv">
		Created by slcman



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now