Sunteți pe pagina 1din 3

31003 - RSView SE and RSLinx Classic Alias Topic Switching 'On Command' Page 1 of 3

RSView SE and RSLinx Classic Alias Topic Switching 'On Command'


31003 | Date Created: 02/08/2005 | Last Updated: 01/10/2018
Print
Access Level: TechConnect

Overview:
This tech note covers an example of Alias Topic Switching 'On Command' using RSLinx Classic and
RSView SE and possible problems and error messages when implementing other approaches to do the
same.

Equipment Used:
2 ControlLogix processors (f/w 12.29)
Computer with RSView SE V3.1 and RSLinx Classic V2.42 installed

Create and Run The Application:


In RSLinx, create an alias topic called "path_se" which contains two OPC topics "path_ControlLogix1"
and "path _ControlLogix2". The processor ControlLogix1 is pointed to by the OPC topic
"path_ControlLogix1" and the processor ControlLogix2 is pointed to by the OPC topic
"path_ControlLogix2". In the alias topic configuration screen, check the checkbox "switch on
command".
In each ControlLogix processor, define a string variable called "destination_name". The value of this
string variable for processor ControlLogix1 is "ControlLogix1" and the value of this variable for
processor ControlLogix2 is "ControlLogix2".
In SE Studio, create a distributed SE application that contains an area folder called "area1". In the
"area1" folder create an hmi server called "hmi_server" and a data server called "RSLinx_classic".
In the SE application, create 3 hmi tags:
"active_alias_computer" - which is a device string tag with the address (without the quotes) - "/area1::
[path_se]destination_name"
"switch_topic_string" - which is a device string tag with the address (without the quotes) - "/area1::
[path_se]@switchtopic()"
"memory_tag" - which is a memory string tag with no initial value
In the SE application, create a display screen that contains two objects:
a string display to display the hmi string tag "active_alias_computer"
a command button that contains the 'release' action (without the quotes) - "memory_tag = /area1::
[path_se]@switchtopic()"
Display the SE screen in an SE client, or test run mode in Studio. When the command button is
pressed, the OPC topic will be switched 'on command' to the other OPC topic. This can be verified by
the contents of the string display on the display screen. When the "path_ControlLogix1" OPC topic is
being used, the string display will show "ControlLogix1". When the "path_ControlLogix2" OPC topic is
being used, the string display will show "ControlLogix2".

Alternate Method:
A different command may be used on the command button for the 'release action' - "memory_tag = {::

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/31003 10/12/2018
31003 - RSView SE and RSLinx Classic Alias Topic Switching 'On Command' Page 2 of 3

[path_se]@switchtopic()}". This forces looking for the item directly from the dataserver using the alias
topic "path_se".

Problems Seen With Other Approaches:


Invalid Syntax Example #1 - If the command button's 'release' action is changed (by removing "/" from
the command, which removes looking for the item starting in the root folder of the SE application) to
"memory_tag = area1::[path_se]@switchtopic()", the following error messages appears:
Invalid expression: 'area1::[path_se]@switchtopic()': Reason: Error at line 1, column 30:
Unexpected characters at end of expression

Invalid Syntax Example #2 - If the command button's 'release' action is changed (by removing "area1"
from the command, which forces looking for the item in just the root '/' of the SE application, rather than
the 'area1' folder) to "memory_tag = /::[path_se]@switchtopic()", the following error message appears:
The item '/::[path_se]@switchtopic()' does not exist on any server
The tag '/::[path_se]@switchtopic()' has not been activated

Invalid Syntax Example #3 - If the command button's 'release' action is changed (by removing
"/area1" from the command) to "memory_tag = ::[path_se]@switchtopic()", the following error
messages appears:
Invalid expression: '::[path_se]@switchtopic()': Reason: Error at line 1, column 2: Invalid
character in expression

Invalid Syntax Example #4 - If the command button's 'release' action is changed (by removing
"/area1::" from the command) to "memory_tag = [path_se]@switchtopic()", the following error
messages appears:
Invalid expression: '[path_se]@switchtopic()': Reason: Error at line 1, column 2: Invalid
character in expression

Valid Syntax (Set HMI Tag to HMI Tag Approach) - If a device string tag (called "device_tag") with
the address "[path_se]@switchtopic()" or with the address "/area1::[path_se]@switchtopic()" (both of
which are valid syntax addresses) is created in the SE application, and the command issued on the
command button is changed to "memory_tag = device_tag", then when the button is pressed more than
once, the OPC topic will only switch once and never again.

DISCLAIMER
This knowledge base web site is intended to provide general technical information on a particular
subject or subjects and is not an exhaustive treatment of such subjects. Accordingly, the information in
this web site is not intended to constitute application, design, software or other professional engineering
advice or services. Before making any decision or taking any action, which might affect your equipment,
you should consult a qualified professional advisor.

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/31003 10/12/2018
31003 - RSView SE and RSLinx Classic Alias Topic Switching 'On Command' Page 3 of 3

ROCKWELL AUTOMATION DOES NOT WARRANT THE COMPLETENESS, TIMELINESS OR


ACCURACY OF ANY OF THE DATA CONTAINED IN THIS WEB SITE AND MAY MAKE CHANGES
THERETO AT ANY TIME IN ITS SOLE DISCRETION WITHOUT NOTICE. FURTHER, ALL
INFORMATION CONVEYED HEREBY IS PROVIDED TO USERS "AS IS." IN NO EVENT SHALL
ROCKWELL BE LIABLE FOR ANY DAMAGES OF ANY KIND INCLUDING DIRECT, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, LOSS PROFIT OR DAMAGE, EVEN IF ROCKWELL
AUTOMATION HAVE BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGES.

ROCKWELL AUTOMATION DISCLAIMS ALL WARRANTIES WHETHER EXPRESSED OR IMPLIED


IN RESPECT OF THE INFORMATION (INCLUDING SOFTWARE) PROVIDED HEREBY, INCLUDING
THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY,
AND NON-INFRINGEMENT. Note that certain jurisdictions do not countenance the exclusion of implied
warranties; thus, this disclaimer may not apply to you.

This page is best viewed in Internet Explorer 11, Edge, Firefox 41, Chrome 46, Safari 9 or newer.

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/31003 10/12/2018

S-ar putea să vă placă și