<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML and CSS Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/html-and-css/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Fri, 21 Aug 2026 19:11:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://static.dmcinfo.com/wp-content/uploads/2025/04/site-icon-150x150.png</url>
	<title>HTML and CSS Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>DMC Attends Inaugural TwinCAT HMI Training</title>
		<link>https://static.dmcinfo.com/blog/22685/dmc-attends-inaugural-twincat-hmi-training/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Mon, 17 Sep 2018 10:33:52 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[User Interface Design]]></category>
		<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[Beckhoff and TwinCAT]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/22685/dmc-attends-inaugural-twincat-hmi-training/</guid>

					<description><![CDATA[<p>Earlier this year, DMC attended a training course on the new TwinCAT HMI at Beckhoff&#8217;s U.S. headquarters in Savage, MN. We were impressed by the flexibility and convenience offered by the platform and have already enjoyed using it on projects. Due to its unique developer-friendly design, DMC has been able to reduce development time and [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/22685/dmc-attends-inaugural-twincat-hmi-training/">DMC Attends Inaugural TwinCAT HMI Training</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">Earlier this year, DMC attended a training course on the new TwinCAT HMI at Beckhoff&rsquo;s U.S. headquarters in Savage, MN. We were impressed by the flexibility and convenience offered by the platform and have already enjoyed using it on projects. Due to its unique developer-friendly design, DMC has been able to reduce development time and save money for our clients. Here&rsquo;s a couple of the features of Beckhoff&rsquo;s new HMI that set it apart:</p>

<p class="wp-block-paragraph"><strong>Web-based Control and Monitoring</strong></p>

<p class="wp-block-paragraph">The most appealing aspect of Beckhoff&rsquo;s platform is that it leverages the internet to allow end users to control and monitor their PLCs from anywhere. Interfacing with industrial controllers via the internet is a common request for DMC, and the TwinCAT HMI makes this easier than ever before with integrated server- and client-side development connecting easily to the underlying PLC access. The key benefit is that a web-based HMI can be accessed from any number of different clients &ndash; a traditional monitor screen nearby the device being controlled, a tablet carried around the area by a supervisor, or even a mobile phone halfway around the world. The HMI includes a responsive grid designed to facilitate development for multiple device sizes.</p>

<figure class="wp-block-image"><img decoding="async" alt="Multiple Web Clients for TwinCAT HMI Server" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/TCHMI-Multi-Client_1.jpg"  /></figure>

<p class="wp-block-paragraph"><strong>WYSIWYG Web Page Design</strong></p>

<p class="wp-block-paragraph">As any web developer can tell you, managing the location and arrangement of content on the page can be one of the most time-consuming aspects to do manually. Development for TwinCAT gets around these issues using a What You See Is What You Get style editor, paired with other features to make life easy for developers. Selecting and arranging components is as simple as dragging them in from a menu. The HMI features dozens of prebuilt components, including commonly used displays and controls, as well as advanced charts. We walked through a demo project using several different charts, which update live when linked with the PLC data, making it very easy to display live system data of all sorts to your end users.</p>

<figure class="wp-block-image"><img decoding="async" alt="TwinCAT HMI Development in Visual Studio" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/TCHMI-VS.jpg"  /></figure>

<p class="wp-block-paragraph"><strong>Development in Visual Studio</strong></p>

<p class="wp-block-paragraph">This is a good point to bring up the ease of development afforded by the IDE. Development for the HMI is integrated directly into Visual Studio, which is very familiar to DMC from our extensive .NET development. The Visual Studio pane and menu system&rsquo;s familiarity makes navigation quick, and Beckhoff&rsquo;s custom screens are also very easy to use. Integrating development into a widely used and well-regarded editor allows engineers to develop a simple web-based HMIs for their PLCs without requiring extensive knowledge of web technologies. However, developers familiar with web technologies (like DMC) still have access to the generated results, allowing us to tailor a solution to the exact needs of our clients.</p>

<p class="wp-block-paragraph"><strong>Easy Extension and Customization</strong></p>

<p class="wp-block-paragraph">As mentioned, Beckhoff&rsquo;s existing framework controls allow for rapid development, especially for simple applications. However, the HMI is also very extensible, allowing for flexible and very custom solutions. DMC took an additional course in designing extensions for custom applications. The extensibility allows for custom Javascript interactive controls, in the case that the provided components don&rsquo;t quite fit the bill. Further, the HMI allows for custom server controls in C#, which allows us to develop connect to any system, use any library, or employ any custom code from our .NET expertise. The flexibility of these extensions, combined with the ease of creating a simple solution, makes us very excited to work on projects with this new HMI.</p>

<p class="wp-block-paragraph">Thanks to Zachary Daulton and co. at Beckhoff for hosting us and giving us a preview of the software!</p>
<p>The post <a href="https://static.dmcinfo.com/blog/22685/dmc-attends-inaugural-twincat-hmi-training/">DMC Attends Inaugural TwinCAT HMI Training</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Frame Accurate Video Scrubbing in the Client</title>
		<link>https://static.dmcinfo.com/blog/23297/frame-accurate-video-scrubbing-in-the-client/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Wed, 28 Mar 2018 11:50:32 +0000</pubDate>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/23297/frame-accurate-video-scrubbing-in-the-client/</guid>

					<description><![CDATA[<p>There are a variety of desktop applications that allow users to seamlessly scrub back and forth through a video to determine the exact frame in which some action should take place or where the placement of a tag should go. Some popular applications include Final Cut Pro and Adobe Premiere Pro. This sort of smooth [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/23297/frame-accurate-video-scrubbing-in-the-client/">Frame Accurate Video Scrubbing in the Client</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There are a variety of desktop applications that allow users to seamlessly scrub back and forth through a video to determine the exact frame in which some action should take place or where the placement of a tag should go. Some popular applications include Final Cut Pro and Adobe Premiere Pro. This sort of smooth functionality is difficult to attain on a website due to the limited resources of a browser client in comparison with a desktop environment.&nbsp;</p>



<p class="wp-block-paragraph">In this post, I will walk through how to create a simple frame-accurate video scrubber for video segments in a browser client using the HTML5 video element.</p>



<p class="wp-block-paragraph">The inspiration for this scrubber implementation comes from this Github post: <a href="https://jordicenzano.github.io/frame-accurate-scrubbing/">Frame Accurate Scrubbing</a>, which describes a method that would extract frames on the backend and serve them up to a client for accurate scrubbing.</p>



<p class="wp-block-paragraph">There are many great open-source packages that make for a simple frame grabbing implementation on the backend, and most of these packages rely on FFMPEG to decode video.&nbsp;</p>



<p class="wp-block-paragraph">Since GPL distributes&nbsp;<span style="background-color: rgb(245, 246, 245);">FFmpeg</span>, this is an approach that can be incompatible with projects that aren’t destined to be open source or also distributed under GPL. By using the HTML5 video element to extract frames, we can avoid FFPMEG’s viral GPL license as well as the hassle of writing the video decoder ourselves.</p>



<h2 class="wp-block-heading" id="h-environment">Environment</h2>



<p class="wp-block-paragraph">The examples below show the JSX markup of the development we did in React JS.</p>



<h2 class="wp-block-heading" id="h-prerequisites">Prerequisites</h2>



<p class="wp-block-paragraph">This implementation requires a known framerate for the video you want to use. Additionally, I did this development using a Chrome browser, which supports the MP4 video format that I was using. Make sure that your <a href="https://en.wikipedia.org/wiki/HTML5_video#Browser_support">browser&nbsp;supports your desired video format</a>&nbsp;for HTML5 video.</p>



<p class="wp-block-paragraph">With that out of the way, let’s get started!</p>



<h2 class="wp-block-heading" id="h-html5-video-element-as-video-decoder">HTML5 Video Element as Video Decoder</h2>



<p class="wp-block-paragraph"><strong>Create an HTML5 Video component</strong> on your page, but keep it hidden. Store a reference to this video player. Also, create a div to hold the extracted frames.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>render() {
  return (
    &lt;div className="video-scrubber">
      &lt;video
        src={"video.mp4"}
        muted={true}
        hidden={true}
        controls={false}        
        onSeeked={this.extractFrame} 
        ref={(element) => { this.videoElement = element }}>
      &lt;/video>

      &lt;div className="video-scrubber-frame-container"  
        ref={(element) => this.frameContainerElement = element}>
      &lt;/div>  
    &lt;/div>
  )    
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">render</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> (</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">className</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;video-scrubber&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">video</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">src</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{</span><span style="color: #CE9178">&quot;video.mp4&quot;</span><span style="color: #569CD6">}</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">muted</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{true}</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">hidden</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{true}</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">controls</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{false}</span><span style="color: #D4D4D4">        </span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">onSeeked</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">extractFrame</span><span style="color: #569CD6">}</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">ref</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">element</span><span style="color: #D4D4D4">) </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> { </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">videoElement</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">element</span><span style="color: #D4D4D4"> }</span><span style="color: #569CD6">}</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">video</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">className</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;video-scrubber-frame-container&quot;</span><span style="color: #D4D4D4">  </span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">ref</span><span style="color: #D4D4D4">=</span><span style="color: #569CD6">{</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">element</span><span style="color: #D4D4D4">) </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frameContainerElement</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">element</span><span style="color: #569CD6">}</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">  </span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">  )    </span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Create canvas representations of the video frames.</strong> Seek to one frame at a time using the known framerate of the video. The video component’s onSeeked event triggers the extractFrame function that draws the current video frame onto a canvas element.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>loadVideoFrames = () => {
  // Exit loop if desired number of frames have been extracted 
  if (this.frames.length >= frameCount){
    this.setState({
      visibleFrame = 0 
    })

    // Append all canvases to container div
    this.frames.forEach((frame) => {this.frameContainerElement.appendChild(frame)})
    return
  }

  // If extraction hasn’t started, set desired time for first frame 
  if (this.frames.length === 0){
    this.requestedTime = 0
  }
  else{
    this.requestedTime = this.requestedTime + this.frameTimestep
  }

  // Send seek request to video player for the next frame.
  this.videoElement.currentTime = this.requestedTime
}
 
 
extractFrame = () => {
  // Create DOM canvas object
  var canvas = document.createElement('canvas')
  canvas.className = "video-scrubber-frame"
  canvas.height = videoHeight
  canvas.width = videoWidth
      
  // Copy current frame to canvas
  var context = canvas.getContext('2d');
  context.drawImage(this.videoElement, 0, 0, videoWidth, videoHeight);  
  this.frames.push(canvas)

  //  Load the next frame
  loadVideoFrames()
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">loadVideoFrames</span><span style="color: #D4D4D4"> = () </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// Exit loop if desired number of frames have been extracted </span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4"> &gt;= </span><span style="color: #9CDCFE">frameCount</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">setState</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4"> = </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">    })</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Append all canvases to container div</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">forEach</span><span style="color: #D4D4D4">((</span><span style="color: #9CDCFE">frame</span><span style="color: #D4D4D4">) </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> {</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frameContainerElement</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">appendChild</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">frame</span><span style="color: #D4D4D4">)})</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">return</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// If extraction hasn’t started, set desired time for first frame </span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4"> === </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">requestedTime</span><span style="color: #D4D4D4"> = </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">requestedTime</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">requestedTime</span><span style="color: #D4D4D4"> + </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frameTimestep</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// Send seek request to video player for the next frame.</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">videoElement</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentTime</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">requestedTime</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">extractFrame</span><span style="color: #D4D4D4"> = () </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// Create DOM canvas object</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">createElement</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;canvas&apos;</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">className</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;video-scrubber-frame&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">height</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">videoHeight</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">width</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">videoWidth</span></span>
<span class="line"><span style="color: #D4D4D4">      </span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// Copy current frame to canvas</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">context</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getContext</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;2d&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">context</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">drawImage</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">videoElement</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">videoWidth</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">videoHeight</span><span style="color: #D4D4D4">);  </span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">push</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">canvas</span><span style="color: #D4D4D4">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">//  Load the next frame</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">loadVideoFrames</span><span style="color: #D4D4D4">()</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Define styling that will layer the canvases</strong> on top of each other.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>.video-scrubber-frame-container {
    position: relative;
}

.video-scrubber-frame {
    left: 0;
    position: absolute;
    top: 0;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">video</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">scrubber</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">frame</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">container</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C8C8C8">position</span><span style="color: #D4D4D4">: </span><span style="color: #9CDCFE">relative</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">video</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">scrubber</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">frame</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C8C8C8">left</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C8C8C8">position</span><span style="color: #D4D4D4">: </span><span style="color: #9CDCFE">absolute</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C8C8C8">top</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<h2 class="wp-block-heading" id="h-implement-scrubbing-functionality">Implement Scrubbing Functionality</h2>



<p class="wp-block-paragraph"><strong>Add mouse event listeners</strong> to handle scrubbing action. Here we create another canvas that will sit on top of all our frames to attach our listeners to.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// Create mouseover canvas
var mouseEventCanvas = document.createElement('canvas')

// Set canvas attributes
mouseEventCanvas.className = "video-scrubber-frame"
mouseEventCanvas.height = videoHeight
mouseEventCanvas.width = videoWidth
mouseEventCanvas.onmousemove = this.onMouseDown
mouseEventCanvas.onmousedown = this.onMouseDown

// We set the z-index to be greater than that of the other frames
mouseEventCanvas.style&#91;'z-index'&#93; = 2

// Append to document
this.frameContainerElement.appendChild(mouseEventCanvas)</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">// Create mouseover canvas</span></span>
<span class="line"><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">createElement</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;canvas&apos;</span><span style="color: #D4D4D4">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Set canvas attributes</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">className</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;video-scrubber-frame&quot;</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">height</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">videoHeight</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">width</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">videoWidth</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">onmousemove</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">onMouseDown</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">onmousedown</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">onMouseDown</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// We set the z-index to be greater than that of the other frames</span></span>
<span class="line"><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">style</span><span style="color: #D4D4D4">&#91;</span><span style="color: #CE9178">&apos;z-index&apos;</span><span style="color: #D4D4D4">&#93; = </span><span style="color: #B5CEA8">2</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Append to document</span></span>
<span class="line"><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frameContainerElement</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">appendChild</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">)</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Toggle z-index of visible canvases</strong> according to mouse positioning over the frames. For our scrubber, we are listening for a mousedown event that moves on the frames. As a user drags their mouse across the frames, we toggle the visible frame value stored in our React component state.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>onMouseDown = (event) => {
  // Bail early if we aren't clicking and dragging
  if (event.type === "mousemove" &amp;&amp; event.buttons === 0) {
    return 
  }

  event.preventDefault()
  
  const frameRect = this.mouseEventCanvas.getBoundingClientRect()
  const x = event.clientX - frameRect.left
  const y = event.clientY - frameRect.top

  if (event.buttons === 1){ // Left button down
    var frameRequested = Math.floor((x / frameRect.width) 
* this.fullResolutionFrames.length)      
    if (frameRequested !== this.state.visibleFrame &amp;&amp; frameRequested >= 0){
      this.setState({
        visibleFrame: frameRequested,
      })
    }
  }
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">onMouseDown</span><span style="color: #D4D4D4"> = (</span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">) </span><span style="color: #569CD6">=&gt;</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// Bail early if we aren&apos;t clicking and dragging</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4"> === </span><span style="color: #CE9178">&quot;mousemove&quot;</span><span style="color: #D4D4D4"> &amp;&amp; </span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">buttons</span><span style="color: #D4D4D4"> === </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">preventDefault</span><span style="color: #D4D4D4">()</span></span>
<span class="line"><span style="color: #D4D4D4">  </span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">const</span><span style="color: #D4D4D4"> </span><span style="color: #4FC1FF">frameRect</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">mouseEventCanvas</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getBoundingClientRect</span><span style="color: #D4D4D4">()</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">const</span><span style="color: #D4D4D4"> </span><span style="color: #4FC1FF">x</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">clientX</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">frameRect</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">left</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">const</span><span style="color: #D4D4D4"> </span><span style="color: #4FC1FF">y</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">clientY</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">frameRect</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">top</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">event</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">buttons</span><span style="color: #D4D4D4"> === </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">){ </span><span style="color: #6A9955">// Left button down</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">frameRequested</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">Math</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">floor</span><span style="color: #D4D4D4">((</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4"> / </span><span style="color: #9CDCFE">frameRect</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">width</span><span style="color: #D4D4D4">) </span></span>
<span class="line"><span style="color: #D4D4D4">* </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">fullResolutionFrames</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4">)      </span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">frameRequested</span><span style="color: #D4D4D4"> !== </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">state</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4"> &amp;&amp; </span><span style="color: #9CDCFE">frameRequested</span><span style="color: #D4D4D4"> &gt;= </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">setState</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">visibleFrame:</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">frameRequested</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">      })</span></span>
<span class="line"><span style="color: #D4D4D4">    }</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph">We <strong>check for a changed visibleFrame value</strong> in the React component lifecycle and change the z-indexes of the appropriate frames.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>componentWillUpdate(nextProps, nextState){
  // set the visible frame
  if (nextState.visibleFrame !== this.state.visibleFrame){
    if (this.state.visibleFrame &lt; this.frames.length){
      this.frames&#91;this.state.visibleFrame&#93;.style&#91;'z-index'&#93; = 0 
    }   
    if (nextState.visibleFrame &lt; this.frames.length){   
      this.frames&#91;nextState.visibleFrame&#93;.style&#91;'z-index'&#93; = 1 
    }
  }
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">componentWillUpdate</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">nextProps</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">nextState</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #6A9955">// set the visible frame</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">nextState</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4"> !== </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">state</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">state</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4"> &lt; </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4">){</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">&#91;</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">state</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4">&#93;.</span><span style="color: #9CDCFE">style</span><span style="color: #D4D4D4">&#91;</span><span style="color: #CE9178">&apos;z-index&apos;</span><span style="color: #D4D4D4">&#93; = </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">    }   </span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">nextState</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4"> &lt; </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4">){   </span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">frames</span><span style="color: #D4D4D4">&#91;</span><span style="color: #9CDCFE">nextState</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">visibleFrame</span><span style="color: #D4D4D4">&#93;.</span><span style="color: #9CDCFE">style</span><span style="color: #D4D4D4">&#91;</span><span style="color: #CE9178">&apos;z-index&apos;</span><span style="color: #D4D4D4">&#93; = </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">    }</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph">There you have it! A simple video scrubber in a client browser.</p>



<p class="wp-block-paragraph"><strong><a href="https://static.dmcinfo.com/services/application-development/web-application-development">Learn more about DMC&#8217;s W</a></strong><a href="https://static.dmcinfo.com/services/application-development/web-application-development"><strong>eb Application Development services.</strong></a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/23297/frame-accurate-video-scrubbing-in-the-client/">Frame Accurate Video Scrubbing in the Client</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Setting Up Docker for WordPress Development</title>
		<link>https://static.dmcinfo.com/blog/24644/setting-up-docker-for-wordpress-development/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 28 Feb 2017 12:17:31 +0000</pubDate>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[PC Application Development]]></category>
		<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24644/setting-up-docker-for-wordpress-development/</guid>

					<description><![CDATA[<p>Way back when in 2014, I wrote a blog about setting up WordPress on IIS. At that time, Docker was only a year old and I hadn&#8217;t even heard of it.&#160;It&#8217;s now 2017&#160;and things are different. Docker has matured and has gained enormous popularity for making developers&#8217; lives easier. One of Docker&#8217;s uses we&#8217;ll examine [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24644/setting-up-docker-for-wordpress-development/">Setting Up Docker for WordPress Development</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Way back when in 2014, I wrote a blog about setting up <a href="https://static.dmcinfo.com/latest-thinking/blog/id/8808/how-to-install-wordpress-on-an-iis-server" target="_blank">WordPress on IIS</a>. At that time, Docker was only a year old and I hadn&#8217;t even heard of it.&nbsp;It&#8217;s now 2017&nbsp;and things are different. Docker has matured and has gained enormous popularity for making developers&#8217; lives easier. One of Docker&#8217;s uses we&#8217;ll examine today&nbsp;is using Docker for development, particularly web development in WordPress. First, let&#8217;s have a little Q&amp;A session and then we&#8217;ll jump right in!</p>



<h2 class="wp-block-heading" id="h-what-the-heck-is-docker">What the Heck is Docker?</h2>



<p class="wp-block-paragraph">Docker acts very much like VirtualBox or VMware, but stripped down and more single-purposed. It runs tiny Linux&nbsp;VMs that are &#8220;snapshots&#8221; of applications with all the setup already completed for you (Windows VMs are actually supported now, too).&nbsp;</p>



<h2 class="wp-block-heading" id="h-why-is-docker-useful">Why is Docker Useful?</h2>



<p class="wp-block-paragraph">Using Docker&#8217;s extensive repository of prebuilt images, one can really quickly and easily get a variety of applications running on their system. Without Docker, there&#8217;s usually a good amount of setup that must be done for any given application, such as WordPress or MySQL. With Docker, it only takes&nbsp;a few commands to get going. Beyond this, Docker can also be used to automate the setup/teardown of different software configurations &#8211; which is what we&#8217;ll be doing today.</p>



<h2 class="wp-block-heading" id="h-why-use-docker-for-development">Why use Docker for Development?</h2>



<p class="wp-block-paragraph">Developers work with a lot of different technologies, languages, and system configurations. If one were to install all of the various servers, databases, languages, runtimes, and applications on their host machine, there&#8217;s bound to be a conflict somewhere: a port being used by another application, resources being used when switching from one type of a development to another, etc. Since Docker is a self-contained environment, your host machine is not modified and things are much less likely to break because of the aforementioned issues.</p>



<h2 class="wp-block-heading" id="h-getting-started">Getting Started</h2>



<p class="wp-block-paragraph">Alright, enough questions!&nbsp;Let&#8217;s get started setting up Docker with WordPress and MySQL. This can aid in development because the container(s) we create can be shared between developers.</p>



<p class="wp-block-paragraph">Depending on your host machine, the setup instructions for Docker vary. All of my development was using Linux (specifically Ubuntu MATE 16.04.2 LTS).&nbsp;</p>



<ol class="wp-block-list">
<li>First things first, install Docker. Docker&#8217;s documentation is quite good, so <a href="https://docs.docker.com/get-started/" target="_blank" rel="noreferrer noopener">take a look</a> and then continue on.</li>



<li>We&#8217;ll also be using something called Docker Compose which lets you easily setup and link multiple containers. Windows and Mac users should install <a href="https://www.docker.com/products/docker-toolbox" target="_blank">Docker Toolbox</a>, while Linux users should <a href="https://docs.docker.com/compose/install/" target="_blank">follow the instructions here</a>.</li>



<li>Once that&#8217;s done, it&#8217;s smooth sailing. Create a directory where you want your WordPress and MySQL database to live. Create a file named docker-compose.yml and paste the following inside:
 <pre>version: '3'

services:
   db:
     image: mysql:5.7
     volumes:
       - ./data/mysql:/var/lib/mysql
     ports:
       - "3306:3306"
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: wordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     volumes:
       - ./data/wordpress:/var/www/html
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_PASSWORD: wordpress
</pre>
 </li>



<li>Save the file. This file describes the Docker images (mysql:5.7 and wordpress:latest) as well as where each of these images will store their data, and on what ports one can access them.&nbsp;</li>



<li>Now let the magic happen.&nbsp;Open a terminal window where you created your docker-compose.yml file and type docker-compose up -d (the -d switch tells docker-compose to run in the background).</li>



<li>Open up a browser window, navigate to https://static.dmcinfo.com/ and you should be presented with the WordPress setup screen!</li>



<li>Congrats. You&#8217;ve just used Docker to setup a development environment that you can assemble and disassemble within minutes. Get hacking!</li>
</ol>



<h2 class="wp-block-heading" id="h-what-s-next">What&#8217;s Next?</h2>



<p class="wp-block-paragraph">Since this post was solely about setting up Docker for WordPress development, I&#8217;ve barely scratched the surface of all of the cool things Docker can do or how it can be used beyond just the development phase. If you&#8217;d like to see a particular post about Docker, let me know in the comments!</p>



<p class="wp-block-paragraph">It&#8217;s also worth mentioning that there&#8217;s other software that shares&nbsp;the same space of Docker (containerization, virtualization, etc.). One particularly interesting software&nbsp;is Vagrant which essentially manages your Docker containers (or VirtualBox, VMWare, or even Amazon EC2 VMs). Vagrant can be used for&nbsp;provisioning (setting up VMs and handling configuration), and makes rapid deployment painless.&nbsp;</p>



<p class="wp-block-paragraph">I encourage you to explore further: <a href="https://github.com/veggiemonk/awesome-docker">Docker</a>, <a href="https://github.com/iJackUA/awesome-vagrant">Vagrant</a></p>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/services/application-development/web-application-development"><strong>Learn more about DMC&#8217;s web application development services.&nbsp;</strong></a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/24644/setting-up-docker-for-wordpress-development/">Setting Up Docker for WordPress Development</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>6 Easy Steps to Get Started with MVC Module Development in DNN 8</title>
		<link>https://static.dmcinfo.com/blog/25071/6-easy-steps-to-get-started-with-mvc-module-development-in-dnn-8/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 14 Oct 2016 12:37:43 +0000</pubDate>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C# .NET Application Development]]></category>
		<category><![CDATA[Dot Net Nuke]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/25071/6-easy-steps-to-get-started-with-mvc-module-development-in-dnn-8/</guid>

					<description><![CDATA[<p>In the beginning of the year,&#160;DNN (formerly DotNetNuke) was updated to support MVC modules. MVC is the latest version of ASP.NET in which the Model-View-Controller paradigm is at the core.&#160;This article won&#8217;t be a look into what MVC is or a comparison with WebForms, but instead will give a quick guide into starting DNN MVC [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/25071/6-easy-steps-to-get-started-with-mvc-module-development-in-dnn-8/">6 Easy Steps to Get Started with MVC Module Development in DNN 8</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In the beginning of the year,&nbsp;DNN (formerly DotNetNuke) was updated to support MVC modules. MVC is the latest version of ASP.NET in which the Model-View-Controller paradigm is at the core.&nbsp;This article won&#8217;t be a look into what MVC is or a comparison with WebForms, but instead will give a quick guide into starting DNN MVC module development.</p>



<p class="wp-block-paragraph">While there are some guides available that give you similar information, I found it a bit difficult to get started developing MVC modules in DNN. For reference, the articles I used are at the bottom of this blog.</p>



<p class="wp-block-paragraph">Here&#8217;s an overview of the steps we&#8217;ll take to get started.</p>



<ol class="wp-block-list">
<li><a href="#prerequisites">Prerequisites</a></li>



<li><a href="#templates">Templates</a></li>



<li><a href="#setup">Setup</a></li>



<li><a href="#build">Build</a></li>



<li><a href="#installation">Installation</a></li>



<li><a href="#next-steps">Next Steps</a></li>



<li><a href="#references">References</a></li>
</ol>



<h2 id="prerequisites" class="wp-block-heading">1. Prerequisites</h2>



<p class="wp-block-paragraph">For this quick start, you&#8217;ll need a few things before we can dive in.</p>



<p class="wp-block-paragraph">First, you&#8217;ll need to have Visual Studio 2015 installed. The express editions have been reported to be incompatible with the templates we&#8217;ll be using later, but this may not be true by the time you&#8217;re reading this.</p>



<p class="wp-block-paragraph">Next, you&#8217;ll need to have IIS (Internet Information Services) setup with a local installation of DNN (version 8 or higher). There are many tutorials on how to do this around the web. You&#8217;ll need to install IIS and&nbsp;Microsoft SQL Server, then you can install DNN by downloading the latest _install.zip from <a href="https://github.com/dnnsoftware/Dnn.Platform/releases" target="_blank">DNN&#8217;s GitHub releases</a>.</p>



<p class="wp-block-paragraph">Once those are all set up, you&#8217;re ready to go.</p>



<h2 id="templates" class="wp-block-heading">2. Templates</h2>



<p class="wp-block-paragraph">You <em>could&nbsp;</em>create a module from scratch. But why would you do that when a DNN expert created templates for you to use? <a href="https://marketplace.visualstudio.com/items?itemName=Chris-Hammond.DotNetNukeDNNDevelopmentProjectTemplates" target="_blank" rel="noreferrer noopener">Download the templates from the Visual Studio Gallery</a>&nbsp;and run through the installation procedure.</p>



<h2 id="setup" class="wp-block-heading">3. Setup</h2>



<p class="wp-block-paragraph">Now that everything is set up, we can actually dive into creating the module.&nbsp;</p>



<p class="wp-block-paragraph">In Visual Studio, select File -&gt; New -&gt; Project</p>



<p class="wp-block-paragraph">In the New Project window, select Templates -&gt; Visual C# -&gt; DotNetNuke and you&#8217;ll see a listing of the types of projects the templates have provided.</p>



<p class="wp-block-paragraph">To create an MVC module, we&#8217;ll select DotNetNuke 8 C# DAL2 MVC Module. There are three other fields we must configure: Name, Location, and Solution name.</p>



<p class="wp-block-paragraph"><strong>Name: </strong>Enter a name for your project (it&#8217;s best not to use any spaces or special characters for this)</p>



<p class="wp-block-paragraph"><strong>Location:&nbsp;</strong>This is important to point this to the correct folder in DNN: /DesktopModules/MVC/.&nbsp;Depending on your installation directory, the folder should be something like C:\Dev\Projects\DMC_Website\Alpha\DesktopModules\MVC\ where &#8220;Alpha&#8221; is the root of your DNN installation.</p>



<p class="wp-block-paragraph"><strong>Solution name:</strong>&nbsp;We&#8217;re not actually going to be using this field. Uncheck&nbsp;the box on the right that says &#8220;Create directory for solution&#8221; and the solution name textbox will be greyed out.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2016-10-28-12_40_42-New-Project.png" alt="Configuration of the DotNetNuke 8 C# DAL2 MVC Module Visual Studio Project"/></figure>



<p class="wp-block-paragraph">Confirm your settings look similar to mine and then click OK.</p>



<p class="wp-block-paragraph">A Project Setup Wizard dialog box will appear asking for some project information. Many of these are self explanatory, so I will only address the two that are a bit tricky.</p>



<p class="wp-block-paragraph"><strong>Namespace: </strong>Whatever namespace you want your module to live in. The templates will automatically include your project name in the namespace, so no need to enter it here.&nbsp;Make sure you include the last period. E.g. DMC.</p>



<p class="wp-block-paragraph"><strong>Local Dev URL:&nbsp;</strong>By default this is set up to point to dnndev.me, which is actually set up to point back to 127.0.0.1 (your localhost). What you enter here depends on what settings you&#8217;ve set your DNN install up with. For my installation, I access my local DNN install through http://localhost./ Therefore, I am going to enter localhost as my Local Dev URL.</p>



<p class="wp-block-paragraph">Initial values</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2016-10-14-12_49_25-Project-Setup-Wizard.png" alt="DNN Template Setup Wizard Initial Values"/></figure>



<p class="wp-block-paragraph">Updated values (note: the owner website field includes https:// but the textbox isn&#8217;t large enough to display it. Be sure to include it in your URL.)</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2016-10-28-12_42_14-Project-Setup-Wizard.png" alt="DNN Template Setup Wizard Updated Values"/></figure>



<p class="wp-block-paragraph">Once all fields have been complete, click OK.</p>



<h2 id="build" class="wp-block-heading">4. Build</h2>



<p class="wp-block-paragraph">Now that the initial project setup is complete, you&#8217;ll be presented with a web page in Visual Studio that says * Important *. These are steps that you should&nbsp;<strong>read carefully</strong>&nbsp;and follow to ensure your project will work correctly. I&#8217;ll provide a quick overview of these steps in case the original wording is confusing for anyone.</p>



<p class="wp-block-paragraph">First, check IIS to see if any of your folders were converted to virtual directories or applications. To do this, open IIS, expand your site&#8217;s dropdown and check what icon is displayed next to your DesktopModules folder or the MVC folder inside of the DesktopModules folder. If it&#8217;s anything other than a yellow folder, right click it and click remove.</p>



<p class="wp-block-paragraph">Next, in Visual Studio, right click and delete the web.config files that are in the solution.</p>



<p class="wp-block-paragraph">You can now build the module! change the solution configuration dropdown from Debug to Release and then select Build -&gt; Build</p>



<p class="wp-block-paragraph">You&#8217;ll get an install .zip file in your module&#8217;s install/ directory.</p>



<h2 id="installation" class="wp-block-heading">5. Installation</h2>



<p class="wp-block-paragraph">Now, in DNN, go to Hosts -&gt; Extensions and click Install Extension, selecting your install .zip file that you previously built.</p>



<p class="wp-block-paragraph">If everything goes well, then the module is now installed and can be placed on any page.</p>



<h2 id="next-steps" class="wp-block-heading">6. Next Steps</h2>



<p class="wp-block-paragraph">Once you&#8217;ve dragged the module into a page, you&#8217;ll see a demo application that includes multiple views, database interaction, and more. Simply build the project in debug mode to automatically copy the new DLL to the /bin folder.</p>



<h2 id="references" class="wp-block-heading">7. References</h2>



<ul class="wp-block-list">
<li><a href="https://www.chrishammond.com/tag/dotnetnuke" type="link" id="https://www.chrishammond.com/tag/dotnetnuke" target="_blank" rel="noreferrer noopener">Chris Hammond&#8217;s DNN posts</a></li>



<li><a href="https://dnncommunity.org/blogs" type="link" id="https://dnncommunity.org/blogs" target="_blank" rel="noreferrer noopener">DNN Community Blogs</a></li>



<li><a href="https://www.dnnsoftware.com/docs/developers/mvc-modules/mvc-module-development.html" type="link" id="https://www.dnnsoftware.com/docs/developers/mvc-modules/mvc-module-development.html" target="_blank" rel="noreferrer noopener">DNN MVC Module Development</a></li>
</ul>



<p class="wp-block-paragraph">While you&#8217;re here, check out DMC&#8217;s <a href="/services/application-development/web-application-development">Web Application Development</a> and <a href="/services/application-development/web-application-development/aspnet-and-aspnet-mvc">ASP.NET &amp; ASP.NET MVC Development</a> services so we can get started on your next DNN MVC module!</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/25071/6-easy-steps-to-get-started-with-mvc-module-development-in-dnn-8/">6 Easy Steps to Get Started with MVC Module Development in DNN 8</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Displaying Slack Channels in SharePoint</title>
		<link>https://static.dmcinfo.com/blog/25174/displaying-slack-channels-in-sharepoint/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 23 Sep 2016 12:20:25 +0000</pubDate>
				<category><![CDATA[Digital Workplace Solutions]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/25174/displaying-slack-channels-in-sharepoint/</guid>

					<description><![CDATA[<p>DMC recently updated our SharePoint intranet site to SharePoint 2016, and with that upgrade, we decided to do a refresh of the UI.&#160; We concentrated on adding interesting and useful items to the homepage. One of those pieces of content was a display of our office-specific Slack channels.&#160; This blog explores what I had to [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/25174/displaying-slack-channels-in-sharepoint/">Displaying Slack Channels in SharePoint</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">DMC recently updated our SharePoint intranet site to SharePoint 2016, and with that upgrade, we decided to do a refresh of the UI.&nbsp;</p>



<p class="wp-block-paragraph">We concentrated on adding interesting and useful items to the homepage. One of those pieces of content was a display of our office-specific <a href="https://slack.com/">Slack</a> channels.&nbsp;</p>



<p class="wp-block-paragraph">This blog explores what I had to learn and do in order to implement a Slack display inside a SharePoint web part page.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/slack-sharepoint-ui.jpg" alt="Image of DMC's Slack display in the SharePoint intranet"/></figure>



<h2 class="wp-block-heading" id="h-getting-ready-in-slack">Getting Ready in Slack</h2>



<p class="wp-block-paragraph">My first step was to learn how to communicate with Slack. Knowing that I wanted to keep this display lightweight and I wasn&#8217;t too worried about displaying tokens to users on an intranet site, I decided to utilize Slack&#8217;s <a href="https://api.slack.com/web">web API</a>. This API uses HTTP-style RPC methods with simple authentication tokens. There is the option to use OAuth 2.0 and negotiate tokens based on users, but for a simple one-way display application, I did not think it necessary. That said, I knew I still needed a token of some sort and didn&#8217;t want to use my own, so I set up a Slack <a href="https://api.slack.com/bot-users">Bot user</a> to facilitate the communication.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/slackSharePointBot.png" alt="Slack SharePoint Bot"/></figure>



<h2 class="wp-block-heading" id="h-talking-with-channels">Talking with Channels</h2>



<p class="wp-block-paragraph">Now that I had an authentication token, I could actually start communicating with our Slack channels and reading information from them. Since we were already using jQuery on other parts of the site, I could just make a simple ajax call to Slack and start receiving data immediately:</p>



<p class="wp-block-paragraph"><span style="font-size:x-small;">&nbsp; &nbsp; &nbsp; &nbsp; //Get messages<br>
&nbsp; &nbsp; &nbsp; &nbsp; $.ajax({<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url: &#8220;https://slack.com/api/channels.history?token=&#8221; + botAuthToken + &#8220;&amp;channel=&#8221; + channel + &#8220;&amp;count=&#8221; + historyAmount + &#8220;&amp;pretty=1&#8221;<br>
&nbsp; &nbsp; &nbsp; &nbsp; }).then(function (data) {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (data[&#8220;ok&#8221;] &amp;&amp; data[&#8220;ok&#8221;] === true) {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; slackMessages = data[&#8220;messages&#8221;];<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; });</span><br>
&nbsp;</p>



<p class="wp-block-paragraph">Once I got the messages, I was able to parse them out with the help of the Slack <a href="https://api.slack.com/events/message">Message</a>&nbsp;documentation. However, I didn&#8217;t only want to display text.&nbsp;I also wanted to show users&#8217; profile pictures and&nbsp;any emojis used in messages, especially custom ones like the office dog:</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DMC_Wiskey_small.gif" alt=""/></figure>



<p class="wp-block-paragraph">I used the users.list and emojis.list actions to get all of the possibilities, and then constructed the HTML for a post as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;small>for(var key in slackEmojis)

            {

                if(messageText.indexOf(":"+key+":") > 0)

                {

                    messageText = messageText.replace(":"+key+":",'&lt;span class="emoji emoji-sizer" style="background-image:url('+slackEmojis&#91;key&#93;+')" title="'+key+'"> &lt;/span>');

                }                

            }

            $("#dmcHomeSlack").append(

                        '&lt;ts-message class="message">'+

                            '&lt;div class="message_gutter">' +

                                '&lt;div class="message_icon">' +

                                    '&lt;a href="https://dmcinfo.slack.com/team/'+ userInfo&#91;"name"&#93;+'" target="https://dmcinfo.slack.com/team/'+ userInfo&#91;"name"&#93;+'" style="background-image: url(\''+ userInfo&#91;"profile"&#93;&#91;"image_32"&#93;+'\')" aria-hidden="true">&lt;/a>' +

                                '&lt;/div>' +

                            '&lt;/div>' +

                            '&lt;div class="message_content ">' +

                                '&lt;a class="message_sender" href="https://dmcinfo.slack.com/team/'+ userInfo&#91;"name"&#93;+'" target="https://dmcinfo.slack.com/team/'+ userInfo&#91;"name"&#93;+'">'+ (userInfo&#91;"real_name"&#93; !== "" ? userInfo&#91;"real_name"&#93; : userInfo&#91;"name"&#93;)+'&lt;/a>' +

                                '&lt;span class="message_body">'+ messageText+'&lt;/span>' +

                            '&lt;/div>' +

                       '&lt;/ts-message>');&lt;/small></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">small</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">for(var key in slackEmojis)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #569CD6">{</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #DCDCAA">if</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">messageText</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">indexOf</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;:&quot;</span><span style="color: #D4D4D4">+</span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4">+</span><span style="color: #CE9178">&quot;:&quot;</span><span style="color: #D4D4D4">) &gt; </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                    </span><span style="color: #9CDCFE">messageText</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">messageText</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">replace</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;:&quot;</span><span style="color: #D4D4D4">+</span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4">+</span><span style="color: #CE9178">&quot;:&quot;</span><span style="color: #D4D4D4">,</span><span style="color: #CE9178">&apos;&lt;span class=&quot;emoji emoji-sizer&quot; style=&quot;background-image:url(&apos;</span><span style="color: #D4D4D4">+</span><span style="color: #9CDCFE">slackEmojis</span><span style="color: #D4D4D4">&#91;</span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4">&#93;+</span><span style="color: #CE9178">&apos;)&quot; title=&quot;&apos;</span><span style="color: #D4D4D4">+</span><span style="color: #9CDCFE">key</span><span style="color: #D4D4D4">+</span><span style="color: #CE9178">&apos;&quot;&gt; &lt;/span&gt;&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                }                </span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #569CD6">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            $(&quot;#dmcHomeSlack&quot;).append(</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                        &apos;</span><span style="color: #808080">&lt;</span><span style="color: #4EC9B0">ts-message</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">class</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;message&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos;+</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                            &apos;</span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">class</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;message_gutter&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                                &apos;</span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">class</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;message_icon&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                                    &apos;</span><span style="color: #808080">&lt;</span><span style="color: #569CD6">a</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">href</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;https://dmcinfo.slack.com/team/&apos;+ userInfo&#91;&quot;</span><span style="color: #F44747">name&quot;&#93;+&apos;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;https://dmcinfo.slack.com/team/&apos;+ userInfo&#91;&quot;</span><span style="color: #F44747">name&quot;&#93;+&apos;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">style</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;background-image: url(\&apos;&apos;+ userInfo&#91;&quot;</span><span style="color: #F44747">profile&quot;&#93;&#91;&quot;image_32&quot;&#93;+&apos;\&apos;)&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">aria-hidden</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;true&quot;</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">a</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                                &apos;</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                            &apos;</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                            &apos;</span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">class</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;message_content &quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&apos; +</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                                &apos;</span><span style="color: #808080">&lt;</span><span style="color: #569CD6">a</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">class</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;message_sender&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">href</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;https://dmcinfo.slack.com/team/&apos;+ userInfo&#91;&quot;</span><span style="color: #F44747">name&quot;&#93;+&apos;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;https://dmcinfo.slack.com/team/&apos;+ userInfo&#91;&quot;</span><span style="color: #F44747">name&quot;&#93;+&apos;&quot;&gt;&apos;+</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">(userInfo&#91;&quot;real_name&quot;&#93;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">!==</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">?</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">userInfo&#91;&quot;real_name&quot;&#93;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">:</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">userInfo&#91;&quot;name&quot;&#93;)+&apos;&lt;/a&gt;&apos;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">+</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                                </span><span style="color: #CE9178">&apos;&lt;span class=&quot;message_body&quot;&gt;&apos;</span><span style="color: #F44747">+</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">messageText+&apos;&lt;/span&gt;&apos;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">+</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                            </span><span style="color: #CE9178">&apos;&lt;/div&gt;&apos;</span><span style="color: #D4D4D4"> </span><span style="color: #F44747">+</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                       </span><span style="color: #CE9178">&apos;&lt;/ts-message&gt;&apos;</span><span style="color: #F44747">);&lt;/small&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">This markup takes advantage of the styles that Slack itself uses, so I didn&#8217;t have to worry much about writing custom CSS to work on our homepage.</p>



<p class="wp-block-paragraph">All in all, this was a pretty straightforward implementation. Slack offers plenty of documentation on how to access data, and parsing messages is simple once you start receiving them.</p>



<p class="wp-block-paragraph">If you&#8217;re interested in any additional details, or would like to explore options for your own SharePoint site, don&#8217;t hesitate to <a href="https://static.dmcinfo.com/contact" target="_blank">contact DMC</a>!</p>
<p>The post <a href="https://static.dmcinfo.com/blog/25174/displaying-slack-channels-in-sharepoint/">Displaying Slack Channels in SharePoint</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deluxe Drink System</title>
		<link>https://static.dmcinfo.com/blog/26001/deluxe-drink-system/</link>
		
		<dc:creator><![CDATA[Frank May]]></dc:creator>
		<pubDate>Fri, 15 Jan 2016 11:56:04 +0000</pubDate>
				<category><![CDATA[Boston]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/26001/deluxe-drink-system/</guid>

					<description><![CDATA[<p>For one of our office parties, DMC&#8217;s Boston office made an automatic bartender by utilizing industrial automation equipment. Before we disassembled it, we made a &#8217;90s style infomercial. The blog linked above has much more detail on how we built the automatic bartender, but here&#8217;s a short list of some of the tech used: And [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26001/deluxe-drink-system/">Deluxe Drink System</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">For one of our office parties, DMC&#8217;s Boston office made an <a href="https://static.dmcinfo.com/blog/26514/dmcs-mad-science-drinxperiment-with-siemens-plcs/" type="post" id="26514">automatic bartender by utilizing industrial automation equipment.</a> Before we disassembled it, we made a &#8217;90s style infomercial.</p>



<p class="wp-block-paragraph">The blog linked above has much more detail on how we built the automatic bartender, but here&#8217;s a short list of some of the tech used:</p>



<ul class="wp-block-list">
<li>Siemens S7-1500 PLC</li>



<li>Siemens S7-1200 PLC configured using I-Device</li>



<li>Siemens KP8 key panel</li>



<li>Philips Hue lightbulbs</li>
</ul>



<p class="wp-block-paragraph">And of course, here is our infomercial:</p>



<p class="wp-block-paragraph"><iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/9rKAuDzATGU" width="480"></iframe></p>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/blog/category/culture/">Learn more about DMC&#8217;s company culture.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/26001/deluxe-drink-system/">Deluxe Drink System</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automating Web Development &#8211; Tools</title>
		<link>https://static.dmcinfo.com/blog/26709/automating-web-development-tools/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 07 Apr 2015 12:27:34 +0000</pubDate>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Dot Net Nuke]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/26709/automating-web-development-tools/</guid>

					<description><![CDATA[<p>I’ve been working on a new DNN skin for a while now and much progress is being made. Along the way, I’ve learned about tools that can help speed up website development drastically. In this blog post, I’ll give an overview of these tools and how to use them by themselves and together to harness [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26709/automating-web-development-tools/">Automating Web Development &#8211; Tools</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I’ve been working on a new DNN skin for a while now and much progress is being made. Along the way, I’ve learned about tools that can help speed up website development drastically. In this blog post, I’ll give an overview of these tools and how to use them by themselves and together to harness the power of automation and simplify development tasks.</p>



<h2 id="h-tools" class="wp-block-heading">Tools</h2>



<ul class="wp-block-list">
<li><a href="#ruby">Ruby</a></li>



<li><a href="#sass-or-less">Sass (or Less)</a></li>



<li><a href="#nodejs">Node.js</a></li>



<li><a href="#npm">npm</a></li>



<li><a href="#bower">Bower</a></li>



<li><a href="#grunt-or-gulp">Grunt or gulp</a></li>
</ul>



<h3 id="ruby" class="wp-block-heading">Ruby</h3>



<p class="wp-block-paragraph">We won’t be using Ruby as a programming language, but we will be needing it to install SASS.</p>



<p class="wp-block-paragraph">If you’re on Windows, download the <a href="https://rubyinstaller.org/" type="link" id="https://rubyinstaller.org/" target="_blank" rel="noreferrer noopener">latest version of Ruby</a></p>



<p class="wp-block-paragraph">If you’re on Linux or OS X, there are <a href="https://rvm.io/rvm/install" type="link" id="https://rvm.io/rvm/install" target="_blank" rel="noreferrer noopener">instructions you can follow</a></p>



<p class="wp-block-paragraph">Or, after installing cURL, run this in a terminal window:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">Bash</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>\curl -sSL https://get.rvm.io/ | bash</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">\curl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-sSL</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">https://get.rvm.io/</span><span style="color: #D4D4D4"> | </span><span style="color: #DCDCAA">bash</span></span></code></pre></div>



<p class="wp-block-paragraph">Once Ruby has finished installing, no matter what platform you’re on, open a terminal window and run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">Bash</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>ruby -v</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">ruby</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-v</span></span></code></pre></div>



<p class="wp-block-paragraph">to ensure it has installed properly.</p>



<h3 id="sass-or-less" class="wp-block-heading">Sass (Syntactically Awesome Style Sheets) or Less</h3>



<p class="wp-block-paragraph">Sass is basically CSS with a ton of awesome features layered on top. Using Sass, which compiles to clean and efficient CSS, one can make use of extended abilities like variables, mixing, inline imports, and more.</p>



<p class="wp-block-paragraph">There is another CSS extension called Less, which is an alternative to Sass. I prefer Sass, but you could definitely adapt this tutorial to work with Less as well.</p>



<p class="wp-block-paragraph">Anyhow, now that Ruby is installed and ready to go, installing Sass is easy.</p>



<p class="wp-block-paragraph">In a terminal window, type</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">Bash</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>gem install sass</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">gem</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">install</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">sass</span></span></code></pre></div>



<p class="wp-block-paragraph">Once that is finished, run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">Bash</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sass -v</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">sass</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-v</span></span></code></pre></div>



<p class="wp-block-paragraph">to ensure it has installed properly.</p>



<h3 id="nodejs" class="wp-block-heading">Node.js</h3>



<p class="wp-block-paragraph">Node.js is tool that allows one to write simple JavaScript programs that create powerful applications.</p>



<p class="wp-block-paragraph">We’ll be using Node.js to power npm (node package manager), Bower, and Grunt.</p>



<p class="wp-block-paragraph"><a href="https://nodejs.org/download/" type="link" id="https://nodejs.org/download/" target="_blank" rel="noreferrer noopener">Grab the proper download for your platform</a></p>



<p class="wp-block-paragraph">To install Node.js on Windows or OS X, simply run the installers.</p>



<p class="wp-block-paragraph">On Linux, you can build Node.js by using these steps:</p>



<p class="wp-block-paragraph">Extract the downloaded archive and open a terminal window</p>



<p class="wp-block-paragraph">1. Navigate to where you extracted the archive</p>



<p class="wp-block-paragraph">2. Run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>./configure</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">./</span><span style="color: #9CDCFE">configure</span></span></code></pre></div>



<p class="wp-block-paragraph">3. Run and wait patiently</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>make</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">make</span></span></code></pre></div>



<p class="wp-block-paragraph">4. Run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo make install</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">sudo</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">make</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">install</span></span></code></pre></div>



<p class="wp-block-paragraph">And you’ll be all set with Node.js.</p>



<h3 id="npm" class="wp-block-heading">npm</h3>



<p class="wp-block-paragraph">npm is the official package manager for Node.js. What this means is that using npm, one can install hundreds of different applications and tools that are built with Node.js.</p>



<p class="wp-block-paragraph">We’ll be using npm to install Bower and Grunt.</p>



<p class="wp-block-paragraph">npm comes installed with Node.js, so there are no additional steps required to install it.</p>



<h3 id="bower" class="wp-block-heading">Bower</h3>



<p class="wp-block-paragraph">Bower, much like npm, is a package manager. However, npm only deals with Node.js packages while Bower titles itself “a package manager for the web.” Using Bower, one can run a simple terminal command to download and install many different web libraries or frameworks, such as jQuery, Bootstrap, FontAwesome, and more.</p>



<p class="wp-block-paragraph">To install Bower, open a terminal window and type:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>npm install -g bower</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">npm</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">install</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">g</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">bower</span></span></code></pre></div>



<p class="wp-block-paragraph">(The -g flag is to install bower globally, so we can call it from the command line anywhere)</p>



<h3 id="grunt-or-gulp" class="wp-block-heading">Grunt or gulp</h3>



<p class="wp-block-paragraph">Grunt is a task runner that performs the time-consuming, repetitive tasks that come along with website development like minification, SASS compilation, and more.&nbsp;</p>



<p class="wp-block-paragraph">Thanks to npm, Grunt is just as easy to install as Bower:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>npm install -g grunt-cli</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">npm</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">install</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">g</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">grunt</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">cli</span></span></code></pre></div>



<p class="wp-block-paragraph">gulp (don’t you ever capitalize that g) is a similar tool that <em>should</em> provide better performance than Grunt because it uses Node.js’s streams.</p>



<p class="wp-block-paragraph">npm comes in handy once again. Install gulp with:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>npm install -g gulp</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #9CDCFE">npm</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">install</span><span style="color: #D4D4D4"> -</span><span style="color: #9CDCFE">g</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">gulp</span></span></code></pre></div>



<h2 id="h-beginning-automation" class="wp-block-heading">Beginning Automation</h2>



<p class="wp-block-paragraph">Now that we have all of the tools we need to begin, we can finally start creating an automated build system.</p>



<p class="wp-block-paragraph">There are tasks associated with web development that quickly become repetitive and mundane. Thankfully, we will no longer have to do these manually!</p>



<p class="wp-block-paragraph">The tasks that we can now automate are (in no particular order):</p>



<ul class="wp-block-list">
<li>Sass (or Less) compilation (converting our Sass or Less to standard CSS)</li>



<li>Concatenation (combining multiple files into one)</li>



<li>Minification (smushing text together to reduce the size, making it load faster)</li>



<li>Linting (automatically checking code for errors)</li>



<li>Copying of files (like fonts)</li>



<li>Adding vendor-specific prefixes to our CSS (ensuring compatibility across browsers)</li>



<li>Detecting features that we require a user’s browser to have</li>



<li>More that I can’t think of!</li>
</ul>



<p class="wp-block-paragraph">And best of all, the build system will be smart enough to understand when a particular file changes to prevent rebuilding the entire thing.</p>



<p class="wp-block-paragraph">Stay tuned for the next article! For now, you can always take a look at DMC&#8217;s <a href="/services/application-development/web-application-development">Web Application Development</a> services, where we can harness the technologies outlined above for your needs.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/26709/automating-web-development-tools/">Automating Web Development &#8211; Tools</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Highlighting Required Nintex Fields Dynamically</title>
		<link>https://static.dmcinfo.com/blog/27400/highlighting-required-nintex-fields-dynamically/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 22 Jul 2014 12:38:04 +0000</pubDate>
				<category><![CDATA[Digital Workplace Solutions]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/27400/highlighting-required-nintex-fields-dynamically/</guid>

					<description><![CDATA[<p>Nintex offers a great platform with which to customize SharePoint forms. Although the capabilities of Nintex are great, not everything can be done out of the box. I needed to highlight Nintex Forms 2013 controls that were required but had not yet been assigned a value. I was able to accomplish this with some custom [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/27400/highlighting-required-nintex-fields-dynamically/">Highlighting Required Nintex Fields Dynamically</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Nintex offers a great platform with which to customize SharePoint forms. Although the capabilities of Nintex are great, not everything can be done out of the box. I needed to highlight Nintex Forms 2013 controls that were required but had not yet been assigned a value. I was able to accomplish this with some custom JavaScript that used the Nintex version of jQuery.</p>



<p class="wp-block-paragraph">The HTML input types supported by the following JavaScript are text, radio, and checkbox. When a text input is empty, a red bounding box will surround the Nintex input control. The same will happen when a radio choice has no selected option or a checkbox is not checked.</p>



<p class="wp-block-paragraph">The following JavaScript also includes an override of the jQuery UI&nbsp;datepicker._gotoToday function, such that selecting the &#8220;Today&#8221; button triggers a date selected event (found on <a href="https://www.stackoverflow.com/questions/8745042/adding-event-listener-on-today-button-in-jquery-ui-datapicker" target="_blank">Stack Overflow</a>). Furthermore, the control that the datepicker is attached to also binds an event handler to the datepicker onSelect event that removes the highlighting when a date is selected. This event handler is attached when the control is clicked so that the jQuery UI datepicker will have already been attached at that point. Lastly, there is a timeout on the input mouseup event such that if the &#8220;X&#8221; at the end of the input is clicked in Internet Explorer 10, that a &#8220;cleared&#8221; event is triggered (also found on <a href="https://www.stackoverflow.com/questions/14498396/event-fired-when-clearing-text-input-on-ie10-with-clear-icon" target="_blank">Stack Overflow</a>).</p>



<p class="wp-block-paragraph">To attach these events to a Nintex control, add the &#8220;required&#8221; CSS class to it, and include the following CSS in the form&#8217;s custom CSS. The color chosen here is thanks to <a href="/latest-thinking/blog/id/8840/simplifying-ui-and-ux-design-with-color-cheat-sheet" target="_blank">DMC&#8217;s web color cheat sheet</a>.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">CSS</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>.required {
}
.required-empty {
 border: 2px solid #CC3333;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D7BA7D">.required</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"><span style="color: #D7BA7D">.required-empty</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">border</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">2px</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">solid</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">#CC3333</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph">Here is the JavaScript.</p>



<p class="wp-block-paragraph">&nbsp;</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">JavaScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>NWF$.datepicker._gotoToday = function(id) {
 var target = NWF$(id);
 var inst = this._getInst(target&#91;0&#93;);
 if (this._get(inst, 'gotoCurrent') &amp;&amp; inst.currentDay) {
  inst.selectedDay = inst.currentDay;
  inst.drawMonth = inst.selectedMonth = inst.currentMonth;
  inst.drawYear = inst.selectedYear = inst.currentYear;
 }
 else {
  var date = new Date();
  inst.selectedDay = date.getDate();
  inst.drawMonth = inst.selectedMonth = date.getMonth();
  inst.drawYear = inst.selectedYear = date.getFullYear();
  this._setDateDatepicker(target, date);
  this._selectDate(id, this._getDateDatepicker(target));
 }
 this._notifyChange(inst);
 this._adjustDate(target);
}

function validateChoice(control) {
 if (control.find('input&#91;type="radio"&#93;:checked,input&#91;type="checkbox"&#93;:checked').length > 0) {
  control.removeClass('required-empty');
 } else {
  control.addClass('required-empty');
 }
}

function validateText(control, input) {
 if (!input.val()) {
   control.addClass('required-empty');
  } else {
   control.removeClass('required-empty');
  }
}

NWF$(document).ready(function() {
 NWF$('.required').each(function() {
  var control = NWF$(this);
  if (control.find('input&#91;type="radio"&#93;:not(&#91;disabled&#93;),input&#91;type="checkbox"&#93;:not(&#91;disabled&#93;)').length > 0) {
   validateChoice(control);
   control.click(function() {
    validateChoice(control);
   });
  } else {
   var input = control.find('input');
   if (input.attr('disabled')) return;
   validateText(control, input);
   input.bind('keyup cut paste cleared', function() {
    validateText(control, input);
   });
   input.bind('mouseup', function() {
    oldValue = input.val();
    if (oldValue == '') return;
    setTimeout(function() {
     var newValue = input.val();
     if (newValue == '') {
      input.trigger("cleared");
     }
    }, 1);
   });
   if (input.hasClass('nf-date-picker')) {
    input.click(function() {
     input.datepicker('option', 'onSelect', function() {
      control.removeClass('required-empty');
     });
    });
   }
  }
 });
});</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #4FC1FF">NWF$</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">datepicker</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_gotoToday</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">NWF$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_getInst</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">&#91;</span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">&#93;);</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_get</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&apos;gotoCurrent&apos;</span><span style="color: #D4D4D4">) &amp;&amp; </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentDay</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedDay</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentDay</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">drawMonth</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedMonth</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentMonth</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">drawYear</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedYear</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentYear</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4"> }</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">date</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">Date</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedDay</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">date</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getDate</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">drawMonth</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedMonth</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">date</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getMonth</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">drawYear</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">selectedYear</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">date</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getFullYear</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_setDateDatepicker</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">date</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_selectDate</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_getDateDatepicker</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">));</span></span>
<span class="line"><span style="color: #D4D4D4"> }</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_notifyChange</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">inst</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">_adjustDate</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">target</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">validateChoice</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">find</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;input&#91;type=&quot;radio&quot;&#93;:checked,input&#91;type=&quot;checkbox&quot;&#93;:checked&apos;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4"> &gt; </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">removeClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;required-empty&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4"> } </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">addClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;required-empty&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4"> }</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">validateText</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (!</span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">val</span><span style="color: #D4D4D4">()) {</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">addClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;required-empty&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  } </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">removeClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;required-empty&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #DCDCAA">NWF$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">ready</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">NWF$</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;.required&apos;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">each</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">NWF$</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">this</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">find</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;input&#91;type=&quot;radio&quot;&#93;:not(&#91;disabled&#93;),input&#91;type=&quot;checkbox&quot;&#93;:not(&#91;disabled&#93;)&apos;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">length</span><span style="color: #D4D4D4"> &gt; </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #DCDCAA">validateChoice</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">click</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">validateChoice</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   });</span></span>
<span class="line"><span style="color: #D4D4D4">  } </span><span style="color: #C586C0">else</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">find</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;input&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">attr</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;disabled&apos;</span><span style="color: #D4D4D4">)) </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #DCDCAA">validateText</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">bind</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;keyup cut paste cleared&apos;</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">validateText</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   });</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">bind</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;mouseup&apos;</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">oldValue</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">val</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">oldValue</span><span style="color: #D4D4D4"> == </span><span style="color: #CE9178">&apos;&apos;</span><span style="color: #D4D4D4">) </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">setTimeout</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">newValue</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">val</span><span style="color: #D4D4D4">();</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">newValue</span><span style="color: #D4D4D4"> == </span><span style="color: #CE9178">&apos;&apos;</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">trigger</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;cleared&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     }</span></span>
<span class="line"><span style="color: #D4D4D4">    }, </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">   });</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">hasClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;nf-date-picker&apos;</span><span style="color: #D4D4D4">)) {</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">click</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">     </span><span style="color: #9CDCFE">input</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">datepicker</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;option&apos;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&apos;onSelect&apos;</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4">() {</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #9CDCFE">control</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">removeClass</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;required-empty&apos;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">     });</span></span>
<span class="line"><span style="color: #D4D4D4">    });</span></span>
<span class="line"><span style="color: #D4D4D4">   }</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"><span style="color: #D4D4D4"> });</span></span>
<span class="line"><span style="color: #D4D4D4">});</span></span></code></pre></div>



<p class="wp-block-paragraph"><a href="/services/digital-workplace-solutions/microsoft-consulting-services">Click to learn more about DMC&#8217;s Microsoft Consulting Services.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/27400/highlighting-required-nintex-fields-dynamically/">Highlighting Required Nintex Fields Dynamically</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>HOW TO: Install WordPress on an IIS Server</title>
		<link>https://static.dmcinfo.com/blog/27531/how-to-install-wordpress-on-an-iis-server/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Thu, 22 May 2014 09:55:59 +0000</pubDate>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/27531/how-to-install-wordpress-on-an-iis-server/</guid>

					<description><![CDATA[<p>For FedEx Day I set up WordPress on an IIS (Internet Information Services) server to test the capabilities compared to Dot Net Nuke (DNN), extensibility through plugins and the difficulty of writing my own, and the SEO-oriented design that it offers. There were a few quirks while installing on IIS, so I&#8217;ve written a quick [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/27531/how-to-install-wordpress-on-an-iis-server/">HOW TO: Install WordPress on an IIS Server</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">For <a href="/latest-thinking/blog/id/8786/fed-ex-day-2014">FedEx Day</a> I set up WordPress on an IIS (Internet Information Services) server to test the capabilities compared to Dot Net Nuke (DNN), extensibility through plugins and the difficulty of writing my own, and the SEO-oriented design that it offers. There were a few quirks while installing on IIS, so I&#8217;ve written a quick tutorial for anyone wanting to get started.</p>



<p class="wp-block-paragraph">This tutorial assumes you&#8217;ve already set up a <a href="http://www.mysql.com/" target="_blank">MySQL</a> server.</p>



<p class="wp-block-paragraph">The installation was quick and easy to follow along with:</p>



<ol class="wp-block-list">
<li>Open IIS Manager</li>



<li>Open Web Platform Installer</li>



<li>Search WordPress</li>



<li>Click Add next to WordPress</li>



<li>Click Options</li>



<li>Check the box next to &#8220;Enable configuration of all web application parameters&#8221; (I&#8217;ll explain why later)
<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/iis_install_options.png" alt="Screenshot of enabling configuration of all web application parameters"/></figure>
</li>



<li>Click Install</li>
</ol>



<p class="wp-block-paragraph">The Web Platform Installer will install some prerequisites (PHP) and take you to a configuration screen like so:</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/configure_wordpress_install.png" alt="Screenshot of configuration of WordPress install"/></figure>



<p class="wp-block-paragraph">Next, you&#8217;ll have to enter some database information (which you enabled when you checked that box earlier!) and some keys in order to make your installation of WordPress secure:</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/configure_database_wordpress.png" alt="Screenshot of WordPress database and key configurations"/></figure>



<p class="wp-block-paragraph"><a href="https://api.wordpress.org/secret-key/1.1/salt/" type="link" id="https://api.wordpress.org/secret-key/1.1/salt/" target="_blank" rel="noreferrer noopener">Generate these keys</a></p>



<p class="wp-block-paragraph">NOTE: You cannot use the dollar sign in these keys under IIS. The generator sometimes uses them. Simply refresh the generator a few times until you&#8217;ve found different keys for each without any &#8216;$&#8217; characters.</p>



<p class="wp-block-paragraph">Now the Web Platform Installer will run through the steps and install WordPress into your selected configuration.</p>



<p class="wp-block-paragraph">HOORAY! WordPress should now be up and running on IIS.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/wordpress_installed_1.png" alt="Screenshot of WordPress running on IIS"/></figure>



<p class="wp-block-paragraph">In order to get some nice looking URLs, follow <a href="https://www.isitwp.com/how-to-set-up-pretty-permalinks-in-wordpress/" target="_blank" rel="noreferrer noopener">this guide</a>.</p>



<p class="wp-block-paragraph">First things first, I needed to create an awesome theme. Starting to port over DMC’s current website theme, I found an excellent template: <a href="http://themble.com/bones/" target="_blank">bones</a>.</p>



<p class="wp-block-paragraph">In end, WordPress is powerful, fast, and easy to work with. It’s a possible candidate for the next iteration of the DMC website.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/27531/how-to-install-wordpress-on-an-iis-server/">HOW TO: Install WordPress on an IIS Server</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Siemens S7-1200 Web Server Tutorial &#8211; From Getting Started to HTML5 User Defined Pages</title>
		<link>https://static.dmcinfo.com/blog/28315/siemens-s7-1200-web-server-tutorial-from-getting-started-to-html5-user-defined-pages/</link>
		
		<dc:creator><![CDATA[Tim Jager]]></dc:creator>
		<pubDate>Wed, 03 Jul 2013 13:17:22 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28315/siemens-s7-1200-web-server-tutorial-from-getting-started-to-html5-user-defined-pages/</guid>

					<description><![CDATA[<p>This is a brief tutorial on getting started with the Siemens embedded web server in the S7-1200 and S7-1500. &#160;Using the concepts explained below, you can create a simple web page or a fully featured HTML5 web app.&#160; Getting Started Step 1:&#160; Turn on the web server. &#160;To do this, navigate to the web server [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28315/siemens-s7-1200-web-server-tutorial-from-getting-started-to-html5-user-defined-pages/">Siemens S7-1200 Web Server Tutorial &#8211; From Getting Started to HTML5 User Defined Pages</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This is a brief tutorial on getting started with the Siemens embedded web server in the <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">S7-1200 and S7-1500</a>. &nbsp;Using the concepts explained below, you can create a simple web page or a fully featured HTML5 web app.&nbsp;</p>


<div>
<hr />


<h2 id="h-getting-started" class="wp-block-heading">Getting Started</h2>



<p class="wp-block-paragraph"><strong>Step 1:</strong>&nbsp; Turn on the web server. &nbsp;To do this, navigate to the web server menu in the device configuration page and check the box to enable the web server.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb5c97&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb5c97" class="wp-block-image aligncenter size-large wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1024" height="944" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/EnableWebserver-1024x944.png" alt="EnableWebserver" class="wp-image-28281" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/EnableWebserver-1024x944.png 1024w, https://static.dmcinfo.com/wp-content/uploads/2025/05/EnableWebserver-300x276.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/EnableWebserver-768x708.png 768w, https://static.dmcinfo.com/wp-content/uploads/2025/05/EnableWebserver.png 1185w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph"><strong>Step 2:</strong> Download your project to your PLC and browse to its IP address using your web browser. &nbsp;You will see the default Siemens PLC Web server.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb5e03&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb5e03" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Default-Pages-1.png" alt="Siemens s7-1200 Web Server"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">You can view the <strong>Diagnostic Buffer</strong>. &nbsp;This is really helpful.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb5ffc&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb5ffc" class="wp-block-image aligncenter size-large wp-lightbox-container"><img decoding="async" width="1024" height="510" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DiagnosticBuffer-1024x510.png" alt="S7DiagnosticBuffer" class="wp-image-28283" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DiagnosticBuffer-1024x510.png 1024w, https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DiagnosticBuffer-300x149.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DiagnosticBuffer-768x383.png 768w, https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DiagnosticBuffer.png 1094w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;The variable status page allows you to view and modify PLC tags. &nbsp;This is great for debugging, but be careful. &nbsp;You will be directly editing PLC values!</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6142&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6142" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/S7VariableStatus.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">If your PLC is configured to save data logs, you can easily download the log files from the Data Logs page and open them in Excel.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6257&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6257" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/S7DataLogs.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">The default website is perfect for troubleshooting and looks great on a tablet.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6362&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6362" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/S7iPad.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-user-pages" class="wp-block-heading">User Pages</h2>



<p class="wp-block-paragraph">Before enabling User-defined pages in the PLC, we need to create an HTML file for our user page. &nbsp;Create a text file called <em>&#8220;index.htm&#8221;</em> and save it to a folder on your computer (i.e. <em>&#8220;C:\UserPages&#8221;</em>).</p>



<p class="wp-block-paragraph">&nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb64d5&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb64d5" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/HelloWorld.png" alt="" style="width:774px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">The file contents should look like this:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!DOCTYPE html>
&lt;html lang="en">
&lt;head>
    &lt;meta charset="utf-8">
    &lt;title>My Title&lt;/title>
&lt;/head>
&lt;body>
    Hello World
&lt;/body>
&lt;/html></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">lang</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;en&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">My Title</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    Hello World</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph"><span style="line-height: 1.5;">Now we can enable the user pages and use this file we created. To enable user pages, navigate to the <strong>device configuration -&gt; Web server -&gt; User-defined Web pages</strong>. &nbsp;Set the HTML Directory to the folder you created and the Default HTML page to the file you created. &nbsp;Then click Generate Blocks to compile the user page:&nbsp;</span></p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb661b&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb661b" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/EnablingUSerPages.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">You will notice that the &#8220;Generate Blocks&#8221; function creates two new data blocks in your project, and you may be wondering what these are for. &nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6732&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6732" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DB334.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-fragments" class="wp-block-heading">Fragments</h2>



<p class="wp-block-paragraph">Fragments are the name given to each file in your user pages folder. Initially, we just created a single &#8220;index.htm&#8221; file, but let&#8217;s suppose you had several files in this folder. &nbsp;It would look something like this:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb687e&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb687e" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/FragmentsFolder.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">When you click the <strong>&#8220;Generate Blocks&#8221;</strong> button, the compiler takes all of these files and copies each byte into an array in the element of the Fragment data blocks. &nbsp;The first Fragment DB starts at DB334. An array is dimensioned for each file.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6988&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6988" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/FragmentsCompiledToDataBlock.png" alt="" style="width:952px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Below you can see how each byte from the file is packed into the array:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6a93&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6a93" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/FilesASCIIValuesSavedAsArrays.png" alt="" style="width:692px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">As you add more files to your folder, you may exceed the maximum number of bytes that can be contained in a data block, when this happens, another sequential data block is created. You can include HTML files, JavaScript, CSS Files, and even image files. &nbsp;They will all get converted into data block fragments:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6ba0&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6ba0" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DBsCreatedAsRequired.png" alt="" style="width:589px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-www-function" class="wp-block-heading">WWW Function</h2>



<p class="wp-block-paragraph">In order for user pages to work, you have to call the WWW Function in your project. &nbsp;Recall the DBs created by the &#8220;Generate Blocks&#8221; function. We already know that DB334 stores the fragments. &nbsp;DB333 is used in conjunction with the WWW Function to control the retrieval and delivery of the fragments:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6cef&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6cef" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DB333.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Insert the WWW Function into your code. &nbsp;Compile and download your project.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6df5&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6df5" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/WWW_FunctionBlock.png" alt="" style="width:672px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">This function process requests from the browser and synchronizes the data in the User Pages. &nbsp;It handles retrieving the correct fragment from the Fragment data blocks as shown below:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb6eff&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb6eff" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/WWW-Fragment-Retrieval.png" alt="" style="width:818px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">If you browse to the IP Address of your PLC, you will see the main Siemens Web server login page. &nbsp;There is a link on the left for User Pages. &nbsp;The name in the hyperlink matches the Application name you specified in the User-defined Pages config screen in TIA Portal:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7008&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7008" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/User-Pages-Hyperlink.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">If you click this link, you will see your Hello World page:&nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7110&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7110" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/User-Pages-Hello-World.png" alt="" style="width:742px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">The format of the User-defined web page URL is as follows. I&#8217;m not sure what &#8220;awp&#8221; means, but it is a required part of the URL:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7228&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7228" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/URL-Structure.png" alt="" style="width:686px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>


<hr />


<h2 id="h-reading-plc-data" class="wp-block-heading">Reading PLC Data</h2>



<p class="wp-block-paragraph">In order to read PLC data we need to modify our file to include a special reference to the tag we are trying to read. &nbsp;First create a data block called &#8220;webdata&#8221; and add define an integer variable called &#8220;counter.&#8221; &nbsp;In your PLC, add some code to make this increment around every second:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7357&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7357" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/CounterVariable.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Download your project and then go online with the PLC to verify that the value is incrementing:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb745c&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb745c" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Counter.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Now modify your &#8220;index.htm&#8221; as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!DOCTYPE html>

&lt;html>
    &lt;head>
        &lt;meta charset="utf-8">
        &lt;title>My Title&lt;/title>
    &lt;/head>

    &lt;body>
        :="webdata".counter:
    &lt;/body>
&lt;/html></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">My Title</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        :=&quot;webdata&quot;.counter:</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">Notice the tag name is prefixed with &#8220;:=&#8221; and suffixed with &#8220;:&#8221; &nbsp;This is the key to injecting variables into the user page. When the page is rendered it will replace the token with the actual PLC tag value.</p>



<p class="wp-block-paragraph">&nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb75c1&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb75c1" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/PLC-Tag-Token.png" alt="" style="width:589px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Next, click the &#8220;Generate Blocks&#8221; button in the Webserver config and download the program to the PLC. &nbsp;When you browse to the user page, you will see the counter value update when the page is refreshed. &nbsp;<span style="text-decoration: underline;">Notice how the page flickers when refreshed.</span>&nbsp; This can be annoying if you are trying to make your web page look and feel like a traditional HMI.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb76cb&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb76cb" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/TagDisplay.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Below is an example of how annoying these page refreshes can be. &nbsp;If you have an image on your page it will flicker as the page is refreshed. &nbsp;In the example below, the page is automatically refreshed by adding a specific meta-tag to the HTML header.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;head>
    &lt;meta charset="utf-8">

    &lt;meta http-equiv="refresh" content="1">
    &lt;!-- meta tag refreshes page every second -->

    &lt;title>DMC Demo - Auto Refresh&lt;/title>
&lt;/head></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">http-equiv</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;refresh&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">content</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;1&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&lt;!-- meta tag refreshes page every second --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">DMC Demo - Auto Refresh</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb77ec&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb77ec" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/annoyingPageRefresh.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-reading-data-using-javascript" class="wp-block-heading">Reading Data Using Javascript</h2>



<p class="wp-block-paragraph">To avoid the annoying page flickering, we need to employ some JavaScript to read the data and refresh the screen in the background. &nbsp;</p>



<p class="wp-block-paragraph">To demonstrate this, the first step is to move the PLC tags from our main page to a new page. &nbsp;The new page will not contain any HTML, it will just be a simple HTML file with a single tag reference. &nbsp;Create a new file and name it something like &#8220;IOCounter.htm&#8221; (I am prefixing the name with &#8220;IO&#8221; to remind myself that this file is used for data Input and Output). &nbsp;The contents of your original &#8220;index.htm&#8221; should be modified as shown below. &nbsp;Notice that we moved the tag reference&nbsp;<span style="text-align: center; line-height: 1.5;"><em style="font-weight: bold;">:=&#8221;webdata&#8221;.counter: </em>to a new file called &#8220;IOCounter.htm&#8221; and replaced it with a label with the id=&#8221;counter.&#8221;</span>&nbsp; We also included the popular JavaScript library JQuery. &nbsp;You will need to download <a href="http://jquery.com/download/">JQuery</a> and copy it to your &#8220;UserFiles&#8221; directory. &nbsp;My &#8220;UserFiles&#8221; directory looks like this:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7957&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7957" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/IOCounterUserPagesFolder.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph"><strong>IOCounter.htm</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>:= "webdata".counter:</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">:= &quot;webdata&quot;.counter:</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Index.htm:</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!DOCTYPE html>
&lt;html lang="en">
&lt;head>
    &lt;meta charset="utf-8">
    &lt;title>Javascript Example&lt;/title>

    -2.0.2.min.js">&lt;/script>
&lt;/head>

&lt;body>
    &lt;label id="counter">0&lt;/label>
&lt;/body>

&lt;script type="text/javascript">
    $(document).ready(function () {

        $.ajaxSetup({
            cache: false
        });

        setInterval(function () {

            $.get("IOCounter.htm", function (result) {
                $('#counter').text(result.trim());
            });

        }, 1000);

    });
&lt;/script>
&lt;/html></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">lang</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;en&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Javascript Example</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    -2.0.2.min.js&quot;&gt;</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">label</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;counter&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">0</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">label</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;text/javascript&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">ready</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">$</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">ajaxSetup</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">cache:</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">false</span></span>
<span class="line"><span style="color: #D4D4D4">        });</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">setInterval</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">$</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">get</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;IOCounter.htm&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">result</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&apos;#counter&apos;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">text</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">result</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">trim</span><span style="color: #D4D4D4">());</span></span>
<span class="line"><span style="color: #D4D4D4">            });</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        }, </span><span style="color: #B5CEA8">1000</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    });</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">The JavaScript function above retrieves the current tag value by requesting the contents of the file &#8220;IOCounter.htm&#8221; and then using this value to set the text of the Label with id=&#8221;counter.&#8221; &nbsp;This code runs automatically every second using the JavaScript <a href="http://www.w3schools.com/jsref/met_win_setinterval.asp">setInterval</a> function. &nbsp;The process is illustrated below:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7af6&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7af6" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/IOCounterDiagram.png" alt="" style="width:838px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">In the simple example above, we placed a single tag value in the file &#8220;IOCounter.htm&#8221;.  A more advanced option would be to put several tags in this file and format the text into a JSON structure.  This would allow you to update several tags on the screen using just one external data file.  Be careful though, <strong>as you add more tags to an HTML page, the page loading time increases. </strong></p>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-modifying-plc-tags-from-the-browser" class="wp-block-heading">Modifying PLC Tags From the Browser</h2>



<p class="wp-block-paragraph">A user web page would not be very helpful without allowing the user to modify PLC values. The following HTML page illustrates the simplest way of editing PLC tag values. &nbsp;The special comment field (AWP_In_Variable)&nbsp;at the top tells the PLC which tags are allowed to be modified. &nbsp;You will not be able to edit the tag values unless you include this comment for each tag.</p>



<p class="wp-block-paragraph">First create a new variable in the <strong>&#8220;webdata&#8221; DB:</strong></p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7c88&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7c88" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/myIntDeclaration.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">Then modify &#8220;index.htm&#8221; as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!-- AWP_In_Variable Name='"webdata".myInt' -->

&lt;!DOCTYPE html>
&lt;html lang="en">
&lt;head>
    &lt;meta charset="utf-8">
    &lt;title>My Title&lt;/title>
&lt;/head>

&lt;body>

    := "webdata".myInt :

    &lt;form method="post">
        &lt;input
            name='"webdata".myInt'
            type="text" />

        &lt;button type="submit">
            Save
        &lt;/button>
    &lt;/form>

&lt;/body>
&lt;/html></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">&lt;!-- AWP_In_Variable Name=&apos;&quot;webdata&quot;.myInt&apos; --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">lang</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;en&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">My Title</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    := &quot;webdata&quot;.myInt :</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">form</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">method</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;post&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">input</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">name</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&apos;&quot;webdata&quot;.myInt&apos;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;text&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #808080">/&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">button</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;submit&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">            Save</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">button</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">form</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">The PLC will not allow you to modify values unless you are logged in. &nbsp;Make sure to log in before navigating to the editor page you just created. &nbsp;The default user name is <em>admin</em> and the default password is blank so you can leave that field empty.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7dcd&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7dcd" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Login.png" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">After you have logged-in, browse to the page and go online with the PLC. &nbsp;You should be able to edit the tag value using the web page you just created. &nbsp;Notice how the page flickers when the save button is pressed. This is because a post-back is occurring and the page gets refreshed.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb7ed2&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb7ed2" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SimpleTagEditor.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">In order to update PLC tags without experiencing the post-back, we can use some more JavaScript to update the value in the background. &nbsp;First, we need to create another HTML file and move our tag reference to it.</p>



<p class="wp-block-paragraph">In order to illustrate this, create a new variable in the &#8220;webdata&#8221; DB called <em>triangleWave. </em>&nbsp;Then write some code to make this value count up to 100 and then back down to -100, or whatever logic you like. &nbsp;Next create a new file called &#8220;IOtriangleWave.htm&#8221; that looks like this:</p>



<p class="wp-block-paragraph"><strong>&#8220;IOtriangleWave.htm&#8221;</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!-- AWP_In_Variable Name='"webdata".triangleWave' -->:="webdata".triangleWave:</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">&lt;!-- AWP_In_Variable Name=&apos;&quot;webdata&quot;.triangleWave&apos; --&gt;</span><span style="color: #D4D4D4">:=&quot;webdata&quot;.triangleWave:</span></span></code></pre></div>



<p class="wp-block-paragraph">The comment field tells the PLC that the triangleWave variable is editable and the&nbsp;<strong><em>:=&#8221;webdata&#8221;.triangleWave:&nbsp;</em></strong>&nbsp;allows us to query the current value of the variable by requesting the contents of &#8220;IOtriangleWave.htm&#8221;.</p>



<p class="wp-block-paragraph">Now modify &#8220;index.htm&#8221; as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!-- AWP_In_Variable Name='"webdata".triangleWave' -->

&lt;!DOCTYPE html>
&lt;html lang="en">
&lt;head>
    &lt;meta charset="utf-8">
    &lt;title>JavaScript Example&lt;/title>

    &lt;script src="jquery-2.0.2.min.js">&lt;/script>
&lt;/head>

&lt;body>

    &lt;!-- Value updated automatically -->
    &lt;label id="triangleWave">
        := "webdata".triangleWave :
    &lt;/label>

    &lt;br>

    &lt;input id="setvar" type="text" />

    &lt;!-- Modify PLC variable without page refresh -->
    &lt;button id="btnModify">
        Modify
    &lt;/button>

    &lt;p>
        &lt;img
            src="logo-DMC.png"
            alt="DMC Logo">
    &lt;/p>

&lt;/body>

&lt;script type="text/javascript">

$(document).ready(function () {

    // Prevent browser caching
    $.ajaxSetup({
        cache: false
    });

    // Read PLC value every second
    setInterval(function () {

        $.get(
            "IOtriangleWave.htm",
            function (result) {

                $("#triangleWave").text(result);

            }
        );

    }, 1000);

    // Write PLC value
    $("#btnModify").click(function () {

        var url = "IOtriangleWave.htm";
        var name = '"webdata".triangleWave';
        var value = $("#setvar").val();

        var data =
            escape(name) + "=" + value;

        $.post(
            url,
            data,
            function (result) {
            }
        );

    });

});

&lt;/script>

&lt;/html></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">&lt;!-- AWP_In_Variable Name=&apos;&quot;webdata&quot;.triangleWave&apos; --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">lang</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;en&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">JavaScript Example</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">src</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;jquery-2.0.2.min.js&quot;</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&lt;!-- Value updated automatically --&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">label</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;triangleWave&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        := &quot;webdata&quot;.triangleWave :</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">label</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">br</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">input</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;setvar&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;text&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #808080">/&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&lt;!-- Modify PLC variable without page refresh --&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">button</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;btnModify&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        Modify</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">button</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">p</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">img</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">src</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;logo-DMC.png&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">alt</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;DMC Logo&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">p</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;text/javascript&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">ready</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Prevent browser caching</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #9CDCFE">$</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">ajaxSetup</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">cache:</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">false</span></span>
<span class="line"><span style="color: #D4D4D4">    });</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Read PLC value every second</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">setInterval</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">$</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">get</span><span style="color: #D4D4D4">(</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #CE9178">&quot;IOtriangleWave.htm&quot;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">result</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;#triangleWave&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">text</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">result</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            }</span></span>
<span class="line"><span style="color: #D4D4D4">        );</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    }, </span><span style="color: #B5CEA8">1000</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">// Write PLC value</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;#btnModify&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">click</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">url</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;IOtriangleWave.htm&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">name</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&apos;&quot;webdata&quot;.triangleWave&apos;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">value</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;#setvar&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #DCDCAA">val</span><span style="color: #D4D4D4">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4"> =</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">escape</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">name</span><span style="color: #D4D4D4">) + </span><span style="color: #CE9178">&quot;=&quot;</span><span style="color: #D4D4D4"> + </span><span style="color: #9CDCFE">value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">$</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">post</span><span style="color: #D4D4D4">(</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">url</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">data</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">result</span><span style="color: #D4D4D4">) {</span></span>
<span class="line"><span style="color: #D4D4D4">            }</span></span>
<span class="line"><span style="color: #D4D4D4">        );</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    });</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">We also added an image to the file to show that the data is being read and written without any flickering or page refreshes:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb80da&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb80da" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SaveDataNoPostback.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>


<hr />


<h2 id="h-server-side-logic-string-variables" class="wp-block-heading">Server Side Logic &#8211; String Variables</h2>



<p class="wp-block-paragraph">Full-featured web servers have powerful server-side engines that can dynamically generate HTML pages. The Siemens PLC has a small embedded server, but there are still a few server-side things that can be done.</p>



<p class="wp-block-paragraph">Up to this point, we have been experimenting with integer tag values. If you embed a string tag into your page and include some HTML formatting in the string value, it will render as HTML. &nbsp;Notice below that the string value is not displaying the exact values typed, but rather rendering as HTML:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb8228&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb8228" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/stringserverdata.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">Below are the HTML values that were assigned to the string tag above:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;font size="30" color="green">GREEN&lt;/font>

&lt;font size="40" color="red">RED&lt;/font>

&lt;ol>
    &lt;li>Message 1&lt;/li>
    &lt;li>Message 2&lt;/li>
    &lt;li>Message 3&lt;/li>
&lt;/ol>

&lt;ol>
    &lt;li>&lt;font color="blue">Information&lt;/font>&lt;/li>
    &lt;li>&lt;font color="orange">Warning&lt;/font>&lt;/li>
    &lt;li>&lt;font color="red">Error&lt;/font>&lt;/li>
&lt;/ol></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;</span><span style="color: #F44747">font</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">size</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;30&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">color</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;green&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">GREEN</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">font</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #F44747">font</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">size</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;40&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">color</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;red&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">RED</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">font</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">ol</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Message 1</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Message 2</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Message 3</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">ol</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">ol</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;&lt;</span><span style="color: #F44747">font</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">color</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;blue&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Information</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">font</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;&lt;</span><span style="color: #F44747">font</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">color</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;orange&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Warning</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">font</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;&lt;</span><span style="color: #F44747">font</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">color</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;red&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Error</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">font</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">li</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">ol</span><span style="color: #808080">&gt;</span></span></code></pre></div>



<h2 id="h-server-side-logic-delayed-delivery" class="wp-block-heading">Server Side Logic &#8211; Delayed Delivery</h2>



<p class="wp-block-paragraph">Another technique that is very powerful for performing server-side logic is <strong>Delayed Delivery</strong>. &nbsp;This is a technique that uses the WWW Function (in conjunction with DB333) to make the web-server wait before returning a requested page to the user. This allows the PLC to ensure that tag values are properly updated before being rendered on the web page. &nbsp;A typical example would be a recipe editor web page. &nbsp;The user selects a recipe from a dropdown box (which will cause a post-back and a page refresh). &nbsp;We must ensure that the new recipe values have been loaded into the PLC tags before refreshing the page. &nbsp;Normally the compiler automatically assigns a fragment number for each user-generated file. &nbsp;In order to control the delivery of pages (i.e. fragments), we must specify a fragment number in the HTML file as shown below:<span style="line-height: 1.5;">&nbsp;</span></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!-- AWP_Start_Fragment Name="Control" Type="manual" ID="2" --></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">&lt;!-- AWP_Start_Fragment Name=&quot;Control&quot; Type=&quot;manual&quot; ID=&quot;2&quot; --&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">Adding this special comment to the top of your HTML file tells the compiler to use fragment #2 for this file. &nbsp;You can specify the fragment number by setting the ID field to the desired number.&nbsp;</p>



<p class="wp-block-paragraph">Now that we know our file will be fragment #2, we can control the delivery of the page to the browser. &nbsp;Below is a typical rung of ladder logic for implementing the delayed delivery of the page. &nbsp;In my example, the &#8220;continue&#8221; bit does not become true until the recipe loading is complete. &nbsp;In my case, the loading of a recipe required several PLC scans, so I needed to delay the page delivery until the recipe was loaded. &nbsp;Note that the PLC can support several simultaneous connections. &nbsp;If your application will support several simultaneous browser connections, you will have to replicate the code below for each index of the arrays shown. &nbsp;Currently only index 1 is handled in the code below. &nbsp;</p>


<div>


<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb840e&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb840e" class="wp-block-image aligncenter is-resized wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DelayedDelivery.png" alt="" style="width:876px;height:auto"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>


</div>


<p class="wp-block-paragraph">Below is an example showing the recipe loading screen. &nbsp;The user selects a recipe from the drop-down which causes a PLC tag to be changed and the browser waits for a post-back from the web server. The PLC detects this change and starts loading the recipe (which takes several PLC scans). &nbsp;The web-server waits for the continue bit to be set before returning the page (fragment) is delayed until the recipe is loaded. &nbsp;This ensures that the tag values injected into the HTML page will be updated with the correct values before being sent to the browser. &nbsp;Below is a demonstration of this in action:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb8515&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb8515" class="wp-block-image aligncenter wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/RecipeEditor.gif" alt=""/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="wp-block-paragraph">&nbsp;</p>


<hr />


<h2 id="h-conclusion" class="wp-block-heading">Conclusion</h2>



<p class="wp-block-paragraph">Knowing the basics and a few advanced tricks will enable you to create fully featured web pages served from a Siemens PLC. If you are comfortable with JavaScript, you can do some pretty amazing things and make a web page that looks and feels as good as a traditional HMI. &nbsp; Below is a simple example showing graphing, gauges, user input, and pop-up alerts. This looks and feels like a native app when running on my iPad or Android tablet. <strong>Click on the image below to see it in action.</strong> &nbsp;Happy coding!</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6abf210bb871a&quot;}" data-wp-interactive="core/image" data-wp-key="6abf210bb871a" class="wp-block-image aligncenter size-full wp-lightbox-container"><img decoding="async" width="892" height="900" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://static.dmcinfo.com/wp-content/uploads/2013/07/S7WebserverDemo.gif" alt="" class="wp-image-33821"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>


<div>&nbsp;</div>


<p class="wp-block-paragraph">EDIT: Below is a simple example of how to use the gauges shown in the demo above. &nbsp;The example below references the <strong>IOTriangleWave.htm</strong> that we created above.&nbsp;</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">HTML</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;!DOCTYPE html>
&lt;html>
&lt;head>
    &lt;meta charset="utf-8">
    &lt;title>DMC Gage Demo&lt;/title>

    2.0.2.min.js">&lt;/script>
    js/raphael.2.1.0.min.js">&lt;/script>
    &lt;script src="js/justgage.1.0.1d>

&lt;body>

    &lt;div id="g1">&lt;/div>
    &lt;div id="g2">&lt;/div>

    &lt;script type="text/javascript">

    $(document).ready(function () {

        var g1 = new JustGage({
            id: "g1",
            value: getRandomInt(-100, 100),
            min: -100,
            max: 100,
            title: "Triangle Wave",
            label: "Value"
        });

        var g2 = new </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">meta</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">charset</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;utf-8&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">DMC Gage Demo</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    2.0.2.min.js&quot;&gt;</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    js/raphael.2.1.0.min.js&quot;&gt;</span><span style="color: #808080">&lt;/</span><span style="color: #F44747">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">src</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;js/justgage.1.0.1d&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #CE9178">&lt;body&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #CE9178">    &lt;div id=&quot;</span><span style="color: #9CDCFE">g1</span><span style="color: #F44747">&quot;</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">&lt;/</span><span style="color: #9CDCFE">div</span><span style="color: #D4D4D4">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;g2&quot;</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">type</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;text/javascript&quot;</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    $(document).ready(function () </span><span style="color: #569CD6">{</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">g1</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">JustGage</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;g1&quot;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">value:</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">getRandomInt</span><span style="color: #D4D4D4">(-</span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4">),</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">min:</span><span style="color: #D4D4D4"> -</span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">max:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">title:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Triangle Wave&quot;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">label:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Value&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">        });</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #9CDCFE">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">g2</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span></span></code></pre></div>


<div id="radePasteHelper" style="position: absolute; left: -10000px; border: 0px solid red; top: 3900px; width: 1px; height: 1px; overflow: hidden;"> </div>


<p class="wp-block-paragraph">Also, <a href="https://static.dmcinfo.com/wp-content/uploads/2025/06/S7HTML5_1.zip">here is a link</a> to a zip file of the project examples. Enjoy!</p>



<p class="wp-block-paragraph"><strong>Learn more about DMC&#8217;s <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Siemens S7 PLC programming expertise</a></strong><strong>. <a href="/contact">Contact us</a> to get started on your next PLC programming project.</strong></p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/28315/siemens-s7-1200-web-server-tutorial-from-getting-started-to-html5-user-defined-pages/">Siemens S7-1200 Web Server Tutorial &#8211; From Getting Started to HTML5 User Defined Pages</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
