At a Glance
This data structure contains the actual configuration data the XMIT block uses. Do not write directly to this array, as the content is automatically generated or copied from XMIT_SET. The following is a detailed description of each of the (16) XMIT communication control table registers.
XMIT_CFG.Revision Read Only
Displays the current revision number of XMIT block. This number is automatically loaded by the function block and over writes any other number entered into this register.
XMIT_CFG.FaultStatus Read Only
This field displays a fault code generated by the XMIT block. A complete list is shown in the table below.
Fault Code |
Fault Description |
---|---|
1 |
Modbus exception - Illegal function |
2 |
Modbus exception - Illegal data address |
3 |
Modbus exception - Illegal data value |
4 |
Modbus exception - Slave device failure |
5 |
Modbus exception - Acknowledge |
6 |
Modbus exception - Slave device busy |
7 |
Modbus exception -Negative acknowledge |
8 |
Modbus exception -Memory parity error |
9 ... 99 |
Reserved |
100 |
Slave PLC data area cannot equal zero |
101 |
Master PLC data area cannot equal zero |
102 |
Coil (0x) not configured |
103 |
Holding register (4x) not configured |
104 |
Data length cannot equal zero |
105 |
Pointer to message table cannot equal zero |
106 |
Pointer to message table is outside the range of configured holding registers (4x) |
107 |
Transmit message time-out (This error is generated when the UART cannot complete a transmission in 10 seconds or less. This error bypasses the retry counter and will activate the error output on the first error). |
108 |
Undefined error |
109 |
Modem returned ERROR |
110 |
Modem returned NO CARRIER |
111 |
Modem returned NO DIALTONE |
112 |
Modem returned BUSY |
113 |
Invalid LRC checksum from the slave PLC |
114 |
Invalid CRC checksum from the slave PLC |
115 |
Invalid Modbus function code |
116 |
Modbus response message time-out |
117 |
Modem reply time-out |
118 |
XMIT could not gain access to PLC communications port #1 or port #2 |
119 |
XMIT could not enable PLC port receiver |
120 |
XMIT could not set PLC UART |
121 |
User issued an abort command |
122 |
not used |
123 |
not used |
124 |
Undefined internal state |
125 |
Broadcast mode not allowed with this Modbus function code |
126 |
DCE did not assert CTS |
127 |
Illegal configuration (data rate, data bits, parity, or stop bits) |
128 |
Unexpected response received from Modbus slave |
129 |
Illegal command word setting |
130 |
Command word changed while active |
131 |
Invalid character count |
132 |
Invalid register block |
133 |
ASCII input FIFO overflow error |
134 |
Invalid number of start characters or termination characters |
XMIT_CFG.UserAvail_1
The XMIT block does not use this register. However, it may be used in the user logic as a pointer.
XMIT_CFG.DataBits
XMIT supports the following data bits: 7 and 8. To configure a data bit size, enter its decimal number into this element. Modbus messages may be sent in ASCII mode (7 or 8 data bits) or RTU mode (8 data bits). When an invalid data bit is entered, the block displays an illegal configuration error (error code 127) in the XMIT_CFG.FaultStatus element. For more details on Modbus message formats refer to Modicon Modbus Protocol Reference Guide (PI MBUS 300).
XMIT_CFG.Parity
XMIT supports the following parity: none, odd and even. Enter a decimal of either: 0 = no parity, 1 = odd parity, or 2 = even parity. When an invalid parity is entered, the block displays an illegal configuration error (error code 127) in the XMIT_CFG.FaultStatus element.
XMIT_CFG.StopBits
XMIT supports one or two stop bits. Enter a decimal of either: 1 = one stop bit, or 2 = two stop bits. When an invalid stop bit is entered, the block displays an illegal configuration error (error code 127) in the XMIT_CFG.FaultStatus element.
XMIT_CFG.UserAvail_2
The XMIT block does not use this element. However, it may be used in the user logic as a pointer.
XMIT_CFG.CommandWord
The XMIT interprets each bit of the command word as a function to perform. If bit 7 and 8 are on simultaneously or if any two or more of bits 13, 14, 15 or 16 are on simultaneously or if bit 7 is not on when bits 13, 14, 15, or 16 are on error 129 will be generated. Other restrictions apply. For more details refer to XXMIT Communication Functions . The individual bit definitions are shown in the table below.
Bit |
Definition |
---|---|
Bit 1 (msb) |
Reserved |
Bit 2 Enable RTS/CTS modem control |
Set to 1 when a DCE connected to the PLC requires hardware handshaking using RTS/CTS control. This bit may be used in conjunction with values contained in XMIT_CFG.XmStartDelay and XMIT_CFG.XmEndDelay. Start of transmission delay keeps RTS asserted for (X mS) before XMIT sends message out of PLC port. Likewise, end of transmission delay keeps RTS asserted for (X mS) after XMIT has finished sending a message out of the PLC port. Once the end of transmission delay expires XMIT de-assert RTS. |
Bit 3 Enable RS485 mode |
Set to 1 when the selected port should operate in RS485 mode. Otherwise it defaults to 0, which is RS232 mode. |
Bit 4 |
Reserved |
Bit 5 Terminated ASCII input |
Set to 1 to remove and discard all characters from FIFO until the starting string is matched, then these starting characters and subsequent characters are written into the MSG_IN array until the terminator sequence is matched. The terminator string is also written into the MSG_IN array. Refer to Terminated ASCII Input Function for more details. |
Bit 6 Simple ASCII input |
Set to 1 to remove the ASCII characters from FIFO for writing into the MSG_IN array. The Message pointer (XMIT_CFG.MessagePtr) is automatically set to the register address specified for the MSG_IN array. Refer to Simple ASCII Input Function for more details. |
Bit 7 Enable ASCII string messaging |
Set to 1 when you want to send ASCII messages out of the PLC. XMIT sends ASCII strings up to 1024 characters in length. You program the ASCII message into the MSG_OUT array. Two characters allowed per register. Only use Bit 7 OR Bit 8, do not try to use both. Refer to ASCII String Messaging for more details. |
Bit 8 Enable Modbus messaging |
Set to 1 when you want to send Modbus messages out of the PLC. Modbus messages may be in either RTU or ASCII formats. When data bits=8, XMIT uses Modbus RTU format. When data bits=7, XMIT uses Modbus ASCII format. Only use Bit 7 OR Bit 8, do not try to use both. |
Bit 9 Enable ASCII receive FIFO |
Set to 1 to allow the XMIT block to take control over the selected port (1 or 2) from the PLC. The block begins to receive ASCII characters into an empty 512 byte circular FIFO. Refer to ASCII Receive FIFO for more details. |
Bit 10 Enable back space |
Set to 1 to allow special handling of ASCII back space character (BS, 8Hex). When using either Simple ASCII Input (Bit 6) or Terminated ASCII Input (Bit 5) each back space character is removed from FIFO and may or may NOT be stored into the MSG_IN array. Refer to Enable Back space for more details. |
Bit 11 Enable RTS/CTS flow control |
Set to 1 to allow full duplex hardware flow control using the RTS and CTS handshaking signals for ASCII massaging. The RTS/CTS operates in both the input and output modes. Refer to Enable RTS/CTS Flow Control for more details. |
Bit 12 Enable Xon/Xoff flow control |
Set to 1 to allow full duplex software flow control using the ASCII Xon character (DC1, 11 Hex) and the ASCII Xoff character (DC3, 13 Hex). The Xon/Xoff operates in both the input and output modes. Refer to Enable Xon/Xoff Flow Control for more details. |
Bit 13 Pulse dial modem |
Set to 1 when using a Hayes compatible dial-up modem and you wish to pulse dial a telephone number. You program the phone number into the MSG_IN array. The length of the message must be in XMIT_SET.MessageLen. Pulse dialed numbers are sent to the modem automatically preceded by ATDP and with carriage return <CR> and line feed <LF> appended. Since the dial message is an ASCII string, bit 7 must be ON prior to sending the number to be dialed. |
Bit 14 hangup modem |
Set to 1 when using a Hayes compatible dial-up modem and you want to hangup the modem. You must use ladder logic to turn this bit ON. Since the hangup message is an ASCII string, bit 7 must be ON prior to sending the message. Hang up messages are sent to the modem automatically preceded by +++AT and with carriage return <CR> and line feed <LF> appended. XMIT looks for a correct disconnect response from the modem before it turns ON the OP_SUC output signal, noting a successful completion. |
Bit 15 Tone dial modem |
Set to 1 when using a Hayes compatible dial-up modem and you wish to tone dial a telephone number. The the dial message must be placed in MSG_OUT array and the length of the message in XMIT_SET.MessageLen. Tone dial numbers are sent to the modem automatically preceded by ATDT and with carriage return <CR> and line feed <LF> appended. Since the dial message is an ASCII string, bit 7 must be ON prior to sending the number to be dialed. |
Bit 16 Initialize modem |
Set to 1 when using a Hayes compatible dial-up modem and you want to initialize the modem. You program the initialization message into the MSG_OUT array and the length of the message XMIT_SET.MessageLen. All messages are sent to the modem automatically preceded by AT and with a carriage return <CR> and line feed <LF> appended. Since the initialization message is an ASCII string, bit 7 must be ON prior to sending the message. |
XMIT_CFG.MessagePtr
This pointer is automatically handled by the XMIT block. It points to the beginning of the message table which is either the MSG_IN array or the MSG_OUT array depending on the chosen XMIT function. Each array element (4x register) holds up to two ASCII characters. Each ASCII string may be up to 1024 characters in length. For example, when you want to send 10 ASCII messages out of the PLC, you must transfer the10 ASCII characters strings into the MSG_OUT array one after another after each successful operation of XMIT.
XMIT_CFG.MessageLen
You enter the length of the current message. When XMIT is sending Modbus messages for function codes 01, 02, 03, 04, 05, 06, 08, 15 and 16, the length of the message is automatically set to five. When XMIT is receving Terminated ASCII input the length of the message must be set to five or an error results. When XMIT is sending Modbus messages for function codes twenty and twenty-one, the length of the message is automatically set to six. When XMIT is sending ASCII messages, the length may be 1 ... 1024 ASCII characters per message.
XMIT_CFG.RespTimeOut
You enter the time value in milliseconds (mS) to determine how long XMIT waits for a valid response message from a slave device (PLC, modem, etc.). In addition, the time applies to ASCII transmissions and flow control operations. When the response message is not completely formed within this specified time, XMIT issues a fault. The valid range is 0 ... 65535 mS. The timeout is initiated after the last character in the message is sent.
XMIT_CFG.RetryLimit
You enter the quantity of retries to determine how many times XMIT sends a message to get a valid response from a slave device (PLC, modem, etc.). When the response message is not completely formed within this specified time, XMIT issues a fault and a fault code. The valid range is 0 ... 65535 # of retries. This field is used in conjunction with response time-out (4x + 11).
XMIT_CFG.StartDelay
You enter the time value in milliseconds (mS) when RTS/CTS control is enabled, to determine how long XMIT waits after CTS is received before it transmits a message out of the PLC port #1. Also, you may use this register even when RTS/CTS is NOT in control. In this situation, the entered time value determines how long XMIT waits before it sends a message out of the PLC port #1. You may use this as a pre message delay timer. The valid range is 0 ... 65535 mS.
XMIT_CFG.XmEndDelay
You enter the time value in milliseconds (mS) when RTS/CTS control is enabled, to determine how long XMIT keeps RTS asserted once the message is sent out of the PLC port #1. After the time expires, XMIT deassert RTS. Also, you may use this register even when RTS/CTS is NOT in control. In this situation, the entered time value determines how long XMIT waits after it sends a message out of the PLC port #1. You may use this as a post message delay timer. The valid range is 0 ... 65535 mS.
XMIT_CFG.XmCurrentRetry
The value displayed here indicates the current number of retry attempts made by the XMIT block. This register is read only.