Tech Tips

Home / Tech Tips

Here at Avanceon, we’ve been developing solutions for our customers for a long time. And in the process, we’ve run into – and solved – many “interesting” technical challenges. We’ll share some of the more generally applicable ones on this page: after all, if we already have a solution, why should you have to develop your own?


Configuring Systems RS Emulator to run on a separate remote server

Full Info
Improving performance of a development environment when using Rockwell Studio 5000 Emulator and a separate computer for development.
When developing and testing a large system in a virtual environment, performance can be improved by running the emulator on a separate VM from the programming software.
Performance improvement is sometimes complicated by a lack of Ethernet support in the emulator environment when configured in RSLinx as a virtual bus. In this case, we needed to use RSLinx on the same virtual machine (VM) that hosted a WonderWare application server and its OPC client. This would also apply to using RSLinx on a separate computer to bring various hardware related industrial protocols that could be used in a virtualized environment into RSLinx, but that had no access to that hardware. For example, DH+ using PCMK cards. This is accomplished by using RSLinx configured as a gateway between two PCs / VMs.
In this case, we used:
• Rockwell Studio 5000 Emulator (on PC1)
• RSLinx Classic Gateway 3.70.00 (on PC1 and PC2)
• RSLogix 5000 – (on PC2)
Other software supported was:
• WW System Platform OPC (on PC2)
Use RSLinx as a Gateway between two computers to avoid developing on the computer running the PLC emulator. It is critical to update RSLinx to a current version due to EDS file incompatibilities between the emulators and RSLinx.
From the RSLinx Classic Gateway menus choose: Communications/Configure Gateway as in Figure 1, below.

Figure 1:RSLinx Classic Gateway Menu
Restart RSLinx after configuring it to act as a gateway (don’t just close it), as in Figure 2.

Figure 2. Enable Gateway
You should have already installed the Virtual Backplane adapter for the emulator, as represented in Figure 3. If not, look at the help in the emulator for configuring RSLinx. 

Figure 3. Virtual Backplane Adapter

The second PC should display a screen similar to the following:

Figure 4.2nd PC Display
You should be able to browse for the first PC and see it by computer name. The configured driver should appear in the remote driver name, as in Figure 5. 

Figure 5. Remote Driver Name

If your controller appears with a question mark indicating an unrecognized device, make sure to update RSLinx. 


Full Info
Turning off the Windows Firewall under Symantec Endpoint Protection.
Sometimes, various network tools (I’m looking at you, BootP) do not work well with the Firewall on your PC, so you need to temporarily disable it.
When using Symantec Endpoint Protection, it manages the Windows Firewall (See Figure 1). This means you can’t turn the firewall on/off via Windows. Disabling Symantec does not allow you to turn the firewall off, and, unfortunately, there is no way to see this.

Figure 1. Symantec Screen for Windows Firewall

Boot the computer in Safe Mode; this does disable Symantec and allows you to turn off the firewall via the Windows Control Panel.
Restart the computer normally and the Rockwell BootP utility will work properly. Restart again to turn the Firewall back on, as Symantec prevents you from doing it via Windows. 

Allen Bradley PowerFlex DC drive speed reference feedback scaling

Full Info
Issue: Allen Bradley PowerFlex DC drive speed reference feedback scaling
While attempting to control the speed of a PowerFlex 20P (DC drive) using a 20- Comm-E card, you may discover a scaling issue between the speed reference command you are sending to the drive and the speed command the drive itself is receiving. This is a known issue for PowerFlex 20P drives using 20-Comm-E cards.
The 20-Comm-E card still uses counts (-32767 to 32768), relative to the configured min/max RPM or Hz. We saw that while sending a speed reference to the 20-Comm-E card, a different commanded speed was being received by the drive. This becomes apparent when you look at the diagnostics on the 20-Comm-E card using the HIM on the drive; the counts sent to the drive were being scaled between the 20-Comm-E card and the drive.
To correct this, calculate the scaling error and use that to scale down the counts sent to the 20-Comm-E card. This in turn scales down the speed of drive to the desired result. In the field, we verified the result using a handheld tachometer.
You will also have to invert the scaling error and apply it to the speed feedback. This will ensure that the command/feedback engineering values are in sync.
Note: you can adjust the scaling using a parameter in the 20-Comm-E card, but it will only scale the speed command; it won’t scale the feedback. It makes more sense to handle this in the PLC and document it well.

Allen-Bradley Ethernet Module Loading

Full Info
Issue: Intermittent communications in Allen-Bradley Ethernet Module Loading
While using a 1756-ENBT module in an application with MSG instructions to/from 20 PLCs, plus HMI traffic, some instructions failed and sometimes the HMI screens froze. The occurrence of these incidents varied between once every 2-3 weeks and several times a day.
By checking the CPU usage on the on-board ENBT processor (not the PLC processor), which is available via the ENBT module’s web page with a 15-second refresh, we determined there were brief (less than 15 second) periods in which the CPU usage would spike from a steady state of 40% to a full 100%. These spikes directly corresponded to the outages. However, raising the Processor Timeslice, slowing down the HMI refresh, slowing the message instructions, and replacing the ENBT all had no effect on the frequency or duration of the spikes.
We found that even though the ENBT was operating within its designed range, it was unable to keep up with traffic demands. Replacing the ENBT module with an EN2TR, which has double the bandwidth and supports 128 connections, has solved the problem. CPU usage is now a steady 10%, and no spikes have been observed.

Making RSLogix5000 behave

Full Info
Attempting to import routines to a Logix5000 PLC results in a crash of Logix 5000.
From Windows, press CTRL-SHIFT while double clicking on the ACD file you wish to open. Keep the keys pressed until the program is fully opened. This will reset the Logix5000 Registry values back to their defaults and clear out any incorrect entries. You may also find that Logix 5000 opens faster.

SQL Syntax Help

Full Info
Issue: Remembering SQL Syntax
It is sometimes difficult to remember the complex syntax of SQL statements.
Use the Template Explorer feature in SQL Server Management Studio.
To access the tool, go to the View menu and choose Template Explorer

Figure 1. Template Explorer Window

This opens up a window with categories for everything that can be created or modified in a SQL Server environment.
Make sure to expand the “Earlier versions” tree, as it includes most of the tool’s basic features.

Figure 2. Template Explorer with “Earlier Versions” Tree opened

Drag and drop what you want into your query window. Be aware, however, that the text contains placeholders. For example, see the Template Explorer generated “DECLARE (cursor_name, sysname, test_cursor) statement. To correct this, see below:

Figure 3. Copied text, uncorrected

To replace the placeholder text, press Ctrl+Shift+M, which will prompt you to replace the placeholder text with your entries. See Figure 4.

Figure 4. Replacing Template text

The net result will appear similar to Figure 5:

Figure 5. Placeholders removed with valid statements

Note: that the default entries from Figure 3 have been replaced with the values entered in Figure 4.

PID Tuning for ControlLogix Conversions

Full Info
Is it necessary to retune all PID loops after a PLC conversion from PLC5 to ControlLogix?
Provided that the PLC5 loops are triggered from a timer DN bit with a preset equal to the Loop Update Time, the loops do not need to be re-tuned. 
If the loops are called unconditionally, then the difference in scan time from the PLC5 to the ControlLogix will necessitate re-tuning of the loops. For example, if the CLX scan time is 4x faster than the PLC5, and the PID loop is not triggered from a timer, then the KI and KD must be adjusted (slowed) by a factor of four in order to provide the same response observed in the PLC5. KP remains unchanged. 
In either case, there is one required change in order to make the loop operate correctly:
The Output (CV) range of the CLX loop defaults to a range of 0 – 100, which is not consistent with the PLC5 range of 0 – 4095. Therefore, the CV range must be changed to 0 – 4095 (see Figure 1). 

Figure 1. PID Setup

This process was verified by testing with a PLC5 program converted to ControlLogix. The code was run in physical PLCs in order to eliminate timing issues introduced by Emulation software. Simulation code was added in order to provide PV response to the loop’s output modulation. The testers compared response of a flow control loop to a setpoint change from 300gpm to 400gpm. 
As seen in figures 2 and 3, the response of the loop to a setpoint change from 300gpm to 400gpm is the same in both PLC5 and ControlLogix, with a rapidly decaying overshoot and a return to stability after approximately 2 minutes.

Figure 2. Tune Compare 1


Figure 3. Tune Compare 2

Provided that the PLC5 loop is programmed using the triggering timer and associated Loop Update time as shown in Figure 4, no re-tuning is needed. The only edits needed are as shown in the ‘required changes’ section above. 

Figure 4. Loop Update Time


Avanceon is happy to offer these suggestions for resolving common issues. Note that since every installation is different, they may not address or be appropriate for your particular situation. We know they’ve worked for us – but use them at your own risk.