<?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>Chipkin Automation Systems - Articles &#187; cpascu</title>
	<atom:link href="http://www.chipkin.com/articles/author/xcosminel/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chipkin.com/articles</link>
	<description>Resources and News for industrial automation</description>
	<lastBuildDate>Wed, 10 Mar 2010 22:05:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Benefits of Subnets</title>
		<link>http://www.chipkin.com/articles/benefits-of-subnets</link>
		<comments>http://www.chipkin.com/articles/benefits-of-subnets#comments</comments>
		<pubDate>Mon, 08 Mar 2010 08:00:03 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[168]]></category>
		<category><![CDATA[192]]></category>
		<category><![CDATA[192.168.1.1]]></category>
		<category><![CDATA[benefits]]></category>
		<category><![CDATA[benifits]]></category>
		<category><![CDATA[broadcast]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sub]]></category>
		<category><![CDATA[subnet]]></category>
		<category><![CDATA[subnetting]]></category>
		<category><![CDATA[subnetwork]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=196</guid>
		<description><![CDATA[This article only explains some of the benefits of subnets, not how to implement a subnet.
1. It provides security.
In larger companies, employees must be able to communicate with other employees from that department. Subnetting allows for the department to have its own subnetwork. Depending on how many departments the company has, each one can have [...]]]></description>
			<content:encoded><![CDATA[<p>This article only explains some of the benefits of subnets, not how to implement a subnet.</p>
<p><b>1. It provides security.</b></p>
<p>In larger companies, employees must be able to communicate with other employees from that department. Subnetting allows for the department to have its own subnetwork. Depending on how many departments the company has, each one can have its own private and secure subnetwork, independent from the other networks. </p>
<p><b>2. It allows organization of resources.</b></p>
<p>A company has several departments or types of resources: sales, customer care, IT, executive, research. With subnetting, these resources can be organized within the larger network. For example:</p>
<p><code>192.168.130.x - Executive<br />
192.168.131.x - Research<br />
192.168.132.x - IT<br />
192.168.133.x - Sales<br />
192.168.134.x - Customer Care<br />
</code></p>
<p><b>3. It speeds up the network.</b></p>
<p>Using subnets will decrease the size of the broadcast domain, allowing data to reach its destination much faster. For example, a network without subnetting:</p>
<p><code>192.168.x.y -<br />
There are 255 possible values for x, and for each x there are 255 possible values for y.<br />
This means that there are 255*255 possible recipients in the network broadcast domain. </code></p>
<p>Having such a large network broadcast domain means the signal must go through each possible recipient until it finds the correct one. To decrease the number of possible recipients, we use subnets. For example:</p>
<p><code><br />
192.168.132.y -<br />
Here, there are 255 possible values for y within the 132 subnet. The network broadcast domain only contains 255 possible recipients, thus making the network much faster.<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/benefits-of-subnets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful tools and applications for Modbus</title>
		<link>http://www.chipkin.com/articles/useful-tools-and-applications-for-modbus</link>
		<comments>http://www.chipkin.com/articles/useful-tools-and-applications-for-modbus#comments</comments>
		<pubDate>Mon, 01 Mar 2010 08:00:47 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Modbus]]></category>
		<category><![CDATA[RS485]]></category>
		<category><![CDATA[Utilities and tools]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[excellent]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[good]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[modhopper]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[RS232]]></category>
		<category><![CDATA[rtu]]></category>
		<category><![CDATA[scanner]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=526</guid>
		<description><![CDATA[Here&#8217;s a useful list of tools to use with Modbus devices:

CAS Modbus Scanner (download)

Allows us to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device.


Modbus RTU Parser (download)

Allows us to analyze an RTU message and see what type of message it is, if there are any errors, what device the message [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a useful list of tools to use with Modbus devices:</p>
<ul>
<li><b>CAS Modbus Scanner</b> (<a href="http://www.chipkin.com/cas-modbus-scanner">download</a>)
<ul>
<li>Allows us to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device.</li>
</ul>
</li>
<li><b>Modbus RTU Parser</b> (<a href="http://www.chipkin.com/cas-modbus-rtu-parser/">download</a>)
<ul>
<li>Allows us to analyze an RTU message and see what type of message it is, if there are any errors, what device the message came from, etc&#8230;</li>
</ul>
</li>
<li><b>Modbus TCP Parser </b>(<a href="http://www.chipkin.com/cas-modbus-tcp-parser">download</a>)
<ul>
<li>Allows us to analyze an TCP message and see what type of message it is, if there are any errors, what device the message came from, etc&#8230;</li>
</ul>
</li>
<li><b>Wireshark </b>(<a href="http://www.wireshark.org/">homepage</a>)
<ul>
<li>Used for capturing Modbus TCP messages coming through the ethernet port.</li>
<li>A full list of the captured data can be found <a href="http://www.wireshark.org/docs/dfref/m/mbtcp.html">here</a>.</li>
</ul>
</li>
<li><b>Modbus Specification</b> (<a href="http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b.pdf">pdf</a>)
<ul>
<li>Official specification of the Modbus Application Protocol</li>
</ul>
</li>
<li><b>Nerds In Control </b>(<a href="http://www.control.com/">homepage</a>)
<ul>
<li>Very useful community website for automation professionals.</li>
<li>An excellent place to ask for Modbus help or help others with their Modbus problems.</li>
</ul>
</li>
<li><b>Modbus Simulator </b>(<a href="http://sourceforge.net/projects/modrssim/">download</a>)
<ul>
<li>Used for simulating a Modbus server for testing and learning purposes.</li>
</ul>
</li>
<li><b>Simply Modbus </b>(<a href="http://www.simplymodbus.ca/download.htm">download</a>)
<ul>
<li>Good Modbus TCP and RTU software, an alternative to our CAS Modbus Explorer and Scanner.</li>
<li>Website provides good tutorials on Modbus.</li>
</ul>
</li>
<li><b>Capturing with serial connections </b>(<a href="">tutorial</a>)
<ul>
<li>How to capture Modbus messages with a serial connection using free tools like PuTTY.</li>
</ul>
</li>
<li><b>Modhopper </b>(<a href="http://www.chipkin.com/modhopper-wireless-modbus">info</a>)
<ul>
<li>Allows connecting up to 128 Modbus devices through wifi to any Modbus network.</li>
</ul>
</li>
<p><i>Feel free to suggest other tools that you find useful and I will add them to the list.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/useful-tools-and-applications-for-modbus/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Broadcast traffic is being blocked on my network, Can I still use CAS BACnet Explorer?</title>
		<link>http://www.chipkin.com/articles/broadcast-traffic-is-being-blocked-on-my-network-can-i-still-use-cas-bacnet-explorer</link>
		<comments>http://www.chipkin.com/articles/broadcast-traffic-is-being-blocked-on-my-network-can-i-still-use-cas-bacnet-explorer#comments</comments>
		<pubDate>Tue, 23 Feb 2010 23:34:53 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[bbmd]]></category>
		<category><![CDATA[broadcast]]></category>
		<category><![CDATA[CAS BACnet Explorer]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=542</guid>
		<description><![CDATA[Question: Broadcast traffic is being blocked on my network, Can I still use CAS BACnet Explorer?
Answer:
Yes, but with some restrictions.
The BACnet discovery uses two services – called ‘Who-Is’ and ‘I-Am’ these messages rely on the use of broadcasts. Without the ability to send broadcast messages on a network, CAS BACnet Explorer will not be able to do the initial discovery of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question:</strong> <a href="http://en.wikipedia.org/wiki/Broadcasting_(computing)">Broadcast </a>traffic is being blocked on my network, Can I still use <a href="http://www.chipkin.com/cas-bacnet-explorer">CAS BACnet Explorer</a>?</p>
<p><strong>Answer:</strong></p>
<p>Yes, but with some restrictions.</p>
<p>The BACnet discovery uses two services – called ‘Who-Is’ and ‘I-Am’ these messages rely on the use of broadcasts. Without the ability to send broadcast messages on a network, CAS BACnet Explorer will not be able to do the initial discovery of objects.</p>
<p>Once a device or objects has been added to CAS BACnet Explorer it no longer uses broadcasts messages to communicate with it. You should be able to poll a device for its object list and read/write its objects properties.</p>
<p>You can add BACnet objects and devices to CAS BACnet Explorer manually from the discover dialog.  You will need to know some of the devices settings. Network type, IP/MAC address, network, Device instance, Object type, Object identifier.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2010/02/manually-add-objects.png"><img class="aligncenter size-medium wp-image-543" title="manually add objects" src="http://www.chipkin.com/articles/wp-content/uploads/2010/02/manually-add-objects-272x300.png" alt="" width="272" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/broadcast-traffic-is-being-blocked-on-my-network-can-i-still-use-cas-bacnet-explorer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLite vs mySQL (short summary)</title>
		<link>http://www.chipkin.com/articles/sqlite-vs-mysql-short-summary</link>
		<comments>http://www.chipkin.com/articles/sqlite-vs-mysql-short-summary#comments</comments>
		<pubDate>Mon, 22 Feb 2010 08:00:07 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Utilities and tools]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[protable]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[sqllite]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[versus]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=513</guid>
		<description><![CDATA[If you&#8217;re trying to decide between SQLite and mySQL (which one to use as your DBMS), you must first figure out what you need. These few simple questions should point you in the right direction:

Do you have a storage space limit?

The SQLite library is a mere 250kb, which is perfect for most embeded devices that [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re trying to decide between SQLite and mySQL (which one to use as your DBMS), you must first figure out what you need. These few simple questions should point you in the right direction:</p>
<ul>
<li><b>Do you have a storage space limit?</b>
<ul>
<li>The SQLite library is a mere 250kb, which is perfect for most embeded devices that don&#8217;t come with very much storage space.</li>
</ul>
</li>
<li>
<b>Do you need the database to be portable?</b></p>
<ul>
<li>SQLite stores the database directly into a single file, which can be simply copied or moved.</li>
<li>mySQL has an export feature which lets you back the database into a single file. mySQL uses its own format for storing data so the content can&#8217;t be moved or viewed by other DMBSs. Only after the database is exported will it be portable. Depending on how large the database is, this could be time consuming.</li>
</ul>
</li>
<li>
<b>Do you need security or authentication for your database?</b></p>
<ul>
<li>SQLite does not provide an authentication system. You can add one within your application, however the database file itself can be updated/read by anyone.</li>
<li>mySQL requires a username and password to make any kind of changes to the database.</li>
</ul>
</li>
<li>
<b>How large will your database get in the future?</b></p>
<ul>
<li>SQLite requires too much memory to run if the database is over 1GB in size (256 bytes of RAM for each MB of database space).</li>
<li>mySQL can have a maximum database size of 4GB.</li>
</ul>
</li>
<li><b>Will the database be accessed multiple times simultaneously?</b>
<ul>
<li>SQLite does not handle multiple simultaneous queries well. All read operations have priority over the write operations. There is a small delay caused by this since the operations must wait their turn, which could become a problem if there are large numbers of simultaneous queries.</li>
<li>mySQL has a query mechanism which handles mutiple query operations very well.</li>
</ul>
</li>
</ul>
<p>Hopefully your basic doubts about SQLite and mySQL have now been answered.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/sqlite-vs-mysql-short-summary/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Same Windows (XP) license on both the host machine and virtual machine</title>
		<link>http://www.chipkin.com/articles/same-windows-xp-license-on-both-the-machine-and-virtual-machine</link>
		<comments>http://www.chipkin.com/articles/same-windows-xp-license-on-both-the-machine-and-virtual-machine#comments</comments>
		<pubDate>Tue, 16 Feb 2010 23:55:25 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Utilities and tools]]></category>
		<category><![CDATA[actvation]]></category>
		<category><![CDATA[both]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[cd-key]]></category>
		<category><![CDATA[eula]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[license]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[machine]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[same]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[virtualpc]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=508</guid>
		<description><![CDATA[Can we use the same Windows license used with our machine&#8217;s installation to install Windows on a virtual machine (VM), which is running on top of the original installation? What is the legal method for achieving this?
Unfortunately, you cannot have a VM running Windows using the same license used on your host machine, because the [...]]]></description>
			<content:encoded><![CDATA[<p>Can we use the same Windows license used with our machine&#8217;s installation to install Windows on a virtual machine (VM), which is running on top of the original installation? What is the <b><i>legal</i></b> method for achieving this?</p>
<p>Unfortunately, you cannot have a VM running Windows using the same license used on your host machine, because the VM is treated as a separate computer. The Microsoft EULA is very ambiguous when referring to virtualization:</p>
<p><i>&#8220;The term &#8216;COMPUTER&#8217; as used herein shall mean the<br />
HARDWARE, if the HARDWARE is a single<br />
computer system, or shall mean the computer system with<br />
which the HARDWARE operates, if the<br />
HARDWARE is a computer system component.&#8221;</p>
<p>1.1 Installation and use. You may install, use, access,<br />
display and run one copy of the SOFTWARE on the<br />
COMPUTER. The SOFTWARE may not be used by more than<br />
two (2) processors at any one time on the COMPUTER,<br />
unless a higher number is indicated on the COA.&#8221;</p>
<p>&#8220;1.2 SOFTWARE as a Component of the COMPUTER &#8211; Transfer.<br />
This license may not be shared, transferred to or used<br />
concurrently on different computers. The SOFTWARE<br />
is licensed with the COMPUTER as a single integrated<br />
product and may only be used with the COMPUTER.&#8221;</i></p>
<p>After various forums responses from several Microsoft representatives its clear that Microsoft expects you to purchase a new license for every Windows installation.</p>
<p><b>Some <i>legal</i> solutions to this problem:</b></p>
<ul>
<li>The obvious one: Buy another Windows license to use with your VM. Not very desirable, seeing as Vista and Windows 7 are each over $70. Windows XP is not even sold anymore (according to Microsoft).</li>
<li>Use Linux as the host OS, using your Windows license only on the VM (Linux has excellent VM capabilities)</li>
<li>Get Vista Ultimate along with Software Assurance from Microsoft. This allows up to 4 VM uses of the same license key.</li>
<li>See if running Linux on the VM instead of Windows suits your needs (simulate Windows using Wine, etc&#8230;), and keep the Windows installation on the host machine. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/same-windows-xp-license-on-both-the-machine-and-virtual-machine/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CAS Modbus Scanner v1.02aB</title>
		<link>http://www.chipkin.com/articles/cas-modbus-scanner-v1-02ab</link>
		<comments>http://www.chipkin.com/articles/cas-modbus-scanner-v1-02ab#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:43:18 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Modbus]]></category>
		<category><![CDATA[RS232]]></category>
		<category><![CDATA[RS485]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Modbus TCP]]></category>
		<category><![CDATA[TCP]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=500</guid>
		<description><![CDATA[CAS Modbus Scanner is a utility to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device. Values retrieved from the device can be viewed in many different formats including Binary, HEX, Uint16, Int16, Uint32, Int32, and Float32.
Features:

Can read; coil status (0xxxx), input status(2xxxx), input registers (3xxxx), and holding registers (4xxxx)
Data is [...]]]></description>
			<content:encoded><![CDATA[<p>CAS Modbus Scanner is a utility to retrieve coils, inputs, holding registers, and input registers from a Modbus enabled device. Values retrieved from the device can be viewed in many different formats including Binary, HEX, Uint16, Int16, Uint32, Int32, and Float32.</p>
<p><strong>Features:</strong></p>
<ul>
<li>Can read; coil status (0xxxx), input status(2xxxx), input registers (3xxxx), and holding registers (4xxxx)</li>
<li>Data is viewable in Binary, HEX, Uint16, Int16,Uint32, Int32, and Float32</li>
<li>Multiple connections</li>
<li>Works with RS232 and RS485, TCP</li>
<li>Easy to use interface</li>
<li>100% Free to use, no registration required.</li>
</ul>
<p><strong>New </strong></p>
<ul>
<li>Works with Modbus TCP</li>
<li>Works on Windows Vista and Windows 7 (32bit and 64bit)</li>
</ul>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2010/02/modbus_v1.02aB.png"><img class="aligncenter size-medium wp-image-501" title="modbus_v1.02aB" src="http://www.chipkin.com/articles/wp-content/uploads/2010/02/modbus_v1.02aB-300x227.png" alt="" width="300" height="227" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/cas-modbus-scanner-v1-02ab/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor any port using any protocol with Wireshark</title>
		<link>http://www.chipkin.com/articles/monitor-any-port-using-any-protocol-with-wireshark</link>
		<comments>http://www.chipkin.com/articles/monitor-any-port-using-any-protocol-with-wireshark#comments</comments>
		<pubDate>Tue, 12 Jan 2010 19:59:38 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Utilities and tools]]></category>
		<category><![CDATA[80]]></category>
		<category><![CDATA[any]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=495</guid>
		<description><![CDATA[Changing the protocol associated with a port while monitoring it with Wireshark can be very useful. 
For example if you were trying to monitor some web traffic but your web proxy is on port 9191, how would you get Wireshark to treat port 9191 as HTTP (or as port 80)?
To change the protocol associated with [...]]]></description>
			<content:encoded><![CDATA[<p>Changing the protocol associated with a port while monitoring it with Wireshark can be very useful. </p>
<p>For example if you were trying to monitor some web traffic but your web proxy is on port 9191, how would you get Wireshark to treat port 9191 as HTTP (or as port 80)?</p>
<p><i><b>To change the protocol associated with a port:</b></i></p>
<ul>
<li>Open wireshark</li>
<li>Go to <i>Edit -> Preferences -> Protocols</i></li>
<li>Search for your protocol and click it</li>
<li>On the right hand side you should find a list of ports considered to be using the protocol</li>
<li>To add your own port, simply add a comma &#8220;,&#8221; after the last port listed and enter your own</li>
</ul>
<p> Simply restart Wireshark and restart your capture for the changed to take effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/monitor-any-port-using-any-protocol-with-wireshark/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chipkin BACnet Explorer set the max master</title>
		<link>http://www.chipkin.com/articles/chipkin-bacnet-explorer-set-the-max-master</link>
		<comments>http://www.chipkin.com/articles/chipkin-bacnet-explorer-set-the-max-master#comments</comments>
		<pubDate>Thu, 10 Dec 2009 19:35:43 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[BACnet MSTP]]></category>
		<category><![CDATA[Utilities and tools]]></category>
		<category><![CDATA[CAS BACnet Explorer]]></category>
		<category><![CDATA[mstp]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=489</guid>
		<description><![CDATA[To change the CAS BACnet explorer MSTP MaxMaster.
1) Open the settings file with notepad. The settings file is stored in of two places
C:\Users\&#60;username&#62;\Documents\CAS BACnet Explorer\Settings.xml
C:\Users\&#60;username&#62;\Documents\CAS BACnet Explorer (beta)\Settings.xml
2) Find the iMSTPNmaxMaster value
&#60;key name=&#8221;iMSTPNmaxMaster&#8221; value=&#8221;127&#8220;/&#62;
3) Change the value to a number between 1-254. Note: 255 (OxFF) is reserved for broadcasts.
From the BACnet Spec:
This parameter represents the value [...]]]></description>
			<content:encoded><![CDATA[<p>To change the CAS BACnet explorer MSTP MaxMaster.</p>
<p>1) Open the settings file with notepad. The settings file is stored in of two places</p>
<blockquote><p>C:\Users\&lt;<em>username</em>&gt;\Documents\CAS BACnet Explorer\Settings.xml<br />
C:\Users\&lt;<em>username</em>&gt;\Documents\CAS BACnet Explorer (beta)\Settings.xml</p></blockquote>
<p>2) Find the iMSTPNmaxMaster value</p>
<blockquote><p>&lt;key name=&#8221;<strong><em>iMSTPNmaxMaster</em></strong>&#8221; value=&#8221;<strong><em><span style="color: #ff0000;">127</span></em></strong>&#8220;/&gt;</p></blockquote>
<p>3) Change the value to a number between 1-254. Note: 255 (OxFF) is reserved for broadcasts.</p>
<p><strong>From the BACnet Spec:</strong></p>
<blockquote><p>This parameter represents the value of the Max_Master property of the node&#8217;s Device object. The value of Max_Master specifies the highest allowable address for master nodes. The value of Max_Master shall be less than or equal to 127. If Max_Master is not writable in a node, its value shall be 127.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/chipkin-bacnet-explorer-set-the-max-master/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Drupal &#8220;Fatal error: Allowed memory size of&#8230;&#8221; error.</title>
		<link>http://www.chipkin.com/articles/fix-drupal-fatal-error-allowed-memory-size-of-error</link>
		<comments>http://www.chipkin.com/articles/fix-drupal-fatal-error-allowed-memory-size-of-error#comments</comments>
		<pubDate>Fri, 20 Nov 2009 22:56:23 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[allowed]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fatal]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[size]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=475</guid>
		<description><![CDATA[This error can occur for multiple reasons. In my case, it occured when trying to edit an already existing drupal page. I would attempt to edit the page, and Drupal would respond with this:
Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1481725 bytes) in __/public_html/includes/database.inc on line 224
Fix 1:
What we need [...]]]></description>
			<content:encoded><![CDATA[<p>This error can occur for multiple reasons. In my case, it occured when trying to edit an already existing drupal page. I would attempt to edit the page, and Drupal would respond with this:</p>
<div style="border: 1px solid grey; padding: 4px; width: 400px; background-color: #cccccc;">Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1481725 bytes) in __/public_html/includes/database.inc on line 224</div>
<p><strong>Fix 1:</strong></p>
<p>What we need to do is increase the allowed memory size for php scripts. This is easy assuming that you know the location of your <em>php.ini</em> file (if you don&#8217;t, read Fix 2).</p>
<p>Inside this file, find the following line and make the following changes:</p>
<div style="border: 1px solid grey; padding: 4px; width: 400px; background-color: #cccccc;">memory_limit = xxM; (xx &#8211; your current value)</div>
<p>to</p>
<div style="border: 1px solid grey; padding: 4px; width: 400px; background-color: #cccccc;">memory_limit = 50M;</div>
<p>Note: You might have to increase the number depending on how many modules your Drupal installation is using.</p>
<p><strong>Fix 2:</strong></p>
<p>If you cannot find your <em>php.ini</em> file, either it does not exist yet, or your host won&#8217;t allow you to access it. We will assume that the file does not exist yet, so lets create it.</p>
<p>Save the following code into a file named <em>php.ini</em>:</p>
<div style="border: 1px solid grey; padding: 4px; width: 400px; background-color: #cccccc;">[PHP]<br />
memory_limit = 40M;</p>
<p>upload_max_filesize = 20M;</p>
<p>post_max_size 20M;</p>
<p>max_execution_time = 200;</p>
<p>max_input_time = 200;</p></div>
<p>Put this file in your Drupal website root folder, <em>&#8230;/public_html/</em>.</p>
<p>Your memory error should no longer occur after this fix, however considering there are many reasons for this error to occur it might also not work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/fix-drupal-fatal-error-allowed-memory-size-of-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modbus/TCP to BACnet/IP Configuration Sample</title>
		<link>http://www.chipkin.com/articles/modbustcp-to-bacnetip-configuration-sample</link>
		<comments>http://www.chipkin.com/articles/modbustcp-to-bacnetip-configuration-sample#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:36:29 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[BACnet MSTP]]></category>
		<category><![CDATA[Modbus]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[descriptor]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[devices]]></category>
		<category><![CDATA[floating]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[point]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=416</guid>
		<description><![CDATA[This example FieldServer configuration illustrates a config which reads data from a Modbus/TCP device and makes the data available as BACnet data. A remote BACnet client can read and write points.
Relationship between a connection, node and Map Descriptor for a client
The name of the connection/adapter is used to form the relationship between the connection and [...]]]></description>
			<content:encoded><![CDATA[<p>This example FieldServer configuration illustrates a config which reads data from a Modbus/TCP device and makes the data available as BACnet data. A remote BACnet client can read and write points.</p>
<p><strong>Relationship between a connection, node and Map Descriptor for a client</strong></p>
<p>The name of the connection/adapter is used to form the relationship between the connection and the node. Here the name ‘N1’ is used in common. This means that when messages are sent to the node called PLC_01 (Node Address=1) they will be sent using connection N1.</p>
<p>As the FieldServer processes each task (Map Descriptor) it needs to know which device or node to send the message to. The name of the Node is used to form the relationship. For example, the task to read address 40001 is defined for Node=’PLC_01’. Now the FieldServer looks for a node with the same name. When it finds it, it then known which connection to send the message on. In this example, it also finds the IP address of the node. So now it knows to send a read holding register message to the device with device address = 1 at IP Adrdess 192.168.1.82 using Network connection N1.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img1.jpg"><img class="aligncenter size-full wp-image-418" title="img1" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img1.jpg" alt="img1" width="688" height="309" /></a></p>
<p><strong>Relationship between a connection, node and Map Descriptor for a Server</strong></p>
<p>For a server, it is not necessary to form a relationship between the connection and the node. What does it mean when a node is not related to a connection? Let&#8217;s say you define the same protocol on two connections (eg N1 and N2 – not all FieldServer’s have both) but you want to use the same server node to respond to messages that arrive on connection N1 or N2. By leaving the relationship between a connection and a node undefined (like this example), this becomes possible.</p>
<p>For a server, Map Descriptors may be thought of as server data object definitions. They must be related to a node. When a request for data from node 11 (like this example) is received, the driver must find a matching server node in the config. Once a matching node is found, the FieldServer must find a data object definition that matches the request. Thus, a relationship between the node and the Map Descriptor must be established. This is done by using a common Node_Name as illustrated by the green line.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img2.jpg"><img class="aligncenter size-full wp-image-419" title="img2" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img2.jpg" alt="img2" width="689" height="360" /></a></p>
<p><strong>What connects two protocols together?</strong></p>
<p>The Data Arrays connect protocols. The client reads data and stores it in a data array. The server serves data, extracting it from the Data Array and serving the data using a different protocol. Some data scaling or rearrangement may be required. FieldServer provides tools to move, reorganize, do arithmetic and scale Data Array data. In this example the relationship is direct.</p>
<p>In this diagram the pink and purple lines show how client side data read using Modbus is served as BACnet Data.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img3.jpg"><img class="aligncenter size-full wp-image-420" title="img3" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img3.jpg" alt="img3" width="689" height="553" /></a></p>
<p>The Client read 20 data items from register 30001 and stores the data in DA_Ana_Inputs starting at offset zero.</p>
<p>This means DA_Ana_Inputs[0] contains the value of register 30001.  DA_Ana_Inputs[1] contains the value of register 30002.  DA_Ana_Inputs[2] contains the value of register 30003.</p>
<p>The server Map Descriptor named ‘AnaInput01’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 0. Thus the data it serves correlates to register 30001.</p>
<p>The server Map Descriptor named ‘AnaInput02’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 1. Thus the data it serves correlates to register 30002.</p>
<p>The server Map Descriptor named ‘AnaInput03’ serves data extracted from the Data Array named ‘DA_Ana_Inputs’ offset 2. Thus the data it serves correlates to register 30003</p>
<p>A similar discussion applies to the other data.</p>
<p>If the client goes offline or the data cannot be read because of some error then the age of the data increases. At some point the data becomes too old to serve in which case the FieldServer marks the data as unreliable.</p>
<p><strong>Data Arrays</strong></p>
<p>Data Arrays are used to store data. Select Data_Formats that are suitable for the data. FieldServers can store 1,8,16 and 32 bit data, signed and unsigned as will as floating point data. A few other formats such as packed_bits and packed_bytes allow binary data to be easily packed/unpacked. In addition using special functions data can be moved from one location to another. During the move, data formats can be changed and arithmetic can be performed.</p>
<p>Data arrays use FieldServer memory but the length does not affect the point count.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img4.jpg"><img class="aligncenter size-full wp-image-421" title="img4" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img4.jpg" alt="img4" width="661" height="166" /></a></p>
<p><strong>Scaling</strong></p>
<p>A value can be scaled before it is served. In this example, the value served will be 100 times smaller than the value found in the Data Array. Read the config as follows; When a value of 0-10,000 is extracted from the Data Array it will be served to the remote node as a value between 0-100.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img5.jpg"><img class="aligncenter size-full wp-image-422" title="img5" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img5.jpg" alt="img5" width="621" height="105" /></a></p>
<p><strong>Modbus Client</strong></p>
<p>No more than once per second (Scan_Interval) read (Function=RDBC which means read continuously) 20 (Length) input registers starting at address 30001 (Address) and store the returned data in DA_Ana_Inputs[0..19]. For this protocol the Map_Descriptor_Name serves only a descriptive purpose – it is not used by the protocol.</p>
<p>There are three other similar tasks. Each reads a different data type and stores it in a different location.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img6.jpg"><img class="aligncenter size-full wp-image-423" title="img6" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img6.jpg" alt="img6" width="689" height="483" /></a></p>
<p><strong>BACnet Server</strong></p>
<p>The BACnet device instance has been set to 11. (Node_ID).</p>
<p>12 Data objects have been defined. Each is defined by a single map descriptor. The unstated length of each map descriptor is 1 (default value for this protocol.). That means each map descriptor defines a single BACnet data object. The object type and instance numbers are defined by Data_Type and Object_ID. They do not have to be sequential.</p>
<p>The MapDescriptor name is used as the BACnet Object Name. When a remote client reads from this server it will find objects named ‘AnaInput01’, ‘AnaInput02’, etc&#8230;</p>
<p>The Virtual BACNet device will be allocated to the Local Network. (Network zero). There are methods to change this default allocation.</p>
<p>A parameter called ‘Relinqush_Default’ tells the driver what value to set the object to if it is not being commanded by a remote device and if it is not being read from a remote device. It is required for output types and the typical value is zero.</p>
<p>The function is set to server meaning that these map descriptors are capabilities as opposed to tasks. The FieldServer does no active work based on these Map Descriptors. The server side waits passively until it receives a message from a remote BACnet device. When a message is received, the Fieldserver matches it against a server side node and then against the server side map descriptors. If there is a match data can be extracted and served. If there is no match then an error response is sent.</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img7.jpg"><img class="aligncenter size-full wp-image-424" title="img7" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img7.jpg" alt="img7" width="689" height="350" /></a></p>
<p>Engineering Units are a property of a BACnet data object. You can set them to any supported unit using the ‘Units’ parameter. The manual provides a full list of units. You can see the analog data is scaled before it is served.</p>
<p><strong>How to Write/Command Data</strong></p>
<p>When you send a BACnet comamd to change the value of an object (typically an output object) then a message is sent to the FieldSever with the new value. If a matching device and object are found the Data Array is updated. Normally the data is read by the client side and shared with the server side. These two operations seem to contradict each other. Here is how it works:</p>
<p>1. Normally client side (Modbus) reads the data and server side serves that data.</p>
<p>2. BACnet Scada System sends a command to write a data object.</p>
<p>3. This causes the FieldServer to store the data in the Data Array location being used by the corresponding Server Map Descriptor.</p>
<p>4. This in turn triggers a once off operation. Instead of reading the data from the Modbus Device, a single write to the Modbus device is performed with the new data. FieldServers call this a ‘write-though-read’. That is why we get away with having no ‘write’ map descriptors to the Modbus device but we are still able to send commands to the Modbus Device.</p>
<p>Lets say a remote controller sends a new setpoint to Analog Output #2. In this case the new setpoint is stored in DA_Ana_Outputs[1] (offset 1).</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img13.jpg"><img class="aligncenter size-full wp-image-431" title="img13" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img13.jpg" alt="img13" width="689" height="59" /></a></p>
<p>You can deduce that DA_Ana_Outputs[1] corresponds to Modbus register 40002. ( Basis for deduction – follow the data array name from the server map descriptor – find which client Map Descrptor uses the same Data Array. In this case it is the one called ‘Read_Holding_Regs’. Now you can see that 40001 corresponds to DA_Ana_Outputs[0] and hence 40002 corresponds DA_Ana_Outputs[1].</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img14.jpg"><img class="aligncenter size-full wp-image-430" title="img14" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img14.jpg" alt="img14" width="688" height="147" /></a></p>
<p>Now the FieldServer knows where to send the new setpoint and hence a message to set 40002 in device #1 using Modbus/TCP is sent.</p>
<p><strong>Modbus and Floating Point Numbers</strong></p>
<p>Modbus does not naturally have a way of transporting floating point numbers. Commonly, two 16bit integers are used to store a representation of a floating point number. Commonly the representation method is IEEE754. FieldServer have a method of doing the conversion.</p>
<p>The following table shows the FieldServer function moves that copy two adjacent 16-bit registers to a 32-bit floating point value:</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img8.jpg"><img class="aligncenter size-full wp-image-425" title="img8" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img8.jpg" alt="img8" width="581" height="107" /></a></p>
<p>In these examples, 32 16-bit values are combined to form 16 floating point numbers.</p>
<p>In the 1st example DA_SYN_REG[502] and DA_SYN_REG[503] are combined and stored in DA_SYN_ FLOAT500[0]. This is repeated 15 more times. Eg DA_SYN_REG[504] and DA_SYN_REG[505] are combined and stored in DA_SYN_FLOAT500[1].</p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img9.jpg"><img src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img9.jpg" alt="img9" title="img9" width="689" height="100" class="aligncenter size-full wp-image-426" /></a></p>
<p><strong>Complete Configuration File</strong></p>
<p><a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img10.jpg"><img class="aligncenter size-full wp-image-427" title="img10" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img10.jpg" alt="img10" width="690" height="331" /></a><br />
<a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img11.jpg"><img class="aligncenter size-full wp-image-428" title="img11" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img11.jpg" alt="img11" width="690" height="397" /></a><br />
<a href="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img12.jpg"><img class="aligncenter size-full wp-image-417" title="img12" src="http://www.chipkin.com/articles/wp-content/uploads/2009/08/img12.jpg" alt="img12" width="690" height="412" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/modbustcp-to-bacnetip-configuration-sample/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
