slcman

MrPLC Member
  • Content count

    360
  • Joined

  • Last visited

Posts posted by slcman


  1. I would check the end of line resistor. On Siemens Profibus connector, there is a red tab on it with ON and OFF position. I've seen people change it by error while working in the panel. The network stop where the resistor is ON. Only the last node should have the switch at ON position.


  2. 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

     

    regards

     

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <!-- 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">
    	    document.createElement("header")
    		document.createElement("footer")
    		document.createElement("section")
    		document.createElement("aside")
    		document.createElement("nav")
    		</script>
    		<![endif]-->
    		
    </head>
    
    <body>
    <header>
    	<img src="images/Unit.jpg" alt="S7-200 unit" />This is a <b>SIEMENS</b> 1200 demo.</header>
    <hr>
    
    
    <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">
    	</form><br/>
    	
    	<!-- *************** 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>
    		</select>
    		<input type="submit" value="Send request">
    	</form><br/>
    	
    	<!-- *************** 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"/>
    	</form><br/>
    	
    	<!-- *************** 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><br/>
    	
    	<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">
    	</form><br/>
    	
    	<!-- *************** 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">
    	</form>
    </div>
    
    <footer>
    	Snapshot take at <script>WriteDate();</script>
    	<div id="FooterDiv">
    		Created by slcman
    	</div>
    </footer>
    <script>PageLoad()</script>
    </body>
    </html>

     

     


  3. Hi,

    I've got a Microsoft Surface that use Tightvnc to control screen (PV7) remotly. Everything work perfect exept one thing: jog function. When we press and hold a jog button, nothing append. Once we release the button, machine jog for a very short period. It's look like the screen handle touch like a mouse up event. If I use a mouse instead of touch, it's work, so this is not a panelview / plc issue.  Any idea?

    Please don't tell me to disable right click on long press in windows menu, I already did this since day 1. This is not my issue.

    thanks for your help


  4. Hi Fab,

    to read the active user in your HMI I suggest to use macro in Runtime security menu. i.e. create a DINT and assign a number for each user. Your macro need to write the number that correspond to user in this DINT.

    To read the login level, use Function - CurrentUserHasCode(letter) in your macro. i.e.  If CurrentUserHasCode( A )  Then 1  Else  If CurrentUserHasCode( B ) Then 2 .... and so on

    You can create one macro that set 2 tag in your plc. One for user, next for login level.

    Global connections allow many data exchange but there is nothing regarding user and login level.

     

    Concerning the alarm ack button. I'm not sure I understand excatly what you need. The is few connection in Alarm Setup --> Optional trigger connections

     

    I hope I help a little.


  5. 1761-NET-AIC+ is not a protocol converter, it's just a RS232 to RS485 converter. To use Modbus you need to change comms driver in Channel configuration (see picture). However, since you only have 1 port, you'll need get DF1 comm to monitor/upload/download. To do that press and hold special hidden comm button for 1 sec (picture), then port protocol will return to default. Once programming job is done, use the same button or laptop to return to modus comms.

    Capture.PNG

    Capture2.PNG

    1 person likes this

  6. You should consider to use the alarms feature in the hmi. Alarms does exactly what you want to do. Multistate indicator are not design to show alarms. This is relatively simple to use, clic on alarms in factory talk (left tree). Then select tag who contain your error message. To keep it simple, you should assign on bit per alarms. Next, on message tab you enter the text you want to display while the bit is set. Once done, you have to create a page to display alarms or use the default [alarms] screen. 

    this is the global idea, just ask if you need more detail.

    regards


  7. Sorry if my answer was rought a little, very often I got answer from people who doesn't know what they are talking about. They just answer without answer, it's look like it's not your case Wow thanks for reply. I do programming since 25 years, however I do not pretend to be an expert on pid subject. My experience is more related in manufacturing not process.

    I've really ask Rockwell on how to change P while loop running and they recommend to put loop in manual. This is strange, I already change loop parameter on the fly with Schneider M258 and Siemens plc. Maybe it's wrong to put it in manual..honestly this is a good new and it make sense. I'm not always impress by AB tech connect.

    You're right about the trend, it's look like a classroom environement. I made it with Studio 5000 emulator v30 for testing and try to figure out what to do before the visit to customer. I'm sure you understand this, production environnement is not a good lab. I'm actually try to figure out how to fix this loop. Altough emulator is not real life, it help to test the idea.

    You're right again about the very small value of I. The loop have to respond very fast. It drive a 125Hp fan and the load is very variable. PV is pressure. Now let's talk about real life, real trend. 

    PLC: 1769-L33ER v30

    Instruction is PID (not PIDE), it run in a periodic task at 75ms.

    Tunning.png.2c1cc4bb75010e927eb173eefd92Config.png.f181efb1b304ae916143b7466296b

     

    Fan is used as exhaust from combustion from boiler. At any time a boiler should start and create hudge change while purging. The idea was to use an higher P while purging. But if you have better sugestion GO I like to learn.

    This is a trend at normal operation, you can see variation from press transmitter. They will always have some variation on press because of combustion. We ran few test without any boiler in run and pressure signal is quite linear, combustion create fluctuation, we have to deal with. This is why I use an average value.

    light blue is instant reading from pressure transmitter

    blue is average value I calculated and use for pid, hmi and so on

    red is PID.ERR tag

    brown is speed command 0-100% 

    green speed feedback 0-100%

    dashed white is setpoint

    *pay attention, pen are not on the same Y scale

    trend.PNG.55bb715420b8ecd58a960071f5d2f2

     

    Thanks again for your time, this kind of forum is very usefull for people like us, I'm member since 2005, each time I got an answer I try to answer about 10 questions to keep to forum alive.

     

    regards

    Scaling.png

    Alarms.png

    trend.PNG

    trend.PNG


  8. Hi all,

    I need to change the gain in a PID instruction while pid is running. I can't just write new gain in KP variable (it will be too easy), it make a hudge bump in CV..not really what we need (see picture). Rockwell suggest to put pid in manual (.SWM) then change the gain and put back to auto. It's work but not fast enought, it's look like pid take time to calculated few thing on manual to auto transition. I'm sure there's a way to do this, I can't be the first who need to do that.

    Thanks for help

     

    Capture.PNG


  9. You have to set limit in tag. As exemple, in Portal, go to HMI tags folder, then select a tag, goto properties --> range. You can set a constant or tag as limit. Numeric entry doesn't have limit, tag does.


  10. Clic on upper right icon (see picture). You need to start the pid controller >(picture Start PID). For have the pid compact start at powerup check enable last mode (picture start at power up) You can detect pid controller mode in your program and change it. I usually use manual config and force run auto or manual, this way I never get a stopped pid controller. (picture mode detect)
    1 person likes this

  11. I agree with Nova5 VPN is is definitely the best solution. However, I strongly suggest eWon VPN router. It have a built-in serial/ethernet or PROFIBus/ethernet Gateway usefull for Siemens 2DP plc. IT doesn't need to be involve in the vpn, eWon use outgoing connection - see video on eWon web site. I have about 20 eWon in Canada/US all work fine, device is really easy to use. http://www.ewon.biz/en/home.html
    1 person likes this

  12. Hi, I use PID_Compact instruction to control a MM440 drive speed. I would like to set a min output value of this instruction as I can do with S7-300 serie. Please don't tell me I can use min drive speed...I know that! I want to have a min speed set in pid instruction. Pid config screen seems the place to do that but when I enter a value greater than 0 in Advanced settings -> Output value limits, I got a red X and portal says Enter a value between -100.0 and 0.0 I can't beleive we can't do that simple thing! Any idea? The only workaround I've found is to write my min speed to my output tag if it is less than min speed. It works but PID take a long time to react when it increase the speed from 0. i.e. output tag is set at 50%(min speed) nothing is changed while pid increase speed from 0 to 50%.