PLC Programming HandbooksPopular ArticlesNavigationUser login |
A Tale of Programming Two PLCsDeveloping and managing several different PLCs and HMIs can be a real burden on a PC or laptop. The problems include:
To remedy the situation there are some options:
Dedicating a PC may be the only option in the case of ancient hardware, but it’s ultimately what we want to avoid. We’re not going to consider option two since we’re into simplicity and I think the other choices are better. The second and third option of batch files or hardware profiles solves the conflicts and memory problems and is easily implemented in Windows. The fourth option can also be a good solution to separate environments and quickly switch to different operating systems even though it can be a memory hog. Tracking Down the Right Windows ServicesThe first thing to do is identify the program’s services that start automatically. The services are listed by going to the Control Panel, double click on Administrative Tools, and then double clicking on Services. In our example we have installed and want to separate RSLogix Enterprise, Siemens STEP7 and Wonderware on a Windows XP computer. Be careful here as certain services are required for Windows to function correctly. If you are unsure then you should create a system restore point before experimenting.
In the list you will see some obvious names and descriptions but others may be a bit obscure. By right clicking on the Name and then selecting Properties you can see where the process lives. For example the “Automation License Manager Service” looks suspicious. The properties dialog shows us that it is indeed a Siemens program since it is in the Siemens folder.
When in doubt you can use Google to try to get information on any particular service. There’s also ProcessLibrary.com which is one of the best sites for determining a files worth. If you want to go further there’s a batch file at PC World that stop/starts what it thinks are unnecessary Windows services. The other columns in the Services window tell us if the service is started or it shows nothing if it’s stopped. The start up type determines what it will do when Windows boots up. So even if things get screwed up it will go back to the default after a reboot. The services of particularly interest say “Started” and “Automatic” For my system, I’ve done the homework and determined the services I want to stop are: AB
Siemens
Wonderware
Just for kicks, I can get the file name of these services and determine their memory usage by Ctrl+Alt+Del and clicking on the Processes tab. The column Mem Usage shows me how much RAM these bad boys are eating up. Creating a Batch File to Stop/Start ServicesTo quickly stop a service, right click on it and select Stop. That’s all well and good but who wants to do keep doing that all the time and having to remember each of the services? The easy way is to create a batch file which does all the work. A batch file is simply a text file (created with NotePad or any text editor) that has a .bat extension. The commands found in the file will be run by Windows just like commands at a DOS prompt. All you DOS/Windows old timers all ready know this. The command to stop a service is: NET STOP “Service Name” And to start it up again… you guessed it… NET START “Service Name” Running this on a DOS prompt will return a message whether it was successful or not. From our list of services above we can now make a batch file called ABStop.bat which contains the line NET STOP “RSLinx Classic” On the flip side is another batch file called ABStart.bat which has the command NET START “RSLinx Classic” The batch file can now be executed by double clicking on it, making it a shortcut or by putting it in our Start Up folder. For the Siemens services there would be one file called SiemensStop.bat where each command gets put on a separate line. NET STOP “Automation License Manager” I think you get the point now. Windows Hardware ProfilesThere is another way if you want to make it really obvious and automatic. This is done by setting up different Windows hardware profiles. It also gives you the ability to disable/enable certain devices on your computer. Hardware profiles have actually been around since Windows 95. More profiles can be added as you determine which services you don’t want to run.
The first steps involve setting up different hardware profiles.
Now that we have our profiles we can enable and disable our chosen services based on these profiles.
Now when Windows is started a DOS type screen will appear asking you to select the hardware profile to use. Once this is done you should be able to go to the Service screen and verify that the service has not started. Running a Virtual MachineThe concept behind a virtual machine is to have multiple operating systems running on one piece of hardware. It is extremely useful for program developers who wish to test their application’s compatibility on several different platforms. The switch can be done at a click of a mouse. In this way it’s also helpful for the PLC programmer to have individual workspaces for each program so that they are not affected by the other. It’s like having two computers just virtually. It also allows for working in other older operating systems so that legacy software can still be used (as long as the hardware is supported). One downside is that since the hardware is the same the RAM has to be divided between the different virtual machines. If you don’t have enough memory then it can be a drain on resources. A rule of thumb is to have double the amount of memory you think you’ll need.
The leading front runners for virtual machine software are Microsoft’s Virtual PC and VMware’s Workstation. Honestly I’ve never used this type of software but from the reviews and forum comments VMware has the most stable and usable software. It’s tempting to try Virtual PC since it is now free but there have been some complaints about Siemens licensing and communications issues. I haven’t seen anybody complaining about VMware. A new version of Virtual PC is scheduled to come out with the release of Windows Vista. So the battle will rage on to our benefit. ConclusionThis article has discussed three ways to alleviate problems and boost performance. First you identify the services associated with each program. The quickest and easiest way to stop and start these services is with a batch file. Another effective way is to create hardware profiles so that you’re automatically asked on Windows startup. Finally, running a virtual machine like VMware is a popular option. Not everybody has problems but if you do we hope one of these methods has solved the problem. Let us know if it has as we’d love to have some real world examples. ( categories: )
|