The text of a manual · part 7 of 10
Class 8030 Type CRM565 Network Interface Module (For Square D PowerLogic Circuit Monitor): 5: SY/MAX Communication Programming
Pages 26 to 34 of 50, from Class 8030 Type CRM565 Network Interface Module (For Square D PowerLogic Circuit Monitor)
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Square D 8030-CRM-565 and Schneider 8030-CRM-565
Page 26
30598-756-01 PageS-1
5.0 SY/MAX COMMUNICATION PROGRAMMING
5.1 General
This section is intended to give the PNIM user an overview of programmable controller communication on the SY/NET network. Moet of thia information applies to circuit monitors as wel] as local networks. One notable difference is that an ALARM rung may not be used when communicating to a PowerLogic Circuit Monitor. [Section 6] gives information on operations that are unique to circuit monitor networks. Additional information can be found in the following Instruction Bulletins:
30598-257-xx SY/NET Network Interface Module (NIM)
30598-167-xx SY/MAX Deluxe CRT Programmer
30598-272-xx SY/MAX D-LOG Data
Controller Module 30598-717-xx SPR-350 Laptop Program- mer
SY/MAX programmable controllers store and exchange information as register data. Timer and counter values are stored as register values. I/O atatus is stored as individual bits of data registers. SY/MAX processors also have contro] registers in which some bits identify current processor conditions and other bits control processor operating modes.
The activities of any processor, therefore, can be monitored or controlled by looking at or changing (reading or writing) the data in its registers. This can be done by devices connected directly to the processor or by devices communicating over the SY/NET network.
In addition, SY/MAX programming devices such as CRT Programmers and personal computers with SY/MATE programming software can send entire ladder programs to processors over the network.
5.2 SY/MAX Processor Communication Rungs
SY/MAX proceasors are able to initiate communication through communication rungs included in their ladder programs. When these rungs are activated, the specified information is sent or retrieved.
The following communication rung instructions are available:
READ - A READ rung is used to obtain the contents of one or more registers in a remote device and store this data in one or more registers in the device initiating the command (the local device).
WRITE - A WRITE rung is used to send register data values from the local device to registers in the remote device.
ALARM - An ALARM rung is used to send a single, programmed value from the local device to a storage register in a remote device. (Cannot be used with the Circuit Monitor.)
§.3 Routing
For communication over the SY/NET network, routing information must be added to the communication rungs. The route numbers identify which device is initiating the communication (source) and which device is receiving the communication (destination).
A route number ia simply the Network Interface Number (thumbwheel address) of the PNIM to which the device is connected, preceded by a 0 or 1 depending on which COMM port the device is connected to. For example, in[Figure 5 the device connected to port 1 of interface 56 has a route value of 156.
Seq Section 5.4|for additional examples.
Page 27
Page 5-2 30598-756-01
5.3.1. Net-to-Net Routing
(Net-to-Net cannot be used with the PNIM).
For communication from one network to another, more than two route numbers are required. Between the originating route and the destination route, a net-to-net route is placed. The net-to-net route is the interface and port number that connects the two networks; this number must be the same on both networks. A Class CRM510 or CRM640 NIM must be used if net-to-net operation is desired.
In[Figure 6.1] a communication from the SY/MAX Processor on network A to the SY/MAX Processor on network B would use the following route values: 009 (originating), 012 (net-to-net), 156 (destination).
If more than two networks are connected, a series of net-to-net route values may be used to route a message through several networks.
This Port Set to ; "Net-to-Net i, Mode}
Jo ol H4 SYMAX Oo 10 Network Af [b= | = we Not-to- Net Link
This Port Set to \ “Net-to-Net” in
N
Mode 0 aL) ch 104 SYMAX |
Network 8 [[}
Figure 5.1 - Net-to-Net Communication
5.3.2 Circult Monitor Network Routing
To communicate with a circuit monitor network, one route value is required in addition to SY/NET source and destination routes. This additional route value is the device number of the circuit monitor.
Note: Each PNIM on a SY/NET Local Area Net- work must have a unique address.
pe - Circuit Monitor Network, N=, /
Figure 5.2 - Circuit Monitor Routing Example
For example, using the circuit monitor network shown in}Figure 5.2] if the SY/MAX processor is to send a message fo circuit monitor 3, the following sequence of route values must be used in the processor communication program:
120,020,03 where:
120 is the device number of the SY/MAX processor, the initiating device (port 1 of interface 20).
020 is the device number of the PNIM used for the circuit moniter com- munication link (port 0 of interface 20).
03 ia the device number of circuit monitor 3, the destination device.
Page 28
To communicate from the SY/MAX processor to circuit monitor 1, the following route sequence would be used:
120,020,01
This would route the message over the circuit monitor network to circuit monitor 1.
Note: When multiple CMs are connected to a single communication channel, there must be one (and only one) CM whose device ad- dress switches are set to 01. This should be the last CM on the link. (See section 5.1 of the PowerLogic Manual 63074-140-XX.)
5.4 Example Rungs
Note that the only difference between implementing a SY/NET LAN (Local Area Network) and a Circuit Monitor Network in the following examples is in the routing used.[See Section 6.3.2]
5.4.1
Figure 5.3 Bhows a sample network layout. Suppose Processor A requires some register data from
Processor B. This can be accomplished by programming the following READ rung in Processor A.
1 - E
READ Rungs o[] | | Processor A OL] | [Processor B 1 Cael 1d OD | CT
Figure 5.3 - Example Network Layout z ROUTE ROUTE STAT LOCAL REM COUNT
--- f--
T READ 2 167 15 8681 s20 SHO 3
Figure 5.4 - Network READ Rung
The above rung will read the contents of registers 30, 31, and 32 from the remote Processor (Processor B) and put the data into registers 20, 21 and 22 of the local Processor (Processor A). The purpose of each element of the rung is aa follows:
30598-756-01 PageS-3 z The initiating contact which activates the rung.
The command for getting data from another Processor.
2 Refers to communication using processor COMM port #2.
The network route number for initiating device (Processor A).
ROUTE 107
ROUTE 115 The network route number for the destination device (Proces- aor B).
STAT S91 Use register S91 in Processor A as the status register. The status register contains infor- mation on the progress of the communication message. LOCAL S20 The first regiater (starting ad- dress) in the local Processor to contain the data to be read. REM S30 The first register in the remote from which data will be read.
COUNT 3 The number of consecutive registers that will be read.
The communication rung is enabled once for each closure of contact Z because the READ rung is tran-sition sensitive.
Communication Progress
During communication (contact Z closed), the STAT (status) register will contain data on the progreas of the communication rung. The following is a description of the status register data. (This information applies equally to READ and WRITE rungs.)
Page 29
Page 5-4 30598-756-01
Status Register Bit Description
Bit 1 ON = error in communication
Bits 1-14 Error code (1 through 16383; all error codes are odd numbers).
If an error is encountered in com- munications, an odd number error code will be put into the atatus register. See Appendix C for a list of error codes.
RUN/HALLT status of remote processor.
Bit 15
ON = Remote processor in Run mode. OFF = Remote processor in Halt mode. (Only Valid when bit 16 is on - message complete.)
Bit 16 ON = Communication is complete.
This bit can be used to initiate automatic repeat of communica- tion rungs. Bit 17 ON = Communication started, mesaage is being sent.
Bit 22 ON = Rung enabled, continuity present up to the communication box.
These status bits can be used as ladder rung ele-ments for control functions.
§.4.2 Suppose Processor Al (see Figure 5.3) must send some register data to Processor B. This can be accomplished by programming the |following] WRITE rung in Processor A.
WRITE Rungs
Zz ROUTE ROUTE STAT LOCAL REM COUNT
Se 8 6S40) - (S50 2
=--4 f--47 WRITE 2107115
Figure 5.5 - Network WRITE Rung
The rung in Figure 5.5 will write the contents of registere 40 and 41 from the local Processor (Processor A) and put the data into registers 50 and 51 of the remote Processor (Processor B). The purpose of each element of the rung is as follows:
Z The initiating contact which ac- tivates the rung.
WRITE The command for getting data from another Processor.
2 Refers to communication using processor COMM port #2. ROUTE 107 The network route number for the initiating device (Processor A). ROUTE 115 The network route number for the destination device (Proces- aor B). STAT S39 Use register $39 in Processor A as the status register. The status register containa infor- mation on the progress of the communication message. LOCAL S40 The first register (starting ad- dress) in the local Processor to be written (sent) to the remote Processor. REM S50 The first register in the remote Processor in which data will be written. COUNT 2 The number of consecutive registers that will be written.
55 Advanced Communication Routing
In addition to routing point-to-point with Network
Device Numbers 000 through 199, the CRM565 supports Special Function ROUTEs numbered 200
. These Special Functions are listed in
Figure 5.6]and are described in the following sec-ons.
CAUTION:
Use care when programming the special routes since more than one NIM on the network may be affected by them.
Page 30
ROUTE SPECIAL FUNCTION
200 READ CRMS565 status and WRITE CRMS65 Parameters.
201 Source's network number unknown
202 Fort to-port within , same N oe (not applicable to
203 Source and target NIM numbers unknown
204 DON’T CARE, go to next ROUTE
205-232 NOT USED
232-254 Broadcast functions (SY/MAX mode only}
Figure 5.6 - Special Function Routes
A register is simply a small portion of memory that is used by a SY/MAX device to store data. Each register has an address to distinguish it from other registers. Though register memory is separate from the control program memory, register addresses can be used in the control program, allowing data stored in the registers to be accessed.
The PNIM internal registers contain status information about the PNIM and also parameters that control certain operations. In typical applications, the default parameters of the PNIM registers that control its operations are satisfactory. A description of the register, along with the type of operation required to access the information and default values is given in [Figure 5.8]
Processor PNIM
Oo Oo
O L]
Figure 5.7 - Example of internal Register Routing
5.5.1 READ PNIM Status (ROUTE 200)
ROUTE 200 ia used to read the internal status of a NIM or PNIM. The NDN of the PNIM to be read is entered immediately after ROUTE 200 as shown below (*“XXX” is the NDN of the Network device whose status is to be read, while “AAA” is the NDN number of the initiating device):
ROUTE AAA, 200, XXX
30598-756-01 Page5-5
The “ROUTE 200” must be the second from the last ROUTE entry within a communica- tion rung.
Note:
For example, if the SY/MAX Processor connected to the PNIM in Figure 5.7 needa to access the PNIM internal registers, it would use the route sequence:
120,200,206
The first value sends the command to the PNIM, the second value flags the PNIM that the command is intended for internal registers, and the final value indicates which PNIM or NIM is to be accessed.
A communication rung sent to a PNIM by a processor or programming device obtaina the data from the readable registers of the target PNIM. Refer to Figure 5.8
§.5.2 WRITE PNIM Parameters
The operational parameters of a PNIM can be changed by a priority WRITE or ALARM with a ROUTE of 200. The Write PNIM status ia identical in format to a Read PNIM status with the exception that AAA and XXX routes are identical] (source device}. indicates the readable/writeable PNIM registers.
Note: When using a WRITE statement to set the value of an internal PNIM register, the value of the COUNT can only be 1. Each internal register to be configured requires an individual WRITE statement. All registers can be read in a single READ statement.
Note: If system power is lost, the PNIM internal registers return to their default values as indicated in[ Figure 6.4
5.5.3 Source Network Number Unknown
ROUTE 201 allows a device to communicate on the network without knowing what its own network number is. For example, to have a device of unknown network number communicate with network device number 22, the following ROUTE statement is used:
ROUTE 201,922
Page 31
Page 5-6 30598-756-01
INTERNAL READ/WRITE DESCRIPTION REGISTER ADDRESS 1 Raad only Network interface Type Number Example: 510 for CRM-510 for CRM-S65 2 Read only Software Revision 3 Read only Thumbwheel Setting 00 to 96 4 Read only DIP Switch 5 Setting (Port 0 Mode, Baud Rate, etc.) xample: Bi 4 0010100 {Ow switch tp open) “ SW7 = 64) na =8 up, Decimal 20 P 5 Read only DIP Switch 4 Setting (Port 1 Mode, Baud Rate, etc.) 6 Read onl Serial number - if tha message involving this module originates from either of the COMM J Sorts, Rwill be indicated in ts renistor as a°0 or 1. ond 7 Read only N/A Read only NA Read/Write | Receive errors (local network port] See Sec. 7.2.
10 Read/Write Transmit errors (local network port]. Sea Sec. 7.2.
11 Read/Write Receive error overtiow (local network port)./See Sec. 7.2.
12 Read/Write Transmit error overflow (local network port)}] See Sec. 7.2.
13 Read/Write User defined, cleared upon power-up, values from 0 to 65536.
14 ReadMWrita User defined, cleared upon power-up, values from 0 to 65536,
15 Read/Mrite User defined, ceared upon power-up, values from 0 to 65536.
16 Read only Cable status, port 0
17 Read only Cable Status, port 1
18 Read/Write Special PNIM identification number. Programmable from 6 to 255. Defaults to zero on power-up.
19 Read/Write Clear To Send (CTS) delay. Programmable from 0 to 2 seconds in 50 millisecond increments. On power-up defaults to a value of 0 (for no delay). Will delay issuing a CTS signal by the amount of time dictated af the value in this register times 50 (ms).
Exampie: if register 19 time delay is 150 milliseconds.
20 Read/Write Message response timeout (in seconds). Determines the time alloted for a response before the message is retransmitted (up to three times, see register 22). After three retries an error is generated. (Default = 2 seconds.)
21 Read/Write NA
22 Read/Write Number of retries by PNIM (when no acknowledgement is received from the intended circuit monitor), before error message is posted in the status register of the communication rung {or assigned to the communication variable CERR of a D-LOG module) initiating the communication command (READ/WRITE/GETN/PUTN). On power-up, the default value is 0. Allowable value range is 0 to 3.
23 Read/Write NA
24 ReadMrite N/A
25 Read/Write Pause time, Programmable from 0 to 60 seconds, Defaults to 0 seconds. Pause time will be inserted after a specified number of messages have been issued (see register 26).
26 Read/Write Message count. rammable from 0 to 250. Default value is 4. Message count ie the maximum number of cormmands that can be transmitted before the minimum pause time (Specified in register 25) will be inserted.
Figure 5.8 - PNIM Internal Register Summary
The ROUTE 201 entry must be the first ROUTE 5.5.4 Port-to-Port within the Same NIM entry in the communication rung.
ROUTE 202 permits communications between two
ROUTE 200 and ROUTE 201 can be combined to devices attached to the same Network Interface read the status of a device hose network number is Module. This ROUTE must be the second entry in unknown by using the following ROUTE entry: the rung.
Page 32
ROUTE 202 can aleo be used in conjunction with ROUTE 201 to permit communication in a PNIM whose network device number is unknown. Use the following ROUTE to accomplish this:
ROUTE 201,202
Route 202 must be the second ROUTE entry. Other than ROUTE 201, NO OTHER ADVANCED ROUTE ENTRIES ARE PERMITTED WITH ROUTE 202.
Module "Palr”, Source and Destination NIM Numbers Unknown
5.5.5
ROUTE 203 allows two NIMs (or PNIMs) to com- municate even if both of their network numbers are not known. A module pair to ROUTE 203 is an even-numbered module, along with its module number plus one OR an odd-numbered module along with its module number minus one.
Example
To route communication between the pair of modules at network location 06 and 07, use either of the following routing statements depending on which direction the communication is going (which processor is initiating the communication command):
ROUTE 201,203
(From 6 to 7. Even-numbered network number, plus one, creates module pair 6/7.)
ROUTE 201,203
(From 7 to 6. Odd-numbered network number, minus one, creates module pair 7/6.)
The ROUTE 203 must be the second ROUTE in- struction in the rung. NO OTHER ROUTE VALUES ARE PERMITTED IN THE RUNG AFTER THE ROUTE 203.
5.5.6 Don’t Care, Skip This Route Number
ROUTE 204 causes the NIM to jump over the ROUTE normally in this position, and act on the next ROUTE entry as if it were the second entry. For example, ROUTE 003, 204, 004 ia executed simply as ROUTE 003,004. This is typically used in applications where the source device can assign routes through the use of variables (D-LOG module).
30598-756-01 Page5-7
5.5.7 Broadcast Functions
Note: Not applicable to NIMs set to Model 50 or Net-to-Net Mode or PNIMs set to Power- Logic Mode.
A broadcast message is a message that is sent by one device to a number of other devices. The “other” devices can include aii other devices on a particular network, or just some devices, or even certain ports on other devices.
CAUTION:
Broadcast messages are NOT acknowledged by the device recelving them; the sending device will NOT recelve a reply. This means there Is no way to be sure that all devices received the broadcast. Model 300 processors DO NOT support the broadcast function.
Sending a Broadcast
To have all devices on a network receive a broadcast, ROUTE 253 or 254 is used. ROUTE 253 sends the message to all COMM port 0s, while 254 sends to all COMM port is. To have only certain devices on a network receive the broadcast, a ROUTE number from 233 to 252 is used.| Figure 5.10]shows which ROUTE aasigns which device.
Example
A broadcast message is to be sent to CO ad ed of network devices 30 through 39. From|Figure 5.10 the proper route to use is 240.
A broadcast message consists of a WRITE or ALARM rung in a processor/programmable controller, or a PUTN statement in a D-LOG program. A
[reg] WRITE command appears in Fig-
ROUTE ROUTE STAT LOCAL REM COUNT
'T WRITE 1 201 24 S100 SH S% 1
Figure 5.9 - Broadcast WRITE Command
The communication command in Figure 5.9, WRITEs register 20 to register 30 in all devices connected to NIM COMM port 1 from a device of unknown network number (ROUTE 201).
Page 33
Page 5-8 30598-756-01
Note: Broadcast messages are only sent “over the network”. It ie not possible for the broadcast measage to be received by the same module that transmitted it. Also, READ messages cannot be broadcast.
NETWORK DEVICE COMM PORT ROUTE # NUMBERS AFFECTED AFFECTED 2x3 0-9 0 234 1 235 10-19 0 236 1 237 20-29 ) 238 1 239 30-39 0 240 1 241 40-49 G 242 1 243 50-59 Q 244 ’ 1 245 60-69 0 246 1 247 70-79 0 248 1 249 80-89 0 250 1 251 90-99 6 252 1 253 ALL 9] 254 1
Figure 5.10 - Partitioned Broadcast ROUTEs
Recelving a Broadcast
Every device on the network has the option of being disabled from receiving a broadcast message. On the CRM565 PNIM, set switch 1 of awitchblock S4 and S5 to UP to disable broadcast to COMM port 1 and/or 0 respectively. Recall broadcasts are not sup-ported when COMM Port 0 is in the PowerLogic mode. Once this switch is OFF, the PNIM will ig-nore all broadcast messages.
Net-to-Net Broadcasts
It is possible to broadcast a message on one network from another network through the net-to-net link. When sending a broadcast net-to-net, the NIM in network #1 that contains the net-to-net link passes the broadcast message to network #2 through one of its COMM ports.
As an example, the following ROUTE entry sends a non-broadcast message from Network #1 to Network #2. Refer to/Figure 5.11] Upon entering Network #2, the message becomes a broadcast message:
101,002,234
° , S¥MAX D) os ie) Proceseor mo
| 1 1 K - T_| Broadcast I Yr
SY/NET Network #1 Cablo
CAUTION:
A broadcast message WILL NOT travel through a net-to-net link.
A message broadcast on Network #1 will NOT be heard on Network #2 through a NET-TO-NET link. A broadcast- ROUTE command can, how- ever, be sent through the NET-TO-NET Ilnk. (Net-to-Net Broadcast}.
Use care when programming ANY broadcast message.
Net-to-Not
Link Nie 8, - 0 Broedcest
Destination
| aE Network SY/NET Network #2 Cable “
“CAMS 10 of CRMS40
Figure 5.11 - Net-to-Net ROUTE Configuration
Page 34
ROUTE SPECIAL FUNCTION 000-990 Point-to-point through COMM port 0. 100-199 Point-to-point through Comm port 1.
200 Check status of this PNIM and change PNiM parameters
201 Source’s network number unknown
202 Port-to-port within the same NIM (not applicable to CRMS580)
203 Source and target NIM numbers unknown
204 DON'T CARE, go to next ROUTE
205-232 NOT USED
232-254 Broadcast functions (SY/MAX mode onty)
Figure 5.12 - Special Function Routes
Figure 5-12 summarizes the ROUTE numbers which can be used in the CRM565.
5.6 D-LOG Module Communication
The SY/MAX D-LOG module is a rack-mounted data logging module which is programmed in Extended BASIC. It is capable of communicating with programmable controllers and other devices, either directly or over the SY/NET network.
While SY/MAX processors use READ and WRITE commands to communicate, D-LOG modules use GETN and PUTN commands. For network com- munication, each group of GETN or PUTN com- mands ia preceded by a ROUTE statement that establishes the network communication pathway.
As with the other forms of SY/MAX communication, the only difference between implementing the following examples in a LAN and_a circuit monitor network is in the routing used [See Section 5.3.2!
Figure 5.7 shows an example network with a D-LOG module connected to port 1 of interface 09 and a programmable controlier connected to port 0 of interface 11. oC SYMAK oc) DLOG 1 [patel 1 Deed O 2a
Figure 5.13 - Example Network With D-LOG Module
30598-756-01 Page 5-9
The following lines in the D-LOG module’s BASIC program would perform communication to the programmable controller.
10 ROUTE 109,011 20 PUTIN 66,95 30 GETN B(1),85,8
The function of each of these program lines is as follows:
Line 10 - Establishes the network communication route from the D-LOG module (network address 109) to the programmable controller (network address 011).
Line 20 - Places the value 66 into register 95 of the programmable controller.
Line 30 - Gets the values of programmable controller regiatera 85 through 92 (8 registers starting at register 85) and stores them in array variables B(1) through B(8).