Rockwell Automation 9220-TG User Manual

Quick Start
   
(Catalog
Number 9220-TG)
About this Document
Use this document to install and use the ControlNetmessage/traffic generator tool.
This tool was designed for engineers and developers familiar with network installation and troubleshooting. To use this tool efficiently, you should be familiar with ControlNet protocols.
We use these conventions in this document:
Convention Shows
pt Courier
9
pt Courier bold
9
9
pt Courier italic
Enter
For this information See page
introduction to the tool 2 system requirements 3 installing the tool 4 initializing the tool 6 using the tool 7
Screen displays and prompts Text you type as shown at the DOS prompt Text you type specific to your setup at the DOS prompt
Keys that you press
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool2
Introducing the Tool
Use this tool to:
construct, edit, and send data packets and messages on a
ControlNet network Using this tool, you can:
open connections to different objects and send predefined
messages, data byte(s), or packet(s) individually or in a sequence.
construct, edit and send data packets and messages. These edited
data packets and messages can be saved to and retrieved from files. Once you have saved data in a file, you can use function keys to send predefined packets or messages into the network one by one. You can also use the play option to send all the data saved in a file, at once.
If you want to view the messages or data packets being sent on
the network, use the Contr
olNet Traffic Analyzer tool (9220-TA).
assist in the designing and debugging of ControlNet products
Use this table to become familiar with some of the tool’s terms.
Term Refers
CNXOR.CFG the configuration file the tool utilizes to initialize itself PIT packets any data bytes, patterns, or messages
MAC ID a node’s address on the network SMAC
Publication
9220-10.1 — July 1996
to
network update time; repetitive time interval in which data can be sent on the ControlNet network
the ControlNet Media Access Control interface circuitry used to send and receive data on an ControlNet network.
ControlNet Message/Traffic Generator Tool 3
System Requirements
microprocessor 486 33 Mhz PC AT or higher operating system MS-DOS 3.3 or higher memory 4 MB or higher hard disk space
video adapter and monitor
diskette drive one 3.5” high-density diskette drive ISA/EISA bus
communication interface pointing device Microsoft Mouse or compatible
The
amount of hard disk space determines how much data you can store to disk files.
Important: The CONFIG.SYS file must, at least, contain the lines
files
8 MB VGA or high-resolution
super VGA display (800 x 600) minimum: VGA card and a display capable of 640x480 VGA
ControlNet 9220-KTCT test card
= 15
and buffers
= 20
.
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool4
Installing the Tool
1. Insert the tool disk into your computer’s 3.5” disk drive.
2. Create a directory on your hard drive for the tool:
mkdir
tg
Enter
The tg directory is used in TG.BAT. If you create a different directory for the tool, you need to edit the cnxpath in TG.BAT
(set CNXP
ATH=c:\new_directory). The path sets a DOS environment
variable to instruct the tool where to look for CNXOR.CFG. This gives you flexibility in placing the file and lets you load multiple files, in different directories.
3. Change to that directory:
tg
cd
Enter
4. Copy the contents of the tool disk to the directory you created:
copy
A:*.*
Enter
5. Start the tool:
tg
Enter
You
see:
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 5
and the current status of the tool:
6. Click with your right mouse button in the Current Status window to
close it.
To navigate through the tool, use your left mouse button to access
drop-down menus, cascading menus, and dialog boxes, and your right mouse button to close them.
dialog box
drop-down menu
cascading menu
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool6
Configuring the Tool
From the Setup drop-down menu, you can set these configuration options:
      
This option Is used to
Simulation
Online set the tool online in the ControlNet network and set the 9220-KTCT card
Offline take the tool and 9220-KTCT offline from the ControlNet network.
Port Number select which 9220-KTCT card will be used. This parameter specifies the
Mac ID
Target Mac ID set the target node’s network address. This address should be the node
CN Parameters set the Network Update Time (NUT), in milliseconds.
The
tool selects a default value based on the configuration file at start-up.
display the tool’s menus and capabilities without actually communicating with a node on the network. While in this mode, the tool does not interface with the 9220-KTCT card.
in an online mode. The 9220-KTCT card waits for a moderator message to go online. Once the 9220-KTCT card is online, the tool acquires the current network parameters and is configured to them.
This is the default setting for the 9220-KTCT card and the tool.
port that the card is installed in (0–3). You can install as many as four 9220-KTCT cards in one PC.
set the network address of the 9220-KTCT card.
you want to communicate with (i.e., get attributes from, open connections to, and send messages to, etc.).
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 7
Using the Tool
This figure shows the functional blocks for navigation through the tool, with each block representing a single window.
Main Menu
Status Display
Send Unconnected Messages
Traffic Generator
For information on See page
changing the network update time changing the port number of the 9220-KTCT card 8 changing the MAC ID of the 9220-KTCT card 9 viewing the tool’s current status 9 sending a message to a target node 10 sending an unconnected message 13 closing a connection 14 using the traffic generator 15 taking the card offline 18 exiting the tool 18 editing the tool’s configuration file 19
Open Connections
8
Send Connected Messages
Data RepeaterData PatternsData Bytes
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool8
Changing the Network Update Time
From Setup, choose CN Parameters, and choose a time in milliseconds.
Changing the Port Number of the 9220-KTCT Card
From Setup, choose Port Number, and set the port number equal to the port of 9220-KTCT card you are using (0–3).
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 9
Changing the MAC ID of the 9220-KTCT Card
From Setup, choose MAC ID, and set the network address of the 9220-KTCT card (0–99).
Viewing the Current Status of the Tool
To view the current status of the tool, choose Status. This displays a status window showing the current state of the traffic generator with respect to the ControlNet network, the status of any open connections, the Port Number, and the source and target MAC IDs.
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool10
Sending a Message to a Target Node
1. Select the node you want to communicate with.
From Setup, choose Target MAC ID.
Click the arrows to select the network address of the target node.
2. Go online to the ControlNet network.
From Setup, choose Online.
Publication
Resetting KTCT Card..
Enabling Network Events..
Soft
Resetting KTCT Card..
Transitioning to Online..
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 11
3. Open a connection.
From Connections, choose Open Connection and then choose the type of connection you want to open.
Connections and connection parameters (e.g., Expected Packet
"
Rate and Connection Size) are defined in CNXOR.CFG. The connections ar
e used to open defined objects and instances for the target node. You can edit this file as necessary for your application.
A.
CBT = cyclic block transfer BT = block transfer
B.
C.
4. Send the message to the target node.
To Choose
send a message Connected, Send Message send and monitor a message Connected, Send/Monitor Messg. monitor the connection Connected, Monitor Connection
Publication
As shown on page 12, in
  
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool12
The list of connected messages displayed is based on active
"
open connections.
displays...
then...
Important: If
Publication
9220-10.1 — July 1996
you did not open a connection (see step 3), you see:
ControlNet Message/Traffic Generator Tool 13
Sending
Y
ou can send unconnected messages to:
Unconnected Messages
send predefined unconnected messages
get attribute information on an object
reset a device
Sending Predefined Unconnected Messages To send an unconnected message, choose Unconnected, Send Message, and choose the message you want to send.
To
set the target nodes in the Listen Only mode CNet Listen Only send Keeper type messages when not in an operating network Keeper 5ms, 15, 16 obtain loose parameters information Keeper Loose Params obtain the pending parameters CNet Get Pending obtain the current parameters CNet Get Current obtain diagnostic information CNet Get Diags
These
messages are defined in the tool’
s configuration file, CNXOR.CFG.
Choose this message
Getting Attribute Information To send an unconnected message to get attribute information, choose Unconnected, Get Attr All, and choose the object you want attributes on.
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool14
Resetting a Device To reset a device, choose Unconnected, Reset, and choose the object you want to reset.
Closing a Connection
To close a connection, choose Connections, Close Connection and choose the connection you want to close from the list of open connections.
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 15
Using the Traffic Generator
The traffic generator provides an editing window for constructing data packets (bytes, patterns and messages). The bottom portion of the editing window lists the main commands to use.
1. To access the traffic generator, choose Build, Traffic Generator.
Y
ou see:
From this window, you can construct your data packets (bytes, patterns, and messages).
Important: If you see this error, you need to go online.
See step 2, on page 10.
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool16
a function key
a function key
2. Use the traffic generator to construct and send messages.
To You Shown in
view the traffic generator’s options construct and send a message
assign a set of data packets to
load a saved function-key-assignment file
save current function-key assignments to a file
log all key strokes into a file, for later playback
play a file (send predefined messages on the network)
À
A
filename must not exceed 8 characters in length.
Á
A
predefined-message file,
Á
PLAYSOME
Type help Type the message enclosed in <>.
<
xx
xx xx xx
a. press a function key
F1 F10
b. type in the message parameters
load
filename
save
filename
log
filename
play
filename
is shipped on the traffic generator disk. See page 17.
>
to
À
À
À
À
not shown
not shown
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 17
A file on the traffic generator disk (PLAYSOME) contains
"
predefined messages you can send on your ControlNet link. Using your DOS editor
, you can edit these messages as necessary
Publication
.
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool18
Running a Separate DOS Program
To run a separate DOS program from
the Modules drop-down menu
the DOS prompt
You
edit CNXOR.CFG to define your tests. These tests then appear in the cascading menu that lists the tests. See the figure below and page 29.
a. choose File, DOS Shell b. run the program:
Taking the Card Offline
From Setup, Choose Offline.
program.exe
Exiting the Tool
To Choose
exit to a DOS prompt for viewing and editing configuration files (e.g., CNXOR.CFG)
exit the program and take the card offline without closing open connections
Publication
9220-10.1 — July 1996
File, DOS Shell
File, Exit
ControlNet Message/Traffic Generator Tool 19
Editing the Tool’s Configuration File
This tool’s functionality is defined in its configuration file, CNXOR.CFG. This ASCII file is read, as necessary, as the tool executes. In this file, information is defined through a set of keywords, called Resources, that configure the menus and provide the data to be used. A resource consists of: keyword.name.resource: value
This part Is
a predefined identifier the traffic generator searches to know what to do.
keyword
Defined keyword CN ControlNet specific setup parameters Object ASA objects used by the target device Connection ASA connections used by the target device Message ASA messages that can be sent to the objects Module a module that has tests associated with it Test a test associated with a module a user-provided identifier that groups a set of resources together. The name:
Defines
must be an alphanumeric string
name
cannot contain a colon
cannot contain any spaces
is case sensitive
resource a predefined name data item. value
the data to be used by the tool. This data is a numeric value, a data byte string, or an ASCII string, depending on the resource being defined.
When editing CNXOR.CFG, remember that:
white spaces, blank lines and tabs are used as separators and
are ignored
if a resource value is long, the resource can be extended to the next
line by placing a \ character as the last character on the line
the tool’s search function is case sensitive—be sure to observe the
exact case of the resource as you define it or the tool will not find your definition in CNXOR.CFG
you can add comments to CNXOR.CFG using the # character—
place them at the beginning of a line, or at the end of a line as the beginning character of the comment
comments (#) cannot be placed on a line that is defining a string of
characters or data bytes
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool20
The following table lists the parameters specified in CNXOR.CFG.
ControlNet Setup Parameters
This resource
CN.name:
CN.___.title:
CN.___.originatorPortNum:
CN.___.originatorMacId: CN.___.targetMacId:
CN.___.pit_time: CN.___.smax: CN.___.umax: CN.___.slot_time: CN.___.blank_time: CN.___.gb_start: CN.___.gb_center: CN.___.redundancy: CN.___.sched_max_frame: CN.___.int_cnt_mod: CN.___.gb_prestart: CN.___.mcycle_start: CN.___.mcycle_length: CN.___.mcycle_count: CN.___.mcycle_multiplier:
Description
Provides a list of ControlNet setup names to be included in the SETUP>CN PARAMETERS cascading menu. These names are shown in the menu unless a CN.___.title resource is provided for each name. The default parameters, if present, will be loaded automatically upon startup of the program.
CN.name: default setup2ms setup5ms
Provides a title to be displayed in the SETUP>CN PARAMETERS cascading menu. If it is not provided, the name will be displayed.
CN.default.title: Default CN.setup2ms.title: Worst Case PIT CN.setup5ms.title: Normal PIT
Specifies the 9220-KTCT card to use for the setup. Valid port numbers: 0–3.
CN.setup2ms.originatorPortNum: 0
Specifies the network addresses (MAC IDs) of the originator (9220-KTCT) and target devices. Valid address: 0– 99.
CN.default.originatorMacId: 1 CN.default.targetMacId: 2
These parameters make up the ControlNet Object Attribute to send to the 9220-KTCT’s ControlNet Object. For definitions and information on range of values, see the
ControlNet Network Product Developer’s Guide
,
PN 955121-04.
CN.default.pit_time: 200 CN.default.smax: 5 CN.default.umax: 6 CN.default.slot_time: 21 CN.default.blank_time: 6 CN.default.gb_start: 12 CN.default.gb_center: 9 CN.default.redundancy: 3 CN.default.sched_max_frame: 255 CN.default.int_cnt_mod: 255 CN.default.gb_prestart: 15 CN.default.mcycle_start: 0 CN.default.mcycle_length: 0 CN.default.mcycle_count: 1 CN.default.mcycle_multiplier: 8
Publication
9220-10.1 — July 1996
Object Setup
This resource
Object.name:
Object.___.title:
Object.___.number:
Object.
.max_instance:
Connection Setup
This resource
Connection.name:
Connection.___.title:
Connection.___.max_instance:
ControlNet Message/Traffic Generator Tool 21
Description
Provides a list of Object names for use in the Unconnected>Send Message, Get Attr All and Reset cascading menus. These names are displayed unless an Object.___.title is provided for each name.
Object.name:
device mr rack
Provides a title to be displayed in the
Unconnected>Send Message
,
Get Attr All,
and Reset cascading menus. If a title s not provided, the name is displayed.
Object.device.title:
Device
Specifies the Object number for the Object.
Object.device.number:
1
Specifies the maximum instance supported by this Object. It is used to create the Instance cascading menu after an object is chosen.
Object.device.max_instance:
1
Description
Provides a list of Connection names for the
Unconnected>Open Connection and Close Connection cascading menus. These names
are displayed in the menu unless a Connection.___.title is provided for each name.
Connection.name:
cycbtr cycbtw
mr rackio rackin rackout
Provides a title to be displayed in the
Unconnected>Open Connection and Close Connection cascading menus. If this resource is not
provided, the name is displayed.
Connection.mr.title:
Message Router
Specifies the maximum instance supported by the Connection being made. It is used to create an instance cascading menu after a Connection has been chosen.
Connection.cycbtr.max_instance: 16
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool22
Connection Setup (continued)
This resource Description
Connection.___.timeout:
The UCMM timeout value used in an Open/Close Connection message to the target Object. This value is in hex.
Connection.mr.timeout: 0A
Connection.___.epr:
The Expected Packet Rate for the Connection being established, expressed in the form of a 16–bit scaled integer as described in the Connections in the ASA Product Developer’s Guide, cat. no. 9250-DOC. This value is in hex.
Connection.rackio.epr: 0E71
Connection.___.net_t_o: Connection.___.net_o_t:
Specify the Net_T_O and Net_O_T values in the Open message. These values are bit fields as described in the Connections in the ASA Product Developer’s Guide cat. no. 9250-DOC. These values are in hex.
Connection.rackio.net_t_o: 281A Connection.rackio.net_o_t: 480A
Connection.___.class:
Specifies the class number of the Object being connected to. This value is in hex.
Connection.mr.class: 02
Connection.___.transport:
Specifies the Transport Class/Trigger value for the Open message. The value is a bit field as described in the Connections in the ASA Product Developer’s Guide cat. no. 9250-DOC. This value is in hex.
Connection.mr.transport: A3
Connection.___.path:
Specifies the path segment to be attached to the end of the Open message. The path begins immediately following the instance segment of the Open and typically begins with the Connection point information. The path is sent byte for byte as specified. The data bytes are in hex.
Connection.rackio.path:
Connection.___.1stmsg:
Specifies a message to be sent on the Connection immediately after a successful Open has completed (optional). This makes sure the Connection does not timeout before you have a chance to send the first data on the Connection. The value must be a name of a message specified in Message.___.data.
Connection.rackio.1stmsg: rout1
(see Message Setup)
2c 02 2c 01 80 05 01 00 0c 00 18 00 01 01 02 00
,
,
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 23
Connection Setup (continued)
This resource Description
Message.___.list:
Provides a list of message names for the CONNECTED>SEND MESSAGE cascading menu. These message names will be associated with the Connection name specified. Once a Connection has been opened, these messages could be sent across that Connection. These names will be shown in the menu unless a Message.___.title is provided for each name.
Connection.name: rackio (see Connection Setup) Message.rackio.list: rout1 rout2 rout3 rout4
The name unconnected is reserved for messages to be sent unconnected.
Message.unconnected.list:
Provides a list of message names for the UNCONNECTED>SEND MESSAGE cascading menu. These names will be shown in the menu unless a Message.___.title is provided for each name.
Message.unconnected.list: reset gaa
Message.___.title:
Provides a title to be displayed in the
UNCONNECTED>SEND MESSAGE or CONNECTED>SEND MESSAGE cascading menus.
If this is not provided, the name will be displayed.
Message.rout1.title: Pattern AA55 Message.reset.title: Reset Message.gaa.title: Get Attributes All
Message.___.data:
The data associated with the message. For Unconnected messages, the data begins with the Unconnected Service Code and is sent byte for byte as specified. For Connected messages, the data begins with the byte immediately following the Transport header. The data bytes are in hex.
Message.rout1.data: 01 00 00 00 AA 55 AA 55 Message.reset.data: 05 02 20 01 24 01 Message.gaa.data: 01 02 20 01 24 01
Module.name:
Provides a list of module names to be included in the MODULES drop-down menu. This menu lists executable tests that can be launched. These names will be shown in the menu unless a Module.___.title is provided for each name.
Module.name: 1771acn 1785l40c
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool24
Connection Setup (continued)
This resource Description
Module.___.title:
Provides a title to be displayed in the MODULES drop-down menu. If this resource is not provided, the name will be displayed.
Module.1771acn.title: 1771–ACN/ACNR
Module.___.tests:
Specifies a list of tests for the desired module under the MODULES drop-down menu. These names will be shown in the menu unless a Test.___.title is provided for each name.
Module.1771acn.tests: ftp1 ftp2 ftp3 ftp4 ftp5 ftp6 ftp7 ftp8 ftp9 ftp10 ftp11 ftp12
Test.___.title:
Provides a title to be displayed under the MODULES drop-down menu or the desired module. If this resource is not provided, the name will be displayed.
Test.ftp1.title: UCMM Test
Test.___.file:
Specifies the name of a pair of files associated with the desired test. The program runs make with a make filename of value.mak file value.exe written using the traffic generator API library and executed from the user interface. Test.ftp1.file: acn_ucmm (this assumes acn_ucmm.mak and acn_ucmm.exe exist)
and then attempts to execute the
. This lets you build and execute programs
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 25
Example CNXOR.CFG File
########################## ## CN Setup Parameters ## ########################## ################################## # Define the CN Parameter Setups # CN.name: default setup2ms # # Describe the CN Setups # CN.default.title: Default CN.default.originatorPortNum: 0 CN.default.originatorMacId: 0 CN.default.targetMacId: 8 CN.default.pit_time: 200 CN.default.smax: 5 CN.default.umax: 6 CN.default.slot_time: 21 CN.default.blank_time: 6 CN.default.gb_start: 12 CN.default.gb_center: 9 CN.default.redundancy: 3 CN.default.sched_max_frame: 255 CN.default.int_cnt_mod: 255 CN.default.gb_prestart: 15 CN.default.mcycle_start: 0 CN.default.mcycle_length: 0 CN.default.mcycle_count: 1 CN.default.mcycle_multiplier: 0
CN.setup2ms.title: 2ms PIT CN.setup2ms.originatorPortNum: 0 CN.setup2ms.originatorMacId: 1 CN.setup2ms.targetMacId: 8 CN.setup2ms.pit_time: 200 CN.setup2ms.smax: 15 CN.setup2ms.umax: 16 CN.setup2ms.slot_time: 21 CN.setup2ms.blank_time: 6 CN.setup2ms.gb_start: 12 CN.setup2ms.gb_center: 9 CN.setup2ms.redundancy: 3 CN.setup2ms.sched_max_frame: 255 CN.setup2ms.int_cnt_mod: 255 CN.setup2ms.gb_prestart: 15 CN.setup2ms.mcycle_start: 0 CN.setup2ms.mcycle_length: 0 CN.setup2ms.mcycle_count: 1 CN.setup2ms.mcycle_multiplier: 0
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool26
Example CNXOR.CFG File (continued)
######################################## # Define the Objects we will be using. # Object.name: device cn mr rack # # Describe the Objects # Object.device.title: Device Object.device.number: 01 Object.device.max_instance: 1
Object.cn.title: CNet Object.cn.number: 65 Object.cn.max_instance: 1
Object.mr.title: Message Router Object.mr.number: 02 Object.mr.max_instance: 1
Object.rack.title: 1771 Rack Object.rack.number: 7c Object.rack.max_instance: 1
####################################################### # Define the Unconnected Messages we will be sending. # Message.unconnected.list: reset gaa # # Describe the Messages # Message.reset.title: Reset Message.reset.data: 05 02 20 01 24 01 Message.gaa.title: Get Attributes All Message.gaa.data: 01 02 20 01 24 01
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 27
Example CNXOR.CFG File (continued)
############################################ # Define the Connections we will be using. # Connection.name: mr rackio rackin rackout # # Describe the connections. # # default values for those not specified Connection.default.timeout: 0A Connection.default.epr: 0E71 # 5ms epr Connection.default.net_t_o: 0000 Connection.default.net_o_t: 0000 Connection.default.transport: 01
# Message Router parameters. Connection.mr.title: Message Router Connection.mr.max_instance: 1 Connection.mr.epr: 2BD0 # 1 second epr Connection.mr.net_t_o: 43ff Connection.mr.net_o_t: 43ff Connection.mr.transport: A3 Connection.mr.class: 02
# Input Rack parameters. Connection.rackin.title: Input Rack Connection.rackin.max_instance: 1 Connection.rackin.net_t_o: 281A Connection.rackin.class: 7C Connection.rackin.transport: 81 Connection.rackin.path: 2c 01 80 05 01 00 0c 00 18 00 01 01 02 00
# Output Rack parameters. Connection.rackout.title: Output Rack Connection.rackout.max_instance: 1 Connection.rackout.net_o_t: 4816 # 16 slot, single density Connection.rackout.class: 7C Connection.rackout.transport: 01 Connection.rackout.path: 2c 02 80 04 01 00 0c 00 18 00 01 01 Connection.rackout.1stmsg: rout1
# Output/Input Rack parameters. Connection.rackio.title: I/O Rack Connection.rackio.max_instance: 1 Connection.rackio.net_t_o: 281A
#Connection.rackio.net_o_t: 4816 # 16 slot, single density Connection.rackio.net_o_t: 480A # 4 slot, single density Connection.rackio.class: 7C Connection.rackio.transport: 01 Connection.rackio.path: Connection.rackio.1stmsg: rout1
2c
02 2c 01 80 05 01 00 0c 00 18 00 01 01 02 00
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool28
Example CNXOR.CFG File (continued)
############################################################### # Define Object Messages # Note: The message name for the list header must be the # same as that defined in the Connection.name object. # Message.rout1.title: Pattern 1 Message.rout1.data: 01 00 00 00 01 02 03 04
Message.rout2.title: Pattern 2 Message.rout2.data: 01 00 00 00 02 03 04 05
Message.rout3.title: Pattern 3 Message.rout3.data: 01 00 00 00 03 04 05 06
# # Rack Output Message List # Message.rackout.list:
# # Rack I/O Message List # Message.rackio.list:
rout1 rout2 rout3 rout4 rout5 rout6 rout7 rout8\
rout1
rout2 rout3 rout4 rout5 rout6 rout7 rout8 \
rout9 rout10 rout11
rout9
rout10 rout11
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 29
Example CNXOR.CFG File (continued)
########################################### # Define the modules with specific tests # Module.name: 1771acn Module.1771acn.title: 1771–ACN/ACNR Module.1771acn.tests: ftp1 ftp2 ftp3 ftp4 ftp5 ftp6 ftp7 ftp8\
Test.ftp1.title: UCMM Test Test.ftp1.file: acn_ucmm
Test.ftp2.title: MR Object Test Test.ftp2.file: acn_mr
Test.ftp3.title: CN Object Test Test.ftp3.file: acn_cn
Test.ftp4.title: Device Object Test Test.ftp4.file: acn_dev
Test.ftp5.title: Output Rack Test Test.ftp5.file: acn_rcko
Test.ftp6.title: Input Rack Test Test.ftp6.file: acn_rcki
Test.ftp7.title: Cyclic BT Read Test.ftp7.file: acn_cbtr
Test.ftp8.title: Cyclic BT Write Test.ftp8.file: acn_cbtw
Test.ftp9.title: Cyclic BT Status Test.ftp9.file: acn_cbts
Test.ftp10.title: Async BT Test Test.ftp10.file: acn_abt
ftp9 ftp10
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool30
Message/Traffic Generator API Functions
The following functions can be used to create executable test programs, for testing on a ControlNet network. Once created, these programs can be added to CNXOR.CFG so they can be accessed in the tool from the Modules pull-down menu.
Use this function To See page
MG_Env ( ) MG_Init ( )
MG_Cleanup ( ) clean up the message/traffic generator interface. 31 MG_LoadCNSetup ( ) load a ControlNet setup from CNXOR.CFG. 32
MG_Online ( )
MG_Offline ( ) MG_OpenConnection ( ) open a connection with the target device. 33
MG_CloseConnection ( ) close a previously opened connection. 33 MG_SendUnconnected ( ) send an unconnected user-supplied message. 33
MG_SendUnconnectedMsg ( )
MG_ReceiveUnconnected ( )
MG_SendConnected ( )
MG_ReceiveConnected ( )
MG_SendConnectedMsg ( )
MG_RegisterClass ( )
MG_UnregisterClass ( )
read the message/traffic generator environment variable and fill in the global configFile string.
initialize the message/traffic generator interface. 31
put the message/traffic generator in listen only mode until it receives a moderator type packet, then it goes online with the target, otherwise it remains in the listen only mode.
take the message/traffic generator offline with the target.
send an unconnected message from CNXOR.CFG.
receive an unconnected message from the UCMM.
send a user-supplied message on a connection previously opened with a call to
OpenConnection.
MG receive a message on a connection previously
opened with a call to MG OpenConnection. send a message from the config file on a
connection previously opened with a call to MG_OpenConnection.
register a class with the message router for receipt of the unsolicited messages.
unregister a class with the message router that was previously registered with
RegisterClass.
MG
31
32
32
34
34
34
35
35
36
36
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 31
/*****************************************************************\ **
** Name: MG_Env ( ) ** ** Description: ** This function reads the Message/Traffic Generator environment ** variable and fills in the global configFile string. ** ** Inputs: None ** ** Outputs: UINT status – SUCCESS ** – BAD_PARAMETER_VALUE ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_Init ( ) ** ** Description: ** This function initializes the Message/Traffic Generator ** interface. It must be the first MG_ API function called. ** ** Inputs: None ** ** Outputs: UINT status – SUCCESS ** – BAD_PARAMETER_VALUE ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_Cleanup ( ) ** ** Description: ** This function cleans up after the Message/Traffic Generator ** interface. It must be the last MG_ API function called. ** ** Inputs: None ** ** Outputs: None ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool32
/*****************************************************************\ **
** Name: MG_LoadCNSetup ( ) ** ** Description: ** This function loads a CNet setup from the configuration file. ** ** Inputs: USINT *setupName – Name of setup to load. ** ** Outputs: UINT status – SUCCESS ** – BAD_PARAMETER_VALUE ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_Online ( ) ** ** Description: ** This function puts the Message/Traffic Generator in Listen Only ** mode until it receives a Moderator type packet, where at that ** time will go On–line with the target, otherwise it will remain ** in Listen Only mode. ** ** Inputs: None ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_Offline ( ) ** ** Description: ** This function takes the Message/Traffic Generator offline with ** the target. ** ** Inputs: None ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 33
/*****************************************************************\ **
** Name: MG_OpenConnection ( ) ** ** Description: ** This function opens an ASA Connection with the target device. ** ** Inputs: UINT *connIndex – Pointer to connection index that ** will be filled in by the function. ** USINT *connName – Name of connection from. ** configuration file to be opened. ** UINT instance – Instance number of object to ** connect to. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_CloseConnection ( ) ** ** Description: ** This function closes a previously opened ASA Connection. ** ** Inputs: UINT connIndex – Connection index that was returned ** by the MG_OpenConnection function. ** ** Outputs: UINT status – SUCCESS ** – BAD_PARAMETER_VALUE ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_SendUnconnected ( ) ** ** Description: ** This function sends an unconnected ASA message provided by ** the user. ** ** Inputs: USINT *message – Message to be sent. ** UINT dataSize – Size, in bytes, of the ** message to be sent. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool34
/*****************************************************************\ **
** Name: MG_SendUnconnectedMsg ( ) ** ** Description: ** This function sends an unconnected ASA message from the ** configuration file. ** ** Inputs: USINT *message – Message to be sent. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_ReceiveUnconnected ( ) ** ** Description: ** This function receives an unconnected ASA message from the UCMM. ** ** Inputs: USINT *message – Pointer to where to put the ** received message. ** UINT *dataSize – Size, in bytes, of the ** message received. ** ** Outputs: UINT status – SUCCESS if message received ** – FAILURE if no message received ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_SendConnected ( ) ** ** Description: ** This function sends a user provided message on a Connection ** previously opened with a call to MG_OpenConnection. ** ** Inputs UINT connIndex – Connection index that was returned ** by the MG_OpenConnection function. ** USINT *message – Message to be sent. ** UINT dataSize – Size, in bytes, of the message to ** be sent. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool 35
/*****************************************************************\ **
** Name: MG_ReceiveConnected ( ) ** ** Description: ** This function receives a message on a Connection ** previously opened with a call to MG_OpenConnection. ** ** Inputs: UINT connIndex – Connection index that was ** returned by the MG_OpenConnection ** function. ** USINT *message – Pointer to buffer for message. ** UINT *dataSize – Size, in bytes, of the message ** received. ** ** Outputs: UINT status – SUCCESS if message was received. ** – FAILURE if no message was received. ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_SendConnectedMsg ( ) ** ** Description: ** This function sends a message from the configuration file on a ** Connection previously opened with a call to MG_OpenConnection. ** ** Inputs: UINT connIndex – Connection index that was returned ** by the MG_OpenConnection function. ** USINT *message – Message to be sent. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
Publication
9220-10.1 — July 1996
ControlNet Message/Traffic Generator Tool36
/*****************************************************************\ **
** Name: MG_RegisterClass ( ) ** ** Description: ** This function registers a class with the Message Router ** for receipt of the unsolicited messages. ** ** Inputs: USINT class – ASA class to be registered. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
/*****************************************************************\ **
** Name: MG_UnregisterClass ( ) ** ** Description: ** This function unregisters a class with the Message Router ** that was previously registered with MG_RegisterClass. ** ** Inputs: USINT class – ASA class to be unregistered. ** ** Outputs: UINT status – SUCCESS ** ** Copyright (c) 1995, ‘96 Allen–Bradley Company ** \*****************************************************************/
ControlNet is a trademark of Allen-Bradley Company, Inc.
Worldwide representation.
Argentina • Colombia • Costa Rica • Croatia • Cyprus • Czech Republic • Denmark • Ecuador • Egypt • El Salvador Finland • France • Germany • Greece • Guatemala • Honduras • Hong Kong • Hungary • Iceland • India Indonesia • Mexico • Netherlands Puerto Rico • Qatar • Romania • Russia–CIS • Saudi Arabia • Singapore • Slovakia • Slovenia • South Africa, Republic • Spain • Sweden United Arab Emirates • United Kingdom • United States • Uruguay • V
Allen-Bradley Headquarters, 1201 South Second Street, Milwaukee, WI 53204 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444
Publication Publication
Australia • Austria • Bahrain • Belgium • Brazil • Bulgaria • Canada • Chile • China, PRC
Ireland • Israel •
9220-10.1 — July 1996 9220-10.1 — July 1996
Italy • Jamaica • Japan • Jordan • Korea • Kuwait • Lebanon • Malaysia
New
Zealand • Norway • Pakistan • Peru • Philippines • Poland • Portugal
Switzerland T
aiwan • Thailand
enezuela • Y
Copyright
T
urkey •
ugoslavia
1996 Allen-Bradley Company, Inc. Printed in USA
PN 955125-36
Loading...