The text of a manual · part 40 of 70
SLC 500 Instruction Set Reference Manual, pages 391 to 400
Pages 391 to 400 of 694
The original document is the PDF (7.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 Allen-Bradley 1747-L514
Page 391
SLC Communication Channels
13-61
Minimum DF1 Half-duplex Master Channel 0 ACK Timeout The governing timeout parameter to configure for a DF1 Half-duplex Master is the channel 0 ACK Timeout. The ACK Timeout is the amount of time you want the processor to wait for an acknowledgment of its message transmissions. Set in 20 millisecond intervals, the value is the amount of time the master will wait for: • an ACK to be returned by a slave when the master has just sent it a message, or • a poll response or message to be returned by a slave when the master has just sent it a poll packet. The timeout must be long enough that after the master has transmitted the last character of the poll packet, there is enough time for a slave to transmit (and the master receive) a maximum sized packet before the time expires. To calculate the minimum ACK timeout, you must know: • the modem baud rate. • maximum sized data packet (the maximum number of data words that a slave write command or read reply packet might contain). • the RTS/CTS or turnaround delay of the slave modem. • the configured RTS Send Delay in the slave. • the program scan time of the slave.
Publication 1747-RM001G-EN-P - November 2008
Page 392
13-62
SLC Communication Channels
Determining Minimum Master ACK Timeout To determine the minimum ACK Timeout, you must first calculate the transmission time by multiplying the maximum sized data packet for your processor by the modem rate in ms/byte. For an example we will assume an SLC 5/03 processor (103 data words or 224 bytes total packet size including overhead) and a 9600 bps modem, which transmits at approximately 1 ms/byte. Therefore, the message transmission time is 224 ms. For approximate modem transmission rates, see the following table.
Table 13.18 Approximate modem transmission rates modem bps approx. ms/byte
4800
2 ms/byte
9600
1 ms/byte
19200
.5 ms/byte
Next, you need to determine the average slave program scan time. In RSLogix 500, double click on the Processor Status icon and then locate Average on the Scan Times tab. For this example, lets assume an average slave program scan time of 20 ms. Remember, program scan time will vary by application. Finally, you must determine the larger of two values, either the configured slave RTS Send Delay or the turnaround time of the slave modem. The RTS Send Delay time can be found by double-clicking on the slave’s Channel Configuration icon and looking at the Chan. 0 System tab of the Channel Configuration screen. Note that the RTS Send Delay time is in intervals of 20 ms, so with a value of 3 in the box, the RTS Send Delay time would be 20 ms multiplied by 3. Using this value (60 ms) for our example, and assuming that the turnaround time of the modem is 50 ms (which will vary by modem) you would choose to use the RTS Send Delay time of 60 ms for your calculation. Having determined the maximum message transmission time (224 ms), the average slave program scan time (20 ms) and the largest of either RTS Send Delay (60 ms) or the modem turnaround time, the minimum ACK timeout is simply the sum of these values.
Table 13.19 Sum of the Transmission Rates
Use only the largest of these two values
Publication 1747-RM001G-EN-P - November 2008
Parameter
Example Values (in ms)
Max message transmission time
224
Average program scan time
20
RTS Send Delay
60
Page 393
SLC Communication Channels
13-63
Table 13.19 Sum of the Transmission Rates Parameter
Example Values (in ms)
modem turnaround time
50 calculated ACK Timeout
304 round up to nearest 20 ms
320
Monitor Active Stations To see what stations are active, view the channel 0 active node table in the SLC 5/03, SLC 5/04, or SLC 5/05 processor status file (S:67/0-S:82/15). Each bit in the file represents a station on the link. The stations are numbered in order as a continuous bitstream file starting with the first bit in word S:67 (See Figure 13.12 below). Figure 13.12 Example Active Node Table
At powerup or after reconfiguration, the master station assumes that all slave stations are inactive. A station is shown active only after it responds to a poll packet.
Configuring Channel 0 for Message-based Polling Mode DF1 Half-duplex Master Choose DF1 half-duplex master in message-based polling mode if you want to use MSG instructions in user programming to communicate with one station at a time. If your application uses satellite transmission or public switched telephone network transmission, consider choosing message-based. Communication to a slave station can be initiated on an as-needed basis.
Publication 1747-RM001G-EN-P - November 2008
Page 394
13-64
SLC Communication Channels
Message-based communication should also be used in redundant SLC master station systems implemented with the 1746-BSN backup communication module. With message-based mode, you do not have an active node file that you can use to monitor station status. Also, you cannot implement slave station-to-slave station messaging. To configure the processor for a master station using message-based polling mode, place the processor in program mode and do the following using your programming software.
To bring up the Channel Configuration interface, double-click on the Channel Configuration icon.
Define the location of the diagnostic file used for Channel Status here. For Channel Status details, see page 13-68.
Publication 1747-RM001G-EN-P - November 2008
Page 395
SLC Communication Channels
13-65
1. On the Channel 0 tab, choose DF1 Half-Duplex Master for your Driver. 2. Choose a Message-based Polling Mode. 3. Configure the communication driver characteristics according to Table 13.20.
Publication 1747-RM001G-EN-P - November 2008
Page 396
13-66
SLC Communication Channels
Table 13.20 Define these parameters when configuring a SLC 5/03, 5/04, or 5/05 processor as a master station using message-based polling mode to communicate with slave stations. Tab
Parameter
Default
Selections
General
Diagnostic File 0
SLC 5/03 (OS 302, Series C or higher), SLC 5/04 (OS 401, Series C or higher) and SLC 5/05 only. Select an unused file (9-255) to store channel status information. You must define a diagnostic file in order to be able to view channel 0 status. See Table 13.21 on page 13-68 for a file description.
Channel 0 System
Baud Rate
1200
Select a communication rate that all devices in your system support. Configure all devices in the system for the same communication rate.
Parity
None
Parity provides additional message packet error detection. To implement even parity checking, choose Even. To implement no parity checking, choose None.
Stop Bits
1
Match the number of stop bits to the devices with which you are communicating.
Node Address
0
A node address identifies the processor on the DF1 half-duplex link. Each station on a link must have a unique address. Choose an address between 010 and 25410. Node address25510 is the broadcast address, and cannot be selected as a station’s individual address
Control Line
No This parameter defines the mode in which the driver operates. Choose a method appropriate Handshaking for your system’s configuration. • If you are not using a modem, choose NO HANDSHAKING. • If the master modem is full duplex, choose FULL-DUPLEX. • If all the modems in the system are half-duplex, choose HALF-DUPLEX WITHOUT CONTINUOUS CARRIER. See page 13-86 for descriptions of control line operation settings.
Error Detection
CRC
With this selection, you choose the how the processor checks the accuracy of each DF1 packet transmission. BCC: This algorithm provides a medium level of data security. It cannot detect: • transposition of bytes during transmission of a packet. • the insertion or deletion of data values of zero within a packet. CRC: This algorithm provides a higher level of data security. Select an error detection method that all devices in your configuration can use. When possible, choose CRC.
Publication 1747-RM001G-EN-P - November 2008
Page 397
SLC Communication Channels
13-67
Table 13.20 Define these parameters when configuring a SLC 5/03, 5/04, or 5/05 processor as a master station using message-based polling mode to communicate with slave stations. (Continued) Tab
Parameter
Default
Selections
Channel 0 System
Polling Mode
Message Based
If you want to accept unsolicited messages from slave stations, choose MESSAGE BASED (ALLOW SLAVES TO INITIATE MESSAGES) Slave station-initiated messages are acknowledged and processed after all master station-initiated (solicited) messages. Note: Slave stations can only send messages when they are polled. If the message-based master station never sends a slave station a message, the master station will never send the slave station a poll. Therefore, to regularly obtain a slave station-initiated message from a slave station, you should choose to use standard communication mode instead. Ignore unsolicited messages from slave stations, choose MESSAGE BASED (DO NOT ALLOW SLAVES TO INITIATE MESSAGES) Slave station-initiated messages are acknowledged and discarded. The master station acknowledges the slave station-initiated message so that the slave station removes the message from its transmit queue, which allows the next packet slated for transmission into the transmit queue.
Duplicate Packet Detect
Checked
Duplicate Detect lets the SLC detect if it has received a message that is a duplicate of its most recent message from another station. If you choose duplicate detect, the processor will acknowledge (ACK) the message but will not act on it since it has already performed the message’s task when it received the command from the first message. If you want to detect duplicate packets and discard them, leave this parameter checked. If you want to accept duplicate packets and execute them, uncheck this parameter.
Reply 1 Message Wait Time
Define the amount of time in 20 millisecond increments that the master station will wait after receiving an ACK (to a master-initiated message) before polling the slave station for a reply. Choose a time that is, at minimum, equal to the longest time that a slave station needs to format a reply packet. This would typically be the maximum scan time of the slave station.
ACK Timeout
50
The amount of time in 20 millisecond increments that you want the processor to wait for an acknowledgment to the message it has sent before the processor retries the message or the message errors out. This timeout value is also used for the poll response timeout.
RTS Off Delay
0
Defines the amount of time in 20 millisecond increments that elapses between the end of the message transmission and the de-assertion of the RTS signal. This time delay is a buffer to make sure that the modem has transmitted the message but should normally be left at zero. See page 13-89 for further guidelines for setting this parameter.
RTS Send Delay
0
Defines the amount of time in 20 millisecond increments that elapses between the assertion of the RTS signal and the beginning of the message transmission. This time allows the modem to prepare to transmit the message. The Clear-to-Send (CTS) signal must be high for transmission to occur.
Pre-Transmit Delay
0
Defines the amount of time in 1 millisecond increments that elapses between when the processor has a message to send and when it asserts the RTS signal (if handshaking is selected) or begins transmitting (if no handshaking is selected).
Message Retries
3
Defines the number of times a master station retries a message before it declares the message undeliverable. A poll packet is transmitted prior to each message retry.
Publication 1747-RM001G-EN-P - November 2008
Page 398
13-68
SLC Communication Channels
DF1 Half-duplex Master Channel Status Channel Status data is stored in the diagnostic file defined on the Channel 0 Configuration screen. See Table 13.21 on page 13-68 for information regarding the diagnostic counter data displayed.
Double-click on the Channel Status Icon Located beneath the Configuration icon to bring up the Channel Status screen.
See Table 13.21 for details concerning the DF1 Half-Duplex Master Channel Status Screen.
Table 13.21 SLC 5/03 and Higher Channel 0 DF1 Half-duplex Master Channel Status Status Field
Diagnostic File Location
Definition
DCD Recover word 11
The number of times the processor detects the DCD handshaking line has gone low to high
Messages Sent word 1
The total number of DF1 messages sent by the processor (including message retries)
Messages Received word 2
The number of messages received with no errors
EOT Received on First Poll word 8
Not implemented
Last Normal Poll List Scan word 5
Time in 100 ms increments of last scan through Normal Poll List
Last Priority Poll List Scan word 10
Time in 100 ms increments of last scan through Priority Poll List
Lost Modem word 12
The number of times the lost modem bit has gone low to high
Publication 1747-RM001G-EN-P - November 2008
Page 399
SLC Communication Channels
13-69
Table 13.21 SLC 5/03 and Higher Channel 0 DF1 Half-duplex Master Channel Status (Continued) Status Field
Diagnostic File Location
Definition
Message Retry word 4
The number of message retries sent by the processor
Undelivered Messages word 3
The number of messages that were sent by the processor but not acknowledged by the destination device
Duplicate Messages Received word 9
The number of times the processor received a message packet identical to the previous message packet
Bad Packet/No ACK word 7
The number of incorrect data packets received by the processor for which no ACK was returned
Max Normal Poll List Scan word 6
Maximum time in 100 ms increments to scan the Normal Poll List
Max Priority Poll List Scan word 13
Maximum time in 100 ms increments to scan the Priority Poll List
DTR (Data Terminal Ready)
word 0;bit 4
The status of the DTR handshaking line (asserted by the processor)
DSR (Data Set Ready)
word 0;bit 2
The status of the DSR handshaking line (received by the processor)
RTS (Request to Send)
word 0;bit 1
The status of the RTS handshaking line (asserted by the processor)
CTS (Clear to Send)
word 0;bit 0
The status of the CTS handshaking line (received by the processor)
DCD (Data Carrier Detect)
word 0;bit 3
The status of the DCD handshaking line (received by the processor)
For processors running OS Series C, FRN 6 and higher, clicking the Clear button while monitoring Channel Status of either channel 1 or channel 0 online, will reset all of the channel status diagnostic counters for both channels to zero. Prior to OS Series C, FRN 6 the only channel status diagnostic counters that are reset when the Clear button is clicked are the ones on the channel that the programming terminal is connected to. For example, if your programming terminal is connected online via channel 0 and you are monitoring the Channel Status of channel 1, when you click on the Clear button, only channel 0 diagnostic counters will be reset, not channel 1 diagnostic counters.
Configuring Channel 0 for DF1 Half-duplex Slave To configure an SLC 5/03, SLC 5/04 or SLC 5/05 processor channel 0 for DF1 half-duplex slave, do the following using your programming software:
To bring up the Channel Configuration interface, double-click on the Channel Configuration icon.
Publication 1747-RM001G-EN-P - November 2008
Page 400
13-70
SLC Communication Channels
Define the location of the diagnostic file used for Channel Status here. For Channel Status details, see page 13-74.
1. On the Channel 0 tab, choose DF1 Half-Duplex Slave for your Driver. 2. Configure the communication driver characteristics according to Table 13.22.
Publication 1747-RM001G-EN-P - November 2008