<?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>PC Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/pc/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Fri, 21 Aug 2026 19:17:02 +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>PC Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Comparing Ethernet and USB cDAQs for Control Applications</title>
		<link>https://static.dmcinfo.com/blog/26253/comparing-ethernet-and-usb-cdaqs-for-control-applications/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Mon, 05 Oct 2015 16:59:26 +0000</pubDate>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Test and Measurement Automation]]></category>
		<category><![CDATA[DAQ Hardware]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[PC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/26253/comparing-ethernet-and-usb-cdaqs-for-control-applications/</guid>

					<description><![CDATA[<p>DMC recently completed a project that involved controlling an applied load using a hydraulic cylinder. Ramping the load at a controlled rate required a fast control loop with analog feedback from a load cell. The speed of the hydraulic cylinder was determined by a proportional valve controlled by an analog output from DMC&#8217;s control system. [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26253/comparing-ethernet-and-usb-cdaqs-for-control-applications/">Comparing Ethernet and USB cDAQs for Control Applications</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 completed a project that involved controlling an applied load using a hydraulic cylinder. Ramping the load at a controlled rate required a fast control loop with analog feedback from a load cell. The speed of the hydraulic cylinder was determined by a proportional valve controlled by an analog output from DMC&rsquo;s control system.</p>

<p class="wp-block-paragraph">Based on other requirements of the software, DMC chose a PC-based control system using National Instruments hardware. The customer wanted the control computer to be located far away from the electrical panel that contained the data acquisition and control hardware.&nbsp;Given the desired distance between the PC and control panel, the customer requested an Ethernet CompactDAQ (cDAQ) system. However, concerned about the latency of the Ethernet connection, DMC decided to compare the functionality of the following data acquisition hardware:</p>

<ul class="wp-block-list">
 <li><a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/208990" target="_blank">NI cDAQ-9188</a> &ndash; NI CompactDAQ 8-Slot <strong>Ethernet</strong> Chassis</li>
 <li><a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/207534" target="_blank">NI cDAQ-9178</a> &ndash; NI CompactDAQ 8-Slot <strong>USB</strong> Chassis</li>
</ul>

<p class="wp-block-paragraph">National Instruments published an article on <a href="http://www.ni.com/white-paper/9401/en/" target="_blank">How to Choose the Right Bus for Your Measurement System</a>. In this article, they compare various buses in five different categories. The comparison for USB to Ethernet is copied below:</p>

<table border="1" cellpadding="0" cellspacing="0" style="margin-bottom:20px; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 584.5px; border-collapse: collapse; direction: ltr;" valign="top">
 <tbody>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">&nbsp;</span></p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">USB</span></p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 176.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Ethernet</span></p>
   </td>
  </tr>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Waveform Streaming</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">60 MB/s</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 176.5px; vertical-align: top; background-color: rgb(197, 224, 179);">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">125 MB/s</p>
   </td>
  </tr>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Single Point I/O</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top; background-color: rgb(197, 224, 179);">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Better</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 176.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Good</p>
   </td>
  </tr>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Multi-device</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Good</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 176.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Good</p>
   </td>
  </tr>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Portability</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Best</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Best</p>
   </td>
  </tr>
  <tr>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 214.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Distributed Measurements</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 190.5px; vertical-align: top;">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Better</p>
   </td>
   <td style="padding: 2pt 3pt; border: 1pt solid rgb(163, 163, 163); border-image: none; width: 176.5px; vertical-align: top; background-color: rgb(197, 224, 179);">
   <p class="wp-block-paragraph" style="margin: 0in; font-family: Calibri; font-size: 11pt;">Best</p>
   </td>
  </tr>
 </tbody>
</table>

<p class="wp-block-paragraph">The <em>Waveform Streaming</em> category makes the Ethernet cDAQ appear &ldquo;faster&rdquo;. Waveform Streaming defines how quickly a large block of buffered data can be transferred to the PC. In order for our control loop to function properly, it needs to read an input, then calculate and set an output as quickly as possible. For this control application, <em>Single Point I/O</em> is the most critical category since we have a small amount of data (i.e. a &ldquo;single point&rdquo;) that we need to quickly update with minimal latency.</p>

<p class="wp-block-paragraph">To test this, DMC implemented a program with a control algorithm which used a 10ms loop rate. This program was then run on a USB cDAQ and an Ethernet cDAQ. The result of the test was clear: a USB cDAQ is significantly better for high-speed control applications. The Ethernet cDAQ was approximately 5 times slower &ndash; the control loop still ran at 10ms, but the output to the hydraulic cylinder was delayed by 40-50ms, which completely threw off the control algorithm.</p>

<p class="wp-block-paragraph">The graphs below clearly illustrate the effect of the Ethernet&rsquo;s latency. The exact same control algorithm and loop rate was used to generate these graphs, the only difference was the hardware.</p>

<p class="wp-block-paragraph"><strong>Ethernet:</strong><br />
<img decoding="async" alt="Ethernet cDAQ Graph" class="MobileImage" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Static_Test-Jog-at-Rate_123-99_1.png"  /></p>

<p class="wp-block-paragraph"><strong>USB:</strong><br />
<img decoding="async" alt="USB cDAQ Graph" class="MobileImage" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Static_Test-Jog-at-Rate_123-100_1.png"  /></p>

<p class="wp-block-paragraph">In the end, DMC chose to use the USB cDAQ based on its vastly superior performance in this particular application.</p>

<p class="wp-block-paragraph">Learn more about DMC&apos;s <a href="/services/test-and-measurement-automation">Test and Measurement Automation</a> services.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26253/comparing-ethernet-and-usb-cdaqs-for-control-applications/">Comparing Ethernet and USB cDAQs for Control Applications</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automation Redundancy Using ICONICS WebHMI Solutions</title>
		<link>https://static.dmcinfo.com/blog/28626/automation-redundancy-using-iconics-webhmi-solutions/</link>
		
		<dc:creator><![CDATA[Jon Carson]]></dc:creator>
		<pubDate>Thu, 21 Feb 2013 12:53:56 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Iconics]]></category>
		<category><![CDATA[PC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28626/automation-redundancy-using-iconics-webhmi-solutions/</guid>

					<description><![CDATA[<p>There are many good options for automation and controls redundancy out there. Here is an example we just recently used in the field. The customer specified a requirement of complete redundancy for all IT, networking, and HMI components of one of a large-scale manufacturing line. The system architecture we chose incorporated thin-client HMIs with server [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28626/automation-redundancy-using-iconics-webhmi-solutions/">Automation Redundancy Using ICONICS WebHMI Solutions</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 many good options for automation and controls redundancy out there. Here is an example we just recently used in the field. The customer specified a requirement of complete redundancy for all IT, networking, and HMI components of one of a large-scale manufacturing line. The system architecture we chose incorporated thin-client HMIs with server virtualization, off-the-shelf ICONICS redundancy solutions, dual KEPware OPC servers, a custom .NET service, and automatically backed-up SQL data storage. A diagram may help demonstrate our solution:<br />
<o:o:o:o:o:p></o:o:o:o:o:p></p>

<p class="wp-block-paragraph"><o:o:o:o:o:p>&nbsp;</o:o:o:o:o:p></p>

<p class="wp-block-paragraph"><o:o:o:o:o:p><img fetchpriority="high" decoding="async" alt="" height="382" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/network-architecture.png" width="450" /></o:o:o:o:o:p></p>

<p class="MsoNormal wp-block-paragraph">&nbsp;</p>

<p class="MsoNormal wp-block-paragraph">Starting from the bottom, we can see that our operator-side HMI is exposed anywhere on the internal company network (with the correct login information) via Internet Explorer. This provides a reduction in downtime, because if HMI hardware fails, any other computer can be put in its place right away. Technology used for this implementation was ICONICS WebHMI, which easily converts between local HMI projects and HTML ActiveX Web pages.<o:o:o:o:o:p></o:o:o:o:o:p></p>

<p class="MsoNormal wp-block-paragraph">Via the production network, the thin client speaks to one of two ICONICS DataWorx servers to send and receive production tags. ICONICS DataWorx has built-in redundancy and failover options which determine which of two OPC servers should be used to communicate to production devices such as PLCs. <o:o:o:o:o:p></o:o:o:o:o:p></p>

<p class="MsoNormal wp-block-paragraph">Recipe data as well as data acquisition and reporting are stored in SQL Server 2008 R2. SQL has built-in features for customizable back-up and storage, which we are using to minimize the possibility of data loss. The SQL server communicates with our OPC server via a custom, configurable .NET service we have written, deployed and tested on several previous systems.<o:o:o:o:o:p></o:o:o:o:o:p></p>

<p class="MsoNormal wp-block-paragraph">The last important step in reducing downtime is virtualization. Each of our three servers is virtualized using VMWare. This allows us to save backups of entire servers on independent storage devices, preserving all program installations and configurations in the event of a total meltdown of the physical servers.</p>

<p class="MsoNormal wp-block-paragraph">Complete redundancy is not a simple task. A lot of thought has to go into specific requirements, hardware/software architecture, network layouts, and program configurations. Testing is also key (for us, simulation off-site of various failure modes provided insight into software configuration requirements). After working on this and previous redundant systems, I would recommend repeating the fundamentals described above:<o:o:o:o:o:p></o:o:o:o:o:p></p>

<ol class="wp-block-list">
 <li>Server-centric solutions with thin-client operation<o:o:o:o:o:p></o:o:o:o:o:p></li>
 <li>Off-the-shelf solutions where available<o:o:o:o:o:p></o:o:o:o:o:p></li>
 <li>Virtualization with independent back-ups of all servers <o:o:o:o:o:p></o:o:o:o:o:p></li>
</ol>

<p class="MsoNormal wp-block-paragraph">Happy programming!</p>

<p class="MsoNormal wp-block-paragraph"><o:o:o:o:o:p><a href="/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/iconics-programming">Learn more about DMC&apos;s Iconics programming services.</a></o:o:o:o:o:p></p>
<p>The post <a href="https://static.dmcinfo.com/blog/28626/automation-redundancy-using-iconics-webhmi-solutions/">Automation Redundancy Using ICONICS WebHMI Solutions</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Programming Madness National Championship</title>
		<link>https://static.dmcinfo.com/blog/28761/programming-madness-national-championship/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 25 Sep 2012 13:46:55 +0000</pubDate>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[and Driver]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[SDK]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28761/programming-madness-national-championship/</guid>

					<description><![CDATA[<p>Welcome to the Programming Tournament National Championship! For the sake of drama, I was going to make a Tournament Highlights blog first, but I figured that everyone was probably so overly excited that putting off the decision any longer would be inhumane. For anyone coming to the party late, I have spent the last 6 [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28761/programming-madness-national-championship/">Programming Madness National Championship</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome to the Programming Tournament National Championship! For the sake of drama, I was going to make a <a href="https://static.dmcinfo.com/blog/29116/march-programming-madness-the-bracket/">Tournament Highlights</a> blog first, but I figured that everyone was probably so overly excited that putting off the decision any longer would be inhumane. For anyone coming to the party late, I have spent the last 6 months (or 3 half-lives of Antimony Sb-124) reviewing the positives and negatives of different programming languages that I’ve worked with, pitting them head to head in a <a href="https://www.ncaa.com/march-madness-live/watch" target="_blank" rel="noreferrer noopener">NCAA style tournament</a>.</p>



<p class="wp-block-paragraph">We’ve had <a href="https://static.dmcinfo.com/blog/29039/programming-madness-diving-into-round-2/">a few upsets along the way</a>, but for the most part, the favorites proved <a href="https://static.dmcinfo.com/blog/28859/programming-madness-conference-finals/">why they earned the high seeds</a>. After a last minute video review overturned what looked initially like a C++ victory in the semi-finals, this inaugural championship is between <a href="https://www.microsoft.com/en-us/" target="_blank" rel="noreferrer noopener">Microsoft’s</a> <a href="https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/" target="_blank" rel="noreferrer noopener">C# .Net</a> and review beneficiary,&nbsp;<a href="http://en.wikipedia.org/wiki/Sun_Microsystems" target="_blank">Sun Microsystems’</a> / <a href="https://www.oracle.com/" target="_blank" rel="noreferrer noopener">Oracle</a> / <a href="http://arstechnica.com/information-technology/2010/08/oracles-java-lawsuit-undermines-its-open-source-credibility/" target="_blank">Open-Source-Independent</a>, <a href="http://www.java.com/en/download/index.jsp" target="_blank">Java</a>.</p>



<p class="wp-block-paragraph">Amazingly, put perhaps not surprisingly, the architectures and syntax of these 2 platforms is remarkably similar. For a complete look at the similarities, there are a number of <a href="http://www.25hoursaday.com/CsharpVsJava.html" target="_blank">great sites</a> exposed by a simple Google search. Some of these differences are significant, while some are cosmetic, but diving into all of them is well beyond the scope of a simple blog post.</p>



<p class="wp-block-paragraph">Now, admittedly, I have done much more work on C# projects than I have with Java, and my Java experience is strictly from what I’ve done working with Android Development and anything I could learn from the <a href="https://www.amazon.com/Java-1-1-Unleashed-Michael-Morrison/dp/1575212986/ref=sr_1_5?crid=264F73CE94ECB&amp;dib=eyJ2IjoiMSJ9.rUTY5j2BCIEwpwXo8clArVL3uWNjlidpwyzxwzk0UpdYUCbW9lVWZielk1U4zcWlHModp9p4QOlHZLzdp-aNtj0FzzEKDwh7dLn5J_KPXvX_9YRxifDJm98vigJrK-B1qCsi_X3rQyQjIByVF8cROeiDgKlRrSKykwaCciEHjtemT9Pdu1XAtdic6Q_E3aYeJPusFQiYQw6jHCrYy7OvJkGJliopy3XabglvdSRk7QI.XfFDyeOMYWbJUllncjBwJSIqwmrqO6JxKxGXep1q4DM&amp;dib_tag=se&amp;keywords=java+unleashed&amp;qid=1751297743&amp;sprefix=java+unleashed%2Caps%2C91&amp;sr=8-5" target="_blank" rel="noreferrer noopener">Java Unleashed</a> book I bought back in 1997 (you know, when I was in seventh grade and they had to give you a CD-ROM with the SDK and examples, since AOL dialup was still too slow to download anything real from the new-fangled “Internet” thing.)</p>



<p class="wp-block-paragraph">Jumping from C# into Java, I’ve been perfectly able to make basic Android apps, and all else being equal, I honestly would lean towards Java for the simple reason that it is inherently cross-platform. Like other <a href="https://static.dmcinfo.com/blog/28904/programming-madness-last-of-the-quarter-finals/">cross-platform languages</a>, this means that code I write on my Windows computer can be compiled and run on a Mac without worry. This advantage means that we don’t have to build the same application 3 times to run on Windows, Mac, and Linux devices, a huge business case for commercial software companies. The <a href="http://en.wikipedia.org/wiki/Java_virtual_machine" target="_blank">Java VM mechanism</a> used to achieve this is pretty neat too, even if it does mean that we are constantly getting <a href="http://www.quickmeme.com/meme/3q4z9c/" target="_blank">barraged by Java update requests at startup</a>. C# is making progress here with the <a href="http://www.mono-project.com/Main_Page" target="_blank">Mono Project</a>, but there is still a long way to go to get the same foothold that Java has.</p>



<p class="wp-block-paragraph">So the winner is Java, right? Well, not so fast. C# gets a chance for a rebuttal, and rebut it does. By most accounts, <a href="http://www.25hoursaday.com/CsharpVsJava.html#different" target="_blank">C#</a> is slightly ahead of <a href="http://www.25hoursaday.com/CsharpVsJava.html#wishlist" target="_blank">Java</a> when it comes to features, although both, it seems, have been doing a flip-flop where one adds a useful feature and then the other copies it. The biggest area where I think C# stands out is the integrated usage and implementation of types and classes for each. It might just be because it’s what I’m used to, but the system in C# makes a lot more sense to me than does Java.</p>



<p class="wp-block-paragraph">For example, Java lacks static classes, doesn’t have a tool like LINQ, won’t allow named and optional method inputs, can’t pass inputs as references, doesn’t integrate arrays and collections, and has only watered down support for Generics. Project file management also seems better in C#, with conditional compilation flags and a level of abstraction between assemblies and files and between files and classes. Now, I know that each of these are subjective features, and you can probably even argue that some features are intentionally left out of Java, but I personally have become accustomed to the C# programming style and think that it makes sense.</p>



<p class="wp-block-paragraph">The bottom line is that both C# and Java are excellent, high level languages, with many similarities and a few individual strong points. I think that environment has a strong impact on which you prefer, but for me, being in a strongly <a href="/about/partners">Microsoft-centric workplace</a>, C# is my go to language. Therefore, strongly weighing my own opinion of my own opinion, in a wild game, with a controversial play, at the very last second, on a strongly contested Hail Mary, C# wins in what will safely go down as an Instant Classic.</p>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/blog/28859/programming-madness-conference-finals/">Semi Final Flashback</a></p>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/blog/29116/march-programming-madness-the-bracket/">Relive the Excitement</a></p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Nerdament-4_0.png" alt=""/></figure>
<p>The post <a href="https://static.dmcinfo.com/blog/28761/programming-madness-national-championship/">Programming Madness National Championship</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>NI Week 2012 Wrap Up &#8211; Customizing Windows Embedded</title>
		<link>https://static.dmcinfo.com/blog/28823/ni-week-2012-wrap-up-customizing-windows-embedded/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 10 Aug 2012 15:19:59 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Embedded Development & Programming]]></category>
		<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Special Events]]></category>
		<category><![CDATA[Test and Measurement Automation]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[PC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28823/ni-week-2012-wrap-up-customizing-windows-embedded/</guid>

					<description><![CDATA[<p>The days have certainly flown by, and, I’m sad to say, NI Week 2012 has run its course.&#160;The last day was shorter and leaner than the others, so, unfortunately, none of the sessions really stood out to me.&#160;I did learn a little more about TestStand and sat in on a session on Network Connection Managers [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28823/ni-week-2012-wrap-up-customizing-windows-embedded/">NI Week 2012 Wrap Up &#8211; Customizing Windows Embedded</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The days have certainly flown by, and, I’m sad to say, NI Week 2012 has run its course.&nbsp;The last day was shorter and leaner than the others, so, unfortunately, none of the sessions really stood out to me.&nbsp;I did learn a little more about <a href="http://www.ni.com/teststand/">TestStand</a> and sat in on a session on Network Connection Managers that reaffirmed a lot of DMC’s decisions in developing the network messaging daemon that we use.&nbsp;I also got an interesting look from <a href="http://jki.net/">JKI</a> at a <a href="http://www.extremeprogramming.org/rules/integrateoften.html">Continuous Integration</a> implementation for LabVIEW.&nbsp;I was happy to see that they use some of the same <a href="http://jenkins-ci.org/" target="_blank">tools</a> that we do at DMC.</p>



<p class="MsoNormal wp-block-paragraph"><o:p></o:p></p>



<p class="MsoNormal wp-block-paragraph">Without anything from day 4 to really write home about though, I figured I’d jump back to Tuesday to highlight a Windows Embedded presentation given by NI’s Andrew Mierau.&nbsp;I had worked on Windows Embedded a few times over the years, but never had the chance to really reap all of the benefits, so it was helpful to hear someone with significant domain knowledge recap his top tips.<o:p></o:p></p>



<p class="MsoNormal wp-block-paragraph">Firstly, the newest embedded version of Windows, <a href="http://www.microsoft.com/windowsembedded/en-us/evaluate/windows-embedded-standard-7.aspx">Windows Embedded Standard 7</a>, seems much easier to work with and is <a href="http://www.ni.com/white-paper/13048/en">fully compatible with LabVIEW and many NI drivers</a>.&nbsp;This customizable build of Windows 7 offers many robust features and shouldn’t be grouped with the watered down embedded version, <a href="http://www.microsoft.com/windowsembedded/en-us/evaluate/windows-embedded-compact-7.aspx">Windows CE (or Compact as they are calling it now.)</a>&nbsp;There is also a <a href="http://www.microsoft.com/windowsembedded/en-us/evaluate/windows-embedded-pos-ready.aspx">Point of Sale tailored version</a>, but it probably doesn’t fit for a lot of what we typically work with.<o:p></o:p></p>



<p class="MsoNormal wp-block-paragraph">One of the coolest WES7 features is the ability to protect the system from unintended or malicious modifications. The first tool to do this is the <a href="http://en.wikipedia.org/wiki/Enhanced_Write_Filter">Enhanced Write Filter</a>, which keeps file changes in RAM instead of pushing them to disk. This means that as soon as you reboot, you’ve got a clean image back from when you enabled EWF. A beefed up version of EWF is Hibernate Once, Resume Many or HORM, which lets you essentially lock in a hibernate point from which the system will always resume.</p>



<p class="MsoNormal wp-block-paragraph">Last but not least, Andrew presented the ease of replacing the Windows shell, explorer.exe. The <a href="https://support.microsoft.com/en-us/windows/file-explorer-in-windows-ef370130-1cca-9dc5-e0df-2f7416fe1cb1">Windows Explorer</a> is really just an application like any other, so by changing a registry key, you can have windows run your own app for every user or just certain users (note that if you only want to change it for one user, go to HKCU\Software instead of HKLM.) This is great for specialized terminals that are running kiosk or test stand applications, where you only want users to have access to the application they need to be running. Remember to leave a way to get back to explorer or to shut down or log out or you will end up stuck pretty badly.</p>



<p class="MsoNormal wp-block-paragraph">Well, that’s it. The last post for NI Week 2012.&nbsp;In all, it was a good experience, and even after 5 years of LabVIEW and becoming an architect there were still useful takeaways to gleam (and some of them were even .Net related!)<o:p></o:p></p>
<p>The post <a href="https://static.dmcinfo.com/blog/28823/ni-week-2012-wrap-up-customizing-windows-embedded/">NI Week 2012 Wrap Up &#8211; Customizing Windows Embedded</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>National Instruments Real-Time Target Asset Management</title>
		<link>https://static.dmcinfo.com/blog/28836/national-instruments-real-time-target-asset-management/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 07 Aug 2012 14:50:51 +0000</pubDate>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Test and Measurement Automation]]></category>
		<category><![CDATA[DAQ Hardware]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[LabVIEW for Real-Time and FPGA]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Vision Inspection]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/28836/national-instruments-real-time-target-asset-management/</guid>

					<description><![CDATA[<p>As the popularity of modular instruments grows in R&amp;D development spaces, National Instruments technology, particularly Real-Time and FPGA hardware, is becoming more and more common in volume test, manufacturing, and control applications. As the number of hardware products grows in a given deployment, so too does the task of asset management.&#160; The aim of this [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/28836/national-instruments-real-time-target-asset-management/">National Instruments Real-Time Target Asset Management</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As the popularity of modular instruments grows in R&amp;D development spaces, National Instruments technology, particularly Real-Time and FPGA hardware, is becoming more and more common in volume test, manufacturing, and control applications. As the number of hardware products grows in a given deployment, so too does the task of asset management.&nbsp;</p>



<p class="wp-block-paragraph">The aim of this discussion is to outline key questions that will be helpful in selecting and asset management solution for projects involving multiple National Instruments targets. I have taken specific focus on Real-Time and FPGA platforms, as they are most commonly deployed in large quantities. Let’s begin with some basic understanding of asset management:</p>



<h2 class="wp-block-heading" id="h-what-is-asset-management">What is asset management?</h2>



<p class="wp-block-paragraph">Asset management is generically described as a system that monitors valuable resources.</p>



<p class="wp-block-paragraph">In large volume deployments, it is critical to have an understanding of the state of critical components to properly maintain and optimize the uptime of a given system. For example, a common application of asset management technology surrounds fleet vehicles. For a large number of vehicles, say sanitation trucks, a central monitoring system is often used to monitor routes, break downs, and track maintenance schedules which ensure each vehicle is optimized for continuous use.</p>



<h2 class="wp-block-heading" id="h-how-does-asset-management-relate-to-national-instruments">How does asset management relate to National Instruments?</h2>



<p class="wp-block-paragraph">As larger volume systems are deployed, groupings of PXI controllers, multiple cRIO embedded systems, OEM SBRIO integrated products; it becomes critical to understand the technology available within the LabVIEW platform that describes a given target, and grants the ability to manage it. National Instruments customers are familiar with Measurement and Automation Explorer, which is NI’s approach to asset management in smaller lab settings.</p>



<p class="wp-block-paragraph"><strong>CHALLENGE:</strong></p>



<p class="wp-block-paragraph">Refresh the Remote Systems sub-section of MAX with 10+ Real Time Targets connected to a network. Configure their IP addresses to place them in a common subnet.</p>



<p class="wp-block-paragraph"><strong>EXTRA CREDIT:</strong></p>



<p class="wp-block-paragraph">Update each of those targets to run the same version of LabVIEW Real-Time and your custom program.</p>



<p class="wp-block-paragraph">If you accepted my challenge and were emboldened to complete the extra credit, you will note that this task is tedious, time-consuming, and not optimal for long term support procedures.</p>



<h2 class="wp-block-heading" id="h-what-are-my-options-for-managing-large-deployments-of-ni-real-time-targets">What are my options for managing large deployments of NI Real-Time Targets?</h2>



<p class="wp-block-paragraph">National Instruments released its first response to the question of asset management in 2010. The <a href="https://decibel.ni.com/content/docs/DOC-13216">System Configuration API</a>&nbsp;is a suite of programmatic tools designed to allow access to target information through driver level experts. This API directly exposes the nature of a given targets configuration for consumption by a given application.</p>



<p class="wp-block-paragraph">Now, to answer your first question, yes this directly leads to custom code development. There is not currently an offering by National Instruments that acts as a robust central monitoring service for Real-Time Targets. However, the <a href="https://decibel.ni.com/content/docs/DOC-13216">System Configuration API </a>can be coupled with the power of <a href="http://www.ni.com/white-paper/7350/en">LabVIEW Web Services</a>&nbsp;to create a highly scalable framework for asset management.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/RT-Asset-Example-Revised.jpg"></p></p>



<p class="wp-block-paragraph">By utilizing the power of Web Services, native to LabVIEW, the System Configuration API can populate Restful Web Services that provide agnostic connectivity any number of Commercial Off the Shelf (COTS) asset management tools. As NI hardware can now be described in common XML, it may be addressable by any subsystem that can provide/consume Restful Web Methods. Some example technologies include <a href="/services/digital-workplace-solutions/microsoft-consulting-services">Microsoft SQL Server/Sharepoint</a>, Oracle, and IBM.</p>



<h2 class="wp-block-heading" id="h-how-do-i-calculate-my-return-on-investment-roi-for-an-asset-management-solution">How do I calculate my Return on Investment (ROI) for an asset management solution?</h2>



<p class="wp-block-paragraph">As National Instruments does not offer a comprehensive solution for asset management, there is a significant time investment required to implement a scalable and robust infrastructure. Things to always consider at the beginning of development:</p>



<ol class="wp-block-list">
<li>How many systems do I anticipate deploying?</li>



<li>Will my deployment be locally networked, or globally deployed?</li>



<li>What is the impact of a single failure? Multiple failures? Fault detection time?</li>



<li>What is the anticipated maintenance requirement for a deployed system?</li>



<li>How often might this system require updates during field use?</li>



<li>What is the cost of continuous field personnel versus remote monitoring application software?</li>



<li>What type of system security must be maintained?</li>
</ol>



<p class="wp-block-paragraph">It’s important to point out that smaller subsystems have a number of options for basic application management. National Instruments systems engineering has produced a reference design for image management on Real-Time targets. The <a href="https://decibel.ni.com/content/docs/DOC-10295">Real Time Application Deployment Utility </a>offers a comprehensive example of how application software can be managed and maintained for multiple targets. This solution, however, does have a number of scaling concerns, especially as network complexity increases.&nbsp;</p>



<p class="wp-block-paragraph">As deployed systems and embedded targets become common place, National Instruments hardware will require integration with more scalable and maintainable solutions than Measurement and Automation Explorer. The joining of the <a href="https://decibel.ni.com/content/docs/DOC-13216">System Configuration API </a>and native <a href="http://www.ni.com/white-paper/7350/en">LabVIEW Web Services </a>begins to offer developers and system administrators a pathway to integrating National Instruments hardware into common asset management technologies.&nbsp;</p>



<h2 class="wp-block-heading" id="h-further-reading">Further Reading</h2>



<p class="wp-block-paragraph"><a href="https://decibel.ni.com/content/docs/DOC-13216">Welcome to the NI System Configuration API</a></p>



<p class="wp-block-paragraph"><a href="https://decibel.ni.com/content/docs/DOC-10295">LabVIEW Real-Time Application Deployment (RTAD) Reference Application</a></p>



<p class="wp-block-paragraph"><a href="https://partner.microsoft.com/en-us/licensing/software-asset-management.">Microsoft Software Asset Management</a></p>



<p class="wp-block-paragraph"><a href="/services/digital-workplace-solutions/microsoft-consulting-services/sharepoint">SharePoint Consulting Services</a></p>



<p class="wp-block-paragraph"><a href="/services/digital-workplace-solutions/microsoft-consulting-services/sharepoint/dashboards">SharePoint Dashboards</a></p>



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



<p class="wp-block-paragraph"><strong><a href="/services/test-and-measurement-automation/labview-programming-for-real-time-and-fpga">Learn more about DMC&#8217;s LabVIEW programming for real-time and FPGA services.</a></strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/28836/national-instruments-real-time-target-asset-management/">National Instruments Real-Time Target Asset Management</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC receives Patent for Dimensional Detection System</title>
		<link>https://static.dmcinfo.com/blog/29064/dmc-receives-patent-for-dimensional-detection-system/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Thu, 05 Apr 2012 11:01:54 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Vision Inspection]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/29064/dmc-receives-patent-for-dimensional-detection-system/</guid>

					<description><![CDATA[<p>One of the most interesting and fun projects I have worked at DMC&#160;was to develop a Dimensional Measurement system for our customer LTS Scale.&#160;&#160; In a nutshell, the system calculates the volume of an object on a&#160;forklift pallet. This is achieved by scanning the object with a laser, taking multiple images and analyzing these images [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/29064/dmc-receives-patent-for-dimensional-detection-system/">DMC receives Patent for Dimensional Detection System</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">One of the most interesting and fun projects I have worked at DMC&nbsp;was to develop a Dimensional Measurement system for our customer LTS Scale.&nbsp;&nbsp;</p>

<p class="wp-block-paragraph">In a nutshell, the system calculates the volume of an object on a&nbsp;forklift pallet. This is achieved by scanning the object with a laser, taking multiple images and analyzing these images with computer vision algorithms.</p>

<p class="wp-block-paragraph">The project also involved motor control, Linux, C++&nbsp;and&nbsp;a lot of number crunching&nbsp;to derive the volume result.</p>

<p class="wp-block-paragraph">US Patent 8,134,717 was awarded on March 13, 2012 to Ken Brey and me from DMC and Robert Pangrazio, Greg Pangrazio and Alan Pangrazio from LTS Scale.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/29064/dmc-receives-patent-for-dimensional-detection-system/">DMC receives Patent for Dimensional Detection System</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC Kinect Demo News and Updates</title>
		<link>https://static.dmcinfo.com/blog/31886/dmc-kinect-demo-news-and-updates/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 28 Oct 2011 08:19:12 +0000</pubDate>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Special Events]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Vision Inspection]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/31886/dmc-kinect-demo-news-and-updates/</guid>

					<description><![CDATA[<p>As many of you may know, we used last week’s Oktoberfest party as an unofficial house warming party for our new office space. In addition to having a great turnout despite uncooperative weather, the Kinect Demo team from FedEx Day 2010 put in some extra hours to get our new display case setup to welcome [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/31886/dmc-kinect-demo-news-and-updates/">DMC Kinect Demo News and Updates</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As many of you may know, we used last week’s <a href="/latest-thinking/blog/id/809/dmc-invites-you-to-an-oktoberfest-open-house-on-october-20th">Oktoberfest party</a> as an unofficial house warming party for our new office space. In addition to having a great turnout despite uncooperative weather, the Kinect Demo team from <a href="/latest-thinking/blog/id/285/dmc-holds-our-1st-fedex-day">FedEx Day 2010</a> put in some extra hours to get our new display case setup to welcome guests. If you haven’t seen the display case, an <a href="//www.youtube.com/watch?v=evAa9XqEg4o" type="link" id="//www.youtube.com/watch?v=evAa9XqEg4o" target="_blank" rel="noreferrer noopener">early video</a> is available, and a detailed case study can be found in <a href="https://static.dmcinfo.com/our-work/3-d-vision-interactive-display-case/">our case study section</a>.</p>



<p class="wp-block-paragraph">In the new office, we were able to dedicate a large space in our front lobby for the demo case, allowing us to install larger shelves with better spotlights. On these shelves, we updated all of the display items, featuring projects in areas from <a href="https://static.dmcinfo.com/our-work/category/service/manufacturing-automation-and-intelligence/">manufacturing</a> to <a href="/latest-thinking/case-studies/category/5/aerospace">aerospace</a> to <a href="https://static.dmcinfo.com/our-work/category/industry/energy-and-utilities/">energy</a>. Last but not least, we created nice graphics and summaries for each of them.</p>



<p class="wp-block-paragraph">Excitingly, there should be more improvements in store, as FedEx Day 2011 is quickly approaching. A couple of ideas for upgrades are advanced gesture recognition, easy customizations, enhanced multimedia, and a new head tracking algorithm.</p>



<p class="wp-block-paragraph">In the meantime, I just wanted to upload a couple of quick videos of the system to show off some of our work. The first is a high level intro and the second is a first person view of the system in action. I hope you enjoy watching as much as we do!</p>



<p class="wp-block-paragraph"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/mhq--0OCXqs?rel=0" width="420"></iframe></p>



<p class="wp-block-paragraph"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/Mc-XqWpdOp0?rel=0" width="420"></iframe></p>
<p>The post <a href="https://static.dmcinfo.com/blog/31886/dmc-kinect-demo-news-and-updates/">DMC Kinect Demo News and Updates</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC uses InFocus LiteShow III for Network Projector Sharing</title>
		<link>https://static.dmcinfo.com/blog/29535/dmc-uses-infocus-liteshow-iii-for-network-projector-sharing/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 17 May 2011 11:16:11 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/29535/dmc-uses-infocus-liteshow-iii-for-network-projector-sharing/</guid>

					<description><![CDATA[<p>At DMC we pride ourselves on being tech-savvy and using appropriate technology to solve common problems.  So as we moved to our new office space this month, we didn&#8217;t want to be constrained by the wires that link to our new conference room projectors and wall mounted displays.  The solution we have implemented is the [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/29535/dmc-uses-infocus-liteshow-iii-for-network-projector-sharing/">DMC uses InFocus LiteShow III for Network Projector Sharing</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">At DMC we pride ourselves on being tech-savvy and using appropriate technology to solve common problems.  So as we moved to our new office space this month, we didn&#8217;t want to be constrained by the wires that link to our new conference room projectors and wall mounted displays. <br> <br> The solution we have implemented is the InFocus LiteShow III.  We have three of these on our office network.  The LiteShow III is a small box with a wired and wireless network connections, and a VGA video output.  We have hooked up a LiteShow III to each of our conference room displays. <br> <br> Now, anyone on our network can project their laptop&#8217;s screen onto any display without connecting a monitor cable.  We use the displays&#8217; HDMI input to connect with dedicated conference room PCs.<br> <br> Using an external device for projector sharing has several advantages:</p>



<ul class="wp-block-list">
<li>Allowing&nbsp;us to use less expensive projectors and wall mounted displays that don&#8217;t have proprietary digital interfaces.</li>



<li>Unifying&nbsp;connectivity to all displays, regardless of brand or function. (Projects are the same as flat-panels)</li>



<li>Freeing us from passing video cables</li>
</ul>



<p class="wp-block-paragraph">The LiteShow III is the best solution that we&#8217;ve found, but it does have some drawbacks that we hope to see InFocus address in software upgrades or future products:</p>



<ul class="wp-block-list">
<li>The native resolution of the LiteShow is 1280X800, which doesn&#8217;t optimize our full 1080p displays.&nbsp; We would like a 1080p version.</li>



<li>The LiteShow software always asks you when you connect to switch to 1024X768 resolution.&nbsp; We wish it wouldn&#8217;t ask.&nbsp;</li>



<li>We have found that&nbsp;1440X900 is the best computer resolution to use with a LiteShow.&nbsp; It sets the LiteShow in the right aspect ratio with the minimum interpolation.</li>
</ul>



<p class="wp-block-paragraph">The LiteShow III can operate through wired networking, or using its wireless interface as a client or an access point.&nbsp; We have found it best to connect the LiteShow to a wired infrastructure network, and use wireless other access points to connect to the network.&nbsp; Unintuitively, before disabling the wireless network, it is important to set the SSID to the room name because that is what will be used to select which LiteShow on the network to connect to.<br>
<br>
We have found that it important to configure a static IP address for the LiteShow.&nbsp; While it has a DHCP client, it only seems to look for an address at startup.&nbsp; After we had an extended power outage, when the liteshows booted before the DHCP server, they took a default address and never connected to DHCP.</p>



<p class="wp-block-paragraph"><a href="/about">Learn more about DMC&#8217;s company culture.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/29535/dmc-uses-infocus-liteshow-iii-for-network-projector-sharing/">DMC uses InFocus LiteShow III for Network Projector Sharing</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Occasionally Connected Database Applications with Microsoft Sync Services</title>
		<link>https://static.dmcinfo.com/blog/29541/occasionally-connected-database-applications-with-microsoft-sync-services/</link>
		
		<dc:creator><![CDATA[Leon Grossman]]></dc:creator>
		<pubDate>Tue, 17 May 2011 10:39:00 +0000</pubDate>
				<category><![CDATA[Digital Workplace Solutions]]></category>
		<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[Custom Applications]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Time Tracking]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/29541/occasionally-connected-database-applications-with-microsoft-sync-services/</guid>

					<description><![CDATA[<p>It is often desired to have&#160;&#8220;occasionally connected&#8221; applications where a&#160;device may not always be connected to a network and that makes the task of maintaining a central data store such as SQL&#160;Server 2008R2 consistent across multiple devices and users an extremely challenging task. Fortunately, Microsoft&#160;has created Microsoft Sync Services&#160;(sync services) to address this problem. Sync [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/29541/occasionally-connected-database-applications-with-microsoft-sync-services/">Occasionally Connected Database Applications with Microsoft Sync Services</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">It is often desired to have&nbsp;&#8220;occasionally connected&#8221; applications where a&nbsp;device may not always be connected to a network and that makes the task of maintaining a central data store such as SQL&nbsp;Server 2008R2 consistent across multiple devices and users an extremely challenging task. Fortunately, <a href="http://www.microsoft.com/" target="_blank">Microsoft</a>&nbsp;has created <a href="http://msdn.microsoft.com/en-us/sync/bb736753?ppud=4" target="_blank">Microsoft Sync Services</a>&nbsp;(sync services) to address this problem. Sync services is a way of using a local database cache built on <a href="http://www.microsoft.com/sqlserver/2005/en/us/compact.aspx" target="_blank">Microsoft SQL&nbsp;Server Compact Edition</a>. The desired data is stored in the local database and synchronized back to a central data store. This often means a variant of SQL&nbsp;Server but it is possible to write a synchronization provider for any data source.</p>



<p class="wp-block-paragraph">If you are using Visual Studio 2010, much of the setup is created for you and is outlined in this walkthrough on <a href="http://msdn.microsoft.com/en-us/library/bb384472.aspx" target="_blank">Creating an Occasionally Connected Application</a>. I found the lack of consistency in sample databases between the various walkthroughs on this topic confusing but most of the information is there. It is not obvious from the walkthrough that you should connect to the local copy cached copy of your database and then use the synchronize command to synchronize the data back to the central store.</p>



<p class="wp-block-paragraph">The second thing that wasn&#8217;t obvious was the need to enable upload explicitly in the code-behind of the sync provider by setting bidirectional mode for the tables which need two-way synchronization. Fortunately, there is a walkthrough for this problem as well in <a href="http://msdn.microsoft.com/en-us/library/cc714035.aspx" target="_blank">Extending the Local Database Cache to Support Bidirectional Synchronization</a>. Pay particular attention to the section on &#8220;Removing Server Tracking Columns from Synchronization Commands&#8221; if you are not using SQL&nbsp;Server 2008 or above as you will have to add extra code to prevent synchronization errors.</p>



<p class="wp-block-paragraph">Finally, you have to handle data conflicts and errors. The first step is to design your architecture such that conflicts are unlikely to begin with but there are still cases in any application where conflicts can occur.&nbsp; <a href="http://msdn.microsoft.com/en-us/library/bb725997.aspx" target="_blank">Understanding Data Conflicts and Errors</a>&nbsp;outlines the steps necessary for handling these problems when they arise in your application.</p>



<p class="wp-block-paragraph">Our latest application to use this functionality is a timer replacement for the <a href="http://quickbooks.intuit.com/" target="_blank">Quickbooks </a>timer application. By creating our own application to replace the mid-90s application we were able to give our engineers the ability edit time offline (something the alternative web-based solutions could not do), write our own export code directly into Quickbooks using <em>QODBC</em> which saves an hour a week of management time, and provide custom user interface functions that dramatically improved the time entry process for all of our staff.</p>



<p class="wp-block-paragraph"><a href="/services/digital-workplace-solutions/microsoft-consulting-services">Learn more about DMC&#8217;s Microsoft consulting services.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/29541/occasionally-connected-database-applications-with-microsoft-sync-services/">Occasionally Connected Database Applications with Microsoft Sync Services</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Command Line Parameters from VBA</title>
		<link>https://static.dmcinfo.com/blog/31923/read-command-line-parameters-from-vba/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 22 Oct 2010 13:39:32 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Iconics]]></category>
		<category><![CDATA[MS Visual Studio/.NET]]></category>
		<category><![CDATA[PC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/31923/read-command-line-parameters-from-vba/</guid>

					<description><![CDATA[<p>Recently, I needed to read a command line parameter within a VBA code (it&#8217;s for&#160;an Iconics SCADA application, but I developed it with Excel VBA&#160;which is&#160;essentially the same). It doesn&#8217;t sound like a big deal but there&#160;were a few not-so-obvious tricks that I thought&#160;were worth sharing. I started with the&#160;simplest&#160;solution using a &#8220;GetCommandLineA&#8221; Windows API [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/31923/read-command-line-parameters-from-vba/">Read Command Line Parameters from VBA</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Recently, I needed to read a command line parameter within a VBA code (it&#8217;s for&nbsp;an <a href="https://iconics.com/" target="_blank" rel="noreferrer noopener">Iconics</a> SCADA application, but I developed it with Excel VBA&nbsp;which is&nbsp;essentially the same). It doesn&#8217;t sound like a big deal but there&nbsp;were a few not-so-obvious tricks that I thought&nbsp;were worth sharing.</p>



<p class="wp-block-paragraph">I started with the&nbsp;simplest&nbsp;solution using a &#8220;GetCommandLineA&#8221; Windows API function from kernel32.dll. It&nbsp;was supposed to return a&nbsp;pointer to the command line string, so I assumed that its return type&nbsp;would be&nbsp;string (sounds logical to me).</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">VBA</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>' The return type of the GetCommandLineA is long
' But it is supposed to be a pointer to the string. 
' Assumming that all VBA strings are passed by pointers
' Just declare it's return type to be a string
Declare Function GetCommandLineA Lib "Kernel32" () As String
 
Sub ReadCmdLine()

   Dim strCmdLine As String ' Command line string   
   ' Read command line parameters into the string
   strCmdLine = GetCommandLineA

End Sub</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">&apos; The return type of the GetCommandLineA is long</span></span>
<span class="line"><span style="color: #6A9955">&apos; But it is supposed to be a pointer to the string. </span></span>
<span class="line"><span style="color: #6A9955">&apos; Assumming that all VBA strings are passed by pointers</span></span>
<span class="line"><span style="color: #6A9955">&apos; Just declare it&apos;s return type to be a string</span></span>
<span class="line"><span style="color: #D4D4D4">Declare</span><span style="color: #569CD6"> Function </span><span style="color: #D4D4D4">GetCommandLineA Lib </span><span style="color: #CE9178">&quot;Kernel32&quot;</span><span style="color: #D4D4D4"> () As </span><span style="color: #4EC9B0">String</span></span>
<span class="line"><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ReadCmdLine</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">Dim</span><span style="color: #9CDCFE"> strCmdLine </span><span style="color: #D4D4D4">As </span><span style="color: #4EC9B0">String</span><span style="color: #D4D4D4"> </span><span style="color: #6A9955">&apos; Command line string   </span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; Read command line parameters into the string</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">strCmdLine</span><span style="color: #D4D4D4"> =</span><span style="color: #9CDCFE"> GetCommandLineA</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">End Sub</span></span></code></pre></div>



<p class="wp-block-paragraph">Surprise &#8211; it caused exception and crashed the application. Hm, apparently VBA handles a pointer to the string differently than&nbsp;GetCommandLineA.&nbsp;Not wanting to&nbsp;spend time figuring out why,&nbsp;I decided to copy the string to VBA&nbsp;string using another kernel32.dll function &#8220;lstrcpynA&#8221;.</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">VBA</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>' Declare the return type to be a pointer (long)
Declare Function GetCommandLineA Lib "Kernel32" () As Long
Declare Function lstrcpynA Lib "kernel32" ( _ 
   ByVal pDestination As String, ByVal pSource As Long, _
   ByVal iMaxLength As Integer) As Long
 
Sub ReadCmdLine()

   Dim pCmdLine as long     ' Pointer to the string
   Dim strCmdLine As String ' Command line string     

   pCmdLine = GetCommandLineA
   ' Copy from the pointer to VBA-Style string 
   ' 300 characters for command line seems to be enough
   lstrcpynA strCmdLine , pCmdLine, 300	   

End Sub</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">&apos; Declare the return type to be a pointer (long)</span></span>
<span class="line"><span style="color: #D4D4D4">Declare</span><span style="color: #569CD6"> Function </span><span style="color: #D4D4D4">GetCommandLineA Lib </span><span style="color: #CE9178">&quot;Kernel32&quot;</span><span style="color: #D4D4D4"> () As </span><span style="color: #4EC9B0">Long</span></span>
<span class="line"><span style="color: #D4D4D4">Declare</span><span style="color: #569CD6"> Function </span><span style="color: #D4D4D4">lstrcpynA Lib </span><span style="color: #CE9178">&quot;kernel32&quot;</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE"> _</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #D4D4D4">   ByVal pDestination As </span><span style="color: #4EC9B0">String</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> ByVal</span><span style="color: #D4D4D4"> pSource As </span><span style="color: #4EC9B0">Long</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">   ByVal iMaxLength As </span><span style="color: #4EC9B0">Integer</span><span style="color: #D4D4D4">) As </span><span style="color: #4EC9B0">Long</span></span>
<span class="line"><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ReadCmdLine</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">Dim</span><span style="color: #9CDCFE"> pCmdLine </span><span style="color: #D4D4D4">as </span><span style="color: #4EC9B0">long</span><span style="color: #D4D4D4">     </span><span style="color: #6A9955">&apos; Pointer to the string</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">Dim</span><span style="color: #9CDCFE"> strCmdLine </span><span style="color: #D4D4D4">As </span><span style="color: #4EC9B0">String</span><span style="color: #D4D4D4"> </span><span style="color: #6A9955">&apos; Command line string     </span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">pCmdLine</span><span style="color: #D4D4D4"> =</span><span style="color: #9CDCFE"> GetCommandLineA</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; Copy from the pointer to VBA-Style string </span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; 300 characters for command line seems to be enough</span></span>
<span class="line"><span style="color: #D4D4D4">   lstrcpynA strCmdLine ,</span><span style="color: #9CDCFE"> pCmdLine</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">300</span><span style="color: #D4D4D4">	   </span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">End Sub</span></span></code></pre></div>



<p class="wp-block-paragraph">This worked better by no longer crashing the application, but the strCmdLine was always empty. After short Google search I found this Microsoft article. Apparently, the lstrcpynA function (as other DLL functions returning strings) can&#8217;t change the size of the VBA-style string. In order to reserve the space for that return data, we need to fill the string with a bunch of zeros (vbNullChar).</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">VBA</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>Declare Function GetCommandLineA Lib "Kernel32" () As Long
Declare Function lstrcpynA Lib "kernel32" ( _
   ByVal pDestination As String, ByVal pSource As Long, _
   ByVal iMaxLength As Integer) As Long
 
Sub ReadCmdLine()

   Dim pCmdLine as long     ' Pointer to the string
   Dim strCmdLine As String ' Command line string   

   ' Get the pointer to the command line string
   pCmdLine = GetCommandLineA

   ' Fill the string with zeros
   ' 300 characters for command line seems to be enough
   strCmdLine = String&#91;DollarSign&#93;(300, vbNullChar)

   ' Copy from the pointer to VBA-style string
   lstrcpynA strCmdLine , pCmdLine, Len(strCmdLine )

   ' At this point we got the string
   ' But rest of it filled with 0 characters.
   strCmdLine = Left(strCmdLine , InStr(1, strCmdLine , _
      vbNullChar) - 1)
   	   
End Sub</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">Declare</span><span style="color: #569CD6"> Function </span><span style="color: #D4D4D4">GetCommandLineA Lib </span><span style="color: #CE9178">&quot;Kernel32&quot;</span><span style="color: #D4D4D4"> () As </span><span style="color: #4EC9B0">Long</span></span>
<span class="line"><span style="color: #D4D4D4">Declare</span><span style="color: #569CD6"> Function </span><span style="color: #D4D4D4">lstrcpynA Lib </span><span style="color: #CE9178">&quot;kernel32&quot;</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">   ByVal pDestination As </span><span style="color: #4EC9B0">String</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> ByVal</span><span style="color: #D4D4D4"> pSource As </span><span style="color: #4EC9B0">Long</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">   ByVal iMaxLength As </span><span style="color: #4EC9B0">Integer</span><span style="color: #D4D4D4">) As </span><span style="color: #4EC9B0">Long</span></span>
<span class="line"><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ReadCmdLine</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">Dim</span><span style="color: #9CDCFE"> pCmdLine </span><span style="color: #D4D4D4">as </span><span style="color: #4EC9B0">long</span><span style="color: #D4D4D4">     </span><span style="color: #6A9955">&apos; Pointer to the string</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">Dim</span><span style="color: #9CDCFE"> strCmdLine </span><span style="color: #D4D4D4">As </span><span style="color: #4EC9B0">String</span><span style="color: #D4D4D4"> </span><span style="color: #6A9955">&apos; Command line string   </span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; Get the pointer to the command line string</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">pCmdLine</span><span style="color: #D4D4D4"> =</span><span style="color: #9CDCFE"> GetCommandLineA</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; Fill the string with zeros</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; 300 characters for command line seems to be enough</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">strCmdLine</span><span style="color: #D4D4D4"> =</span><span style="color: #9CDCFE"> String</span><span style="color: #D4D4D4">&#91;DollarSign&#93;(</span><span style="color: #B5CEA8">300</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> vbNullChar</span><span style="color: #D4D4D4">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; Copy from the pointer to VBA-style string</span></span>
<span class="line"><span style="color: #D4D4D4">   lstrcpynA strCmdLine ,</span><span style="color: #9CDCFE"> pCmdLine</span><span style="color: #D4D4D4">, </span><span style="color: #DCDCAA">Len</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">strCmdLine</span><span style="color: #D4D4D4"> )</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; At this point we got the string</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #6A9955">&apos; But rest of it filled with 0 characters.</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #9CDCFE">strCmdLine</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">Left</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">strCmdLine</span><span style="color: #D4D4D4"> , </span><span style="color: #DCDCAA">InStr</span><span style="color: #D4D4D4">(</span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> strCmdLine</span><span style="color: #D4D4D4"> ,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #4EC9B0">vbNullChar</span><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: #569CD6">End Sub</span></span></code></pre></div>



<p class="wp-block-paragraph">This code finally worked as&nbsp;expected, returning command line arguments.</p>



<p class="wp-block-paragraph">Hopefully, this article is useful in saving someone 15 minutes of frustration.</p>



<p class="wp-block-paragraph"><a href="/services/application-development/web-application-development">Learn more about DMC&#8217;s software and web development services.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/31923/read-command-line-parameters-from-vba/">Read Command Line Parameters from VBA</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
