Author Archive for cpascu

How to Create/Access Subfolders In TortoiseSVN

Note: This article assumes that the user already has full access to the repository.

  1. Within a folder already linked to the root URL of the repository (http://www.yoursvn.com/CVS/ ), create a new subfolder (e.g. Project).
  2. Create a completely new folder at a different location, which will link to the newly created subfolder in the repository. (e.g. Backup)
  3. Right-click the folder and select SVN Checkout…
  4. For the URL of the repository use the rootURL/subfolder (e.g. http://www.yoursvn.com/CVS/Project/)
  5. Select OK.
  6. Enter the username and password.
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Benefits of Subnets

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 its own private and secure subnetwork, independent from the other networks.

2. It allows organization of resources.

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:

192.168.130.x - Executive
192.168.131.x - Research
192.168.132.x - IT
192.168.133.x - Sales
192.168.134.x - Customer Care

3. It speeds up the network.

Using subnets will decrease the size of the broadcast domain, allowing data to reach its destination much faster. For example, a network without subnetting:

192.168.x.y -
There are 255 possible values for x, and for each x there are 255 possible values for y.
This means that there are 255*255 possible recipients in the network broadcast domain.

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:


192.168.132.y -
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.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Useful tools and applications for Modbus

Here’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 came from, etc…
  • Modbus TCP Parser (download)
    • 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…
  • Wireshark (homepage)
    • Used for capturing Modbus TCP messages coming through the ethernet port.
    • A full list of the captured data can be found here.
  • Modbus Specification (pdf)
    • Official specification of the Modbus Application Protocol
  • Nerds In Control (homepage)
    • Very useful community website for automation professionals.
    • An excellent place to ask for Modbus help or help others with their Modbus problems.
  • Modbus Simulator (download)
    • Used for simulating a Modbus server for testing and learning purposes.
  • Simply Modbus (download)
    • Good Modbus TCP and RTU software, an alternative to our CAS Modbus Explorer and Scanner.
    • Website provides good tutorials on Modbus.
  • Capturing with serial connections (tutorial)
    • How to capture Modbus messages with a serial connection using free tools like PuTTY.
  • Modhopper (info)
    • Allows connecting up to 128 Modbus devices through wifi to any Modbus network.
  • Feel free to suggest other tools that you find useful and I will add them to the list.

    Did you like this post?

    Subscribe To The RSS Feed!
    To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

    Do you have a question?
    We will do our best to try and solve any building automation, protocol, integration problem you may have

Broadcast traffic is being blocked on my network, Can I still use CAS BACnet Explorer?

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

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.

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.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

SQLite vs mySQL (short summary)

If you’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 don’t come with very much storage space.
  • Do you need the database to be portable?

    • SQLite stores the database directly into a single file, which can be simply copied or moved.
    • 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’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.
  • Do you need security or authentication for your database?

    • 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.
    • mySQL requires a username and password to make any kind of changes to the database.
  • How large will your database get in the future?

    • 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).
    • mySQL can have a maximum database size of 4GB.
  • Will the database be accessed multiple times simultaneously?
    • 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.
    • mySQL has a query mechanism which handles mutiple query operations very well.

Hopefully your basic doubts about SQLite and mySQL have now been answered.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Same Windows (XP) license on both the host machine and virtual machine

Can we use the same Windows license used with our machine’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 VM is treated as a separate computer. The Microsoft EULA is very ambiguous when referring to virtualization:

“The term ‘COMPUTER’ as used herein shall mean the
HARDWARE, if the HARDWARE is a single
computer system, or shall mean the computer system with
which the HARDWARE operates, if the
HARDWARE is a computer system component.”

1.1 Installation and use. You may install, use, access,
display and run one copy of the SOFTWARE on the
COMPUTER. The SOFTWARE may not be used by more than
two (2) processors at any one time on the COMPUTER,
unless a higher number is indicated on the COA.”

“1.2 SOFTWARE as a Component of the COMPUTER – Transfer.
This license may not be shared, transferred to or used
concurrently on different computers. The SOFTWARE
is licensed with the COMPUTER as a single integrated
product and may only be used with the COMPUTER.”

After various forums responses from several Microsoft representatives its clear that Microsoft expects you to purchase a new license for every Windows installation.

Some legal solutions to this problem:

  • 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).
  • Use Linux as the host OS, using your Windows license only on the VM (Linux has excellent VM capabilities)
  • Get Vista Ultimate along with Software Assurance from Microsoft. This allows up to 4 VM uses of the same license key.
  • See if running Linux on the VM instead of Windows suits your needs (simulate Windows using Wine, etc…), and keep the Windows installation on the host machine.
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

CAS Modbus Scanner v1.02aB

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 viewable in Binary, HEX, Uint16, Int16,Uint32, Int32, and Float32
  • Multiple connections
  • Works with RS232 and RS485, TCP
  • Easy to use interface
  • 100% Free to use, no registration required.

New

  • Works with Modbus TCP
  • Works on Windows Vista and Windows 7 (32bit and 64bit)

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Monitor any port using any protocol with Wireshark

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 a port:

  • Open wireshark
  • Go to Edit -> Preferences -> Protocols
  • Search for your protocol and click it
  • On the right hand side you should find a list of ports considered to be using the protocol
  • To add your own port, simply add a comma “,” after the last port listed and enter your own

Simply restart Wireshark and restart your capture for the changed to take effect.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Chipkin BACnet Explorer set the max master

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\<username>\Documents\CAS BACnet Explorer\Settings.xml
C:\Users\<username>\Documents\CAS BACnet Explorer (beta)\Settings.xml

2) Find the iMSTPNmaxMaster value

<key name=”iMSTPNmaxMaster” value=”127“/>

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 of the Max_Master property of the node’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.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Fix Drupal “Fatal error: Allowed memory size of…” error.

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 to do is increase the allowed memory size for php scripts. This is easy assuming that you know the location of your php.ini file (if you don’t, read Fix 2).

Inside this file, find the following line and make the following changes:

memory_limit = xxM; (xx – your current value)

to

memory_limit = 50M;

Note: You might have to increase the number depending on how many modules your Drupal installation is using.

Fix 2:

If you cannot find your php.ini file, either it does not exist yet, or your host won’t allow you to access it. We will assume that the file does not exist yet, so lets create it.

Save the following code into a file named php.ini:

[PHP]
memory_limit = 40M;

upload_max_filesize = 20M;

post_max_size 20M;

max_execution_time = 200;

max_input_time = 200;

Put this file in your Drupal website root folder, …/public_html/.

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.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have