Top Ten Considerations For Devicewise Configurations
Top Ten Considerations For Devicewise Configurations
Introduction
When configuring deviceWISE for a specific application, customers have encountered
challenges where they required additional information. This document provides a look at
ILS Technologys best practices and recommendations to avoid common issues customers
encounter while configuring applications using deviceWISE.
1. How do you define a transport to a specific Microsoft SQL Server database instance?
When configuring a deviceWISE SQLServer transport for an instance other than the default
instance, you may encounter issues like failure to validate the transport. The exception log
will indicate the following error:
Login failed for user 'xxxxx'.
This error is due to the deviceWISE transport attempting to connect to the default instance
rather than the specific instance, and the userid is not configured on that specific instance.
If the SQLServer instance is configured to listen on a dynamic port then you might see the
following error in the exception log instead.
Connect timed out. Verify the connection properties; check that an instance of SQL
Server is running on the host and accepting TCP/IP connections at the port, and that
no firewall is blocking TCP connections to the port.
To correct this issue, follow these steps to make sure that you have configured the
transport definition correctly.
(1) Verify that SQLServer is configured for mixed mode authentication. ( NOTE: This step is not
Figure 1
1
required for deviceWISE Enterprise on Windows ) To verify, launch the SQLServer Management
Studio and go the Server Properties as shown in Figure 1.
On the Properties screen make sure that Server Authentication has been set to SQL Server and
Windows Authentication as shown in Figure 2.
Figure 2.
(2) Determine the port number that the SQLServer Instance is listening on, and make sure that the
instance is listening on a static port.
(a) Connect to the Instance using SQLServerManagementStudio .
(b) Run the following command as shown in Figure 3. Look for the Server is listening on entry.
This gives you the port number that the instance is listening on.
Figure 3
2
Figure 4.
(c) Select TCP/IP properties as shown in Figure 5. You can modify the IPAll configuration to
specify a static port 1433 as shown.
Figure 5.
You could also configure the instance to listen on static port on all network interfaces [0.0.0.0]
as shown in Figure 6. Make sure you blank out the TCP Dynamic Ports field.
Figure 6.
(4) Configure the deviceWISE SQLServer Transport Definition with the specific port number, as
shown in Figure 7.
Figure 7.
Also specify the instance Name in the extended attributes panel as shown in Figure 8.
Figure 8.
Additional Reference Information
http://support.microsoft.com/kb/823938
Figure 9
The second step is to configure the listener map. The listener map defines the message that
will be received by the listener. In the example in Figure 10, the listener map is expecting
four parameters: a string, an integer, the float and a timestamp. When a message is
received from one of the four IP addresses defined in the listener, and it calls the
TestTCPListener listener map with its four parameters, it will process the trigger set up for
that message.
Figure 10
The message for this listener map would look like the following:
One of the key parameters is the first. The message is required to start with the name of
the listener map it is calling. Following the listener map name are the input parameters
defined in the listener map, separated by the delimiter defined in the listener configuration
and terminated with the termination character, also in the listener configuration.
The final step is to define a trigger to fire on receipt of the TCP message. For this trigger,
the event will be a listener event, and the corresponding listener map is selected to define
the message to be received. Once these are selected, the message parameters will appear
as event variables, and can be used in the trigger for processing the data. Figure 11 gives an
example of a listener trigger.
Figure 11
3. How do I get a consistent and valid indicator that my database select transaction has
successfully completed?
In deviceWISE, the default pattern is to map all information from an SQL request to a
register in the PLC. However, the order of this mapping is not deterministic. The following
data is usually returned from an SQL query:
1) Status of query-- "result status" INT4
2) Number of rows -- "row count" INT4
3) Block of result data -- "data"
In the case of the PLC logic, the ladder may be looking for the "status of query" to change to
trigger the next activity with the data. However, the problem is that that "status" may be
written before the data is written. Then the PLC logic could start to operate on data
registers which have not yet been updated.
To solve the problem, add one step in the trigger definition. When mapping the query
results, do not map all items directly to the PLC. Instead, map the "data" directly to the PLC
and map the "result status" and "row count" to local variables in deviceWISE as INT4.
Perform the following steps in the trigger to ensure deterministic interlock of data to the
PLC:
1) Map row data to PLC, but map the returned status and row count to local variables
2) Add action "device commit" to flush the data to the PLC
3) Set the local variables to the PLC: "status" and "row count"
3) Add another action "device commit" to flush the status and row count to the PLC.
The PLC program can now look for the "result Status" and "row count" and be guaranteed
that, if successful, the data is already present.
Figure 12
Make sure to check all the routing options, and for best practices, do not leave any with an
UNDEFINED path. The failure path provides a means for handling errors in your triggers.
It is a good practice to develop error handling actions to reduce troubleshooting time if a
trigger fails. The minimum is to assign failure paths to the ENDERR path, if no other error
handling is required. This is shown in Figure 13.
Figure 13
6. How do I fix invalid licenses for deviceWISE Embedded for the ERPC?
This is a common problem for all deviceWISE Embedded for ERPC customers. The primary
cause for this problem is the clock is not set in the CP. The license processing on
deviceWISE is based on the date and time in the CP. The CP does not have a clock that is
battery backed up. When the CP is powered off, the clock stops. There are two ways to get
the correct time in the CP, and they are both controlled by Step7. The ERPC needs to be
configured to source the time & date from a company time keeper. Usually NTP is used, but
Siemens has another method, called SIMATIC TIME. In either case the date and time needs
to be set or licenses will not work.
10
1. Add a MESSAGE structure to the global tag space. It can be named anything you want.
Add a rung of a ladder to send the message instruction.
2. Configure the message instruction by clicking the button. You will see a dialog box
similar to Figure 14:
Figure 14
Here are some notes on the important parameters of the above configuration panel:
3. Next go to the Communication tab in the configuration panel. It will look like Figure 15:
11
Figure 15
4. The Path should be set to the proper path to reach the deviceWISE node that contains
the trigger to execute. In general, the path will be first to the Ethernet module in the rack,
then 2 (for Ethernet), and the IP address of the deviceWISE node. For example:
LocalENB, 2, 192.168.5.243
Where: LocalENB: is the name assigned to the Ethernet module in the PLC rack. 2: indicates
that the next path is an Ethernet route. 192.168.5.243: is the IP address of the deviceWISE
node. Refer to your RSLogix 5000 documentation for more information.
12
Figure 16
Unsolicited Logix Listener trigger
To define a trigger that executes when a Rockwell Logix unsolicited message is sent, select
the Rockwell (CIP) Trigger Event Type and then set the Trigger Definition fields in Figure 17:
Figure 17
13
8. What are some rules of thumb regarding capacity planning and tuning?
What commonly occurs when a new user configures deviceWISE for the first time is they
configure triggers at fast rate, which they may not need. The result is the communications
method becomes unnecessarily busy. There are two parameters to focus on for capacity:
CPU usage and memory usage.
A good rule of thumb for CPU usage is during steady state of operation, the CPU should not
exceed 60%. This will allow capacity for processing spikes, store and forward recovery, and
other CPU intensive operations. A good rule for memory usage is to keep it below 90%.
Anything over 95 % is dangerous. Memory usage is a function of how many items are
defined and started in the system. The items include devices, triggers, local variables,
transports, transport maps, listeners, listener maps and others.
In systems where the communication speed is critical and the application is transactional,
try using the FB56 unsolicited instruction.
14