Vous êtes sur la page 1sur 117

Modicon

XMIT Function Block


User Guide
840 USE 113 00 Version 3.0
Modicon
XMIT FunctionBlock
User Guide
840 USE 113 00 Ver 3.0
August, 1998
Schneider AutomationInc.
OneHighStreet
NorthAndover, MA 01845
Preface
840 USE 113 00
iii
Preface
Thedataandillustrations found in this book arenot binding. Wereserve
theright tomodify our products in linewith our policy of continuous
product development. Theinformation in this document is subject to
changewithout noticeandshould not beconstrued as acommitment by
Schneider Automation I nc.
Schneider Automation assumes noresponsibility for any errors that may
appear in this document. I f you haveany suggestions for improvements
or amendments or havefound errors in this publication, pleasenotify us
by usingtheformon thelast pageof this publication.
Nopart of this document may bereproducedin any formor by any
means, electronic or mechanical, includingphotocopying, without
express written permission of thePublisher, Schneider Automation I nc.
Caution: All pertinent state, regional, and local safety
regulations must be observed when installing and using this
product. For reasons of safety and to assure compliance with
documented systemdata, repairs to components should be
performed only by the manufacturer.
MODSOFT is aregisteredtrademark of Schneider Automation I nc.
Thefollowingaretrademarks of Schneider Automation I nc.:
Modbus Modbus Plus
Modicon 984
DI GI TALandDECareregisteredtrademarksofDigitalEquipment
Corporation.
I BM and I BM AT areregistered trademarks of I nternational
Business Machines Corporation.
Microsoft andMS- -DOS areregisteredtrademarks of Microsoft
Corporation.
Procomm is aregisteredtrademarks of DatastormTechnologies
Corporation.
Copyright 1998, Schneider Automation I nc.
Printed in U.S.A.
Contents
840 USE 113 00
v
Contents
Chapter 1
Introduction 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 XMI T Specific Functionality 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Restrictions 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Softwareand HardwareRequired 3 . . . . . . . . . . . . . . . . . . . . .
1.1.3 ReferenceDocuments 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 PLC LoadableFunctions 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 XMI T I nstallation as aLoadable 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.1 DX ZoomScreens: LoadingDXFDT.SYS 7 . . . . . . . . . . . . . . . .
1.3.2 DX ZoomScreens: LoadingXMI T.ZMM 7 . . . . . . . . . . . . . . . .
1.3.3 LoadingXMI T1968.HLP Help Screen File 8 . . . . . . . . . . . . . .
1.3.4 LoadingNSUP.EXE 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.5 LoadingXMI T.EXE 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 XMI T ZoomScreens 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.1 DX Communication Screens (Eight) 13 . . . . . . . . . . . . . . . . . . .
1.4.2 DX Port Status Screen (Three) 18 . . . . . . . . . . . . . . . . . . . . . . . .
1.4.3 DX Conversion Screen (Three) 19 . . . . . . . . . . . . . . . . . . . . . . . .
1.5 Customer Service 21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 2
XMIT CommunicationBlock 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 XMI T Communication Block 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Characteristics 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 Representation 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 XMI T Communication Control Table 27 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 XMI T Revision Number (4x) Read Only 27 . . . . . . . . . . . . . . . .
2.2.2 Communication Fault Status (4x + 1) Read Only 27 . . . . . . . .
2.2.3 AvailabletoUser (4x + 2) 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4 DataRate(4x + 3) 29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.5 DataBits (4x + 4) 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.6 Parity Bits (4x + 5) 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.7 Stop Bits (4x + 6) 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.8 AvailabletoUser (4x + 7) 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.9 Command Word (4x + 8) 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
840 USE 113 00
Contents vi
2.2.10 MessagePointer Word (4x + 9) 38 . . . . . . . . . . . . . . . . . . . . . . . .
2.2.11 MessageLength (4x + 10) 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.12 ResponseTime-Out (mS) (4x + 11) 44 . . . . . . . . . . . . . . . . . . . .
2.2.13 Retry Limit (4x + 12) 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.14 Start of Transmission Delay (mS) (4x + 13) 45 . . . . . . . . . . . .
2.2.15 Endof Transmission Delay (mS) (4x + 14) 45 . . . . . . . . . . . . .
2.2.16 Current Retry (4x + 15) 45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 XMI T Communication Functions 46 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 3
XMIT PortStatus Block 47 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 XMI T Port Status Block 48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 Characteristics 48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.2 Representation 48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 XMI T Port Status Display Table 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1 XMI T Revision Number (4x) Read Only 50 . . . . . . . . . . . . . . . .
3.2.2 Port Status Fault Status (4x + 1) ReadOnly 50 . . . . . . . . . . . .
3.2.3 SlaveLogin/SlavePort ActiveStatus (4x + 2) Read Only 50 .
3.2.4 SlaveTransaction Counter (4x + 3) ReadOnly 51 . . . . . . . . . .
3.2.5 Port State(4x + 4) Read Only 51 . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.6 I nput FI FO Status Bits (4x + 5) Read Only 51 . . . . . . . . . . . . .
3.2.7 I nput FI FO Length (4x + 6) ReadOnly 52 . . . . . . . . . . . . . . . .
Chapter 4
XMIT ConversionBlock 53 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1 XMI T Conversion Block 54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.1 Characteristics 54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.2 Representation 54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 XMI T Conversion Control Table 57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 XMI T Revision Number (4x) Read Only 57 . . . . . . . . . . . . . . . .
4.2.2 Conversion Fault Status (4x + 1) Read Only 57 . . . . . . . . . . . .
4.2.3 AvailabletoUser (4x + 2) 57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.4 DataConversion Control Bits (4x + 3) 58 . . . . . . . . . . . . . . . . .
4.2.5 DataConversion Opcodes (4x + 4) 60 . . . . . . . . . . . . . . . . . . . . .
4.2.6 SourceRegister (4x + 5) 61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.7 Destination Register (4x + 6) 61 . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.8 ASCI I StringCharacter Count (4x + 7) 61 . . . . . . . . . . . . . . . .
Contents
840 USE 113 00
vii
4.3 XMI T Conversion OpcodeExamples 62 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1 ASCI I I nput Related Conversion Examples 62 . . . . . . . . . . . . .
4.3.2 ASCI I Output RelatedConversion Examples 64 . . . . . . . . . . . .
4.3.3 ASCI I StringRelated Conversion Examples 65 . . . . . . . . . . . . .
4.4 Other Conversion Types 70 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4.1 Binary toBCD Conversion 70 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4.2 BCD toBinary Conversion 70 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 5
ApplicationExamples 71 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1 MultipleModbus Commands Transmission fromPLC toPLC slave 72 . . .
5.1.1 HardwareConfiguration 72 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.2 Master PLC Setup 73 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.3 Ladder Logic 74 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.4 Conclusion 79 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Fault WordTransmission toSlavePLC viaDialupModems 80 . . . . . . . . . .
5.2.1 HardwareConfiguration 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.2 ModemSetup 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.3 Master PLC Setup 81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.4 Ladder Logic 82 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.5 Conclusion 88 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AppendixA
Technical References 89 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Modbus Query/ResponseParameter Limits 90 . . . . . . . . . . . . . . . . . . . . . . . .
A.2 CablePinouts 93 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2.1 9-pin (RS-232) to25-pin (Modem) with noRTS/CTS 93 . . . .
A.2.2 9-pin (RS-232) to25-pin (Modem) with RTS/CTS 94 . . . . . . .
A.2.3 9-pin to9-pin (Null Modem) 95 . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2.4 9-pin to9-pin (Modem) 96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2.5 9-pin to25-pin (Null Modem) 97 . . . . . . . . . . . . . . . . . . . . . . . . .
A.2.6 RJ 45-(8x8) to25-pin (Null Modem) 110XCA20401 98 . . . . . . .
A.2.7 RJ 45-(8x8) to9-pin (Null Modem)110XCA20301 99 . . . . . . . .
A.2.8 RJ 45-(8x8) to25-pin (Modem)110XCA20401 100 . . . . . . . . . . . .
A.2.9 RJ 45-(8x8) to25-pin (Modem)110XCA20401 101 . . . . . . . . . . . .
A.2.10 RJ 45-(8x8) toRJ 45-(8x8) (Modem) 102 . . . . . . . . . . . . . . . . . . . . .
A.2.11 9-pin toRJ 45-(8x8) (Modem)110XCA20301 103 . . . . . . . . . . . . .
840 USE 113 00
Contents viii
A.2.12 9-pin toRJ 45-(8x8) (Modem)110XCA20301 104 . . . . . . . . . . . . .
A.3 CableAdapter Kits 105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.4 XMI T Configuration usingHayes CompatibleDial-Up Modems (Only) 106
A.4.1 I nitialization Message 106 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.4.2 Dial Message 108 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.4.3 HangupMessage 109 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index 111 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 1
840 USE 113 00
Chapter 1
Introduction
V XMI T Specific Functionality
V PLC Loadable Functions
V XMI T I nstallation as a Loadable
V Customer Service
Introduction
840 USE 113 00
2
1.1 XMIT Specific Functionality
TheXMI T (Transmit) function block sends Modbus messages froma
master PLC tomultipleslavePLCs or sends ASCI I character strings
fromthePLCs Modbus slaveport#1or port#2toASCI I printers and
terminals. XMI T sends thesemessages over telephonedialup modems,
radiomodems, or simply direct connection.
XMI T comes with threemodes: acommunication mode, port status
modeandaconversion mode. XMI T performs general ASCI I input
functions in thecommunication modeincludingsimpleASCI I and
terminated ASCI I . You may usean additional XMI T block for reporting
port status information intoregisters whileanother XMI T block
performs theASCI I communication function. You may import and
export ASCI I or binary dataintoyour PLC and convert it intovarious
binary dataor ASCI I tosend toDCE devices basedupon theneeds of
your application. Refer toChapter Twofor details about theXMI T
communication block, Chapter Threefor XMI T port status block and
Chapter Four for XMI T conversion block.
Theblock has builtin diagnostics that checks tomakesurenoother
XMI T blocks areactivein thePLC. Within theXMI T block acontrol
tableallows you tocontrol thecommunications link between thePLC
and DCE (DataCommunication Equipment) devices attached toModbus
port #1or port#2of thePLC. TheXMI T block does NOT activatethe
port LED when it is transmittingdata.
Expert: Remember, the Modbus protocol is a master/slave protocol.
Modbus is designed to have only one master polling multiple slaves.
Therefore, when using the XMI T block in a network with multiple
masters, contention resolution and collision avoidance is your responsi-
bility and may easily be addressed through ladder logic programming.
1.1.1 Restrictions
This function block controls Modbus port #1of the140CPU 11302, 140
CPU 21304, 140CPU 11303, 140CPU 42402, and PC E9842xx PLCs.
TheXMI T does not control Modbus port #2of thesePLCs. I n contrast,
this function block controls Modbus port #2of the110CPU 61204. The
XMI T does not control Modbus port #1of this PLC. This function block
does NOT operateon Modicon Micromodels 110CPU 512xx, 110CPU
61200/03, andCompact models PC A9841xx, PC 09841xx, PLCs.
Limits exist for Modbus query/responseparameters basedupon thePLC
model. Refer toAppendix A.
Introduction 3
840 USE 113 00
1.1.2 Software and Hardware Required
TheXMI T function block is availablein twoforms. Either as aloadable
or abuiltin block. When usingtheQuantum, Compact or MicroPLCs it
is aloadable. When usingtheMomentumPLCs it is abuiltin.
1.1.2.1 LoadableForm
V Modsoft Version 2.5 or lower (Part Number SW MSxD 9SA). Refer
to Section 1.3.1 for details.
V Modsoft Version 2.6 or higher (Part Number SW MSxD 9SA). Re-
fer to Section 1.3.2 for details.
V XMI T Loadable Function Block (Part Number 309 COM 455 0x).
This includes README.TXT, NSUP.EXE, XMI T1968.HLP,
XMI T.EXE files plus two sub-directories; /MS_25 that contains the
DXFDT.SYS file and /MS_26 that contains the XMI T.ZMM file.
Note: These are not PC executable programs.
V QuantumPLCs: 140 CPU 113 02, 140 CPU 213 04, 140 CPU 113
03 (with 2.12 executive or higher), 140 CPU 424 02 (with 2.10
executive or higher), and 140 CPU 434 12, 140 CPU 534 14 (with
1.02 executive or higher).
V Compatible Compact PLCs: PC E984 241, PC E984 245, PC E984
251, and PC E984 255 (with 1.02 executive or higher).
V Compatible Micro PLCs: 110 CPU 612 04 (with 1.00 executive or
higher).
V Communication media. For example, dialup type modem/lease line
modems. Refer to the list of tested modems and printers in the
Modicon 309 COM 455 00 XMIT Loadable Read--Me--First (GI--
XMIT--RMF).
1.1.2.2 Builtin Form
V Modsoft Version 2.6 or higher (Part Number SW MSxD 9SA).
V MomentumPLCs: 171 CCS 700 00, 171 CCS 700 10, 171 CCS 760
00, 171 CCS 780 00, 171 CCC 760 10, and 171 CCC 780 10 (with
2.00 executive or higher).
Introduction
840 USE 113 00
4
V Communication media. For example, dialup type modem/lease line
modems. Refer to the list of tested modems and printers in the
Modicon 309 COM 455 00 XMIT Loadable Read--Me--First (GI--
XMIT--RMF).
Introduction 5
840 USE 113 00
1.1.3 Reference Documents
V Modicon Modbus Protocol ReferenceGuide
(PI MBUS 300)
V 984 A120 Compact ProgrammableControllers User Guide
(890 USE 108 00)
V Modicon TSX QuantumAutomation Series HardwareReference
Guide
(840 USE 100 00)
V Modicon TSX MomentumM1 Processor Adapter and Option Adapt-
er User Manual
(870 USE 101 00)
V Modicon 512/612 Micro PLC HardwareUser Manual
(890 USE 145 00)
V Modicon Micro Controllers Ladder Logic Manual
(890 USE 146 00)
V Modicon Modsoft Programmer SoftwareUser Guide
(890 USE 115 00)
V Modicon Ladder Logic Block Library User Guide
(840 USE 101 00)
V Modicon 309 COM 455 0x XMI T LoadableRead MeFirst
(GI XMI T RMF)
Introduction
840 USE 113 00
6
1.2 PLC Loadable Functions
ThePLC has, within its configuration datatables, theability tohave
LoadableFunction Blocks addedtothecontroller. TheseLoadable
Functions areapplication specificprogrammableblocks that areloaded
and allowyou toset theopcodethrough Modsoft panel softwareand
then configure themintothelarger control program.
Theexecutablesoftwarecodeis programmed intotheapplication in the
format of astandardthreenodeladder logic instruction block. Thebasic
logic subroutinestructureof aloadableis shown in Figure1.
Process Memory References
Define Length
Start
Opcode
INPUTS
OUTPUTS
Figure1 LoadableCodeLogic Flow
Thesefunctions can beaddedtoexistingcontrol logic in afield
environment and offer asoftwaresolution tospecificapplication
problems.
Introduction 7
840 USE 113 00
1.3 XMIT Installation as a Loadable
This information assumes that you arefamiliar with Modsoft, have
configured thePLC and areabout toloadXMI T.
When theloadableis transferredtothepanel, Modsoft converts
XMI T.EXE toaDX filenamed XMI T1968.EXE.
Thenext fewfigures areexamples of thescreens you seeas you transfer
theXMI T Loadablefromthedisk tothe984controller. When you have
concluded thetransfer tothepanel, theDX will bedownloadedtothe
controller when you downloadtheconfiguration.
Step 1 I nsert the XMI T Loadable Function Block Disk (Part Number 309
COM 455 0x) into disk drive A:
Step 2 Go to the Offline(F2) selection on the Main Menu.
Step 3 Select either Select Programor New Programfromthe menu.
Step 4 Select Configuration (F5) fromthe menu.
Note: Remember, the README.TXT, NSUP.EXE, XMI T1968.HLP,
XMI T.EXE files plus two sub-directories; /MS_25 that contains the
DXFDT.SYS file and /MS_26 that contains the XMI T.ZMM file are
present on the disk. The NSUP and LSUP loadables are used to
interface .EXE loadables with the PLC operating system.
1.3.1 DXZoomScreens: Loading DXFDT.SYS
Only load DXFDT.SYS when usingModsoft 2.5or lower for DX zoom
screens. This fileis in the/MS_25sub-directory.
Step 1 Copy the DXFDT.SYS file to the Modsoft/runtime directory. The
DXFDT.SYS file replaces the existing DXFDT.SYS file.
1.3.2 DXZoomScreens: Loading XMIT.ZMM
Only load XMI T.ZMM when usingModsoft 2.6or higher for DX zoom
screens. This fileis in the/MS_26sub-directory.
Step 1 Copy the XMI T.ZMM file to the directory in which the programfiles re-
side. This file MUST be in the same directory as the programfiles for
the programusing XMI T, or the DX zoomscreens will not be available.
Introduction
840 USE 113 00
8
1.3.3 Loading XMIT1968.HLP Help Screen File
Step1 Copy the XMI T1968.HLP file to the directory in which the program
files reside. This file MUST be in the same directory as the program
files for the programusing XMI T, or the help screen will not be avail-
able.
1.3.4 Loading NSUP.EXE
Step1 Select Loadable(F7) then Dir (F3) then Load (F1). A prompt appears
asking for the filename. Type A:\ NSUP.EXE and then hit return.
Note: Either NSUP.EXE file or LSUP.EXE file must be loaded in
order to run the XMI T Block on the PLC. Therefore, if you already
have LSUP.EXE loaded, you need not load NSUP.EXE. Refer to
Figure2.
Caution: The NSUP.EXE file MUST be loaded into the PLC
BEFORE the XMIT.EXE file. If not the XMIT instruction will
not operate correctly and all three outputs turn on.
Figure2 LoadableScreen (SampleScreen)
Introduction 9
840 USE 113 00
Step 2 A systemmessage appears telling you that you can now access this
loadable.
Step 3 Hit Shift ? to display all available loadables. The NSUP.EXE Loadable
should now appear in this list.
Step 4 Place your cursor onto NSUP.EXE and press enter. This displays the
revision, size, and opcode of the NSUP Loadable. I ts Opcode is (ff
Hex). Ensure that this opcode does not conflict with any other Op-
codes that may be in use. I f so, select a new opcode fromthe available
list.
Note: To obtain the latest revisions to your NSUP Loadable contact
Customer Service.
1.3.5 Loading XMIT.EXE
Caution: When the NSUP loadable is not installed or,
installed after the XMIT loadable or, installed in a Quantum
PLC with an older executive than specified in Section 2.1.1., all
three outputs turn on regardless of the input states.
Caution: The NSUP.EXE file MUST be loaded into the PLC
BEFORE the XMIT.EXE file. If not the XMIT instruction will
not operate.
Step 1 Select Loadable(F7) then Dir (F3) then Load (F1). A prompt appears
asking for the filename. Type A:\ XMI T.EXE and then hit return. Re-
fer to Figure3.
Introduction
840 USE 113 00
10
Figure3 LoadableScreen (SampleScreen)
Step2 Systemmessage appears telling you that you can now access this load-
able. Move cursor below the name of the previous loadable to an open
spot.
Step3 Hit Shift ? to display all available loadables. The XMI T Loadable
should now appears in this list. Refer to Figure4.
Introduction 11
840 USE 113 00
Figure4 List of AvailableLoadables (SampleScreen)
Step 4 Place your cursor onto XMI T.EXE and press enter. This displays the
revision, size and opcode of the XMI T Loadable. I ts Opcode is (1e
Hex). Ensure that this opcode does not conflict with any other opcodes
that may be in use. The opcode shown on the screen may vary. Refer
to Figure5.
Introduction
840 USE 113 00
12
Figure5 InstalledLoadables (SampleScreen)
Step5 Press Escapetwice.
Step6 The Segment Status Display appears. Select a segment, a network and
press enter.
Step7 Select Element (F3) frommenu.
Step8 Select Loadable(F5) frommenu to access the XMI T Loadable.
Step9 Pick your XMI T Loadable.
Step 10 Place your cursor onto the XMI T block and hit ALT Z to pull- -up the
XMI T zoomscreens. At this point you may set your parameters based
upon your application and the details of the XMI T Block found in
Chapter Two. There are fourteen zoomscreens for the XMI T block.
Refer to Figure6 through Figure19.
Note: Use ALT H to access the help screen for XMI T.
Introduction 13
840 USE 113 00
1.4 XMIT ZoomScreens
Ten zoomscreens areusedtoset your parameters for both theloadable
and builtin XMI T blocks and thedetails of theXMI T block arefoundin
Chapter Two. Therearethreetypes of zoomscreens: eight screens for
XMI T communication mode, threefor XMI T port status modeandthree
for XMI T conversion mode.
1.4.1 DXCommunication Screens (Eight)
Figure6 XMIT Communication ZoomScreen1of 8
Introduction
840 USE 113 00
14
Figure7 XMIT Communication ZoomScreen2of 8
Figure8 XMIT Communication ZoomScreen3of 8
Introduction 15
840 USE 113 00
Figure9 XMIT Communication ZoomScreen4of 8
Figure10 XMIT Communication ZoomScreen5of 8
Introduction
840 USE 113 00
16
Figure11 XMIT Communication ZoomScreen6of 8
Figure12 XMIT Communication Zoom Screen7of 8
Introduction 17
840 USE 113 00
Figure13 XMIT Communication Zoom Screen 8of 8
Introduction
840 USE 113 00
18
1.4.2 DXPort Status Screen (Three)
Figure14 XMIT Port Status Zoom Screen1of 3
Figure15 XMIT Port Status Zoom Screen2of 3
Introduction 19
840 USE 113 00
Figure16 XMIT Port Status Zoom Screen3of 3
1.4.3 DXConversion Screen (Three)
Figure17 XMIT Conversion Zoom Screen1of 3
Introduction
840 USE 113 00
20
Figure18 XMIT Conversion Zoom Screen2of 3
Figure19 XMIT Conversion Zoom Screen3of 3
Introduction 21
840 USE 113 00
1.5 Customer Service
Schneider Automation telephonenumbers areas follows:
V To call us fromanywhere in North America except fromwithin the
state of Massachusetts: 1 (800) 468 5342
V To call us fromwithin Massachusetts or fromoutside North Ameri-
ca: 1 (978) 975 5001
V To fax us: 1 (978) 975 9301
Customer Service. When callingtheSchneider Automation telephone
number, ask for servicefromthelist below.
When callingthe800number, you will get arecordingaskingyou to
enter aonedigit codefor thetypeof serviceyou want (listed below).
However, this only works with atouch tone phone. I f usingadial
phone, hangon andtheoperator will intercept after ashort pause.
Theservicecategories and extra digit coderesponses for push button
phones are:
1 Technical support
2 Serviceorder administration
3 Modfax
4 Training/courseregistration inquiries
5 General information other than above.
Note: MODFAX: For available hardware data sheets, application
notes, and software information. Recommended catalogue MC FAX
DI R which is the master of all available catalogues (only twelve pages)
lists all catalogues available on the MODFAX system.
Note: BBS (Schneider Automations Customer Service Bulletin
Board): For Modsoft updates, conversion utilities, hardware and soft-
ware help, field service bulletins, Modbus and Modbus Plus help, soft-
ware revision levels, FLASH EXEC updates for 984E controllers, load-
able updates, and more. Parameters are up to 14.4k baud, no parity, 8
data, 1 stop, phone 1 (978) 975 9779.
Note: Schneider Automation web page (www.modicon.com) provides
user documentation, file updates, access to MODFAX, and other online
services.
XMIT Communication Block 23 840USE 113 00
Chapter 2
XMIT CommunicationBlock
V XMI T Communication Block
V XMI T Communication Control Table
V XMI T Communication Functions
XMIT Communication Block 24
840USE 11300
2.1 XMIT Communication Block
Thepurposeof theXMI T communication block is toreceiveand
transmit ASCI I messages, andModbus Master messages usingyour PLC
ports.
2.1.1 Characteristics
Size
Threenodes high
PLC Compatibility
V QuantumPLCs: 140 CPU 113 02, 140 CPU 213 04, 140 CPU 113
03 (with 2.12 executive or higher), 140 CPU 424 02 (with 2.10
executive or higher), and 140 CPU 434 12, 140 CPU 534 14 (with
1.02 executive or higher).
V Compact PLCs: PC E984 241, PC E984 245, PC E984 251, and PC
E984 255 (with 1.02 executive or higher).
V Micro PLCs: 110 CPU 612 04 (with 1.00 executive or higher).
V MomentumPLCs: 171 CCS 700 00, 171 CCS 700 10, 171 CCS 760
00, 171 CCS 780 00, 171 CCC 760 10, and 171 CCC 780 10 (with
2.00 executive or higher).
2.1.2 Representation
BlockStructure
Start XMIT operation Operationis active
#0001
4xxxx
XMIT
Operationterminated
unsuccessfully
Abort XMIT operation
Operationsuccessful
#0016
Not Used
Inputs
XMI T has twopossiblecontrol inputs. Theinput tothetop nodebegins
an XMI T operation and it shouldremain ON until theoperation has
completed successfully or an error has occurred. Theinput tothe
middlenodeaborts any activeXMI T operation andforces theport to
XMIT Communication Block 25 840USE 113 00
slavemode. An abort code(121) is placedintothefault status register.
Theport remains closed as longas this input is ON.
Note: To reset an XMI T fault and clear the fault register, the top
input must go OFF for at least one PLC scan.
Outputs
XMI T may producethreepossibleoutputs. Theoutputs fromthetop
nodegoes ON whilean XMI T operation is in progress. Theoutput from
themiddlenodegoes ON when XMI T has detected an error or was
issued an abort. Theoutput fromthebottomnodegoes ON when an
XMI T operation has been successfully completed.
Thefollowingtwocautions apply toloadables only.
Caution: When the NSUP loadable is not installed or,
installed after the XMIT loadable or, installed in a Quantum
PLC with an older executive than specified in Section 2.1.1., all
three outputs turn on regardless of the input states.
Caution: The NSUP.EXE file MUST be loaded into the PLC
BEFORE the XMIT.EXE file. If not the XMIT instruction will
not operate correctly and all three outputs turn on.
TopNodeContent
Thetop nodemust contain oneof thefollowingconstants either (#0001)
toselect PLC port #1, or (#0002) toselect PLC port #2. Theloadable
version does accept 4x registers in thetop node, whereas thebuiltin does
NOT.
MiddleNodeContent
The4xregister entered in themiddlenodeis thefirst in agroupof
sixteen (16) contiguous holdingregisters that comprisethecontrol block,
as shown below:
XMITCommunicationControl TableDescription
Description Register Valid Entries
XMIT Revision Number 4x ReadOnly
Fault Status 4x +1 ReadOnly
Availableto User 4x +2 0(May be usedas pointers
for instructions like TBLK)
Data Rate 4x +3 50, 75, 110, 134, 150, 300,
600, 1200, 2400, 9600, and
19200
XMIT Communication Block 26
840USE 11300
Data Bits 4x +4 7,8
Parity 4x +5 0, 1, 2
StopBits 4x +6 0, 1, 2
Availableto User 4x +7 0(May be usedas pointers
for instructions like TBLK)
Command Word 4x +8 0000--0001--0000--0000
(256Dec)
Pointer to Message
Table
4x +9 Limitedby the range of 4x
registers configured
Lengthof Message 4x +10 0 ... 1024
Response Time--Out
(mS)
4x +11 0 ... 65535
Retry Limit 4x +12 0 ... 65535
Start of Transmission
Delay (mS)
4x +13 0 ... 65535
Endof Transmission
Delay (mS)
4x +14 0 ... 65535
Current Retry 4x +15 ReadOnly
Warning! DO NOT modify the address in the middle node of
the XMIT block or delete it fromthe programwhile it is active.
This locks up the port preventing communications.
BottomNodeContent
Thebottomnodemust contain aconstant equal to(#0016). This is the
number of registers usedby theXMI T instruction.
XMIT Communication Block 27 840USE 113 00
2.2 XMIT Communication Control Table
Thefollowingis adetail description of each of the(16) XMI T
communication control tableregisters.
2.2.1 XMIT Revision Number (4x) Read Only
Displays thecurrent revision number of XMI T block. This number is
automatically loaded by theblock andtheblock over writes any other
number entered intothis register.
2.2.2 Communication Fault Status (4x +1) Read Only
This field displays afault codegeneratedby theXMI T block. A complete
list is shown in thetablebelow.
FaultStatus (4x+1)
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 Holdingregister (4x) not configured
104 Data lengthcannot equal zero
105 Pointer to message table cannot equal zero
106 Pointer to message table is outside the
range of configuredholdingregisters (4x)
107 Transmit message time--out (This error is gener-
atedwhenthe UART cannot complete a transmissionin 10
seconds or less. This error bypasses the retry counter and
will activate the error output onthe first error).
108 Undefinederror
109 ModemreturnedERROR
XMIT Communication Block 28
840USE 11300
110 ModemreturnedNO CARRIER
111 ModemreturnedNO DIALTONE
112 ModemreturnedBUSY
113 InvalidLRC checksumfromthe slave PLC
114 InvalidCRC checksumfromthe slave PLC
115 InvalidModbus functioncode
116 Modbus response message time--out
117 Modemreply time--out
118 XMIT couldnot gainaccess to PLC commu-
nications port #1or port #2
119 XMIT couldnot enable PLC port receiver
120 XMIT couldnot set PLC UART
121 User issuedanabort command
122 Topnode of XMIT not equal to zero, one or
two
123 Bottomnode of XMIT is not equal to seven,
eight or sixteen
124 Undefinedinternal state
125 Broadcast mode not allowed withthis Mod-
bus functioncode
126 DCE didnot assert CTS
127 Illegal configuration(data rate, data bits,
parity, or stopbits)
128 Unexpectedresponse receivedfromMod-
bus slave
129 Illegal commandwordsetting
130 Command wordchangedwhile active
131 Invalidcharacter count
132 Invalidregister block
133 ASCII input FIFO overflowerror
134 Invalidnumber of start characters or ter-
minationcharacters
2.2.3 Available to User (4x +2)
TheXMI T block does not usethis register. However, it may beusedin
ladder logic as apointer. An efficient way tousetheXMI T block is to
placeapointer valueof aTBLK instruction intothis register. For a
example, refer toChapter Five, Application Examples.
XMIT Communication Block 29 840USE 113 00
2.2.4 Data Rate (4x +3)
XMI T supports thefollowingdatarates: 50, 75, 110, 134, 150, 300, 600,
1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600and19200. Toconfigure
adatarate, enter its decimal number intothis field. When an invalid
datarateis entered, theblock displays an illegal configuration error
(error code127) in theFault Status (4x + 1) register.
XMIT Communication Block 30
840USE 11300
2.2.5 Data Bits (4x +4)
XMI T supports thefollowingdatabits: 7and 8. Toconfigureadatabit
size, enter its decimal number intothis register. Modbus messages may
besent in ASCI I modeor RTU mode. ASCI I moderequires 7databits,
whileRTU moderequires 8databits. When sendingASCI I character
messageyou may useeither 7or 8databits. When an invalid databit is
entered, theblock displays an illegal configuration error (error code127)
in theFault Status (4x + 1) register. For moredetails on Modbus
messageformats refer toModicon Modbus Protocol ReferenceGuide(PI
MBUS 300).
2.2.6 Parity Bits (4x +5)
XMI T supports thefollowingparity: none, oddand even. Enter a
decimal of either: 0= noparity, 1= odd parity, or 2= even parity.
When an invalid parity is entered, theblock displays an illegal
configuration error (error code127) in theFault Status (4x + 1) register.
2.2.7 Stop Bits (4x +6)
XMI T supports oneor twostopbits. Enter adecimal of either: 1= one
stopbit, or 2= twostopbits. When an invalid stopbit is entered, the
block displays an illegal configuration error (error code127) in theFault
Status (4x + 1) register.
2.2.8 Available to User (4x +7)
TheXMI T block does not usethis register. However, it may beusedin
ladder logic as apointer. An efficient way tousetheXMI T block is to
placeapointer valueof aTBLK instruction intothis register. For a
example, refer toChapter Five, Application Examples.
2.2.9 Command Word (4x +8)
TheXMI T interprets each bit of thecommand wordas afunction to
perform. I f bit 7and 8areon simultaneously or if any twoor moreof
bits 13, 14, 15or 16areon simultaneously or if bit 7is not on when bits
13, 14, 15, or 16areon error 129will begenerated. Other restrictions
apply. For moredetails refer toSection 2.3. Theindividual bit
definitions areshown in thetablebelow.
XMIT Communication Block 31 840USE 113 00
CommandWord(4x+8) BitDefinitions
Bit 1(msb) Reserved
Bit 2Enable RTS/
CTS modemcontrol
Set to 1whena DCE connectedto the PLC requires
hardware handshakingusing RTS/CTS control. This bit
may be usedin conjunctionwith values containedin(4x
+13) and(4x +14). Start of transmissiondelay (4x +
13) keeps RTS assertedfor (X mS) before XMIT sends
message out of PLC port #1. Likewise, endof transmis-
siondelay (4x +14) keeps RTS assertedfor (X mS)
after XMIT has finishedsendinga message out of the
PLC port #1. Once the endof transmissiondelay ex-
pires XMIT de--assert RTS.
Bit 3Enable RS485
mode
Set to 1whenthe selectedport shouldoperate in
RS485mode. Otherwise it defaults to 0, whichis RS232
mode.
Bit 4 Reserved
Bit 5Terminated
ASCII input
Set to 1to remove anddiscardall characters fromFIFO
until the startingstringis matched, thenthese starting
characters andsubsequent characters are writteninto a
contiguous 4x register destinationblock until the termi-
nator sequence is matched. The terminator stringis
also writteninto the 4x register destinationblock. Refer
to 2.2.9.1for more details.
Bit 6Simple ASCII
input
Set to 1to remove the ASCII characters fromFIFO for
writinginto a contiguous 4x register block. The Mes-
sage pointer (4x +9) specifics the 4x register block.
Refer to 2.2.9.2for more details.
Bit 7Enable ASCII
stringmessaging
Set to 1whenyou want to sendASCII messages out of
the PLC. XMIT sends ASCII strings upto 1024charac-
ters in length. You programeachASCII message into
contiguous 4x registers of the PLC. Two characters
allowedper register. Only use Bit 7ORBit 8, do not try
to use both.
Bit 8Enable Mod-
bus messaging
Set to 1whenyou want to sendModbus messages out
of the PLC. Modbus messages may be in either RTU or
ASCII formats. Whendata bits=8, XMIT uses Modbus
RTU format. Whendata bits=7, XMIT uses Modbus
ASCII format. Only use Bit 7 ORBit 8, do not try to use
both.
Bit 9Enable ASCII
receive FIFO
Set to 1to allowthe XMIT block to take control over the
selectedport (1or 2) fromthe PLC. The block begins to
receive ASCII characters into anempty 512byte circu-
lar FIFO. Refer to 2.2.9.3for more details.
Bit 10Enable back
space
Set to 1to allowspecial handlingof ASCII back space
character (BS, 8Hex). Whenusingeither Simple ASCII
Input (Bit 6) or TerminatedASCII Input (Bit 5) eachback
space character is removed fromFIFO andmay or may
NOT be storedinto a 4x register destinationblock. Re-
fer to 2.2.9.4for more details.
Bit 11Enable RTS/
CTS flowcontrol
Set to 1to allowfull duplex hardware flowcontrol using
the RTS andCTS handshakingsignals for ASCII mas-
saging. The RTS/CTS operates in boththe input and
output modes. Refer to 2.2.9.5for more details.
XMIT Communication Block 32
840USE 11300
Bit 12Enable Xon/
Xoff flowcontrol
Set to 1to allowfull duplex software flowcontrol using
the ASCII Xoncharacter (DC1, 11Hex) andthe ASCII
Xoff character (DC3, 13Hex). The Xon/Xoff operates in
boththe input andoutput modes. Refer to 2.2.9.6for
more details.
Bit 13Pulse dial
modem
Set to 1whenusinga Hayes compatible dial--upmodem
andyou wishto pulse dial a telephone number. You
programthe phone number into contiguous 4x registers
of the PLC. A pointer to these registers must be placed
incontrol table register (4x +9) andthe lengthof the
message in(4x +10). Pulse dialednumbers are sent to
the modemautomatically precededby ATDP andwith
carriage return<CR>andline feed<LF>appended.
Since the dial message is anASCII string, bit 7must be
ON prior to sendingthe number to be dialed.
Bit 14hangupmo-
dem
Set to 1whenusinga Hayes compatible dial--upmodem
andyou want to hangupthe modem. Youmust use
ladder logic to turnthis bit ON. Since the hangupmes-
sage is anASCII string, bit 7must be ON prior to send-
ingthe message. Hangupmessages are sent to the
modemautomatically precededby +++AT andwith car-
riage return<CR>andline feed<LF>appended. XMIT
looks for a correct disconnect response fromthe mo-
dembefore it turns ON the bottomoutput, notinga suc-
cessful completion.
Bit 15Tone dial mo-
dem
Set to 1whenusinga Hayes compatible dial--upmodem
andyou wishto tone dial a telephone number. Youpro-
gramthe dial message into contiguous 4x registers of
the PLC. A pointer to the dial message must be placed
incontrol table register (4x +9) andthe lengthof the
message in(4x +10). Tone dial numbers are sent to
the modemautomatically precededby ATDT andwith
carriage return<CR>and line feed<LF>appended.
Since the dial message is anASCII string, bit 7must be
ON prior to sendingthe number to be dialed.
Bit 16Initialize mo-
dem
Set to 1whenusinga Hayes compatible dial--upmodem
andyou want to initialize the modem. Youprogramthe
initializationmessage into contiguous 4x registers of the
PLC. A pointer to the initializationmessage must be
placedin control table register (4x +9) andthe lengthof
the message in(4x +10). All messages are sent to the
modemautomatically precededby AT andwith a car-
riage return<CR>andline feed<LF>appended. Since
the initializationmessage is an ASCII string, bit 7 must
be ON prior to sendingthe message.
2.2.9.1 Terminated ASCII Input Function
When (4x + 8, Bit 5) is actived for terminated ASCI I I nput messages,
themessagepointer (4x + 9) is theregister offset tothefirst register of
theASCI I input definition table. Theterminated ASCI I definition table
is fiveregisters long. Therefore, set themessagelength register (4x +
10) tofivefor successful XMI T operation. Theterminated ASCI I input
definition tableis shown in thetablebelow. Enter your dataintoyour
ASCI I input definition tableusingthereferencesection of Modsoft.
XMIT Communication Block 33 840USE 113 00
TerminatedASCII InputDefinitionTable
Word HighByte LowByte
4x +0 Number of startingcharacters
(allowedcontent =0, 1, 2)
Number of terminator characters
(allowedcontent =1, 2)
4x +1 First startingcharacter Secondstartingcharacter
4x +2 First terminator character Secondterminator character
4x +3 First 4x storage destinationregister
4x +4 Counter: counts the number of receivedcharacters writteninto the 4x
storage destinationregisters
Duringtheprocess, (4x +4) of theASCI I input definition tableholds a
runningcount of characters written intothe4x destination register
block. Oncetheterminated stringis receivedthebottomoutput on the
XMI T block goes ON and (4x +4) of theASCI I input definition table
holds thetotal length of thereceived stringincludingthestartingand
terminator strings. At this point theXMI T block stills owns theport
and continues tosavenewly receivedcharacters intotheASCI I receive
FI FO, becausetheenableASCI I receiveFI FO (4x + 8, Bit 9) is ON.
Usingladder logic, you can clear thesimpleASCI I input (4x + 8,Bit 6)
beforethenext scan, whileleavingtheenableASCI I receiveFI FO (4x +
8, Bit 9) ON. Thus, thecurrent 4x register destination block is NOT
over written by newer FI FO data, which is still collected in theFI FO.
Usingladder logic, you can clear both bits for enableASCI I receiveFI FO
(4x + 8, Bit 9), and terminated ASCI I input (4x + 8,Bit 5) toreturn port
control back tothePLC.
When toomany characters arewritten intothe4x register destination
block with NO terminator detected, or the4x register destination block
is outsidetheallowed rangefor theconfiguredPLC an error is reported
in Fault Status (4x +1). Thecharacter limit is thesmaller of 1024or
twotimes thesizes of the4x register destination block.
Werecommend you placethe4x register destination block for
terminated ASCI I input (4x + 8,Bit 5) past all other 4x registers used in
theapplication toavoid beingover written by ASCI I input in casethe
terminator is absent. Also, you couldallocate512registers for the4x
register destination block.
TerminatedASCII Example
Assumethat XMI T is activatedwith thecommand word(4x + 8, Bit 9
and 5) set. EnableASCI I FI FO and terminated ASCI I . Thefollowing
ASCI I stringis received by theport: AMScrlf$weight= 1245
GRAMScrlf$wei. Refer totheASCI I I nput Definition Tablethat shows
thecontents denoted by ( ) usedin this example.
XMIT Communication Block 34
840USE 11300
TerminatedASCII InputDefinitionTableExample(contents)
Word HighByte LowByte
4x +0 Number of starting charac-
ters (0x01)
Number of terminator char-
acters (0x02)
4x +1 First starting character ($) Secondstartingcharacter
(Not Used)
4x +2 First terminator character
(cr)
Secondterminator character
(if)
4x +3 First 4x storage destinationregister (101) =400101
4x +4 Counter: counts the number of receivedcharacters written
into the 4x storage destinationregisters (??????)
TheXMI T block becomes ACTI VE and then discards fromtheinput
FI FO theinitial fivecharacters, AMScrlf, becausethey donot match
thefirst startingcharacter set to$. On thelogic scan after the$ is
received, theXMI T block remains ACTI VE and it copies the$ and
subsequent characters intothe4x destination storage, updating(4x + 4)
of theASCI I I nput Definition Tablewith thecount donesofar, as the
characters comein. After thefinal termination character is receivedthe
bottomoutput Operation Successful is activatedand (4x + 4) of the
ASCI I I nput Definition Tablecontains thetotal length equal to0x0016.
The4x destination storageblock, startingat 400101contains: $w,
ei, gh, t, =, 12, 45, G, RA, MS, cflf. On thescan
that thebottomoutput Operation Successful is activated, thealready
received characters fromthenext message, $wei, that camein after
thetermination string, remains in theASCI I input FI FO. This gives the
ladder logic theopportunity toturn off theTerminated ASCI I input (4x
+ 8, Bit 5) beforethenext scan solveof XMI T for this port, keeping
thosecharacters in theFI FO until thePLC completes processingthe
current message, that might takeseveral scans.
2.2.9.2 Simple ASCII Input Function
Twocharacters arestored in each 4x register. Thefirst character
transferredfromFI FO is storedin thehigh byteof thefirst 4x register.
Thesecondcharacter is transferredfromFI FO is stored in thelowbyte
of thefirst register. Thethird character is storedin thehigh byteof the
second4x register, andsoon. TheMessageLength Register (4x + 10)
contains thelength of themessage(1... 1024). Therefore, theMessage
Length Register (4x + 10) decreases as thecharacters aretransferred
fromFI FO intothecontiguous 4x register block. Oncetheentire
messageis transfered theMessageLength Register (4x +10) restores its
initial valueandtheXMI Ts Operation Successful output is activated.
XMIT Communication Block 35 840USE 113 00
Note: When SI mple ASCI I I nput (Bit 6) and ASCI I Receive FI FO (Bit
9) remain set, new characters are constantously transferred fromFI FO
into the same 4x register block thus constantly over writing the
previous characters stored into the 4x register block.
By clearingSimpleASCI I I nput (Bit 7) beforethenext scan in your
ladder logicand settingASCI I ReceiveFI FO (Bit 9) you can still collect
newcharacters and avoidthis continuous overwritingof the4x register
block.By clearingboth SimpleASCI I I nput (Bit 7) and ASCI I Receive
FI FO (Bit 9) usingladder logicyou return control of theport (1or 2)
back tothePLC.
When theMessageLength Register (4x +10) is 0or morethan 1024, or
the4x register block is outsidetheallowed rangefor theconfiguredPLC
an error is reportedin Fault Status (4x +1).
2.2.9.3 EnableASCII ReceiveFIFO
Settingthis bit to0ends this function. When theFI FO receives 512
characters an internal overflowis set. When this occurs all subsequent
characters arediscarded, all ASCI I input operations (simpleand
terminated) areended, andtheblock returns an error until you toggle
(Bit 9). When (Bit 9) is toggled, all datain theFI FO is discarded, both
ASCI I input control bits areignored(SimpleASCI I (Bit 6), Terminated
ASCI I (Bit 5)), andwhen noASCI I output controls areselectedthen the
control of theport (1or 2) is returned back tothePLC.
You needtoset either Terminated ASCI I (Bit 5) or SimpleASCI I (Bit 6)
toremovetheASCI I characters fromFI FO for processing. Nomore
than oneof thefollowingthreebits can beset simultaneously:
Terminated ASCI I (Bit 5), SimpleASCI I (Bit 6), or ASCI I Output (Bit 7).
Full duplex operation may beachieved by settingboth ASCI I Receive
FI FO (BI T 9), andASCI I Output (Bit 7). This allows simpleASCI I
transmission out of thePLC whilestill receivingASCI I characters into
FI FO. This is useful when workingwith dumb terminals. When ASCI I
ReceiveFI FO (Bit 9) is set noneof thefollowingASCI I output controls
areallowed: Modbus Master Messaging(Bit 8), PulseDial Modem(Bit
13), Hangup Modem(Bit 14), ToneDial Modem(Bit 15) and I nitialize
Modem(Bit 16).
2.2.9.4 EnableBack space
When aBS is detectedit is NOT storedintothe4x register destination
block, in fact it deletes theprevious character andthus decreases the
Terminated (Bit 5) Character Counter (4x + 4) of theASCI I I nput
Definition Table. I n contrast, when aregular ASCI I character is
XMIT Communication Block 36
840USE 11300
detected it is stored intothe4x register destination block andthe
Terminated (Bit 5) Character Counter (4x + 4) of theASCI I I nput
Definition Tableis increased.
Note: Back spaces CANNOT delete characters froman empty 4x
register destination block, thus the Terminated (Bit 5) Character
Counter (4x + 4) of the ASCI I I nput Definition Table never goes below
0.
This special back spacefunctionality alongwith internal echoenabledat
theterminal arevery useful for dealingwith dumbterminals. A single
Terminated ASCI I I nput XMI T block searchingfor cr is activated with
ASCI I ReceiveFI FO (Bit 9) andback space(Bit 10) set. Noadditional
ladder logic is required whiletheyou typeand edit characters usingthe
back spaceon thefly. When you typecr XMI T activates thebottom
output Operation Successful, and thecorrecteddatais all lined up
properly in the4x register destination block.
2.2.9.5 EnableRTS/CTS FlowControl
Thefollowingpertains totheoutput mode. TheXMI T statevariableis
set toBLOCKED when CTS is OFF andthereceivingdeviceindicates it
cannot process additional characters. Likewise, TheXMI T statevariable
is set toUNBLOCKED when CTS is ON and thereceivingdevices
indicates it CAN process additional characters.
When transmission is UNBLOCKED andSimpleASCI I Output (Bit 7)
and RTS/CTS FlowControl (Bit 11) areset then thetransmit output
datais sent out in 16bytepackets. After all output packets aresent
then thebottomoutput on theXMI T block goes ON Operation
Successful.
I f duringatransmission it suddenly becomes BLOCKED, only the
remainingcharacters in thecurrent output packet aresent, never
exceeding16characters, and theXMI T block remains ACTI VE
indefinitely. Only when theCTS in ON will theASCI I output resume
sendingall remainingoutput packets.
Thefollowingpertains totheinput mode. SinceRTS is an output signal,
it can beused independently of theASCI I output transmit process, to
BLOCK or UNBLOCK sendingdevices. When ASCI I ReceiveFI FO (Bit
9) is set theRTS/CTS FlowControl works in theinput mode. When
ASCI I ReceiveFI FO (Bit 9) is set and neither of thetwoASCI I inputs
areset, SimpleASCI I I nput (Bit 6) or Terminated ASCI I I nput (Bit 5),
thereceived characters will fill theFI FO in which they areinserted.
XMIT Communication Block 37 840USE 113 00
Mean timetheRTS FlowControl (Bit 11) is ON allowingthesending
devicetoproceed.
When theFI FO is morethan threequarters full with characters theRTS
Control Flow(Bit 11) is clearedtoBLOCK thesendingdevice. TheRTS
Control Flow(Bit 11) remains cleareduntil either SimpleASCI I I nput
(Bit 6) or Terminated ASCI I I nput (Bit 5) haveremoved enough
characters fromtheFI FO whereby reducingit toless than onequarter
full of characters at which point theRTS Control Flow(Bit 11) is tuned
ON.
Note: The RTS/CTS Flow Control algorithmis different from
RTS/CTS ModemControl. The former is related to full duplex receive
buffer overflow. The latter deals with the transmit process gaining
access to a shared transmission medium. Therefore, it is illegal to
simultaneously request both of these RTS/CTS algorithms.
Note: You CANNOT select any type of RTS/CTS Flow Control (Bit
11) handshaking when the port is in RS 485 Mode (Bit 3) because these
signals do NOT exist in RS 485 mode.
2.2.9.6 EnableXon/Xoff FlowControl
Thefollowingpertains totheoutput mode. TheXMI T statevariableis
set toBLOCKED when Xoff character is received. LikewisetheXMI T
statevariableis set toUNBLOCKED when Xon character is received. I n
neither casewill Xon or Xoff beinsertedintotheFI FO.
When transmission is UNBLOCKED andSimpleASCI I Output (Bit 7)
and Xon/Xoff FlowControl (Bit 12) areset then thetransmit output
datais sent out in 16bytepackets. After all output packets aresent
then thebottomoutput on theXMI T block goes ON Operation
Successful.
I f duringatransmission it suddenly becomes BLOCKED, only the
remainingcharacters in thecurrent output packet aresent, never
exceeding16characters, andtheXMI T block remains ACTI VE
indefinitely. Only when thenext Xon character is received will the
ASCI I output resumesendingall remainingoutput packets.
Thefollowingpertains totheinput mode. Xon/Xoff may beusedto
BLOCK or UNBLOCK sendingdevices. When ASCI I ReceiveFI FO (Bit
9) is set theXon/Xoff Control Flow(Bit 12) works in theinput mode.
When ASCI I ReceiveFI FO (Bit 9) is set and neither of thetwoASCI I
inputs areset, SimpleASCI I I nput (Bit 6) or Terminated ASCI I I nput
XMIT Communication Block 38
840USE 11300
(Bit 5), thereceived characters will fill theFI FO in which they are
inserted.
When theFI FO is morethan threequarter full with characters and
additional characters arereceived theFI FO statevariableis set tosend
XOFF character out theserial port after adelay of upto16character
times BLOCKI NG thesender and clearingtheFI FO statevariable.
When all ASCI I output functions are(Bits 8,13,14,15, and 16) OFF and
theXon/Xoff FlowControl (Bit 12) is ON thedelay timedefaults to1
character time. I n contrast, when all ASCI I output functions are(Bits
8,13,14,15, and 16) ON andtheXon/Xoff FlowControl (Bit 12) is ON
then theASCI I output is broken up into16bytepackets. Thus, pending
Xoff characters DO NOT havetowait morethan 16character times
beforeBLOCKI NG thesender.
Oncethesender has stoppedtransmission, thePLC eventually removes
thecharacters formtheFI FO usingeither SimpleASCI I I nput (Bit 6) or
Terminated ASCI I I nput (Bit 7).
When FI FO becomes less than onequarter full with characters theFI FO
statevariableis set tosendXON. Thus, sendingaXon character out the
serial port toUNBLOCK thesender.
Note: To prevent lockup due to a disconnected cable or other
intermittent communication errors, when the sender is BLOCKED and
did NOT receive the Xon character correctly we use the following
algorithm. When FI FO becomes empty and no characters are
subsequently received, then a steady streamof Xon characters are
transmitted at the rate of once every 5 seconds.
Note: The Xon/Xoff Flow Control (Bit 12) is different fromthe
RTS/CTS Control Flow (Bit 11). The former uses transmitted Xon and
Xoff characters to prevent receive buffer overflow in full duplex mode.
The latter uses hardware shaking signals to accomplish the same goal.
Therefore, it is illegal to simultaneously request both of these flow
control algorithms because RTS/CTS Flow Control (Bit 11) Modem
Control implies a half duplex network while Xon/Xoff Flow Control (Bit
12) implies a full duplex network.
2.2.10 Message Pointer Word (4x +9)
You enter apointer that points tothebeginningof themessagetable.
For ASCI I character strings, thepointer is theregister offset tothefirst
register of theASCI I character string. Each register hold uptotwo
XMIT Communication Block 39 840USE 113 00
ASCI I characters. Each ASCI I stringmay beup to1024characters in
length. For example, when you want tosend 10ASCI I messages out of
thePLC, you must program10ASCI I characters strings into4x registers
of thePLC andthen through ladder logic set thepointer tothestart of
each messageafter each successful operation of XMI T.
2.2.10.1 Modbus Function Codes (01... 06, 15and 16)
For Modbus, messages, thepointer is theregister offset tothefirst
register of theModbus definition table. TheModbus definition tablefor
Modbus function code: 01, 02, 03, 04, 05, 06, 15and16is fiveregisters
longandyou must programit for successful XMI T operation. The
Modbus definition tableis shown in thetablebelow.
XMIT Communication Block 40
840USE 11300
Modbus DefinitionTableFunctionCodes (01... 06, 15and16)
Modbus functioncode (4y) XMIT supports the followingfunctioncodes:
01=Read multiple coils (0x)
02=Read multiple discrete inputs (1x)
03=Read multiple holdingregisters (4x)
04=Readmultiple input registers (3x)
05=Write single coil (0x)
06=Write single holdingregisters (4x)
15=Write multiple coils (0x)
16=Write multiple holdingregisters (4x)
Quantity (4y +1) Enter the amount of data youwant writtento the slave
PLC or read fromthe slave PLC. For example, enter
100to read100holdingregisters fromthe slave PLC or
enter 32to write 32coils to a slave PLC. There is a
size limitationon quantitythat is dependent onthe PLC
model. Refer to AppendixA for complete details on
limits.
Slave PLC address (4y +2) Enter the slave Modbus PLC address. Typically the
Modbus address range is 1 ... 247. To senda Modbus
message to multiple PLCs, enter 0for the slave PLC
address. This is referredto as Broadcast Mode.
Broadcast Mode only supports Modbus functioncodes
that writes data fromthe master PLC to slave PLCs.
Broadcast Mode does NOT support Modbus function
codes that readdata fromslave PLCs.
Slave PLC data area (4y +3) For a read command, the slave PLC data area is the
source of the data. For a write command, the slave
PLC data area is the destinationfor the data. For ex-
ample, whenyouwant to read coils (00300 ... 00500)
froma slave PLC, enter 300inthis field. Whenyou
want to write data froma master PLC andplace it into
register (40100) of a slave PLC, enter 100inthis field.
Dependingonthe type of Modbus command(write or
read), the source anddestinationdata areas must be
as definedinthe Source andDestinationData Areas
table below.
Master PLC data area (4y +4) For a read command, the master PLC data area is the
destinationfor the data returnedby the slave. For a
write command, the master PLC data area is the
source of the data. For example, whenyouwant to
write coils (00016... 00032) locatedin the master PLC
to a slave PLC, enter 16inthe field. Whenyouwant to
readinput registers (30001 ... 30100) froma slave PLC
andplace the data into the master PLC data area
(40100... 40199), enter 100in this field. Dependingon
the type of Modbus command(write or read), the
source anddestinationdata areas must be as defined
inthe Source andDestinationData Areas table below.
XMIT Communication Block 41 840USE 113 00
SourceandDestinationDataAreas for FunctionCodes (01... 06, 15and16)
FunctionCode Master PLC Data Area Slave PLC Data Area
03(Readmultiple 4x) 4x (destination) 4x (source)
04(Readmultiple 3x) 4x (destination) 3x (source)
01(Readmultiple 0x) 0x (destination) 0x (source)
02(Readmultiple 1x) 0x (destination) 1x (source)
16(Write multiple 4x) 4x (source) 4x (destination)
15(Write multiple 0x) 0x (source) 0x (destination)
05(Write single 0x) 0x (source) 0x (destination)
06(Write single 4x) 4x (source) 4x (destination)
When you want tosend 20Modbus messages out of thePLC, you must
program20Modbus definition tables andthen through ladder logic
increment thepointer toeach definition tableafter each successful
operation of XMI T, or you may program20separateXMI T blocks and
then activatethemoneat atimethrough ladder logic.
2.2.10.2 Modbus Function Code(08)
For Modbus messages, thepointer is theregister offset tothefirst
register of theModbus definition table. TheModbus definition tablefor
Modbus function code: 08is fiveregisters longandyou must programit
for successful XMI T operation. TheModbus definition tableis shown in
thetablebelow.
XMIT Communication Block 42
840USE 11300
Modbus DefinitionTableFunctionCodes (08)
Modbus functioncode (4y) XMIT supports the followingfunctioncode:
08=Diagnostics
Diagnostics (4y +1) Enter the diagnostics subfunctioncode decimal value
inthis filed to performthe specific diagnostics function
desired. The following diagnostic subfunctions are
supported:
Code Description
00 Return query data
01 Restart commoption
02 Return diagnostic register
03 Change ASCII input delimiter
04 Force listen only mode
05... 09 Reserved
10 Clear counters (&diagnostics registers
in384, 484)
11 Return bus messages count
12 Return bus commerror count
13 Return bus exceptionerror count
14... 15 Not supported
16 Returnslave NAK count
17 Returnslave busy count
18 Return bus Char overrun
count
19... 21 Not supported
Slave PLC address (4y +2) Enter the slave Modbus PLC address. Typically the
Modbus address range is 1 ... 247. Functioncode 8
dose NOT support Broadcast Mode (Address 0)
Diagnostics functiondata field
content (4y +3)
Youmust enter the decimal value neededfor the data
area of the specific diagnostic subfunction. For sub-
functions 02, 04, 10, 11, 12, 13, 16, 17and18this val-
ue is automatically set to zero. For subfunctions 00,
01, and03youmust enter the desired data field value.
For more details, refer to Modicon Modbus Protocol
Reference Guide (PI--MBUS--300).
Master PLC data area (4y +4) For all subfunctions, the master PLC data area is the
destinationfor the data returnedby the slave. You
must specify a 4x register that marks the beginningof
the data area where the returneddata is placed. For
example, to place the data into the master PLC data
area startingat (40100), enter 100in this field. Sub-
function04does NOT returna response. For more
details, refer to ModiconModbus Protocol Reference
Guide (PI--MBUS--300).
2.2.10.3 Modbus Function Codes (20, 21)
For Modbus, messages, thepointer is theregister offset tothefirst
register of theModbus definition table. TheModbus definition tablefor
Modbus function codes: 20and21is six registers longandyou must
programit for successful XMI T operation. TheModbus definition table
is shown in thetablebelow.
XMIT Communication Block 43 840USE 113 00
Modbus DefinitionTableFunctionCodes (20, 21)
Modbus functioncode (4y) XMIT supports the following functioncodes:
20=Readgeneral reference (6x)
21=Write general reference (6x)
Quantity(4y +1) Enter the amount of data youwant written to the slave
PLC or readfromthe slave PLC. For example, enter
100to read100holdingregisters fromthe slave PLC or
enter 32to write 32coils to a slave PLC. There is a
size limitation onquantity that is dependent onthe PLC
model. Refer to Appendix A for complete details on
limits.
Slave PLC address (4y +2) Enter the slave Modbus PLC address. Typically the
Modbus address range is 1... 247. Functioncode 20
and21do NOT support Broadcast Mode (Address 0).
Slave PLC data area (4y +3) For a readcommand, the slave PLC data area is the
source of the data. For a write command, the slave
PLC data area is the destinationfor the data. For ex-
ample, whenyouwant to readregisters
(600300... 600399) froma slave PLC, enter 300inthis
field. Whenyouwant to write data froma master PLC
andplace it into register (600100) of a slave PLC, enter
100inthis field. Dependingonthe type of Modbus
command(write or read), the source anddestination
data areas must be as definedin the Source andDes-
tinationData Areas table below. The lowest extended
register is addressedas register zero(600000). The
lowest holdingregister is addressedas register one
(400001).
Master PLC data area (4y +4) For a readcommand, the master PLC data area is the
destinationfor the data returnedby the slave. For a
write command, the master PLC data area is the
source of the data. For example, whenyouwant to
write registers (40016... 40032) locatedinthe master
PLC to 6x registers ina slave PLC, enter 16in the filed.
Whenyouwant to read6x registers
(600001... 600100) froma slave PLC andplace the
data into the master PLC data area (40100... 40199),
enter 100inthis field. Dependingonthe type of Mod-
bus command(write or read), the source anddestina-
tiondata areas must be as definedinthe Source and
DestinationData Areas table below. The lowest ex-
tendedregister is addressedas register zero
(600000). The lowest holdingregister is addressedas
register one(400001).
File number (4y +5) Enter the file number for the 6x registers to be written
to or read from. (1 ... 10) dependingonthe size of the
extendedregister data area. 600001is 60001file 1
and690001is 60001file 10as viewed by the Refer-
ence Data Editor in Modsoft.
XMIT Communication Block 44
840USE 11300
SourceandDestinationDataAreas for FunctionCodes (20, 21)
FunctionCode Master PLC Data Area Slave PLC Data Area
20 (Readgeneral reference 6x) 4x (destination) 6x (source)
21 (Write general reference 6x) 4x (source) 6x (destination)
When you want tosend20Modbus messages out of thePLC, you must
program20Modbus definition tables andthen through ladder logic
increment thepointer toeach definition tableafter each successful
operation of XMI T, or you may program20separateXMI T blocks and
then activatethemoneat atimethrough ladder logic.
2.2.11 Message Length (4x +10)
You enter thelength of thecurrent message. When XMI T is sending
Modbus messages for function codes 01, 02, 03, 04, 05, 06, 08, 15and16,
thelength of themessageis automatically set tofive. When XMI T is
recevingTerminated ASCI I input thelength of themessagemust beset
tofiveor an error results. When XMI T is sendingModbus messages for
function codes twenty andtwenty- -one, thelength of themessageis
automatically set tosix. When XMI T is sendingASCI I messages, the
length may be1... 1024ASCI I characters per message.
2.2.12 Response Time--Out (mS) (4x +11)
You enter thetimevaluein milliseconds (mS) todeterminehowlong
XMI T waits for avalidresponsemessagefromaslavedevice(PLC,
modem, etc.). I n addition, thetimeapplies toASCI I transmissions and
flowcontrol operations. When theresponsemessageis not completely
formed within this specifiedtime, XMI T issues afault. Thevalid range
is 0... 65535mS. Thetimeout is initiated after thelast character in the
messageis sent.
2.2.13 Retry Limit (4x +12)
You enter thequantity of retries todeterminehowmany times XMI T
sends amessagetoget avalid responsefromaslavedevice(PLC,
modem, etc.). When theresponsemessageis not completely formed
within this specifiedtime, XMI T issues afault and afault code. The
valid rangeis 0... 65535#of retries. This fieldis usedin conjunction
with responsetime- -out (4x + 11).
XMIT Communication Block 45 840USE 113 00
2.2.14 Start of Transmission Delay (mS) (4x +13)
You enter thetimevaluein milliseconds (mS) when RTS/CTS control is
enabled, todeterminehowlongXMI T waits after CTS is receivedbefore
it transmits amessageout of thePLC port #1. Also, you may usethis
register even when RTS/CTS is NOT in control. I n this situation, the
entered timevaluedetermines howlongXMI T waits beforeit sends a
messageout of thePLC port #1. You may usethis as apremessage
delay timer. Thevalidrangeis 0 ... 65535mS.
2.2.15 End of Transmission Delay (mS) (4x +14)
You enter thetimevaluein milliseconds (mS) when RTS/CTS control is
enabled, todeterminehowlongXMI T keeps RTS assertedoncethe
messageis sent out of thePLC port #1. After thetimeexpires, XMI T
deassert RTS. Also, you may usethis register even when RTS/CTS is
NOT in control. I n this situation, theentered timevaluedetermines
howlongXMI T waits after it sends amessageout of thePLC port #1.
You may usethis as apost messagedelay timer. Thevalid rangeis
0... 65535mS.
2.2.16 Current Retry (4x +15)
Thevaluedisplayedhereindicates thecurrent number of retry attempts
madeby theXMI T block. This register is readonly.
XMIT Communication Block 46
840USE 11300
2.3 XMIT Communication Functions
TheXMI T communication block performs six functions shown below.
For each function certain bits of thecommand word(4x + 8) must be
set.
(4x+8) CommandWordFunctions inRelationto Bits
(4x +8) Command
WordFunction
Commandword
bits that must
be set to 1
Bits that MUST be set to =0
TerminatedASCII
input (Bit 5=1) *
2,3,9,10,11,12 6,7,8,13,14,15,16
Simple ASCII input
(Bit 6=1) *
2,3,9,10,11,12 5,7,8,13,14,15,16
Simple ASCII out-
put (Bit 7=1)
2,3,9,10,11,12 5,6,8,13,14,15,16
Modemoutput (Bit
7=1)
2,3,13,14,15,16 5,6,8,9,10,11,12(plus one, but
ONLY one, of the followingbits
is set to 1: 13,14,15or 16, while
the other three bits must be set
to 0)
Modbus master
messagingoutput
(Bit 8=1)
2,3 5,6,7,9,10,11,12,13,14,15,16
Enable ASCII re-
ceive input FIFO
ONLY (Bit 9=1)
2,3,10,11,12 5,6,7,8,13,14,15,16
* Whenusingeither of these functions youMUST set Enable ASCII receive
FIFO ( (4x +8,Bit 9) to 1.
XMIT Port Status Block 47 840USE 113 00
Chapter 3
XMIT PortStatus Block
V XMI T Port Status Block
V XMI T Port Status Display Table
XMIT Port Status Block 48
840USE 11300
3.1 XMIT Port Status Block
TheXMI T port status block shows thecurrent port status, Modbus slave
activity, ASCI I input FI FO andflowcontrol information that may be
used in ladder logicfor someapplications. TheXMI T port status block
is totally passive. I t does not take, release, or control thePLC port.
3.1.1 Characteristics
Size
Threenodes high
PLC Compatibility
V QuantumPLCs: 140 CPU 113 02, 140 CPU 213 04, 140 CPU 113
03 (with 2.12 executive or higher), 140 CPU 424 02 (with 2.10
executive or higher), and 140 CPU 434 12, 140 CPU 534 14 (with
1.02 executive or higher).
V Compact PLCs: PC E984 241, PC E984 245, PC E984 251, and PC
E984 255 (with 1.02 executive or higher).
V Micro PLCs: 110 CPU 612 04 (with 1.00 executive or higher).
V MomentumPLCs: 171 CCS 700 00, 171 CCS 700 10, 171 CCS 760
00, 171 CCS 780 00, 171 CCC 760 10, and 171 CCC 780 10 (with
2.00 executive or higher).
3.1.2 Representation
BlockStructure
Start XMIT operation Not Used #0001
4xxxx
XMIT
Operationterminated
unsuccessfully
Operationsuccessful
#0007
Not Used
Not Used
Inputs
XMI T has onepossiblecontrol input. Theinput tothetop nodebegins
an XMI T operation and it shouldremain ON until theoperation has
XMIT Port Status Block 49 840USE 113 00
completed successfully or an error has occurred. Theinput tothe
middlenodeis not used on theXMI T port status block.
Note: To reset an XMI T fault and clear the fault register, the top
input must go OFF for at least one PLC scan.
Outputs
XMI T may producetwopossibleoutputs. Theoutput fromthetop node
is not usedon theXMI T port status block. Theoutput fromthemiddle
nodegoes ON when XMI T has detectedan error or was issued an abort.
Theoutput fromthebottomnodegoes ON when an XMI T operation has
been successfully completed.
TopNodeContent
Thetop nodemust contain oneof thefollowingconstants either (#0001)
toselect PLC port #1, or (#0002) toselect PLC port #2. Theloadable
version does accept 4x registers in thetop node, whereas thebuiltin does
NOT.
MiddleNodeContent
The4xregister entered in themiddlenodeis thefirst in agroupof seven
(7) contiguous holdingregisters that comprisetheport status display
block, as shown below:
XMITPortStatus Control TableDescription
Description Register No ValidEntries
XMIT Revision Number 4x ReadOnly
Fault Status 4x +1 ReadOnly
Slave loginstatus/
Slave port active status
4x +2 ReadOnly
Slave transaction
counter
4x +3 ReadOnly
Port state 4x +4 ReadOnly
Input FIFO status bits 4x +5 ReadOnly
Input FIFO length 4x +6 ReadOnly
Warning! DO NOT modify the address in the middle node of
the XMIT block or delete it fromthe programwhile it is active.
This locks up the port preventing communications.
BottomNodeContent
Thebottomnodemust contain aconstant equal to(#0007). This is the
number of registers used by theXMI T port status instruction.
XMIT Port Status Block 50
840USE 11300
3.2 XMIT Port Status Display Table
Thefollowingis adetail description of each of the(7) XMI T display table
registers.
3.2.1 XMIT Revision Number (4x) Read Only
Displays thecurrent revision number of XMI T block. This number is
automatically loaded by theblock andtheblock over writes any other
number entered intothis register.
3.2.2 Port Status Fault Status (4x +1) Read Only
This fielddisplays afault codegenerated by theXMI T port status block.
A completelist is shown in thetablebelow.
FaultStatus (4x+1)
Fault Code Fault Description
118 XMIT couldnot gainaccess to PLC commu-
nications port #1or port #2
122 Topnode of XMIT not equal to zero, one or
two
123 Bottomnode of XMIT is not equal to seven,
eight or sixteen
3.2.3 Slave Login Status/Slave Port Active Status (4x +2)
Read Only
This register displays status on twoitems generatedby theXMI T port
status block. Ladder logic may beabletousethis information toreduce
or avoidcollisions on amulti master Modbus network.
(4x+2highbyte) SlaveLoginStatus (4x+2lowbyte) PortActiveStatus
Yes=Whena programmingdevice is
currently loggedON to this PLC slave
port
Yes=Whenobservedport is ownedby
the PLC andcurrently receiving a Mod-
bus commandOR transmittinga Mod-
bus response
No=Whena programming device is
currently NOT loggedON to this PLC
slave port
(NOTE: A Modbus master cansend
commands but, not be loggedON)
No=Whenobservedport is NOT owned
by the PLC andcurrently receivingMod-
bus commandOR transmittinga Mod-
bus response
XMIT Port Status Block 51 840USE 113 00
3.2.4 Slave Transaction Counter (4x +3) Read Only
This register displays thenumber of slavetransactions generated by the
XMI T port status block. Thecounter increases every timethePLC
Modbus slaveport receives another command fromtheModbus master.
Ladder logic may beabletousethis information toreduceor avoid
collisions on amulti master Modbus network.
3.2.5 Port State (4x +4) Read Only
This register displays ownershipof theport andits state. I t is generated
by theXMI T port status block.
(4X+4) PortStateOptions
Owns Port Active State Value
PLC PLC Modbus slave 0
XMIT Tone dial modem 1
XMIT Hangupmodem 2
XMIT Modbus messaging 3
XMIT Simple ASCII output 4
XMIT Pulse dial modem 5
XMIT Initialize modem 6
XMIT Simple ASCII input 7
XMIT TerminatedASCII input 8
XMIT ASCII input FIFO is ON but, NO
XMIT functionis active
9
3.2.6 Input FIFO Status Bits (4x +5) Read Only
Theregister displays thestatus of seven items related totheinput FI FO.
I t is generatedby theXMI T port status block.
(4x+5) InputFIFOStatus Bits andtheir Definitions
Bit # Definition Yes/1= No/0=
1... 3 Not Used
4 Port ownedby... XMIT PLC
5... 7 Not Used
8 ASCII output transmission... Blockedby receiv-
ingdevice
Unblockedby receiving
device
9 ASCII input received... Newcharacter NO newcharacter
XMIT Port Status Block 52
840USE 11300
10 ASCII input FIFO is ... Empty Not empty
11 ASCII input FIFO is... Overflowing(error) Not overflowing(error)
12 ASCII input FIFO is... On Off
13 ... 15 Not Used
16 ASCII input reception... XMIT Blockedsen-
dingdevice
XMIT Unblockedsend-
ingdevice
3.2.7 Input FIFO Length (4x +6) Read Only
This register displays thecurrent number of characters present in the
ASCI I input FI FO. Theregister may contain other values based on the
stateof theinput FI FO andif thelength is empty or overflowing. I t is
generated by theXMI T port status block.
(4x+6) Other PossibleValues
WhenInput FIFO Then Length
=OFF =0
=ON &Empty =0
=ON &Overflowing =512
XMIT Conversion Block 53 840USE 113 00
Chapter 4
XMIT ConversionBlock
V XMI T Conversion Block
V XMI T Conversion Control Table
V XMI T Conversion Examples
V Other Conversion Types
XMIT Conversion Block 54
840USE 11300
4.1 XMIT Conversion Block
Thepurposeof theXMI T conversion block is totakedataandconvert it
intoother usableforms basedupon your application needs. Theconvert
block performs eleven different functions. Somefunctions include
ASCI I tobinary, integer toASCI I , byteswapping, searchingASCI I
strings, andothers. Theblock allows internal conversions using4x
sourceblocks to4x destination blocks.
4.1.1 Characteristics
Size
Threenodes high
PLC Compatibility
V QuantumPLCs: 140 CPU 113 02, 140 CPU 213 04, 140 CPU 113
03 (with 2.12 executive or higher), 140 CPU 424 02 (with 2.10
executive or higher), and 140 CPU 434 12, 140 CPU 534 14 (with
1.01 executive or higher).
V Compact PLCs: PC E984 241, PC E984 245, PC E984 251, and PC
E984 255 (with 1.02 executive or higher).
V Micro PLCs: 110 CPU 612 04 (with 1.00 executive or higher).
V MomentumPLCs: 171 CCS 700 00, 171 CCS 700 10, 171 CCS 760
00, 171 CCS 780 00, 171 CCC 760 10, and 171 CCC 780 10 (with
2.00 executive or higher).
4.1.2 Representation
BlockStructure
Start XMIT operation Not Used
#0000
4xxxx
XMIT
Operationterminated
unsuccessfully
Not Used
Operationsuccessful
#0008
Not Used
XMIT Conversion Block 55 840USE 113 00
Inputs
XMI T has onepossiblecontrol input. Theinput tothetop nodebegins
an XMI T operation andit shouldremain ON until theoperation has
completed successfully or an error has occurred. Theinput tothe
middlenodeis not used for theXMI T conversion block
Note: To reset an XMI T fault and clear the fault register, the top
input must go OFF for at least one PLC scan.
Outputs
XMI T may producetwopossibleoutputs. Theoutput fromthetop node
is not usedon theXMI T conversion block. Theoutput fromthemiddle
nodegoes ON when XMI T has detectedan error or was issued an abort.
Theoutput fromthebottomnodegoes ON when an XMI T operation has
been successfully completed.
TopNodeContent
Thetop nodemust contain aconstant (#0000) sinceconversions donot
deal with thePLCs port. Theloadableversion does accept 4x registers
in thetop node, whereas thebuiltin does NOT.
MiddleNodeContent
The4xregister entered in themiddlenodeis thefirst in agroupof eight
(8) contiguous holdingregisters that comprisethecontrol block, as
shown below:
XMITConversionControl TableDescription
Description Register Valid Entries
XMIT Revision Number 4x ReadOnly
Fault Status 4x +1 ReadOnly
Availableto User 4x +2 0(May be usedas pointers
for instructions like TBLK)
Data ConversionCon-
trol Bits
4x +3 Refer to the bit definition
table for 4x +3.
Data ConversionOp-
code
4x +4 Refer to the definitiontable
for 4x +4.
Source Register 4x +5 4x register (beginreadat
High or Lowbyte)
DestinationRegister 4x +6 4x register (beginreadat
High or Lowbyte)
ASCII StringCharacter
Count
4x +7 Defines the search area
XMIT Conversion Block 56
840USE 11300
Warning! DO NOT modify the address in the middle node of
the XMIT block or delete it fromthe programwhile it is active.
This locks up the port preventing communications.
BottomNodeContent
Thebottomnodemust contain aconstant equal to(#0008). This is the
number of registers usedby theXMI T conversion instruction.
XMIT Conversion Block 57 840USE 113 00
4.2 XMIT Conversion Control Table
Thefollowingis adetail description of each of the(8) XMI T conversion
control tableregisters.
4.2.1 XMIT Revision Number (4x) Read Only
Displays thecurrent revision number of XMI T block. This number is
automatically loaded by theblock andtheblock over writes any other
number entered intothis register.
4.2.2 Conversion Fault Status (4x +1) Read Only
This field displays afault codegeneratedby theXMI T conversion block.
A completelist is shown in thetablebelow.
FaultStatus (4x+1)
Fault Code Fault Description
122 Topnode of XMIT not equal to zero, one or
two
123 Bottomnode of XMIT is not equal to seven,
eight or sixteen
131 Invalidcharacter count
135 Invaliddestinationregister block
136 Invalidsource register block
137 No ASCII number present
138 Multiple signcharacters present
139 Numerical overflowdetected
140 Stringmismatcherror
141 Stringnot found
142 Invaliderror check detected
143 Invalidconversionopcode
4.2.3 Available to User (4x +2)
TheXMI T conversion block does not usethis register. However, it may
beusedin ladder logic as apointer. An efficient way tousetheXMI T
block is toplaceapointer valueof aTBLK instruction intothis register.
For aexample, refer toChapter Five, Application Examples.
XMIT Conversion Block 58
840USE 11300
4.2.4 Data Conversion Control Bits (4x +3)
This 16bit wordrelates totheDataConversion (4x + 4) word. These
bits provideadditional control options based on which of theeleven
conversions you select.
(4x+3) DataConversionControl Bits andtheir Definitions
Bit # Definition 1= 0=
1 Not Used
2 CRC 16seed 0x0000 0xFFFF
3 Error check type LRC 8 CRC 16
4 Error check Validate Append
5 &6 Not Used
7 Conversioncase Upper to
lower
Lower to
upper
8 Case sensitivity No Yes
9 Format leading Zeros Blanks
10 Output format Fixed Variable
11 Conversiontype Unsigned Signed
12 Conversionword 32bit 16bit
13 Automatic advance source
pointer (points to the next char-
acter after the last character
purged)
Yes No
14 Automatic advance destination
pointer (points to the next char-
acter after the last character
purged)
Yes No
15 BeginreadingASCII at source
beginningwith ...
Lowbyte High byte
(normal)
16 BeginsavingASCII at destina-
tionbeginningwith...
Lowbyte highbyte
(normal)
Certain bits relatetocertain conversions. Thosebits not mentioned are
not validatedor modified by theselected conversion and they haveno
function in relation totheselected conversion. Therefore, they arejust
ignored.
Conversionto PertinentBits Relationship
Conversion Type (opcode) Pertinent Bit State (software sets bit state)
Illegal opcode (displayedwhen illegal opcode is detected)
ASCII decimal to integer (1) 16=0,11,12,13,15(7=1, 8=0)
ASCII hex to integer (2) 16=0,11,12,13,15(7=1, 8=0)
XMIT Conversion Block 59 840USE 113 00
ASCII hex to integer array (3) 13,15,16(none)
Integer to ASCII decimal (4) 15,9,10,11,12,14,16(none)
Integer to ASCII hex (5) 15,9,10,11,12,14,16(none)
Integer array to ASCII hex (6) 14,15,16, (8=yes)
Swapsource bytes to destination(7) 14,15,16, (8=yes)
Copy source block to destination(8) 7,8,14,15,16(none)
Compare source &destinationblocks (9) 7,8,13,15,16(none)
Searchsource block for definedstring de-
finedindestination(10)
7,8,13,15,16(none)
Validate or appenderror check insource
block (11)
2,3,4,13,15(8=yes, 14=yes, 16=1/0)
XMIT Conversion Block 60
840USE 11300
4.2.5 Data Conversion Opcodes (4x +4)
Select thetypeof conversion you want toperformfromthelist of eleven
options listedin thetable. After pickingthetypeof conversion refer to
DataConversion Control Bits (4x + 3) for additional control options that
relatetothespecificconversion typeselected.
(4x+4) DataConversionOpcodes andtheir Definitions
Data Type (4x block) Action Data Type (4x block)
Illegal opcode displayed
whenillegal
opcode is
detected
Not applicable
Received ASCII deci-
mal character string (1)
Convertedto 16bit or 32bit signedor un-
signedbinary integer
Received ASCII hex
character string(2)
16bit or 32bit unsigned
binary integer
Received ASCII hex
character string(3)
16bit unsignedbinary inte-
ger array
16bit or 32bit signedor
unsignedinteger (4)
ASCII decimal character
string for transmission
16bit or 32bit unsigned
binary integer (5)
ASCII hex character string
for transmission
16bit unsignedinteger
array (6)
ASCII hex character string
for transmission
High andlowbytes from
savedASCII source
register block (7)
Swappedto ASCII destinationregister
block
ASCII stringfrom
source register block
(8)
Copiedto ASCII destinationregister
block with or without case
conversion
ASCII source register
block (9)
Comparedto ASCII string definedin des-
tinationregister block with
or without case sensitivity
ASCII source register
block (10)
Searchfor ASCII string definedin des-
tinationblock with or without
case sensitivity
Error check 8bit LRC or
16bit CRC (11)
Validatedor
Appended
on
ASCII string insource regis-
ter block
Note: Binary to BCD and BCD to binary conversions may be
performed using more than one XMI T conversion block. For details,
refer to Section 4.4, Other Conversion Types.
XMIT Conversion Block 61 840USE 113 00
4.2.6 Source Register (4x +5)
Enter the4x register desired. This is thefirst register in thesource
block that is read. Ensureyou select whereyou want thereadtobegin
(high or lowbyte). Theselection besidethis register in theDX zoom
screen is thesameas bit 15in (4x +3).
4.2.7 Destination Register (4x +6)
Enter the4x register desired. This is thefirst register in thedestination
block that is saved. Ensureyou select whereyou want thesavetobegin
(high or lowbyte). Theselection besidethis register in theDX zoomis
thesameas bit 16in (4x +3).
4.2.8 ASCII String Character Count (4x +7)
Enter thesearch area. This register defines thesearch area. When
either automatic advancesource(Bit 13) or automatic advance
destination (Bit 14) areON and noASCI I character is detected, the
block automatically adjusts thecharacter count.
XMIT Conversion Block 62
840USE 11300
4.3 XMIT Conversion OpcodeExamples
This section provides you with examples usingall eleven conversion
options (opcodes 1... 11). I ndividual examples comewith complete
settings anddatainformation alongwith adescriptions.
4.3.1 ASCII Input Related Conversion Examples
Opcodes 1... 3convert ASCI I input dataintobinary data. TheASCI I
input datais received viathePLC port and XMI T communication block.
TheASCI I datais then converted intobinary data. At this point the
converted binary datais ready tobeused by thePLC basedupon your
application needs.
Theseopcodes parsevariablelength ASCI I stringdata, startingat the
sourceregister high or lowbyte, as selected by (4x +3, Bit 15) data
conversion control register. TheASCI I stringcharacter count register
(4x + 7) defines themaximumnumber of characters that can beparsed
fromthesourcestringandmust initially contain avaluebetween
1... 1024. Thedataconversion control register (4x + 3) alsoselects the
conversion length of 16bit or 32bit (4x + 3, Bit 12) and selects signed or
unsigned (4x +3, Bit 13) conversion.
For opcodes 1... 3, theinitial ASCI I stringcharacter count (4x + 7) is
reducedby thetotal number of characters parsedfromtheASCI I source
string, andthesourcestringpointer (4x + 3, Bit 13) is advancedtoone
character past thelast character parsedduringtheconversion.
Note: An error occurs when no hex or decimal digits are present, or
when the destination register (4x +6) block is greater than 512
registers or runs past the end of the PLCs state RAM configuration.
XMIT Conversion Block 63 840USE 113 00
ASCII InputRelatedConversionExamples
Opcode Actions Data (youenter)
1 Source block startingat 400201highbyte = --001234567crlf
Initial character count= 0x000C
Conversioncontrol selection= 32bit signedconversion
32bit signeddestinationregister pair is
loadedwith=
0xFFED2979
Source block advancedto 400206high
byte, nowaims at=
crlf
ASCII string character count is reducedto= 0x0002
2 Source block startingat 400201highbyte = +F301C23 cat
Initial character count= 0x000C
Conversioncontrol selection= 32bit unsignedconver-
sion
32bit signeddestinationregister pair is
loadedwith=
0x0FE01C23
Source block advancedto 400205high
byte, nowaims at=
cat
ASCII string character count is reducedto= 0x0004
3 Source block startingat 400301lowbyte = 124ABC0AFcrlf
Initial character count= 0x000B
32bit signeddestinationregister pair is
loadedwith=
0x0FE01C23
Source block advancedto 400306high
byte, nowaims at=
crlf
ASCII string character count is reducedto= 0x0002
4.3.1.1 Description of Opcode1Example
Opcode1skips initial whitespaceandthen looks for optional sign, +
or -, andat least onedecimal digit, 0 to9, terminated by
somethingother than whitespaceor decimal digit. Then thebinary
equivalent valueof thestringis written intothedestination register, for
16bit conversion, or intothedestination register pair, for 32bit
conversion. The32bit destination register pair has least significant
word(LSW) stored in thelower register number and most significant
word(MSW) storedin thehigher register number. An error occurs when
nodecimal digit is present, or when somany digits arepresent that the
converted binary equivalent is toolargetofit in therequested storage
type.
XMIT Conversion Block 64
840USE 11300
4.3.1.2 Description of Opcode2Example
Opcode2skips initial whitespaceandthen looks for optional sign, +
or -, and at least onehex digit, 0 to9 or A toF or a tof,
terminated by somethingother than whitespaceor hex digit. Then the
binary equivalent valueof thestringis written intothe16bit or 32bit
destination.
4.3.1.3 Description of Opcode3Example
Opcode3converts ASCI I hex characters intoan array of 16bit binary
equivalents, with 4ASCI I characters packedintoeach 16bit storage
word.
4.3.2 ASCII Output Related Conversion Examples
Opcodes 4... 6convert PLC binary dataintoASCI I data. OncethePLC
binary datais convertedintoASCI I datait is then transmitted viathe
PLC port and XMI T communication block. At this point theconverted
ASCI I datais ready tobeused by thefield devicebased upon your
application needs.
Note: I n opcodes 4... 6, an error occurs when the destination register
block is greater than 512 registers or runs past the end of the PLCs
state RAM configuration.
ASCII OutputRelatedConversionExamples
Opcode Actions Data (you enter)
4 Source contains= 0x9CDE
Destinationblock at 400101highbyte
Initial character count is= 0x000C
Conversioncontrol selects 16bit signed
fixedoutput format usingleadingzeroes
Destinationblock is loadedwith= 000000040158
Final character count is= 0x0000
Destinationblock advancedto 400107high
byte
5 Source contains= 0x03FE1234
Destinationblock at 400001lowbyte
Initial character count is= 0x0010
Conversioncontrol selects 32bit unsigned
variable output format
Destinationblock is loadedwith= 3FE1234
XMIT Conversion Block 65 840USE 113 00
Final character count is= 0x0009
Destinationblock advancedto 400005high
byte
6 Source contains= 0x5B3D, 0x467E,
0xD14F, 0x478C
Destinationblock at 400201lowbyte
Initial character count is= 0x0007
Destinationblock is loadedwith= 5B3D467
Final character count is= 0x0000
Destinationblock advancedto 400205high
byte
4.3.2.1 Description of Opcode4and 5Example
Opcodes 4and 5generatevariablelength ASCI I output datawhen the
dataconversion control register (4x +3, Bit 10) is 0(variable). Then the
number of ASCI I output characters generated aresubtractedfromthe
initial ASCI I stringcharacter count register (4x + 7) andthedestination
pointer (4x + 3, Bit 14) is advanced. When thedataconversion control
register (4x +3, Bit 10) is 1(fixed). Then enough leadingzeros or
blanks, basedon thestateof thedataconversion control register (4x +3,
Bit 9) is loadedintothedestination register block (4x + 6), in front of
theconversion data, toforcethetotal number of characters tobeexactly
therequested amount. TheASCI I stringcharacter count (4x + 7) is set
tozeroandthedestination pointer (4x + 3, Bit 14) is advanced. An
error occurs when thebinary sourcevaluegenerates moredecimal
characters than can fit in thedefined destination register block.
4.3.2.2 Description of Opcode6Example
Opcode6converts an array of binary registers fromthesourceblock
intoASCI I hex digit characters, that areloadedintothedestination
block.
4.3.3 ASCII String Related Conversion Examples
Opcodes 7... 11performfivedifferent ASCI I stringoperations within
thePLC basedupon your application needs. Werecommend you define
your sourceand destination blocks usingdifferent 4x references that do
not overlap.
When usingbyteswap (opcode7) or stringcopy (opcode8) with case
conversion, thesourceand destination blocks may bethesame. When
usingbyteswap(opcode7) or stringcopy (opcode8) thedestination
block is loaded, thedestination pointer (4x + 3, Bit 14) is advancedpast
XMIT Conversion Block 66
840USE 11300
thelast character written, and theASCI I stringcharacter count (4x + 7)
is reducedtozero.
When usingstringcompare(opcode9) or stringsearch (opcode10), the
sourcepointer (4x + 3, Bit 13) is advanced, andtheASCI I string
character count (4x + 7) is reduced.
Note: I n general, The source pointer auto advance (4x + 3, Bit 13)
and the destination pointer auto advance(4x + 3, Bit 14) must be on in
the conversion control register (4x + 3), or else these pointers retain
their original values, as well as, the initial character count (4x + 7).
ASCII StringRelatedConversionExamples
Opcode Actions Data (you enter)
7 Source contains= ABCDEF
Destinationblock at 400001lowbyte
Initial character count is= 0x0006
Destinationblock is loadedwith= BADCFE
Final character count is reducedto= 0x0000
Destinationblock advancedto 400004low
byte
8a Source contains= ABcdeFGH
Destinationblock at 400101lowbyte
Initial character count is= 0x0006
Conversioncontrol has case sensitivity on
Destinationblock is loadedwith= ABcdeF
Final character count is reducedto= 0x0000
Destinationblock advancedto 400104low
byte
8b Source contains= abCdeF12
Destinationblock at 400301highbyte
Initial character count is= 0x0008
Conversioncontrol has case sensitivity off,
withlower to upper selected
Destinationblock is loadedwith= ABCDEF12
Final character count is reducedto= 0x0000
Destinationblock advancedto 400305high
byte
XMIT Conversion Block 67 840USE 113 00
4.3.3.1 Description of Opcode7Example
Opcode7uses asourceregister block of 16bit integers andadestination
register block of 16bit integers. Each sourcewordfromthesource
register block is read, bytes swappedand then written intothe
destination register block. Theinitial ASCI I stringcharacter count
register (4x + 7) specifies thenumber of registers tobeconverted and
must bean even number between 2... 1024.
4.3.3.2 Description of Opcode8a and 8b Example
Opcode8copies theASCI I stringin thesourceregister block intothe
destination register block. Theinitial ASCI I stringcharacter count (4x
+ 7) specifics thenumber of characters tobecopied. When case
sensitivity in thedataconversion control register (4x + 3, Bit 8) is off,
then theselected lower toupper caseor upper tolower caseconversion
(4x + 3, Bit 7) is performedon thedestination block duringthecopy.
ASCII StringRelatedConversionExamples
Opcode Actions Data (youenter)
9 Destinationblock contains= abcde\0
Source block at 400201highbyte contains= abcdefgh
Initial character count is= 0x0008
Source block advancedto 400203lowbyte,
nowaims at=
fgh
Final character count is reducedto= 0x0003
Operationsuccessfulbottomoutput goes
onbecause destinationstringmatchedin
source string
10 Destinationblock contains= def\0
Source block at 400201highbyte contains= abcdefgh
Initial character count is= 0x0008
Source block advancedto 400202lowbyte,
nowaims at=
defgh
Final character count is reducedto= 0x0005
Operationsuccessfulbottomoutput goes
onbecause destinationstringfoundin
source string
11 Source block at 400201highbyte contains= 0x0103, 0x0001,
0x0008, 0x1234
Initial character count is= 0x0006
Conversioncontrol selects LRC8must be
appended
Source block at 400201lowbyte, nowcon-
tains=
0x0103, 0x0001,
0x0008, 0xF334
XMIT Conversion Block 68
840USE 11300
Source block remains at 400201highbyte
Final character count is increasedto= 0x0007
Operationsuccessfulbottomoutput goes
onbecause destinationstring foundin
source string
4.3.3.3 Description of Opcode9Example
Opcode9takes theASCI I stringdefinedin thedestination register block
and compares it tothesourceregister block. Theinitial ASCI I string
character count (4x + 7) specifics themaximumnumber of characters to
becompared, it must bebetween 1... 1024. Thematch stringis
contained in thedestination block andmust beterminated by a0x00
character. Thesourcepointer (4x + 3, Bit 13) is advancedpast thelast
matchingcharacter and thecharacter count (4x + 7) is reducedby the
number of characters that matched. When all characters in thesource
stringmatch thedestination stringuptotheNULL terminator, then the
bottomoutput goes on (operation successful). Otherwise, themiddle
output goes on (error).
4.3.3.4 Description of Opcode10Example
Opcode10takes theASCI I stringdefined in thedestination register
block andsearches thesourceregister block. Theinitial ASCI I string
character count (4x + 7) specifics themaximumnumber of characters to
besearched, it must bebetween 1... 1024. Thematch stringis
contained in thedestination block andmust beterminated by a0x00
character. When thematch stringis present in thesourceblock, then
thesourcepoint (4x + 3, Bit 13) is advanced tothestart of thematching
string. Thecharacter count (4x + 7) is reduced by thenumber of
characters skipped over at thebeginningof thesourceblock and the
bottomoutput goes on (operation successful). Otherwise, thesource
pointer andcharacter count arenot changedand themiddleoutput goes
on (error).
4.3.3.5 Description of Opcode11Example
Opcode11performs an error check computation for LRC 8bit, CRC
16bit with seed 0xFFFF, or CRC 16bit with seed0x0000. When
conversion control register (4x +3, Bit 4) is set (validate), theselected
error check, at theend of theASCI I stringin thesourceblock with its
given length definedby theASCI I stringcharacter count, is validated.
When theerror check is valid, then thebottomoutput goes on (operation
successful). Otherwise,themiddleoutput goes on (error).
When conversion control register (4x +3, Bit 4) is 0(append), then the
selected error check is computed and appendedtotheendof theASCI I
XMIT Conversion Block 69 840USE 113 00
stringin thesourceblock. Thecharacter count is increasedby thebyte
sizeof theerror check, thesourcepointer is not advanced, andthe
bottomoutput goes on (operation successful).
XMIT Conversion Block 70
840USE 11300
4.4 Other Conversion Types
Additional conversion types arepossibleusingtwoXMI T conversion
blocks.
4.4.1 Binary to BCDConversion
TwoXMI T conversion blocks must beused toperformthis conversion
type. Thefirst XMI T conversion block uses (opcode4) toconvert the
32bit binary sourceinteger intoa10digit fixedplaceASCI I decimal
character stringsavedtoa4x register block. Thesecond XMI T
conversion block uses (opcode2) toconvert ahexadecimal ASCI I
character stringreadfromthesame4x register block, into32bit BCD
destination integer. Thebinary sourceinteger must besmaller than
0x05F5E0FF, which is 99999999decimal.
4.4.2 BCDto Binary Conversion
TwoXMI T conversion blocks must beused toperformthis conversion
type. Thefirst XMI T conversion block uses (opcode5) toconvert the
32bit BCD sourceinteger intoan 8digit fixedplaceASCI I hexadecimal
character stringsavedtoa4x register block. Thesecond XMI T
conversion block uses (opcode1) toconvert adecimal ASCI I character
stringreadfromthesame4x register block, intoa32bit binary
destination integer. When all 8characters areparsed, then theBCD
sourceinteger is avalidBDC number.
Application Examples 71
840 USE 113 00
Chapter 5
ApplicationExamples
V Multiple Modbus Commands Transmission fromPLC master to
PLC slave
V Fault Word Transmission to Slave PLC via Dialup Modems
Application Examples 72
840USE 11300
5.1 MultipleModbus Commands Transmission
fromPLC master to PLC slave
Theladder logic in this exampleshows howtosendmultipleModbus
commands toaslavePLC usingoneXMI T block. Theexample
specifically sends four Modbus commands toaslavePLC with Modbus
address #3. Thecommands performthefollowingfunctions:
V Read 25 holding registers (4x) starting at 40010 in slave PLC and
place into master PLC starting at 40800.
V Write 25 holding registers (4x) starting at 40825 in master PLC to
slave PLC starting at 40010.
V Read 16 coils (0x) starting at 00001 in slave PLC and place into
master PLC starting at 00097.
V Write 16 coils (0x) starting at 00113 in master PLC to slave PLC
starting at 00001.
5.1.1 Hardware Configuration
Master PLC
PC--E984--2xx
or
140CPU xxx xx
Slave PLC
PC--E984--2xx
or
140CPU xxx xx
RS--232Cable
Master PLC
PC--E984--2xx
or
140CPU xxx xx
Slave PLC
PC--E984--2xx
or
140CPU xxx xx
RS--232Cable
Radio Modem Radio Modem
RS--232Cable
Figure20 HardwareConfiguration for Master to SlavePLC Application
Application Examples 73
840 USE 113 00
Note: This application works with both radio modems and lease line
modems.
5.1.2 Master PLC Setup
TheXMI T must transmit four Modbus messages fromthemaster PLC
port #1. TheXMI T forms thesemessages fromthefour Modbus
messagedefinition tables as definedin themaster PLC. TheModbus
definition tables areshown below.
Modbus MessageDefinitionTables
DefinitionTable
#1
Description Register Contents
Modbus FunctionCode 40100 3
Quantity 40101 25
Slave PLC Address 40102 3
Slave PLC Data Area 40103 10
Master PLC Data Area 40104 800
DefinitionTable
#2
Description Register Contents
Modbus FunctionCode 40105 16
Quantity 40106 25
Slave PLC Address 40107 3
Slave PLC Data Area 40108 10
Master PLC Data Area 40109 825
DefinitionTable
#3
Description Register Contents
Modbus FunctionCode 40110 1
Quantity 40111 16
Slave PLC Address 40112 3
Slave PLC Data Area 40113 1
Master PLC Data Area 40114 97
DefinitionTable
#4
Description Register Contents
Modbus FunctionCode 40115 15
Quantity 40116 16
Slave PLC Address 40117 3
Slave PLC Data Area 40118 1
Master PLC Data Area 40119 113
Application Examples 74
840USE 11300
5.1.3 Ladder Logic
Network #1sends theModbus commands totheslavePLC. The
references toholdingregisters, coils andinputs may bechangedbased
upon your application. Refer toFigure21.
0035 0033 0037 0038
0035
Initiate
Data
Transmission
XMIT
Transmission
Error
Finished
Sending
Messages
Enable
Message
Transmission
Enable
Message
Transmission
P
Figure21 Network #1Modbus Commands to SlavePLC
Network #1initiates theModbus commands totheslavePLC when coil
00033comes ON. Coil 00035remains ON until all four Modbus
commands aresent totheslavePLC. When an XMI T error occurs
duringaModbus transmission totheslavePLC, it unlatches coil 00035.
Network #2sets uptheXMI T control tabledata(40001... 40015) for a
newmessage. Refer toFigure22.
40200
40008
TBLK
#0004
0035 0036
P
XMIT
Transmission
Successful
Enable
Message
Transmission
P
0019
Send
New
Message
Enable
Message
Transmission
40008
#0005
SUB
40018
0034
40008
40008
XOR
#0005
All
Messages
Sent
0035
Figure22 Network #2Setup XMIT Control Table
Application Examples 75
840 USE 113 00
Tworegisters (4x + 2and 4x + 7) within theXMI T control table(15
register length) aredesignatedas AvailabletoUser, sothat, pointer
values for other instruction blocks likeTBLK may beheld in these
registers. I n this example, theTBLK instruction block uses register
40008(4x + 7) as thepointer.
TheTBLK copies datafromsourcetables (seeFigure23below) intothe
XMI T control table. I n this example, four sourcetables (Blocks
1... Block 4), each four registers longarecopiedintotheXMI T control
table, (Destination Block) four registers long(4x + 8... 4x + 11). The
contents of thesourcetables (Blocks 1... Block 4) andthedescription of
theXMI T control tableareshown in thetablebelow.
40009
destination
block
40200
source
table
40201
40202
40008
pointer
40010
40011
40012
40203
40204
40205
40206
40207
40208
40209
40210
40211
Block 1
Block 2
Block 3
= 1
40212
40213
40214
40215
Block 4
XMIT Control Table
Figure23 TBLK Operation
Application Examples 76
840USE 11300
Contents of SourceTables andXMIT Control Table
Source
Tables
Block 1 40200 00000001-- 00000000
(256Dec)
40201
100
40202 5
40203 3000
Block 2 40204 00000001-- 00000000
(256Dec)
40205 105
40206 5
40207 3000
Block 3 40208 00000001-- 00000000
(256Dec)
40209 110
40210 5
40211 3000
Block 4 40212 00000001-- 00000000
(256Dec)
40213 115
40214 5
40215 3000
XMIT Control
Table
4x +8 40009 CommandWord
4x +9 40010 Pointer to Message
Table
4x +10 40011 Lengthof Message
4x +11 40012 Response timeout
(mS)
When coil 00035goes ON for thefirst time, TBLK copies thecontents of
thefirst sourcetable(Block 1or 40200... 40203) totheXMI T control
table(40009... 40012). Upon successful completion, thenext source
tableis copied. Thus, TBLK copies thesecond sourcetable(Block 2or
40204... 40207) totheXMI T control table(40009... 40012). TheTBLK
continues until all four Modbus commands aresent (Block 1... Block 4).
TheSUB instruction verifies that thesourcetabletransfer is complete.
I t checks after each block transfer.
TheXOR instruction clears all registers in the(40009... 40012) range.
Application Examples 77
840 USE 113 00
Network #3sends theModbus messagefromthemaster PLC tothe
slavePLC.
#0001
40001
XMIT
#0016
0036
0017
P Message
Transmission
Send
New
Message
All
Messages
Sent
0017
Message
Transmission
XMIT
Transmission Error
XMIT
Transmission Successful
0034
0018
0019
0037
Error Occurred in
UsingXMIT
Figure24 Network #3Send Modbus Commands Using XMIT
I n network #3theModbus messageis formedusingtheXMI T
instruction sothat it may besent fromthemaster PLC totheslavePLC.
Thetop input of theXMI T instruction remains ON until theModbus
messageis successfully sent. TheXMI T control tableis 16registers
long. I n this example, theXMI T control tablestarts with register 40001
and ends with register 40016. Thecontents of theseregisters areshown
in thetablebelow.
XMITControl Table
Description Register Value
XMIT Revision Number 40001 201(or current revision)
Fault Status 40002 0
Availableto User 40003 0(May be usedas
pointers for instructions
like TBLK)
Data Rate 40004 9600
Data Bits 40005 8
Parity 40006 0
StopBits 40007 1
Availableto User 40008 0(May be usedas
pointers for instructions
like TBLK)
CommandWord 40009 0000--0001--0000--0000
(256Dec)
Pointer to Message
Table
40010 100
Application Examples 78
840USE 11300
Lengthof Message 40011 5
Response timeout
(mS)
40012 3000
Retry Limit 40013 3
Start of Transmission
Delay (mS)
40014 0
Endof Transmission
Delay (mS)
40015 0
Current retry 40016 0
Network #4resets theXMI T instruction when afault occurs.
0035
0037
XMIT
Transmission
Error
All
Messages
Sent
0037
0018
0038
10001
P
Initiate
Data
Transmission
Error Occurred
inUsing XMIT
Error Occurred
inUsing XMIT
Finished
Sending
Message
Reset XMIT
Fault
0034
Figure25 Network #4Reset XMIT Faults
I n network #4coil 00037goes ON and remains ON until areset is
performed. As always, based upon your application, you should
determinehowtoaddress faults and reset your application. Coil 00038
goes ON when all four Modbus commands aresuccessfully sent tothe
slavePLC. I n order toreset (clear thefault) theXMI T instruction
blocks top input must beturned OFF for onePLC scan.
Application Examples 79
840 USE 113 00
5.1.4 Conclusion
Thefour networks of ladder logic in this application exampleshows how
easy it is tosend multipleModbus commands toaslavePLC froma
master PLC usingonly oneXMI T instruction. Programmingmultiple
instances of theXMI T control tableintothesourcetableof aTBLK, is
an excellent method tosetupXMI T for anewmessage. Wetherefore
recommend that you usethis method in all futureapplications
implementingtheXMI T instruction.
Application Examples 80
840USE 11300
5.2 Fault Word Transmission to Slave PLC via
Dialup Modems
Theladder logic in this exampleshows howtosendasinglefault word
(40800) toaslavePLC usingtelephonedialup Hayes compatible
modems. This logicor avariation of it may beusedfor applications
requiringreport by exception fault handling. When afault occurs, the
master PLC uses XMI T tosendadial stringtothemodem. When the
local modemconnects toremotemodem, themaster PLC uses XMI T to
sendaModbus messagetotheslavePLC. TheModbus messagewrites
thecontents of fault register (40800) in themaster PLC to(40001) in the
slavePLC. When themaster PLC gets avalidresponsefromtheslave
PLC, themaster PLC uses XMI T tosendahangup stringtothelocal
modem. Thus, threemessages aretransmitted fromthemaster PLC:
dial, Modbus command, andhangup.
5.2.1 Hardware Configuration
Master PLC
PC--E984--2xx
or
140CPU xxx xx
Slave PLC
PC--E984--2xx
or
140CPU xxx xx
RS--232Cable
DialUpModem
RS--232Cable
DialUp Modem
Figure26 HardwareConfiguration for Fault Word Transmission
Note: This application works with telephone dialup modems only.
5.2.2 ModemSetup
You must first initializeyour dialupmodemtoensureproper operation
with theXMI T instruction. Programan initialization messageor a
communication programin themaster PLC andsend it thethemodem
viatheXMI T function. Werecommend usingaterminal programto
initializethemodemthat simplifies theladder logic. I n this example, a
communication programnamedProcomm by DataStromwas used to
initializethemodem. When possible, initializeall dialup modem, in the
Application Examples 81
840 USE 113 00
system, usingthesameinitialization message. Theactual initialization
messageand adefinition of each parameter is providedin thetable
below.
InitializationMessagefor DialUpModem
InitializationMessage = AT&F&K0&D0&Q0Q0V1X0
AT= Attention***
&F= Recall factory configurationas
active configuration**
&K0= Disable local flowcontrol **
&D0= Ignore status of DTR signal **
&Q0= Communicate in asynchronous
mode **
Q0= Returnresult codes *
V1= Display result codes as words *
X4= Provide basic call progress re-
sult codes: Connect, No Carrier,
andRing*
E1 Echo characters fromthe key-
boardto the screenin com-
mandstate *
<CR> Carriage return ***
<LF> Line feed***
* These parameters must always be part of the initialization
stringfor XMIT to functionproperly.
** These parameters shouldbe part of the initializationstring
for XMIT to transmit a message to remote modemproperly.
Only a experiencedmodemuser shouldchange or not use
these parameters.
*** These parameters are automatically addedby XMIT, AT
before and<CR>, <LF>after, to the message programmed
by you.
Note: While some modemmanufactures state full compatibility with
Hayes, they may still be slightly different. Therefore, we recommend
using only those commands that have the same definition as those
stated above.
5.2.3 Master PLC Setup
TheXMI T must transmit threemessages fromthemaster PLC port #1
totheslavePLC: twomodemmessages (Dial andHangup), and one
modbus message. You must programthesemessages intothemaster
Application Examples 82
840USE 11300
PLC holdingregisters. Theactual messages and their content is
providedin thetablebelow.
ModemMessages
Dial
Message
40150= 68ASC
40151= 00ASC
40152= 32ASC
40153= 6ASC
hangupMes-
sage
40170= H0ASC
Modbus
Message
40100= 16 Modbus Function
Code
40101= 1 Quantity
40102= 3 Slave PLC Address
40103= 1 Slave PLC Data
Area
40104= 800 Master PLC Data
Area
NOTE: The ATDT header andCR/LF trailers are automat-
ically sent andare NOT includedinthe lengthof message
control register (4x+10).
5.2.4 Ladder Logic
Network #1sends theModbus commands totheslavePLC. The
references toholdingregisters, coils andinputs may bechangedbased
upon your application. Refer toFigure27.
0035 0033 0037 0038
0035
Initiate
Data
Transmission
XMIT
Transmission
Error
Finished
Sending
Messages
Enable
Message
Transmission
Enable
Message
Transmission
P
Figure27 Network #1Modbus Commands to SlavePLC
Application Examples 83
840 USE 113 00
Network #1sends theModbus commands totheslavePLC when coil
00033comes ON. Coil 00035remains ON until all threemessages
(Modemand Modbus) aresent totheslavePLC. When an XMI T error
occurs duringaModbus transmission totheslavePLC, it unlatches coil
00035.
Network #2sets theXMI T control table(40001... 40016) for anew
message. Refer toFigure28.
40200
40008
TBLK
#0004
0035 0036
P
XMIT
Transmission
Successful
Enable
Message
Transmission
P
0019
Send
New
Message
Enable
Message
Transmission
40008
#0004
SUB
40018
0034
40008
40008
XOR
#0004
All
Messages
Sent
0035
Figure28 Network #2Setup XMIT Control Table
Tworegisters (4x + 2and 4x + 7) within theXMI T control table(16
register length) aredesignatedas AvailabletoUser, sothat, pointer
values for other instruction blocks likeTBLK may beheld in these
registers. I n this example, theTBLK instruction block uses register
40008(4x + 7) as thepointer.
TheTBLK copies datafromsourcetables (seeFigure29below) intothe
XMI T control table. I n this example, threesourcetables (Blocks
1... Block 3), each four registers longarecopiedintotheXMI T control
table, (Destination Block) four registers long(4x + 8... 4x + 11). The
contents of thesourcetables (Blocks 1... Block 3) andthedescription of
theXMI T control tableareshown in thetablebelow.
Application Examples 84
840USE 11300
40009
destination
block
40200
source
table
40201
40202
40008
pointer
40010
40011
40012
40203
40204
40205
40206
40207
40208
40209
40210
40211
Block 1
Block 2
Block 3
= 1
Figure29 TBLK Operation
Application Examples 85
840 USE 113 00
Contents of SourceTables andXMIT Control Table
Source
Tables
Block 1
Dial Message:
Sent to modem
40200 00000010-- 00000010
(256Dec)
40201 150
40202 7
40203 30000
Block 2
Modbus Message:
Sent to slave PLC
40204 00000001-- 00000000
(256Dec)
40205 100
40206 5
40207 3000
Block 3
hangupMessage:
Sent to Modem
40208 00000010-- 00000100
(256Dec)
40209 170
40210 2
40211 30000
XMIT Control
Table
4x +8 40009 CommandWord
4x +9 40010 Pointer to Message
Table
4x +10 40011 Lengthof Message
4x +11 40012 Response timeout
(mS)
Block #1is theDial Messagethat is sent tothedialup modem. Thefirst
register contains theCommand Word. Bit 7is ON indicatingaASCI I
messageand Bit 15is ON indicatingadial message. Thesecondregister
contains apointer tothedial messagestartingat (40150). Thethird
register contains thedial messagelength (7characters). Thefourth
register contains thetimeout for thedial message(30,000mS). A lot of
timeis requiredwhen alocal modemdials aremotemodembecausea
local modemgoes through aprocess todetermineaconnection.
Therefore, werecommend atimeout of approximately 3000mS. When
thetimeout is tooshort theXMI T issues amodemreply timeout.
Block #2is theModbus Messagethat is sent totheslavePLC. Thefirst
register contains theCommand Word. Bit 8is ON indicatingaModbus
message. Thesecondregister contains apointer totheModbus
definition tablestartingat (40100). XMI T uses theinformation stored
heretoformaModbus message. Thethird register contains theModbus
definition tablelength (5registers). Thefourth register contains the
Application Examples 86
840USE 11300
timeout for theslavePLC responsemessage(3000mS). TheslavePLC
responsetimemaybechanged basedupon your specificapplication.
Block #3is thehangupMessagethat is sent totheslavePLC. Thefirst
register contains theCommand Word. Bit 14is ON indicatingahangup
message. Thesecondregister contains apointer tothehangup message
startingat (40170). Thethirdregister contains thehangupmessage
that is twocharacters long. Thefourth register contains thetimeout for
thehangup message(30,000mS). When thetimeout is not longenough,
XMI T issues amodemreply timeout. Thehanguptimemaybechanged
basedupon your specific application.
When coil 00035goes ON for thefirst time, TBLK copies thecontents of
thefirst sourcetable(Block 1or 40200... 40203) totheXMI T control
table(40009... 40012). Upon successful completion, thenext source
tableis copied. Thus, TBLK copies thesecond sourcetable(Block 2or
40204... 40207) totheXMI T control table(40009... 40012). TheTBLK
continues until all threeModbus commands aresent (Block 1... Block
3).
TheSUB instruction verifies that thesourcetabletransfer is complete.
I t checks after each block transfer.
TheXOR instruction clears all registers in the(40009... 40012) range.
Network #3sends theModbus messagefromthemaster PLC tothe
slavePLC.
#0001
40001
XMIT
#0016
0036
0017
P Message
Transmission
Send
New
Message
All
Messages
Sent
0017
Message
Transmission
XMIT
Transmission Error
XMIT
Transmission Successful
0034
0018
0019
0037
Error Occurred in
Using XMIT
Figure30 Network #3Send Modbus Commands Using XMIT
I n network #3theModbus messageis formedusingtheXMI T
instruction sothat it may besent fromthemaster PLC totheslavePLC.
Application Examples 87
840 USE 113 00
Thetop input of theXMI T instruction remains ON until theModbus
messageis successfully sent. TheXMI T control tableis 16registers
long. I n this example, theXMI T control tablestarts with register 40001
and ends with register 40016. Thecontents of theseregisters areshown
in thetablebelow.
XMITControl Table
Description Register Value
XMIT Revision Number 40001 201(or current revision)
Fault Status 40002 0
Availableto User 40003 0(May be usedas
pointers for instructions
like TBLK)
Data Rate 40004 9600
Data Bits 40005 8
Parity 40006 0
StopBits 40007 1
Availableto User 40008 0(May be usedas
pointers for instructions
like TBLK)
CommandWord 40009 0000--0010--0000--0010
(514Dec)
Pointer to Message
Table
40010 150
Lengthof Message 40011 7
Response timeout
(mS)
40012 3000
Retry Limit 40013 3
Start of Transmission
Delay (mS)
40014 0
Endof Transmission
Delay (mS)
40015 0
Current retry 40016 0
Network #4resets theXMI T instruction when afault occurs.
Application Examples 88
840USE 11300
0035 0037
Message
Transmission
All
Messages
Sent
0037
0018
0038
10001
P
Initiate
Data
Transmission
Error Occurred
inUsingXMIT
Error Occurred
inUsing XMIT
Finished
Sending
Message
Reset XMIT
Fault
0034
0017
Message
Transmission
in Progress
Figure31 Network #4Reset XMIT Faults
I n network #4coil 00037goes ON and remains ON until areset is
performed. As always, based upon your application, you should
determinehowtoaddress faults and reset your application. Coil 00038
goes ON when all threemessages (ModemandModbus) aresuccessfully
sent totheslavePLC. I n order toreset (clear thefault) theXMI T
instruction blocks top input must betoggled OFF for onePLC scan.
5.2.5 Conclusion
Thefour networks of ladder logic in this application exampleshows how
easy it is touseaXMI T instruction tocommunicatebetween aPLC and
amodem. ProgrammedASCI I messages stored in themaster PLC
command themodemtodial and hangup. TheXMI T sends themessage
and waits for areply usingthecommands you programmedintoits
control table. Programmingmultipleinstances of theXMI T control
tableintothesourcetableof aTBLK, is an excellent method tosetup
XMI T for anewmessage. Wethereforerecommend that you usethis
method in all futureapplications implementingtheXMI T instruction.
Also, recall that certain parameters must bepart of themodem
initialization stringfor XMI T totransmit amessagetoremotemodems
properly.
Technical References 89
840 USE 113 00
AppendixA
Technical References
V Modbus Query/Response Parameter Limits
V Cable Pinouts
V Cable Adapter Kits
V XMI T Configuration using Hayes Compatible Dialup Modems
(Only)
Technical References 90 90
840USE 11300
A.1 Modbus Query/Response Parameter Limits
Thequery/responseparameters arelimited basedupon thetypeof PLC
you areusing. Refer totheapplicabletablebelow.
884/QuantumPLC MaximumParameters
Function
Code
Description Query Response
1 Read Coil Status 2000Coils 2000Coils
2 Read Input Status 2000Inputs 2000Inputs
3 Read HoldingRegisters 125Registers 125Registers
4 Read Input Registers 125Registers 125Registers
5 Force Single Coil 1Coil 1Coil
6 Force Single Register 1Register 1Register
15 Force Multiple Coil 800Coils 800Coils
16 Force Multiple Register 100Registers 100Registers
20 Read General Refer-
ences
NOT Supported NOT Supported
21 Write General Refer-
ences
NOT Supported NOT Supported
584/984PLC MaximumParameters
Function
Code
Description Query Response
1 Read Coil Status 2000Coils 2000Coils
2 Read Input Status 2000Inputs 2000Inputs
3 Read HoldingRegisters 125Registers 125Registers
4 Read Input Registers 125Registers 125Registers
5 Force Single Coil 1Coil 1Coil
6 Force Single Register 1Register 1Register
15 Force Multiple Coil 800Coils 800Coils
16 Force Multiple Register 100Registers 100Registers
20 Read General Refer-
ences (6x)
Maximumlengthof
the entire message
canNOT exceed
256bytes
Maximumlengthof
the entire message
canNOT exceed
256bytes
21 Write General Refer-
ences (6x)
Maximumlengthof
the entire message
canNOT exceed
256bytes
Maximumlengthof
the entire message
canNOT exceed
256bytes
Technical References 91
840 USE 113 00
484PLC MaximumParameters
Function
Code
Description Query Response
1 ReadCoil Status 512Coils 512Coils
2 ReadInput Status 512Inputs 512Inputs
3 ReadHoldingRegisters 254Registers 254Registers
4 ReadInput Registers 32Registers 32Registers
5 Force Single Coil 1Coil 1Coil
6 Force Single Register 1Register 1Register
15 Force Multiple Coil 800Coils 800Coils
16 Force Multiple Register 60Registers 60Registers
20 ReadGeneral Refer-
ences
NOT Supported NOT Supported
21 Write General Refer-
ences
NOT Supported NOT Supported
184/384PLC MaximumParameters
Function
Code
Description Query Response
1 ReadCoil Status 800Coils 800Coils
2 ReadInput Status 800Inputs 800Inputs
3 ReadHoldingRegisters 100Registers 100Registers
4 ReadInput Registers 100Registers 100Registers
5 Force Single Coil 1Coil 1Coil
6 Force Single Register 1Register 1Register
15 Force Multiple Coil 800Coils 800Coils
16 Force Multiple Register 100Registers 100Registers
20 ReadGeneral Refer-
ences
NOT Supported NOT Supported
21 Write General Refer-
ences
NOT Supported NOT Supported
Technical References 92 92
840USE 11300
M84PLC MaximumParameters
Function
Code
Description Query Response
1 Read Coil Status 64Coils 64Coils
2 Read Input Status 64Inputs 64Inputs
3 Read HoldingRegisters 32Registers 32Registers
4 Read Input Registers 4Registers 4Registers
5 Force Single Coil 1Coil 1Coil
6 Force Single Register 1Register 1Register
15 Force Multiple Coil 64Coils 64Coils
16 Force Multiple Register 32Registers 32Registers
Technical References 93
840 USE 113 00
A.2 Cable Pinouts
You needtobuild an interfacecablebetween your PLC andthemodem
or printer. Theactual cableis connectedtoPort#1of thePLC andto
theRS232port of themodemor printer, or direct toanother PLCs
Modbus port. BecausetheXMI T supports many modems and printers
thepinouts aregoingtovary. A list of thedevices that havebeen tested
with theModbus master PLC port #1alongwith acablepin- -out
referenceareprovided in theModicon 309COM 4550xXMI T Loadable
Read MeFirst (GI XMI T RMF). Theactual pinouts areprovidedbelow.
A.2.1 9--pin (RS--232) to 25--pin (Modem) with no RTS/CTS
Control
Front View
Pin 1
Pin9
Front View
25--pinMale Adapter
Pin1
Pin25
9--pinMale
Connector Pinouts
9--Pin
Connector
25--PinD--shell
RXD 2 3 RXD
TXD 3 2 TXD
RTS 7 4 RTS
CTS 8 5 CTS
DSR 4 6 DSR
DTR 6 20 DTR
GND 5 7 GND
Technical References 94 94
840USE 11300
A.2.2 9--pin (RS--232) to 25--pin (Modem) with RTS/CTS Control
Front View
Pin 1
Pin 9
Front View
25--pinMale Adapter
Pin1
Pin25
9--pinMale
Connector Pinouts
9--Pin
Connector
25--PinD--shell
RXD 2 3 RXD
TXD 3 2 TXD
RTS 7 4 RTS
CTS 8 5 CTS
DSR 4 6 DSR
DTR 6 20 DTR
GND 5 7 GND
Technical References 95
840 USE 113 00
A.2.3 9--pin to 9--pin (Null Modem)
Front View
Pin 1
Pin 9
9--pinMale Adapter
Connector Pinouts
9--Pin
Connector
9--Pin
Connector
RXD 2 3 TXD
TXD 3 2 RXD
RTS 7 7 RTS
CTS 8 8 CTS
DSR 4 4 DSR
DTR 6 6 DTR
GND 5 5 GND
Technical References 96 96
840USE 11300
A.2.4 9--pin to 9--pin (Modem)
Front View
Pin 1
Pin9
9--pinMale Adapter
Connector Pinouts
9--Pin
Connector
9--Pin
Connector
TXD 2 2 TXD
RXD 3 3 RXD
RTS 7 7 RTS
CTS 8 8 CTS
DSR 4 4 DSR
DTR 6 6 DTR
GND 5 5 GND
Technical References 97
840 USE 113 00
A.2.5 9--pin to 25--pin (Null Modem)
Front View
Pin 1
Pin 9
9--pinMale Adapter
Front View
25--pinMale Adapter
Pin 1
Pin25
Connector Pinouts
9--Pin
Connector
25--PinD--shell
RXD 2 2 TXD
TXD 3 3 RXD
RTS 7 4 RTS
CTS 8 5 CTS
DSR 4 6 DSR
DTR 6 20 DTR
GND 5 7 GND
Technical References 98 98
840USE 11300
A.2.6 RJ 45--(8x8) to 25--pin (Null Modem) 110XCA20401
Pin 1
RJ 45 connector
(8x8)
Front View
25--pinMale Adapter
Pin 1
Pin 25
Connector Pinouts
RJ 45
Connector
25--PinD--shell
RXD 4 2 TXD
TXD 3 3 RXD
RTS 6 4 RTS
CTS 7 5 CTS
GND 5 7 GND
DSR 2 6 DSR
20 DTR
Chassis
Ground
8 1
Chassis
Ground
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 99
840 USE 113 00
A.2.7 RJ 45--(8x8) to 9--pin (Null Modem)110XCA20301
Pin 1
RJ 45connector
(8x8)
Front View
Pin 1
Pin 9
9--pinMale Adapter
Connector Pinouts
RJ 45
Connector
9--PinD--shell
RXD 4 3 TXD
TXD 3 2 RXD
RTS 6 7 RTS
CTS 7 8 CTS
GND 5 5 GND
DSR 2 4 DTR
6 DSR
Chassis
Ground
8
Case of the
Connector
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 100 100
840USE 11300
A.2.8 RJ 45--(8x8) to 25--pin (Modem)110XCA20401
Pin 1
RJ 45connector
(8x8)
Front View
25--pinMale Adapter
Pin1
Pin25
Connector Pinouts
RJ 45
Connector
25--PinD--shell
RXD 4 3 RXD
TXD 3 2 TXD
RTS 6 4 RTS
CTS 7 5 CTS
GND 5 7 GND
DSR 2 6 DSR
20 DTR
Chassis
Ground
8 1
Chassis
Ground
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 101
840 USE 113 00
A.2.9 RJ 45--(8x8) to 25--pin (Modem)110XCA20401
Pin 1
RJ 45connector
(8x8)
Front View
25--pinMale Adapter
Pin 1
Pin25
Connector Pinouts
RJ 45
Connector
25--PinD--shell
RXD 4 3 RXD
TXD 3 2 TXD
RTS 6 4 RTS
CTS 7 5 CTS
GND 5 7 GND
6 DSR
20 DTR
Chassis
Ground
8 1
Chassis
Ground
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 102 102
840USE 11300
A.2.10 RJ 45--(8x8) to RJ 45--(8x8) (Modem)
Pin 1
RJ 45connector
(8x8)
Connector Pinouts
RJ 45
Connector
RJ 45
Connector
RXD 4 4 RXD
TXD 3 3 TXD
RTS 6 6 RTS
CTS 7 7 CTS
GND 5 5 GND
DSR 2 2 DSR
Chassis
Ground
8 8
Chassis
Ground
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 103
840 USE 113 00
A.2.11 9--pin to RJ 45--(8x8) (Modem)110XCA20301
Pin 1
RJ 45 connector
(8x8)
Front View
Pin1
Pin 9
9--pinMale Adapter
Connector Pinouts
RJ 45
Connector
9--Pin
Connector
RXD 4 2 RXD
TXD 3 3 TXD
RTS 6 7 RTS
CTS 7 8 CTS
GND 5 5 GND
DSR 2 6 DSR
4 DTR
Chassis
Ground
8
Case of the
Connector
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 104 104
840USE 11300
A.2.12 9--pin to RJ 45--(8x8) (Modem)110XCA20301
Pin1
RJ 45connector
(8x8)
Front View
Pin 1
Pin 9
9--pinMale Adapter
Connector Pinouts
RJ 45
Connector
9--Pin
Connector
RXD 4 2 RXD
TXD 3 3 TXD
RTS 6 7 RTS
CTS 7 8 CTS
GND 5 5 GND
6 DSR
4 DTR
Chassis
Ground
8
Case of the
Connector
Caution: Pin1 of the RJ 45 receives 5V fromthe PLC.
Technical References 105
840 USE 113 00
A.3 Cable Adapter Kits
You may want topurchaseCableAdapter Kits for your RJ 45(8x8)
requirements rather than makethem. Thetablebelowprovides alist of
availablekits.
CableAdapter Kits
Description Modicon
Part Number
RJ 45--(8x8) to 25--Pin(Male) 110XCA20401
RJ 45--(8x8) to 9--Pin(Male) 110XCA20301
RJ 45--(8x8) to 9--Pin(Female) 110XCA20302
RJ 45--(8x8) to 25--Pin(Female) 110XCA20402
Technical References 106 106
840USE 11300
A.4 XMIT Configuration using Hayes
CompatibleDial--Up Modems (Only)
Therearethreecommands that you need tobecomefamiliar with when
interfacingdial-upmodems toXMI T. Thesecommands are: I nitialize
modem, Dial modem, and Hangupmodem. Beforean ASCI I messageor
aModbus messagegoes through themodem, you must first sendan
initialization stringandthen adial stringtothemodem. Oncethe
modemhas dialedthetelephonenumber and madeaconnection tothe
remotemodem, you may sendan unlimited number of ASCI I messages
or Modbus messages through themodem. Tosendmultiplemessages,
you increment themessagepointer tothenext messageafter each
successful XMI T operation. When all messages aresent, you may then
sendthehangup stringtothemodem.
A.4.1 Initialization Message
Theinitialization messageis just likeany other ASCI I messageand may
beamaximumof 512characters long, although 50characters is usually
morethan enough toinitializeamodem. You may implement any Hayes
AT command as part of theinitialization string. Werecommend the
followingcommands when initializingamodemfor usewith XMI T.
InitializationMessagefor Dial--UpModem
InitializationMessage = AT&F&K0&Q0&D0V1Q0X0E1
AT= Self--calibrate Modem*
&F= Recall factory configurationas
active configuration*
&K0= Disable local flowcontrol **
&Q0= Communicate inasynchronous
mode **
&D0= Ignore status of DTR signal *
V1= Display result codes as words *
If V1is not usedor if modemis
not capable of returningver-
bose responses the XMIT block
returns error 117(modemre-
play time out).
Q0= Returnresult codes *
X4= Provide basic call progress re-
sult codes: Connect, No Carrier,
andRing*
Technical References 107
840 USE 113 00
E1= Echo characters fromthe key-
boardto the screenin com-
mandstate *
* These parameters must always be part of the initialization
stringfor XMIT to functionproperly.
** These parameters shouldbe part of the initializationstring
for XMIT to transmit a message to remote modemproperly.
Only a experiencedmodemuser shouldchange or not use
these parameters.
Note: While some modemmanufactures state full compatibility with
Hayes, they may still be slightly different. Therefore, we recommend
using only those commands that have the same definition as those
stated above.
Theinitialization messagemust always start with Hayes standardAT
command. TheXMI T block automatically precedes modemcommand
messages with AT andappends themessagewith carriagereturn (0x0D)
and linefeed(0x0A) characters sincethesearerequired by all modem
control messages. Other (non controlling) ASCI I messages donot have
toend with acarriagereturn and linefeed.
For example, atypical initialization messagethat XMI T sends tothe
modem.
Message= (AT)&F&K0&Q0&D0V1X0Q0(<CR><LF>) *
Length = 17characters
For example, theinitialization messagemay alsobeusedtoset
S- -registers of themodem.
Message= (AT)S0=1(<CR><LF>) *
Length = 4characters
*Characters within parentheses areautomatically sent.
TohaveXMI T sendan initialization messagetothemodem, bit 7and bit
16of thecommand wordmust beON. When bit 16is ON, bits 15and14
must not beON or XMI T will not completetheoperation successfully.
Toactually send themessage, thetop input of XMI T must comeON and
stays ON until theoperation is completeor an error occurs. When
XMI T determines themessagewas successfully sent tothemodem, it
turns ON thebottomoutput. When an error occurs, themiddleoutput
Technical References 108 108
840USE 11300
comes ON. Thetop output is ON whilethemessageis beingsent tothe
modem.
Expert: To eliminate some ladder logic programming, you may
initialize the modemwith parameters via a terminal programand not
use XMI T. Once the parameters are in the modemmemory they may
be saved to non-memory with an AT command, usually &W.
A.4.2 Dial Message
Thedial messageis usedtosend atelephonenumber tothemodem.
Only AT commands relatedtodialinganumber should beincluded with
themessage. Examples of typical dial messages usedwith XMI T are
shown below.
For example, dial telephonenumber usingtonedialing.
Message= (AT)DT)6800326(<CR><LF>) *
Length = 7characters
For example, dial telephonenumber usingpulsedialing.
Message= (AT)DP)6800326(<CR><LF>) *
Length = 7characters
For example, dial telephonenumber usingtonedialing, wait tohear dial
tonebeforedialingnumber, andpausebeforedialingtherest of the
number.
Message= (AT)DT)W,6800326(<CR><LF>) *
Length = 9characters
*Characters within parentheses areautomatically sent.
TohaveXMI T send atonedial messagetothemodem, bit 7andbit 15of
thecommand wordmust beON. When bit 15is ON, bits 16and 14must
not beON or XMI T will not completetheoperation successfully. To
actually sendthemessage, thetop input of XMI T must comeON and
stays ON until theoperation is completeor an error occurs. When
XMI T determines themessagewas successfully sent tothemodem, it
turns ON thebottomoutput. When an error occurs, themiddleoutput
comes ON. Thetop output is ON whilethemessageis beingsent tothe
modem.
Technical References 109
840 USE 113 00
Expert: Because it takes so long for a local modemto make a
connection to a remote modem, the timeout value, in register (4x + 11)
should be as very long when sending a dial message to a modem. For
example, set the timeout for 30,000 mS when sending a dial message.
When the timeout value is too short, XMI T issues a message timeout.
You may have to try several settings before finding the optimal time.
A.4.3 Hangup Message
Thehangup messageis used tohangupthemodem. Only AT commands
related tohangingupthemodemshould beused in this message. An
exampleof atypical hangup messageis shown below.
For example, hangup modemmessage.
Message= (+++AT)H0(<CR><LF>) *
Length = 2characters
*Characters within parentheses areautomatically sent.
When thehangup messageis sent toamodemthat is already connected
toaremotemodem, XMI T must first set thelocal modemin command
mode. XMI T does this by sendingaescapesequence+++ tothe
modem. XMI T assumes that +++ sets themodemin command mode.
Somemodemmanufactures let theowner changethis default escape
sequence. For XMI T tofunction properly themodemshould beset to
accept the+++ escapesequence.
TohaveXMI T sendahangupmessagetothemodem, bit 7and bit 14of
thecommand wordmust beON. When bit 14is ON, bits 16and15must
not beON or XMI T will not completetheoperation successfully. To
actually send themessage, thetop input of XMI T must comeON and
stays ON until theoperation is completeor an error occurs. When
XMI T determines themessagewas successfully sent tothemodem, it
turns ON thebottomoutput. When an error occurs, themiddleoutput
comes ON. Thetop output is ON whilethemessageis beingsent tothe
modem.
Expert: Because it takes so long for a local modemto hangup once it
receives the hangup command, the timeout value, in register (4x + 11)
should be as very long when sending a dial message to a modem. For
example, set the timeout for 30,000 mS when sending a dial message.
When the timeout value is too short, XMI T issues a message timeout.
You may have to try several settings before finding the optimal time.
Index
840 USE 113 00
111
Index
Numbers
1through 6, 15and16, Modbus function
codes, 40
110XCA20301, CableAdapter Kit, 99, 103,
104
110XCA20401, CableAdapter Kit, 98, 100,
101
184/384, PLC parameter limits, 91
20and 21, Modbus function codes, 43
484, PLC parameter limits, 91
584/984, PLC parameter limits, 90
8, Modbus function codes, 42
884/Quantum, PLC parameter limits, 90
9-pin (RS-232) to25-pin (Modem), Modem
cablepin-outs, 93, 94
9-pin to25-pin (Null Modem), Modem
cablepin-outs, 97
9-pin to9-pin (Modem), Modemcable
pin-outs, 96
9-pin to9-pin (Null Modem), Modemcable
pin-outs, 95
9- pin toRJ 45-(8x8) (Modem)
110XCA20301, Modemcablepin-outs, 103,
104
A
Application example
Radio/leaselinemodem, 72
Telephonedial-up modem, 80
B
Bit definitions, Command word, 31
C
CableAdapter Kit
110XCA20301, 99, 103, 104
110XCA20401, 98, 100, 101
CableAdapter Kits-Available, Quick
Reference, 105
Command word, Bit definitions, 31
Communication control table, Valid ranges,
25
Conversion control table, Validranges, 55
D
Datarateranges, Datarateregister, 29
Datarateregister, Datarateranges, 29
DXFDT.SYS, I nstallation, 7
F
Fault codes, Fault status register, 50
Fault codes (XMI T communication), Fault
status register (XMI T communication), 27
Fault codes (XMI T conversion), Fault status
register (XMI T conversion), 57
Fault status register (XMI T communication),
Fault codes (XMI T communication), 27
Fault status register (XMI T conversion),
Fault codes (XMI T conversion), 57
Fault status register (XMI T port status),
Fault codes (XMI T port status), 50
I
I nstallation
DXFDT.SYS file, 7
NSUP.EXE file, 8
XMI T.EXE file, 9
XMI T.ZMM, 7
XMI T1968.HLP, 8
M
M84, PLC parameter limits, 92
Modbus function codes
1through 6, 15and 16, 40
20and 21, 43
8, 42
Modemcablepin-outs
9-pin (RS-232) to25-pin (Modem), 93,
94
9-pin to25-pin (Null Modem), 97
9-pin to9-pin (Modem), 96
9-pin to9-pin (Null Modem), 95
9-pin toRJ 45-(8x8) (Modem)
110XCA20301, 103, 104
840 USE 113 00
Index 112
RJ 45-(8x8) to25-pin (Modem)
110XCA20401, 100, 101
RJ 45- (8x8) to25-pin (Null Modem)
110CXA20401, 98
RJ 45-(8x8) to9-pin (Null Modem)
110XCA20301, 99
RJ 45-(8x8) toRJ 45-(8x8) (Modem), 102
Modsoft zoomscreens
XMI T communication
Control table, 14, 15
Fault codes, 15, 16, 17
Modbus function codes, 13, 14
XMI T conversion, 19
Fault codes, 20
XMI T port status, 18
Fault codes, 18, 19
N
NSUP.EXE, I nstallation, 8
P
PLC parameter limits
184/384, 91
484, 91
584/984, 90
884/Quantum, 90
M84, 92
Port status control table, Validranges, 49
Q
Quick Reference, CableAdapter
Kits-Available, 105
R
Radio/leaselinemodem, Application example,
72
RJ 45-(8x8) to25-pin (Modem)
110XCA20401, Modemcablepin-outs, 100,
101
RJ 45-(8x8) to25-pin (Null Modem)
110XCA20401, Modemcablepin-outs, 98
RJ 45-(8x8) to9-pin (Null Modem)
110XCA20301, Modemcablepin-outs, 99
RJ 45-(8x8) toRJ 45-(8x8) (Modem), Modem
cablepin-outs, 102
T
Telephonedial-up modem, Application
example, 80
V
Validranges
Communication control table, 25
Conversion control table, 55
Port status control table, 49
X
XMI T communication, Modsoft zoomscreens
Control table, 14, 15
Fault codes, 15, 16, 17
Modbus function codes, 13, 14
XMI T conversion, Modsoft zoomscreens, 19
Fault Codes, 20
Fault codes, 20
XMI T port status, Modsoft zoomscreens, 18
Fault codes, 18, 19
XMI T.EXE, I nstallation, 9
XMI T.ZMM, I nstallation, 7
XMI T1968.HLP, I nstallation, 8

Vous aimerez peut-être aussi