Jewell Instruments LLC
- Home
- Companies & Suppliers
- Jewell Instruments LLC
- Downloads
- DIN-100 Series Sensor To Computer ...
DIN-100 Series Sensor To Computer Interface Modules Datasheet
DIN-100 SERIES USERS MANUALREVISED: 06/2000DGH CORPORATIONP. O. BOX 5638MANCHESTER, NH 03108TELEPHONE: 603-622-0452FAX: 603-622-0487URL: http://www.dghcorp.comThe information in this publication has been carefully checked and isbelieved to be accurate; however, no responsibility is assumed for possibleinaccuracies or omissions. Applications information in this manual is in-tended as suggestions for possible use of the products and not as explicitperformance in a specific application. Specifications may be subject tochange without notice.DIN-100 modules are not intrinsically safe devices and should not be usedin an explosive environment unless enclosed in approved explosion-proofhousings.2TABLE OF CONTENTSWarranty 4CHAPTER 1 Getting StartedDefault Mode 1-1Quick Hook-Up 1-2CHAPTER 2 Functional DescriptionBlock Diagram 2-2CHAPTER 3 CommunicationsData Format 3-2RS-485 3-2RS-485 Multidrop System 3-3CHAPTER 4 Command SetTable of Commands 4-6User Commands 4-6Error Messages 4-12CHAPTER 5 Setup Information and CommandCommand Syntax 5-1Setup Hints 5-10CHAPTER 6 Digital I/O FunctionDigital Outputs 6-1Digital Inputs 6-2CHAPTER 7 Power SupplyCHAPTER 8 TroubleshootingCHAPTER 9 CalibrationCHAPTER 10 Extended AddressingAppendix A (ASCII TABLE )Appendix B DIN-160 Data SheetAppendix C DIN-140 Data SheetAppendix D DIN-150 Data SheetAppendix E DIN-100 SpecificationsAppendix F Modbus Protocol3WARRANTYDGH warrants each DIN-100 series module to be free from defects inmaterials and workmanship under normal conditions of use and service andwill replace any component found to be defective, on its return to DGH,transportation charges prepaid within one year of its original purchase. DGHassumes no liability, expressed or implied, beyond its obligation to replaceany component involved. Such warranty is in lieu of all other warrantiesexpressed or implied.WARNINGThe circuits and software contained in DIN-100 series modules areproprietary. Purchase of these products does not transfer any rightsor grant any license to the circuits or software used in these products.Disassembling or decompiling of the software program is explicitlyprohibited. Reproduction of the software program by any means isillegal.As explained in the setup section, all setups are performed entirelyfrom the outside of the DIN-100 module. There is no need to open themodule because there are no user-serviceable parts inside. Removingthe cover or tampering with, modifying, or repairing by unauthorizedpersonnel will automatically void the warranty. DGH is not responsiblefor any consequential damages.RETURNSWhen returning products for any reason, contact the factory and request aReturn Authorization Number and shipping instructions. Write the ReturnAuthorization Number on the outside of the shipping box. DGH stronglyrecommends that you insure the product for value prior to shipping. Itemsshould not be returned collect as they will not be accepted.Shipping Address:DGH CorporationHillhaven Industrial Park146 Londonderry TurnpikeHooksett, NH 03106Chapter 1Getting StartedDefault ModeAll DIN-100 modules contain an EEPROM (Electrically Erasable Program-mable Read Only Memory) to store setup information and calibrationconstants. The EEPROM replaces the usual array of switches and potsnecessary to specify baud rate, address, parity, etc. The memory isnonvolatile which means that the information is retained even if power isremoved. No batteries are used so it is never necessary to open the modulecase.The EEPROM provides tremendous system flexibility since all of themodule’s setup parameters may be configured remotely through the com-munications port without having to physically change switch and potsettings. There is one minor drawback in using EEPROM instead ofswitches; there is no visual indication of the setup information in the module.It is impossible to tell just by looking at the module what the baud rate,address, parity and other settings are. It is difficult to establish communica-tions with a module whose address and baud rate are unknown. Toovercome this, each module has an input pin labeled DEFAULT*. Byconnecting this pin to Ground, the module is put in a known communicationssetup called Default Mode.The Default Mode setup is: 300 baud, one start bit, eight data bits, onestop bit, no parity, any address is recognized.Grounding the DEFAULT* pin does not change any of the setups stored inEEPROM. The setup may be read back with the Read Setup (RS) commandto determine all of the setups stored in the module. In Default Mode, allcommands are available.A module in Default Mode will respond to any address except the sixidentified illegal values (NULL, CR, $, #, {, }). A dummy address must beincluded in every command for proper responses. The ASCII value of themodule address may be read back with the RS command. An easy way todetermine the address character is to deliberately generate an errormessage. The error message outputs the module’s address directly afterthe “?” prompt.Setup information in a module may be changed at will with the SetUp (SU)command. Baud rate and parity setups may be changed without affectingthe Default values of 300 baud and no parity. When the DEFAULT* pin isreleased, the module automatically performs a program reset and config-ures itself to the baud rate and parity stored in the setup information.The Default Mode is intended to be used with a single module connected toa terminal or computer for the purpose of identifying and modifying setupGetting Started 1-2values. In most cases, a module in Default Mode may not be used in a stringwith other modules.RS-485 Quick Hook-UpSoftware is not required to begin using your DIN-100 module. We recom-mend that you begin to get familiar with the module by setting it up on thebench. Start by using a dumb terminal or a computer that acts like a dumbterminal. Make the connections shown in the quick hook-up drawings,Figures 1.1 or 1.2. Put the module in the default mode by grounding theDefault* terminal. Initialize the terminal communications package on yourcomputer to put it into the “terminal” mode. Since this step varies fromcomputer to computer, refer to your computer manual for instructions.Begin by typing $1RD and pressing the Enter or Return key. The module willrespond with an * followed by the data reading at the input. The data includessign, seven digits and a decimal point. For example, if you are using athermocouple module and measuring room temperature your reading mightbe *+00025.00. The temperature reading is scaled in °C which has beenpreset at the factory. Once you have a response from the module you canturn to the Chapter 4 and get familiar with the command set.All modules are shipped from the factory with a setup that includes a channeladdress of 1, 300 baud rate, no linefeeds, no parity, alarms off, no echo andtwo-character delay. Refer to the Chapter 5 to configure the module to yourapplication.Figure 1.1 RS-485 Quick Hook-Up.Getting Started 1-3RS-485 Quick Hook-up to a RS-232 portAn RS-485 module may be easily interfaced to an RS-232C terminal forevaluation purposes. This connection is only suitable for benchtop operationand should never be used for a permanent installation. Figure 1.2 shows thehook-up. This connection will work provided the RS-232C transmit output iscurrent limited to less than 50mA and the RS-232C receive threshold isgreater than 0V. All terminals that use 1488 and 1489 style interface IC’s willsatisfy this requirement. With this connection, characters generated by theterminal will be echoed back. To avoid double characters, the local echo onthe terminal should be turned off.If the current limiting capability of the RS-232C output is uncertain, insert a100? to 1k? resistor in series with the RS-232 output.In some rare cases it may be necessary to connect the module’s DATApin to ground through a 100? to 1k? resistor.Figure 1.2 RS-485 Quick Hook-Up with RS-232C Port.A functional diagram of a typical module is shown in Figure 2.1. It is a usefulreference that shows the data path in the module and to explain the functionof many of the module’s commands.The first step is to acquire the sensor signal and convert it to digital data. InFigure 2.1, all the signal conditioning circuitry has been lumped into oneblock, the analog/digital converter (A/D). Autozero and autocalibration isperformed internally and is transparent to the user.The full-scale output of the A/D converter may be trimmed using the TrimSpan (TS) command. The TS command adjusts calibration values storedinternally in the EEPROM. The TS command should only be used to trim theaccuracy of the unit with a laboratory standard reference applied to thesensor input.The trimmed data flows into either of two digital filters. The filter selection isperformed automatically by the microprocessor after every A/D conversion.The filter selection depends on the difference of the current A/D output dataand the previous data stored in the output data register. If the least significantdecimal digit from the A/D differs from the old output data by more than 10counts, the large signal filter is selected. If the change is less than 10 counts,the small signal filter is used.The two-filter system allows for different degrees of filtering depending onthe rate of the input change. For steady-state signals, the small-signal filteraverages out noise and small input changes to give a stable steady-stateoutput. The large-signal filter is activated by step changes or very noisy inputsignals. The time constants for the two filters can be specified independentlywith the SetUp (SU) command. The filter values are stored in nonvolatilememory. Typically, the small-signal filter is set to a larger time constant thanthe large-signal filter. This gives very good noise rejection along with fastresponse to step inputs.The scaled data is summed with data stored in the Output Offset Registerto obtain the final output value. The output offset is controlled by the user andhas many purposes. The data in the Output Offset Register may be used totrim any offsets caused by the input sensor. It may be used to null outundesired signal such as a tare weight. The Trim Zero (TZ) command is usedto adjust the output to any desired value by loading the appropriate value inthe offset register. The offset register data is nonvolatile.The value stored in the offset register may be read back using the Read Zero(RZ) command. Data loaded in with the SP command will be read back withthe sign changed. The output register may be reset to zero with the ClearZero (CZ) command.Chapter 2Functional DescriptionFunctional Description 2-2The output data may be read with the Read Data (RD) command. In somecases when a computer is used as a host, the same data value may be readback several times before it is updated with a new A/D conversion.The DIN-170 general-purpose digital outputs are open-collector transistorswitches that may be controlled by the host with the Digital Output (DO)command. They are designed to activate external solid-state relays tocontrol AC or DC power circuits. The output may also be used to interfaceto other logic-level devices. The number of digital outputs available dependson the module type.The DIN-170 Digital Input (DI) command is used to sense the logic levels onthe digital input pins DI0-DI7. The digital inputs are used to read logic levelsgenerated by other devices. They are also useful to sense the state ofelectro-mechanical limit switches. The number of digital inputs availablevaries with the module type.Figure 2.1 Analog Input Block Diagram.IntroductionThe DIN-100 modules has been carefully designed to be easy to interfaceto all popular computers and terminals. All communications to and from themodules are performed with printable ASCII characters. This allows theinformation to be processed with string functions common to most high-levellanguages such as BASIC. The ASCII format makes system debuggingeasy with a dumb terminal.This system allows multiple modules to be connected to a communicationsport with a single 4-wire cable. Up to 32 RS-485 modules may be strungtogether on one cable; 122 with repeaters. The modules communicate withthe host on a polling system; that is, each module responds to its own uniqueaddress and must be interrogated by the host. A module can never initiatea communications sequence. A simple command/response protocol mustbe strictly observed to avoid communications collisions and data errors.Communications to the DIN-100 modules is performed with two-characteror three-character ASCII command codes such as RD to Read Data fromthe analog input. A complete description of all commands is given in theChapter 4. A typical command/response sequence would look like this:Command: $1RDResponse: *+00123.00A command/response sequence is not complete until a valid response isreceived. The host may not initiate a new command until the response froma previous command is complete. Failure to observe this rule will result incommunications collisions. A valid response can be in one of three forms:1) a normal response indicated by a ‘ * ‘ prompt2) an error message indicated by a ‘ ? ‘ prompt3) a communications time-out errorWhen a module receives a valid command, it must interpret the command,perform the desired function, and then communicate the response back tothe host. Each command has an associated delay time in which the moduleis busy calculating the response. If the host does not receive a response inan appropriate amount of time specified in Table 3.1, a communicationstime-out error has occurred. After the communications time-out it is as-sumed that no response data is forthcoming. This error usually results whenan improper command prompt or address is transmitted. The table belowlists the timeout specification for each command:Chapter 3CommunicationsCommunications 3-2Mnemonic TimeoutDI,DO,RD 10 mSAll other commands 100 mSTable 3.1 Response Timeout Specifications.The timeout specification is the turn-around time from the receipt of acommand to when the module starts to transmit a response.Data FormatAll modules communicate in standard NRZ asynchronous data for-mat. This format provides one start bit, seven data bits, one parity bitand one stop bit for each character.Single Module ConnectionFigure 1.1 shows the connections necessary to attach one module to a host.Use the Default Mode to enter the desired address, baud rate, and othersetups (see Setups).RS-485The RS-485 communications standard satisfies the need for multidroppedsystems that can communicate at high data rates over long distances. RS-485 is similar to RS-422 in that it uses a balanced differential pair of wiresswitching from 0 to 5V to communicate data. RS-485 receivers can handlecommon mode voltages from -7V to +12V without loss of data, making themideal for transmission over great distances. RS-485 differs from RS-422 byusing one balanced pair of wires for both transmitting and receiving. Sincean RS-485 system cannot transmit and receive at the same time it isinherently a half-duplex system. RS-485 offers many advantages over RS-232C:1) balanced line gives excellent noise immunity2) can communicate with D1000 modules at 115200 baud3) communications distances up to 4,000 feet.4) true multidrop; modules are connected in parallel5) can disconnect modules without losing communications6) up to 32 modules on one line; 122 with repeaters7) no communications delay due to multiple modules8) simplified wiring using standard telephone cableRS-485 does have disadvantages. Very few computers or terminals havebuilt-in support for this new standard. Interface boards are available for theIBM PC and compatibles. As RS-485 system usually requires an interface.The DIN-190 will convert RS-232 signals to RS-485 or repeat RS-485signals. The DIN-190 connected as an RS-485 repeater can be used toCommunications 3-3extend an existing RS-485 network or connect up to 122 modules on oneserial communications port.RS-485 Multidrop SystemFigure 3.1 illustrates the wiring required for multiple-module RS-485 sys-tem. Notice that every module has a direct connection to the host system.Any number of modules may be unplugged without affecting the remainingmodules. Each module must be setup with a unique address and theaddresses can be in any order. All RS-485 modules must be setup for noecho to avoid bus conflicts (see Setup). Also note that the connector pins oneach module are labelled with notations (B), (R), (G), and (Y). Thisdesignates the colors used on standard 4-wire telephone cable:Label Color(B) GND Black(R) V+ Red(G) DATA* (-) Green(Y) DATA (+) YellowThis color convention is used to simplify installation. If standard 4-wiretelephone cable is used, it is only necessary to match the labeled pins withthe wire color to guarantee correct installation.DATA* on the label is the complement of DATA (negative true).To minimize unwanted reflections on the transmission line, the bus shouldbe arranged as a line going from one module to the next. ‘Tree’ or randomstructures of the transmission line should be avoided. When using longtransmission lines and/or high baud rates, the data lines should be termi-nated at each end with 200 ohm resistors. Standard values of 180 ohms or220 ohms are acceptable.During normal operation, there are periods of time where all RS-485 driversare off and the communications lines are in an 'idle' high impedancecondition. During this condition, the lines are susceptible to noise pickupwhich may be interpreted as random characters on the communicationsline. To prevent noise pickup, all RS-485 systems should incorporate 1Kohm bias resistors as shown in Figure 3.1. The resistors will maintain thedata lines in a 'mark' condition when all drivers are off.DIN-191 and DIN-192 modules have the 1K? resistors built-in.Special care must be taken with very long busses (greater than 1000 feet)to ensure error-free operation. Long busses must be terminated as de-scribed above. The use of twisted cable for the DATA and DATA* lines willgreatly enhance signal fidelity. Use parity and checksums along with the ‘#’Communications 3-4form of all commands to detect transmission errors. In situations wheremany modules are used on a long line, voltage drops in the power leadsbecomes an important consideration. The GND wire is used both as a powerconnection and the common reference for the transmission line receivers inthe modules. Voltage drops in the GND leads appear as a common-modevoltage to the receivers. The receivers are rated for a maximum of -7V. ofcommon-mode voltage. For reliable operation, the common mode voltageshould be kept below -5V.To avoid problems with voltage drops, modules may be powered locallyrather than transmitting the power from the host. Inexpensive 'calculator'type power supplies are useful in remote locations. When local supplies areused, be sure to provide a ground reference with a third wire to the host orthrough a good earth ground. With local supplies and an earth ground, onlytwo wires for the data connections are necessary.Communications DelayAll DIN-100 modules are setup at the factory to provide two units ofcommunications delay after a command has been received (see Chapter 5).This delay is necessary when using host computers that transmit a carriagereturn as a carriage return-linefeed string. Without the delay, the linefeedcharacter may collide with the first transmitted character from the module,resulting in garbled data. If the host computer transmits a carriage return asa single character, the delay may be set to zero to improve communicationsresponse time.Communications 3-5The DIN-100 modules operate with a simple command/response protocolto control all module functions. A command must be transmitted to themodule by the host computer or terminal before the module will respond withuseful data. A module can never initiate a communications sequence. Avariety of commands exists to exploit the full functionality of the modules. Alist of available commands and a sample format for each command is listedin Table 4.1.Command StructureEach command message from the host must begin with a command promptcharacter to signal to the modules that a command message is to follow.There are two valid prompt characters; a dollar sign character ($) is used togenerate a short response message from the module. A short response isthe minimum amount of data necessary to complete the command. Thesecond prompt character is the pound sign character (#) which generateslong responses (will be covered later in this chapter).The prompt character must be followed by a single address characteridentifying the module to which the command is directed. Each moduleattached to a common communications port must be setup with its ownunique address so that commands may be directed to the proper unit.Module addresses are assigned by the user with the SetUp (SU) command.Printable ASCII characters such as ‘1’ (ASCII $31) or ‘A’ (ASCII $41) are thebest choices for address characters.The address character is followed by a two-character command thatidentifies the function to be performed by the module. All of the availablecommands are listed in Table 4.1 along with a short function definition. Allcommands are described in Chapter 4. Commands must be transmitted asupper-case characters.A two-character checksum may be appended to any command message asa user option. See ‘Checksum’ in Chapter 4 .All commands must be terminated by a Carriage Return character (ASCII$0D). (In all command examples in this text the Carriage Return is eitherimplied or denoted by the symbol ‘CR’.)Data StructureMany commands require additional data values to complete the commanddefinition as shown in the example commands in Table 4.1. The particulardata necessary for these commands is described in full in the completecommand descriptions.Chapter 4 ASCII Command SetCommand Set 4-2The most common type of data used in commands and responses is analogdata. Analog data is always represented in the same format for all modelsin the DIN-100 series. Analog data is represented as a nine-character stringconsisting of a sign, five digits, decimal point, and two additional digits. Thestring represents a decimal value in engineering units. Examples:+12345.68+00100.00-00072.10-00000.00When using commands that require analog data as an argument, the fullnine-character string must be used, even if some digits are not significant.Failure to do this results in a SYNTAX ERROR.Analog data responses from the module will always be transmitted in thenine-character format. This greatly simplifies software parsing routinessince all analog data is in the same format for all module types.In many cases, some of the digits in the analog data may not be significant.For instance, the DIN-130 thermocouple input modules feature 1 degreeoutput resolution. A typical analog data value from this type of module couldbe +00123.00. The two digits to the right of the decimal point have nosignificance in this particular model. However, the data format is alwaysadhered to in order to maintain compatibility with other module types.The maximum computational resolution of the module is 16 bits, which isless than the resolution that may be represented by an analog data variable.The Digital Input, Digital Output, and Setup commands use hexadecimalrepresentations of data. The data structures for these commands aredetailed in the command descriptions.Write ProtectionMany of the commands listed in Table 4.1 are under the heading of ‘WriteProtected Commands’. These commands are used to alter setup data in themodule’s EEPROM. They are write protected to guard against accidentalloss of setup data. All write-protected commands must be preceded by aWrite Enable (WE) command before the protected command may beexecuted.Miscellaneous Protocol NotesThe address character must transmitted immediately after the commandprompt character. After the address character the module will ignore anycharacter below ASCII $23 (except CR). This allows the use of spaces(ASCII $20) within the command message for better readability if desired.Command Set 4-3The length of a command message is limited to 20 printable characters. Ifa properly addressed module receives a command message of more than20 characters the module will abort the whole command sequence and noresponse will result.If a properly addressed module receives a second command prompt beforeit receives a CR, the command will be aborted and no response will result.Response StructureResponse messages from the module begin with either an asterisk ‘ * ‘(ASCII $2A) or a question mark ‘ ? ‘ (ASCII $3F) prompt. The ‘ * ‘ promptindicates acknowledgment of a valid command. The ‘ ? ‘ prompt precedesan error message. All response messages are terminated with a CR. Manycommands simply return a ‘ * ‘ character to acknowledge that the commandhas been executed by the module. Other commands send data informationfollowing the ‘ * ‘ prompt. The response format of all commands may be foundin the detailed command description.The maximum response message length is 20 characters.A command/response sequence is not complete until a valid response isreceived. The host may not initiate a new command until the response froma previous command is complete. Failure to observe this rule will result incommunications collisions. A valid response can be in one of three forms:1) a normal response indicated by a ‘ * ‘ prompt2) an error message indicated by a ‘ ? ‘ prompt3) a communications time-out errorWhen a module receives a valid command, it must interpret the command,perform the desired function, and the communicate the response back to thehost. Each command has an associated delay time in which the module isbusy calculating the response. If the host does not receive a response in anappropriate amount of time specified in Table 4.1, a communications time-out error has occurred. After the communications time-out it is assumed thatno response data is forthcoming. This error usually results when animproper command prompt or address is transmitted.Long Form ResponsesWhen the pound sign ‘ # ‘ command prompt is used, the module respondswith a ‘long form’ response. This type of response will echo the commandmessage, supply the necessary response data and will add a two-characterchecksum to the end of the message. Long form responses are used whenthe host wishes to verify the command received by the module. Thechecksum is included to verify the integrity of the response data. The ‘ # ‘command prompt may be used with any command. For example:Command Set 4-4Command: $1RD (short form)Response: *+00072.10Command: #1RD (long form)Response: *1RD+00072.10A4 (A4=checksum)ChecksumChecksum is a two character hexadecimal value appended to the end of amessage. It verifies that the message received is exactly the same as themessage sent. The checksum ensures the integrity of the informationcommunicated.Command ChecksumA two-character checksum may be appended to any command to themodule as a user option. When a module interprets a command, it looks forthe two extra characters and assumes that it is a checksum. If the checksumis not present, the module will perform the command normally. If the twoextra characters are present, the module calculates the checksum for themessage. If the calculated checksum does not agree with the transmittedchecksum, the module responds with a ‘BAD CHECKSUM’ error messageand the command is aborted. If the checksums agree, the command isexecuted. If the module receives a single extra character, it responds with‘SYNTAX ERROR’ and the command is aborted For example:Command: $1RD (no checksum)Response: *+00072.10Command: $1RDEB (with checksum)Response: *+00072.10Command: $1RDAB (incorrect checksum)Response: ?1 BAD CHECKSUMCommand: $1RDE (one extra character)Response: ?1 SYNTAX ERRORResponse ChecksumsIf the long form ‘ # ‘ version of a command is transmitted to a module, achecksum will be appended to the end of the response. For example:Command: $1RD (short form)Response: *+00072.10Command: #1RD (long form)Response: *1RD+00072.10A4 (A4=checksum)Command Set 4-5Checksum CalculationThe checksum is calculated by summing the hexadecimal values of all theASCII characters in the message. The lowest order two hex digits of the sumare used as the checksum. These two digits are then converted to theirASCII character equivalents and appended to the message. This ensuresthat the checksum is in the form of printable characters.Example: Append a checksum to the command #1DOFFCharacters: # 1 D O F FASCII hex values: 23 31 44 4F 46 46Sum (hex addition) 23 + 31 + 44 + 4F + 46 + 46 = 173The checksum is 73 (hex). Append the characters 7 and 3 to the end ofthe message: #1DOFF73Example: Verify the checksum of a module response *1RD+00072.10A4The checksum is the two characters preceding the CR: A4Add the remaining character values:* 1 R D + 0 0 0 7 2 . 1 02A + 31 + 52 + 44 + 2B + 30 + 30 + 30 + 37 + 32 + 2E + 31 + 30 = A4The two lowest-order hex digits of the sum are A4 which agrees with thetransmitted checksum.The transmitted checksum is the character string equivalent to the calcu-lated hex integer. The variables must be converted to like types in the hostsoftware to determine equivalency.If checksums do not agree, a communications error has occurred.If a module is setup to provide linefeeds, the linefeed characters are notincluded in the checksum calculation.Parity bits are never included in the checksum calculation.Command Set 4-6Table 4.1 DIN-100 Command SetCommand and Definition Typical TypicalCommand ResponseMessage Message($ prompt)DI Read Alarms/Digital Inputs $1DI *0003DO Set Digital Outputs $1DOFF *RD Read Data $1RD *+00072.00RS Read Setup $1RS *31070142RZ Read Zero $1RZ *+00000.00WE Write Enable $1WE *Write Protected CommandsMBR Set Modbus Address $1MBR01 *MBD Modbus Disable $1MBD *RR Remote Reset $1RR *SU Setup Module $1SU31070142 *TS Trim Span $1TS+00600.00 *TZ Trim Zero $1TZ+00000.00 *DIN-100 User CommandsNote that in all command and response examples given below, a carriagereturn is implied after every character string.Clear Zero (CZ)The Clear Zero command clears the output offset register value to+00000.00. This command clears any data resulting from a Trim Zero (TZ).Command: $1CZResponse: *Command: #1CZResponse: *1CZF8Digital Input (DI)The DI command reads the status of the digital inputs on the DIN-171. Theresponse to the DI command is four hex characters representing two bytesof data. The second byte contains the digital input data.Command: $1DIResponse: *0003Command: #1DIResponse: *1DI0003ABCommand Set 4-7The second byte displays the hex value of the digital input status. Thenumber of digital inputs varies depending on module type.Digital Inputs DI5 DI4 DI3 DI2 DI1 DI0Data Bits 5 4 3 2 1 0For example: A typical response from a $1DI command could be: *00FE.This response indicates that DI0 = 0 and all other digital inputs are = 1All digital inputs that are not implemented or left unconnected are read as‘1’Digital input 0 serves a dual function. It is both a digital input and the EventCounter input.When reading digital inputs with a checksum, be sure not to confuse thechecksum with the data.Digital Output (DO)The DO command controls eight bits of digital outputs on the DIN-172module connector. The number of digital outputs implemented depends onthe model used. The digital outputs allow the module to control externalcircuits under host command. The DO command requires an argument oftwo hex characters specifying the eight bits of output data.Digital Outputs DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0Data Bits 7 6 5 4 3 2 1 0The electrical implementation of the digital output consists of open-collectortransistors wired to the module connector. If a digital output is set to ‘1’ thecorresponding transistor is turned on and sinks current. Note that when adigital output bit is set to ‘1’ the electrical output is near 0 volts. If a digitaloutput is set to ‘0’ the corresponding transistor is turned off and sinks nocurrent.Assume a module has two digital outputs, and you wish to turn both outputson (sinking current). Set data bit 0 and data bit 1 to ‘1’. Since the module hasonly two digital outputs, all the other bits are ‘don’t cares’. For example, thiscommand will turn both outputs ‘on’:Command: $1DOFFResponse: *To turn both outputs off you could use the command:Command: $1DO00Response: *Command Set 4-8Digital output settings are not stored in nonvolatile memory. If a power failureoccurs, all digital outputs will be 0 upon power up.The DO command is the only means of changing digital outputs. There is nosoftware provision to read the state of digital outputs.Read Data (RD)The read data command is the basic command used to read the bufferedsensor data. The output buffer (Figure 2.1) allows the data to be readimmediately without waiting for an input A/D conversion. For example:Command: $1RDResponse: *+00072.00Command: #1RDResponse: *1RD+00072.10A4Since the RD command is the most frequently used command in normaloperation, a special shortened version of the command is available. If amodule is addressed without a two-letter command, the module interpretsthe string as an RD command.Command: $1Response: *+00072.10Command: #1Response: *1RD+00072.10A4Remote Reset (RR)The reset command allows the host to perform a program reset on themodule’s microprocessor. This may be necessary if the module’s internalprogram is disrupted by static or other electrical disturbances. Once a resetcommand is received, the module will recalibrate itself. The calibrationprocess takes approximately 3 seconds. For example:Command: $1RRResponse: *Command: #1RRResponse: *1RRFFIn general, the state of the digital outputs and the event counter will not beaffected by the RR command. However, if data in the microprocessor’s RAM(Random Access Memory) has been lost, the RR command will result in afull power-up reset.Any commands sent to the module during the self-calibration sequence willresult in a NOT READY error.Command Set 4-9Read Setup (RS)The read setup command reads back the setup information loaded intothe module’s nonvolatile memory with the SetUp (SU) command. Theresponse to the RS command is four bytes of information formatted aseight hex characters.Command: $1RSResponse: *31070142Command: #1RSResponse: *1RS3107014292The response contains the module’s channel address, baud rate andother parameters. Refer to the setup command (SU), and Chapter 5 fora list of parameters in the setup information.When reading the setup with a checksum, be sure not to confuse thechecksum with the setup information.Read Zero (RZ)The Read Zero command reads back the value stored in the OutputOffset Register (Figure 2.1).Command: $1RZResponse: *+00000.00Command: #1RZResponse: *1RZ+00000.00B0The data read back from the Output Offset Register may be interpretedin several ways. The commands that affect this value are: Trim Zero(TZ) and Clear Zero (CZ).Setup Command (SU)Each DIN-100 module contains an EEPROM (Electrically ErasableProgrammable Read Only Memory) which is used to store modulesetup information such as address, baud rate, parity, etc. TheEEPROM is a special type of memory that will retain information evenif power is removed from the module. The EEPROM is used to replacethe usual array of DIP switches normally used to configure electronicequipment.The SetUp command is used to modify the user-specified parameterscontained in the EEPROM to tailor the module to your application.Since the SetUp command is so important to the proper operation ofa module, a whole section of this manual has been devoted to itsdescription. See Chapter 5.Command Set 4-10The SU command requires an argument of eight hexadecimal digits todescribe four bytes of setup information:Command: $1SU31070182Response: *Command: #1SU31070182Response: *1SU3107018299Trim Span (TS)The trim span command is the basic means of trimming the accuracy of aDIN-100 module. The TS command loads a calibration factor into nonvola-tile memory to trim the full-scale output of the signal conditioning circuitry.It is intended only to compensate for long-term drifts due to aging of theanalog circuits, and has a useful trim value of ±10% of the nominalcalibration set at the factory. It is not to be used to change the basic transferfunction of the module. Full information on the use of the TS command maybe found in Chapter 9.Command: $1TS+00500.00Response: *Command: #1TS+00500.00Response: *1TS+00500.00B0Caution TS is the only command associated with the span trim. There is noprovision to read back or clear errors loaded by the TS command. Misuseof the TS command may destroy the calibration of the unit which can onlybe restored by using laboratory calibration instruments in a controlledenvironment. An input signal must be applied when using this command.Trim Zero (TZ)The Trim Zero command is used to load a value into the Output OffsetRegister (Figure 2.1) to null out an offset in the output data. It may be usedto trim offsets created by sensors. It may also be used to null out data tocreate a deviation output.Example: Assume a DIN-151 bridge input module is being used with a loadcell for weight measurement. An initial reading of the load cell with no weightapplied may reveal an initial offset error:Command: $1RDResponse: *+00005.00With no weight applied, trim the output to read zero. To trim, use the TZcommand and specify the desired output reading:Command: $1TZ+00000.00 (zero output)Response: *Command Set 4-11With no weight applied, trim the output to read zero. To trim, use the TZcommand and specify the desired output reading:Command: $1TZ+00000.00 (zero output)Response: *The TZ command will load a data value into the Output Offset Register toforce the output to read zero. The module will compensate for any previousvalue loaded into the Output Offset Register. If another output reading istaken, it will show that the offset has been eliminated:Command: $1RDResponse: *+00000.00Although the TZ command is most commonly used to null an output to zero,it may be used to offset the output to any specified value. Assume that withthe previously nulled load cell system we performed this command:Command: $1TZ-00100.00Response: *The new data output with no load applied would be:Command: $1RDResponse: *-00100.00The load cell output is now offset by -100.The offset value stored by the TZ command is stored in nonvolatile memoryand may be read back with the Read Zero (RZ) command and cleared withthe Clear Zero (CZ) command.The SetPoint (SP) command will write over any value loaded by the TZcommand.Write Enable (WE)Each module is write protected against accidental changing of alarms,limits, setup, or span and zero trims. To change any of these write protectedparameters, the WE command must precede the write-protected command.The response to the WE command is an asterisk indicating that the moduleis ready to accept a write-protected command. After the write-protectedcommand is successfully completed, the module becomes automaticallywrite disabled. Each write-protected command must be preceded individu-ally with a WE command. For example:Command: $1WEResponse: *Command: #1WEResponse: *1WEF7Command Set 4-12If a module is write enabled and the execution of a command results in anerror message other than WRITE PROTECTED, the module will remainwrite enabled until a command is successfully completed resulting in an ‘ *‘ prompt. This allows the user to correct the command error without havingto execute another WE command.Write Extended Address (WEA)ERROR MESSAGESThe DIN-100 modules feature extensive error checking on input commandsto avoid erroneous operation. Any errors detected will result in an errormessage and the command will be aborted.All error messages begin with “?”, followed by the channel address, a spaceand error description. The error messages have the same format for eitherthe ‘ $ ‘ or ‘ # ‘ prompts. For example:?1 SYNTAX ERRORThere are eight error messages, and each error message begins with adifferent character. It is easy for a computer program to identify the errorwithout having to read the entire string.ADDRESS ERRORThere are six ASCII values that are illegal for use as a module address:NULL ($00), CR ($0D), $ ($24), # ($23), { ($7B) and } ($7D). The ADDRESSERROR will occur when an attempt is made to load an illegal address intoa module with the SetUp (SU) command. An attempt to load an addressgreater than $7F will produce an error.BAD CHECKSUMThis error is caused by an incorrect checksum included in the commandstring. The module recognizes any two hex characters appended to acommand string as a checksum. Usually a BAD CHECKSUM error is due tonoise or interference on the communications line. Often, repeating thecommand solves the problem. If the error persists, either the checksum iscalculated incorrectly or there is a problem with the communicationschannel. More reliable transmissions might be obtained by using a lowerbaud rate.Command Set 4-13COMMAND ERRORThis error occurs when the two-character command is not recognized by themodule. Often this error results when the command is sent with lower-caseletters. All valid commands are upper-case.NOT READYIf a module is reset, it performs a self-calibration routine which takes 2-3seconds to complete. Any commands sent to the module during the self-calibration period will result in a NOT READY error. When this occurs, simplywait a couple seconds and repeat the command.The module may be reset in three ways: a power-up reset, a Remote Reset(RR) command, or an internal reset. All modules contain a ‘watchdog’ timerto ensure proper operation of the microprocessor. The timer may be trippedif the microprocessor is executing its program improperly due to powertransients or static discharge.If the NOT READY error persists for more than 30 seconds, check the powersupply to be sure it is within specifications.PARITY ERRORA parity error can only occur if the module is setup with parity on (see Setup).Usually a parity error results from a bit error caused by interference on thecommunications line. Random parity errors are usually overcome by simplyrepeating the command. If too many errors occur, the communicationschannel may have to be improved or a slower baud rate may be used.A consistent parity error will result if the host parity does not match themodule parity. In this situation, the easiest solution may be to change theparity in the host to obtain communication. At this point the parity in themodule may be changed to the desired value with the SetUp (SU) command.The parity may be changed or turned off by using Default Mode.SYNTAX ERRORA SYNTAX ERROR will result if the structure of the command is not correct.This is caused by having too few or too many characters, signs or decimalpoints missing or in the wrong place. Table 4.1 lists the correct syntax forall the commands.VALUE ERRORThis error results when an incorrect character is used as a numerical value.Data values can only contain decimal digits 0-9. Hex values used in theSetUp (SU) and Digital Output (DO) commands can range from 0-F.Command Set 4-14WRITE PROTECTEDAll commands that write data into nonvolatile memory are write-protected toprevent accidental erasures. These commands must be preceded with aWrite Enable (WE) command or else a WRITE PROTECTED error willresult.The DIN-100 modules feature a wide choice of user configurable optionswhich gives them the flexibility to operate on virtually any computer orterminal based system. The user options include a choice of baud rate,parity, address, and many other parameters. The particular choice ofoptions for a module is referred to as the setup information.The setup information is loaded into the module using the SetUp (SU)command. The SU command stores 4 bytes (32 bits) of setup informationinto a nonvolatile memory contained in the module. Once the information isstored, the module can be powered down indefinitely (10 years minimum)without losing the setup data. The nonvolatile memory is implemented withEEPROM so there are no batteries to replace.The EEPROM has many advantages over DIP switches or jumpers normallyused for option selection. The module never has to be opened because allof the options are selected through the communications port. This allows thesetup to be changed at any time even though the module may be locatedthousands of feet away from the host computer or terminal. The setupinformation stored in a module may be read back at any time using the ReadSetup command (RS).The following options can be specified by the SetUp command:Channel address (122 values)LinefeedsParity (odd, even, none)Baud rate (300 to 38,400)Addressing Mode: Extended/NormalCJC disable (DIN-130 series)RTD 3/4 wire (DIN-140 series)Communication delay (0-6 characters)Number of displayed digitsLarge-signal filter constantSmall-signal filter constantEach of these options will be described in detail below. For a quick look-upchart on all options, refer to Tables 5.1-4.Command SyntaxThe general format for the SetUp (SU) command is:$1SU[byte1][byte 2][byte 3][byte 4]Chapter 5Setup Information/SetUp CommandSetup & SetUp Command 5-2A typical SetUp command would look like: $1SU31070182.Notice that each byte is represented by its two-character ASCII equivalent.In this example, byte 1 is described by the ASCII characters ‘31’ which is theequivalent of binary 0011 0001 (31 hex). The operand of a SU commandmust contain exactly 8 hex (0-F) characters. Any deviation from this formatwill result in a SYNTAX ERROR. The Appendix contains a convenient hex-to-binary conversion chart.For the purposes of describing the SetUp command, ‘bit 7’ refers to thehighest-order bit of a byte of data. ‘Bit 0’ refers to lowest-order bit:‘bit number’: 7 6 5 4 3 2 1 0binary data: 0 0 1 1 0 0 0 1 = $31 (hex)The SU command is write protected to guard against erroneous changes inthe setup data; therefore each SU command must be preceded by a WriteEnable (WE) command. To abort an SU command in progress, simply senda non-hex character (an ‘X’ for example) to generate a SYNTAX ERROR,and try again.CAUTION: Care must be exercised in using the SU command. Improper usemay result in changing communications parameters (address, baud rate,parity) which will result in a loss of communications between the host andthe module. In some cases the user may have to resort to using DefaultMode to restore the proper setups. The recommended procedure is to firstuse the Read Setup (RS) command to to examine the existing setup databefore proceeding with the SU command.Byte 1Byte 1 contains the module (channel) address. The address is stored as theASCII code for the string character used to address the module. In ourexample command $1SU31070080 , the first byte ‘31’ is the ASCII code forthe character ‘1’. If our sample command is sent to a module, the EEPROMwill be loaded with the address ‘1’, which in this particular case remainsunchanged. To change the module address to ‘2’ , byte 1 of the SetUpcommand becomes ‘32’, which is the ASCII code for the character ‘2’. Nowthe command will look like this: $1SU32070080. When this command issent, the module address is changed from ‘1’ to ‘2’ and will no longer respondto address ‘1’.When using the SU command to change the address of a module, be sureto record the new address in a place that is easily retrievable. The only wayto communicate with a module with an unknown address is with the DefaultMode.Setup & SetUp Command 5-3are six ASCII codes that are illegal for use as an address. These codes are$00, $0D, $24, $23, $7B, $7D which are ASCII codes for the charactersNUL, CR, $, #, { and }. Using these codes for an address will cause anADDRESS ERROR and the setup data will remain unchanged. This leavesa total of 122 possible addresses that can be loaded with the SU command.It is highly recommended that only ASCII codes for printable characters beused ($21 to $7E) which greatly simplifies system debugging with a dumbterminal. Refer to Appendix A for a list of ASCII codes. Table 5.1 lists theprintable ASCII codes that may be used as addresses.Table 5.1 Byte 1 ASCII Printable Characters.HEX ASCII HEX ASCII HEX ASCII HEX ASCII21 3A : 51 Q 68 h22 “ 3B ; 52 R 69 i25 % 3C < 53 S 6A j26 & 3D = 54 T 6B k27 ‘ 3E > 55 U 6C l28 ( 3F ? 56 V 6D m29 ) 40 @ 57 W 6E n2A * 41 A 58 X 6F o2B + 42 B 59 Y 70 p2C , 43 C 5A Z 71 q2D - 44 D 5B [ 72 r2E . 45 E 5C \\\\ 73 s2F / 46 F 5D ] 74 t30 0 47 G 5E ^ 75 u31 1 48 H 5F _ 76 v32 2 49 I 60 ‘ 77 w33 3 4A J 61 a 78 x34 4 4B K 62 b 79 y35 5 4C L 63 c 7A z36 6 4D M 64 d 7B {37 7 4E N 65 e 7C |38 8 4F O 66 f 7D }39 9 50 P 67 g 7E ~Setup & SetUp Command 5-4Byte 2Byte 2 is used to configure some of the characteristics of the communica-tions channel; linefeeds, parity, and baud rate.LinefeedsThe most significant bit of byte 2 (bit 7) controls linefeed generation by themodule. This option can be useful when using the module with a dumbterminal. All responses from the DIN-100 are terminated with a carriagereturn (ASCII $0D). Most terminals will generate a automatic linefeed whena carriage return is detected. However, for terminals that do not have thiscapability, the D1000 module can generate the linefeed if desired. By settingbit 7 to ‘1’ the module will send a linefeed (ASCII $0A) before and after eachresponse. If bit 7 is cleared (0), no linefeeds are transmitted.When using the ‘#’ command prompt, the linefeed characters are notincluded in the checksum calculation.ParityBits 5 and 6 select the parity to be used by the module. Bit 5 turns the parityon and off. If bit 5 is ‘0’, the parity of the command string is ignored and theparity bit of characters transmitted by the module is set to ‘1’.If bit 5 is ‘1’, the parity of command strings is checked and the parity ofcharacters output by the module is calculated as specified by bit 6.If bit 6 is ‘0’, parity is even; if bit 6 is ‘1’, parity is odd.If a parity error is detected by the module, it will respond with a PARITYERROR message. This is usually caused by noise on the communicationsline.If parity setup values are changed with the SU command, the response tothe SU command will be transmitted with the old parity setup. The new paritysetup becomes effective immediately after the response message from theSU command.Baud RateBits 0-3 specify the communications baud rate. The baud rate can beselected from ten values between 300 and 38400 baud. Refer to Table 5.2for the desired code.The baud rate selection is the only setup data that is not implementeddirectly after an SU command. In order for the baud rate to be actuallychanged, a module reset must occur. A reset is performed by sending aRemote Reset (RR) command (see Communications) or powering down.This extra level of write protection is necessary to ensure that communica-tions to the module is not accidently lost. This is very important whenSetup & SetUp Command 5-5changing the baud rate of an RS-485 string. For more information onchanging baud rate, refer to Chapter 3.Let’s run through an example of changing the baud rate. Assume our samplemodule contains the setup data value of ‘31070080’. Byte 2 is ‘07’. Byreferring to the SU command chart we can determine that the module is setfor no linefeeds, no parity, and baud rate 300. If we perform the Read Setupcommand with this module we would get:Command: $1RSResponse: *31070080Let’s say we wish to change the baud rate to 9600 baud. The code for 9600baud is ‘0010’ (from Table 5.2). This would change byte 2 to ‘02’. To performthe SU command we must first send a Write Enable command because SUis write protected:Command: $1WEResponse: *Command: $1SU31020080Response: *This sequence of messages is done in 300 baud because that was theoriginal baud rate of the module. The module remains in 300 baud after thissequence. We can use the Read Setup (RS) command to check the setupdata:Command: $1RSResponse: *31020080Notice that although the module is communicating in 300 baud, the setupdata indicates a baud rate of 9600 (byte 2 = ‘02’). To actually change thebaud rate to 9600, send a Remote Reset (RR) command (RR is writeprotected):Command: $1WEResponse: *Command: $1RRResponse: *Up to this point all communications have been sent at 300 baud. The modulewill not respond to any further communications at 300 baud because it is nowrunning at 9600 baud. At this point the host computer or terminal must be setto 9600 baud to continue operation.If the module does not respond to the new baud rate, most likely the setupdata is incorrect. Try various baud rates from the host until the moduleresponds. The last resort is to set the module to Default Mode where theSetup & SetUp Command 5-6baud rate is always 300.Bit 4Bit 4 is used to enable or disable extended addressing mode.Table 5.2 Byte 2: Linefeed, Parity, Addressing and Baud Rate.FUNCTION DATA BIT7 6 5 4 3 2 1 0LINEFEED 1NO LINEFEED 0NO PARITY 0 0NO PARITY 1 0EVEN PARITY 0 1ODD PARITY 1 1NORMAL ADDRESSING 0EXTENDED ADDRESSING 138400 BAUD 0 0 0 019200 BAUD 0 0 0 19600 BAUD 0 0 1 04800 BAUD 0 0 1 12400 BAUD 0 1 0 01200 BAUD 0 1 0 1600 BAUD 0 1 1 0300 BAUD 0 1 1 1Byte 3This byte contains the setup information for several seldom-used options.The default value for this byte is ‘01’.Disable CJCRTD 3/4 WireTrigger Edge SelectThe setup information stored in bit 4 has different meanings depending onthe DIN-100 model number.Disable CJC; this function pertains only to the DIN-130 series of thermo-couple input modules. If the bit is set to ‘1’ the Cold Junction Compensationis disabled. The module calculates the temperature output with a fixed coldjunction temperature of 0 degrees Celsius. This setup is useful for calibratingthe module or in cases where remote CJC is used. Normally this bit is clearedto ‘0’.Setup & SetUp Command 5-7RTD 3/4 Wire; this function pertains only to the DIN-140 series of RTD inputmodules. If the bit is set to ‘1’, the module provides the correct lead-compensation calculation for 4-wire RTD’s. If the bit is cleared to ‘0’, themodule calculates the correct lead compensation for 3-wire RTD’s. Meas-urement errors may result if the module is not set to the correct sensor type.This function has no affect on DIN-145 or DIN-146 Thermistor inputs.DelayBits 0 and 1 specify a minimum turn-around delay between a command andthe module response. This delay time is useful on host systems that are notfast enough to capture data from quick-responding commands such as RD.This is particularly true for systems that use software UART’s. The specifieddelay is added to the typical command delays listed in the SoftwareConsiderations section of Chapter 3. Each unit of delay specified by bits 0and 1 is equal to the amount of time required to transmit one character withthe baud rate specified in byte 2. For example, one unit of delay at 300 baudis 33.3 mS; for 38.4 kilobaud the delay is 0.26 mS. The number of delay unitsis selectable from 0 to 6 as shown in Table 5.3.In some systems, such as IBM BASIC, a carriage return (CR) is alwaysfollowed by a linefeed (LF). The DIN-100 modules will respond immediatelyafter a command terminated by a CR and will ignore the linefeed. To avoida communications collision between the linefeed and the module response,the module should be setup to delay by 2 units.Table 5.3 Byte 3 Options.FUNCTION DATA BIT7 6 5 4 3 2 1 0CJC ( DIN-130’S ) 0NO CJC ( DIN-130’S ) 13 WIRE ( DIN-140’S ) 04 WIRE ( DIN-140’S ) 1NO DELAYS 0 02 BYTE TIME DELAYS 0 14 BYTE TIME DELAYS 1 06 BYTE TIME DELAYS 1 1Setup & SetUp Command 5-8Byte 4This setup byte specifies the number of displayed digits and the digital filtertime constants.Number of displayed digitsFor ease of use, the data outputs of all modules are standardized to acommon 7-digit output consisting of sign, 5 digits, decimal point, and twomore digits. Typical output data looks like: +00100.00. However, best-caseresolution of the A/D converter is 1 part in 32,768. In some cases, theresolution of the output format is much greater than the resolution of themeasurement system. In such cases, the trailing digits of the responsewould display meaningless information. Bits 6 and 7 are used to inserttrailing zeros into the output data to limit the output resolution and mask offmeaningless digits.Bit 7 Bit 60 0 XXXX0.00 (4 displayed digits)0 1 XXXXX.00 (5 displayed digits)1 0 XXXXX.X0 (6 displayed digits)1 1 XXXXX.XX (7 displayed digits)For example, the DIN-141 model for RTD’s has 0.1 degree output resolution.The appropriate number of digits for this module is 6, to mask off the 0.01digit which has no meaningful data. In some cases, the user may want to limitthe output resolution to 1 degree. To do this, select bits 6 and 7 to display5 digits. With this selection, the right-most two digits will always be set to ‘0’.The number of displayed digits affects only data received from an RD or NDcommand.Large Signal Filter, Bits 3,4,5Small Signal Filter, Bits 0,1,2The modules contain a versatile single-pole, low-pass digital filter to smoothout unwanted noise caused by interference or small signal variations. Thedigital filter offers many advantages over traditional analog filters. Thefiltering action is done completely in firmware and is not affected bycomponent drifts, offsets, and circuit noise typically found in analog filters.The filter time constant is programmable through the SetUp (SU) commandand can be changed at any time, even if the module is remote from the host.The digital filter features separate time constants for large and small signalvariations. The Large Signal Filter time constant is controlled by bits 3,4,5.This time constant is used when large signal variations are present on theinput. The Small Signal Filter time constant is controlled by bits 0,1,2. Thisfilter time constant is automatically selected when input signal variations aresmall. The microprocessor in the module automatically selects the correctSetup & SetUp Command 5-9filter constant after every A/D conversion. The constant selected dependson the magnitude of the change of the input signal and the setup for thenumber of digits displayed. The microprocessor always keeps the value ofthe last calculated output to compare to a new data conversion. If the newdata differs from the last output by more than ten counts of the last displayeddigit, the large signal time constant is used in the digital filter. If the result ofthe most recent A/D conversion differs from the last output value by less thanten counts of the last displayed digit, the small signal time constant is used.Let’s look at an example:The DIN-141 RTD module has a standard output resolution of 0.1 degrees.The standard number-of-displayed-digits setup for this module is 6 digits,from byte 4 of the setup data. Therefore, the large signal filter will be selectedif a new input conversion differs from the previous value by > 1.0 degree:Previous data New data Filter selected+00100.00 +00100.50 small+00100.00 +00101.50 large+00100.00 +00099.90 small+00100.00 +00098.90 large-00050.50 -00050.00 small-00050.50 -00060.00 smallIf the number of displayed digits is changed to reduce output resolution, filterselection is also affected. If the number of displayed digits in the previousexample is changed to 5, the output resolution becomes 1.0 degree.In this case the large signal time constant is used if the new reading differsfrom the old by more than 10.0 degrees:Previous data New data Filter selected+00100.00 +00105.00 small+00100.00 +00111.00 large+00100.00 +00091.00 small+00100.00 +00085.00 large-00050.00 -00045.00 small-00050.00 -00039.00 largeLarge Signal Time ConstantThe large signal filter time constant is specified by bits 3,4,5 of byte 4. It maybe specified from 0 (no filter) to 16 seconds. The time constant for a first-order filter is the time required for the output to reach 63% of its final valuefor a step input.Setup & SetUp Command 5-10Small Signal Time ConstantBits 0,1, 2 specify the filter time constant for small signals. Its values aresimilar to the ones for the large signal filter. Most sensors can benefit froma small amount of small signal filtering such as T = 0.5 seconds In mostapplications, the small signal time constant should be larger than the largesignal time constant. This gives stable readings for steady-state inputs whileproviding fast response to large signal changes.Table 5.4 Byte 4 Displayed Digits and Filter Time Constants.BYTE 4FUNCTION DATA BIT7 6 5 4 3 2 1 0+XXXX0.00 DISPLAYED DIGITS 0 0+XXXXX.00 DISPLAYED DIGITS 0 1+XXXXX.X0 DISPLAYED DIGITS 1 0+XXXXX.XX DISPLAYED DIGITS 1 1NO LARGE SIGNAL FILTERING 0 0 00.25 SECOND TIME CONSTANT 0 0 10.5 SECOND TIME CONSTANT 0 1 01.0 SECOND TIME CONSTANT 0 1 12.0 SECOND TIME CONSTANT 1 0 04.0 SECOND TIME CONSTANT 1 0 18.0 SECOND TIME CONSTANT 1 1 016.0 SECOND TIME CONSTANT 1 1 1NO SMALL SIGNAL FILTERING 0 0 00.25 SECOND TIME CONSTANT 0 0 10.5 SECOND TIME CONSTANT 0 1 01.0 SECOND TIME CONSTANT 0 1 12.0 SECOND TIME CONSTANT 1 0 04.0 SECOND TIME CONSTANT 1 0 18.0 SECOND TIME CONSTANT 1 1 016.0 SECOND TIME CONSTANT 1 1 1Setup HintsUntil you become completely familiar with the SetUp command, the bestmethod of changing setups is to change one parameter at a time and to verifythat the change has been made correctly. Attempting to modify all the setupsat once can often lead to confusion. If you reach a state of total confusion,the best recourse is to reload the factory setup shown in Table 5.5 and tryagain, changing one parameter at a time. Use the Read Setup (RS)command to examine the setup information currently in the module as abasis for creating a new setup.Setup & SetUp Command 5-11By using the RS command and changing one setup parameter at a time, anyproblems associated with incorrect setups may be identified immediately.Once a satisfactory setup has been developed, record the setup value anduse it to configure similar modules.If you commit an error in using the SetUp command, it is possible to losecommunications with the module. In this case, it may be necessary to usethe Default Mode to re-establish communications.Table 5.5 Factory Setups by Model.(All modules from the factory are set for address ‘1’, 300 baud, no parity)DIN-100 Series Model Number Setup Message111, 115, 125 310701C2110, 113, 114 3107014213X 31070142141, 142, 143 , 112 31070182145, 15X 310701C216X 310701C017X 31070100The DIN-100 series features the DIN-171 module with six digital inputsand the DIN-172 module with six digital outputs .Digital OutputsA digital output consists of an open-collector transistor controlled by thehost, using the Digital Output (DO) command (See Figure 6.1). The open-collector configuration is used to provide maximum versatility in interfacingto solid state relays (SSR’s) or to standard logic levels such as TTL orCMOS. Each digital output can sink up to 100mA and can withstand up to30V. Power in the transistor must be limited to 300mW. The emitter of eachtransistor is tied to the GND terminal on the input connector.A typical connection of a digital output is shown in Figure 6.1. In this case, asolid state relay is controlled by the DIN-172 module. The SSR can then beused to control AC power to alarms, heaters, pumps, etc. A typical connec-tion to a logic input is shown in Figure 6.2. In some cases, the common-mode voltage of the GND terminal may be significantly different from theground potential of the logic input to be interfaced. This may occur whenChapter 6Digital I/O FunctionsFigure 6.1 Digital Outputs Used With Relaysthe module is powered remotely. In this case, an opto-isolator may be usedto eliminate the common-mode voltage. See Figure 6.2. In all cases, thecurrent switched by the transistor may not be more than 100mA.Digital I/O Functions 6-2 If the module loses power, the digital outputs are turned off. The outputswill remain off until switched by a Digital Output (DO) command.The digital outputs are not affected by the Remote Reset (RR) command.Digital InputsDigital inputs are used to sense switch closures and the state of digitalsignals. The inputs are protected to voltages up to ±30V and are normallypulled up to the logic “1” condition (see Figure 6.2). Digital inputs can beread by the Digital Input (DI) command. Voltage inputs less than 1V areread back as ‘0’. Signals greater than 3.5V are read as ‘1’. No othercommands have any affect on the inputs.Switch closures can be read by the digital input by simply connecting theswitch between GND terminal and a digital input with the addition of anexternal 10K pull-up resistor to +5Vdc. The pull-up supplies only 0.5ma;therefore, self-wiping switches designed for low current operation shouldbe used.Digital inputs may be used to sense AC voltages by using isolated sensingmodules offered by many manufacturers.Figure 6.2 Typical Digital Input Circuit.DIN-100 modules require a regulated +5Vdc power-supply. The modulescontain a low voltage detection circuit that shuts down all circuits in themodule at approximately 4.5 Vdc. All power supply specifications arereferred to the module connector; the effects of line voltage drops must beconsidered when the module is powered remotely.For modules with sensor excitation, consult individual data sheets for powerrequirements.The low voltage detection circuit shuts down the module at approximately4.5Vdc. If the module is interrogated while in a low power supply condition,the module will not respond. Random NOT READY error messages couldindicate that the power supply voltage is periodically drooping below the4.7V minimum.In some cases, a small number of modules may be operated by “stealing”power from a host computer or terminal.Small systems may be powered by using wall-mounted calculator-typemodular power supplies. These units are inexpensive and may be obtainedfrom many retail electronics outlets.For best reliability, modules operated on long communications lines (>500feet) should be powered locally using small calculator-type power units. Thiseliminates the voltage drops on the Ground lead which may interfere withcommunications signals. In this case the V+ terminal is connected only to thelocal power supply. The Ground terminal must be connected back to the hostto provide a ground return for the communications loop.All DIN-100 modules are protected against power supply reversals.Chapter 7Power SupplySymptom:Module is not responding to commandsModule responds with ?1 COMMAND ERROR to every command.Characters in each response message appear as graphics characters• RS-485 Module is not responding to commands1. Using a voltmeter, measure the power supply voltage at the+Vs and GND terminals to verify the power supply voltage is constantly5Vdc ± 5%.2. Verify using an ohmmeter that there are no breaks in thecommunications data lines.3. When using a serial communications converter (DIN-191) ensure thatthe communications Baud Rate switch is set to the proper Baud Rate value.4. Confirm software communications settings in Host computer matchthose values being used by the connected module(s).5. If the Baud Rate value being used in the application is greater than 300Baud and the module will only communicate 300 Baud then make sure thatthe DEFAULT* terminal is not connected to Ground (GND).6. Ensure that module RS-485 "Data" line (module terminal pin #7) isconnected to the Host RS-485 "Data+" line.7. Ensure that module RS-485 "Data*" line (module terminal pin #8) isconnected to the Host RS-485 "Data-" line.8. If the problem is not corrected after completing the steps above thenconnect the module by itself to a Host computer as outlined in Chapter 1.0under "Quick Hook-up". Start the supplied Utility software and please call thefactory for further assistance.• Module responds with ?1 COMMAND ERROR to every commandEnsure that characters in the command message are uppercase char-acters. All commands consist of uppercase characters only.• Characters in each response message appear as graphics characters1. Set the communications software parity setting to "M" for 'MARK' paritytype and 7 data bits. Or, utilize any parity type in both the module andsoftware other than "NO" parity.2. In custom written software routines, mask off the most significant bit ofeach received character to logic "0". Thus forcing the received character to7-bit ASCII value.Chapter 8TroubleshootingThe DIN-100 module is initially calibrated at the factory and has a recom-mended calibration interval of one year. Calibration constants are stored inthe EEPROM and may be trimmed using the Trim Span (TS) and Trim Zero(TZ) commands. Calibration procedure is as follows.Voltage and current inputs: clear the output offset register using the ClearZero (CZ) command. Zero trims are not neccessary due to the built-in auto-zero function. Apply a known calibrated voltage or current to the input of themodule. The calibrated stimulus should be adjusted to be near 90% of the fullscale output of the modules for best results. The accuracy of the calibratedvoltage or current must be better than the rated accuracy of the module,which in most cases is 0.02% of full scale. Use the Read Data (RD) com-mand to obtain an output reading. If the output corresponds to the appliedinput, no calibration is necessary. If the output is in overload, check thecircuit connections or use a different input value to obtain an output within theoperating range of the module.To trim the output, use the Trim Span (TS) command. The argument of theTS command should correspond to the desired module output. After per-forming the TS command, verify the trim with the RD command. For exampleto trim a DIN-112 module:1. Clear the output offset register.Command: $1WEResponse: * (CZ is write protected)Command: $1CZResponse: *2. Apply an input voltage near 90% of rated full scale. In this case we use a+900mV input voltage accurate to at least 0.02%. Obtain an output reading.Command: $1RDResponse: *+00900.30In this case, the output of the module is off by 300µV. To trim:Command: $1WEResponse: * (TS is write protected)Command: $1TS+00900.00Response: *This sequence will trim the output to +00900.00. Verify:Command: $1RDResponse: *+00900.00 (The module is calibrated.)Chapter 9CalibrationCalibration 9-2Thermocouples: Disable the cold junction compensation by setting bit 4 inbyte 3 of the setup data with the SetUp (SU) command. The module maynow be calibrated using a known input voltage. Perform the calibration asdescribed for a voltage input module. Table 9.1 gives recommended calibra-tion points. Due to the nonlinear nature of thermocouples, it may be neces-sary to repeat the TS command to obtain the desired output. After calibrationis complete, enable the cold junction compensation by clearing bit 4 in byte3 of the setup data.RTD: Use a calibrated resistor mounted directly on the module connector toavoid lead resistance errors. The resistor must be accurate to 0.01% forproper calibration. Recommended calibration points are listed in Table 9.1.Follow the command sequence described for voltage inputs to calibrate themodule. Due to the nonlinear nature of RTD’s it may be necessary to repeatthe TS command to obtain the desired output.Table 9.1 Calibration ValuesModel Input Stimulus Output DataDIN-110 +9000µV +09000.00DIN-111 +90mV +00090.00DIN-112 +900mV +00900.00DIN-113 +4.5V +04500.00DIN-114 +9V +09000.00DIN-115 +90V +00090.00DIN-125 +20mA +00020.00DIN-131 +39.13mV +00700.00DIN-132 +41.269mV +01000.00DIN-133 +17.816mV +00350.00DIN-134 +68.783mV +01000.00DIN-135 +17.445mV +01500.00DIN-136 +15.576mV +01500.00DIN-137 +10.094mV +01500.00DIN-138 +33.442mV +01982.00DIN-141 300.00? +00558.00DIN-142 300.00? +00547.60DIN-143 134.91? +00115.00DIN-145 206.1? +00090.00DIN-146 3018? +00140.00DIN-151 25mV +00025.00DIN-152 25mV +00025.00DIN-153 90mV +00090.00DIN-154 90mV +00090.00DIN-161 18Khz +18000.00Chapter 10Extended AddressingThe DIN-100 may be configured to a special command format calledExtended Addressing. This mode uses a different prompt, either '{' or '}'to distinguish it from the regular command syntax. The major differencein syntax for the Extended Addressing mode is that it uses a two-charac-ter address. A typical command in Extended Address mode would looklike this:Command: {01WEResponse: *Both the command and response are terminated with carriage returns.Note that the command uses a two-character address, '01.'There are two benefits to using Extended Addressing with the DIN-100:1) Greatly expanded addressing capability.2) Allow for a more structured addressing method inlarge systems.With single-byte addressing of the normal command structure, addressspace is limited to 122 points. Extended addressing allows an address-ing range of 249 points.Structured AddressingEven for a relatively small system, it can be advantageous to employ ahierarchical addressing system as used in Fig. 7.1. This is particularlytrue in systems that consist of many sites that are identical. From a hostsoftware standpoint, each site can be treated identically with the samemodule addresses, with each site having a different DIN-100 address.Extended Address SyntaxThe command syntax used with Extended Addressing is quite similar tothe normal protocol. The Extended Address commands are initiated witha '{' character (left curly brace, ASCII $7B), or a '}' character (right curlybrace, ASCII $7E). The '{' prompt is analogous to the '$' prompt in that itreturns the shortest possible response to complete the command. The '}'prompt is similar to the '#' prompt in that the command is echoed and achecksum is generated along with the other data necessary to completethe response. The '*' response prompt is used in all command forms.The Extended Address commands use a two-character ASCII address,each character may be one of 122 legal possibilities. Illegal charactersare: NULL ($00), CR ($0D), $ ($24), # ($23), { ($7B), and } ($7E).Command examples with Extended Address '01':Command: {01WEResponse: *Command: }01WEResponse: *01WE27Command: {01RSResponse: *31070000 (typical)Command: }01RSResponse: *01RS31070000BB (typical)Checksums may be appended to commands:Command: {01WE78Response: *All commands that are available with single-byte addressing may beaccessed with Extended Addressing, and vice-versa.Table of ASCII characters (A) and their equivalent values in Decimal (D),Hexadecimal (Hex), and Binary. Claret (^) represents Control function.A D Hex Binary D Hex Binary^@ 0 00 00000000 128 80 10000000^A 1 01 00000001 129 81 10000001^B 2 02 00000010 130 82 10000010^C 3 03 00000011 131 83 10000011^D 4 04 00000100 132 84 10000100^E 5 05 00000101 133 85 10000101^F 6 06 00000110 134 86 10000110^G 7 07 00000111 135 87 10000111^H 8 08 00001000 136 88 10001000^I 9 09 00001001 137 89 10001001^J 10 0A 00001010 138 8A 10001010^K 11 0B 00001011 139 8B 10001011^L 12 0C 00001100 140 8C 10001100^M 13 0D 00001101 141 8D 10001101^N 14 0E 00001110 142 8E 10001110^O 15 0F 00001111 143 8F 10001111^P 16 10 00010000 144 90 10010000^Q 17 11 00010001 145 91 10010001^R 18 12 00010010 146 92 10010010^S 19 13 00010011 147 93 10010011^T 20 14 00010100 148 94 10010100^U 21 15 00010101 149 95 10010101^V 22 16 00010110 150 96 10010110^W 23 17 00010111 151 97 10010111^X 24 18 00011000 152 98 10011000^Y 25 19 00011001 153 99 10011001^Z 26 1A 00011010 154 9A 10011010^[ 27 1B 00011011 155 9B 10011011^\\\\ 28 1C 00011100 156 9C 10011100^] 29 1D 00011101 157 9D 10011101^^ 30 1E 00011110 158 9E 10011110^_ 31 1F 00011111 159 9F 1001111132 20 00100000 160 A0 10100000 33 21 00100001 161 A1 10100001“ 34 22 00100010 162 A2 10100010Appendix AASCII TableASCII Tables A-2A D Hex Binary D Hex Binary# 35 23 00100011 163 A3 10100011$ 36 24 00100100 164 A4 10100100% 37 25 00100101 165 A5 10100101& 38 26 00100110 166 A6 10100110‘ 39 27 00100111 167 A7 10100111( 40 28 00101000 168 A8 10101000) 41 29 00101001 169 A9 10101001* 42 2A 00101010 170 AA 10101010+ 43 2B 00101011 171 AB 10101011, 44 2C 00101100 172 AC 10101100- 45 2D 00101101 173 AD 10101101. 46 2E 00101110 174 AE 10101110/ 47 2F 00101111 175 AF 101011110 48 30 00110000 176 B0 101100001 49 31 00110001 177 B1 101100012 50 32 00110010 178 B2 101100103 51 33 00110011 179 B3 101100114 52 34 00110100 180 B4 101101005 53 35 00110101 181 B5 101101016 54 36 00110110 182 B6 101101107 55 37 00110111 183 B7 101101118 56 38 00111000 184 B8 101110009 57 39 00111001 185 B9 10111001: 58 3A 00111010 186 BA 10111010; 59 3B 00111011 187 BB 10111011< 60 3C 00111100 188 BC 10111100= 61 3D 00111101 189 BD 10111101> 62 3E 00111110 190 BE 10111110? 63 3F 00111111 191 BF 10111111@ 64 40 01000000 192 C0 11000000A 65 41 01000001 193 C1 11000001B 66 42 01000010 194 C2 11000010C 67 43 01000011 195 C3 11000011D 68 44 01000100 196 C4 11000100E 69 45 01000101 197 C5 11000101F 70 46 01000110 198 C6 11000110G 71 47 01000111 199 C7 11000111H 72 48 01001000 200 C8 11001000I 73 49 01001001 201 C9 11001001J 74 4A 01001010 202 CA 11001010K 75 4B 01001011 203 CB 11001011ASCII Tables A-3A D Hex Binary D Hex BinaryL 76 4C 01001100 204 CC 11001100M 77 4D 01001101 205 CD 11001101N 78 4E 01001110 206 CE 11001110O 79 4F 01001111 207 CF 11001111P 80 50 01010000 208 D0 11010000Q 81 51 01010001 209 D1 11010001R 82 52 01010010 210 D2 11010010S 83 53 01010011 211 D3 11010011T 84 54 01010100 212 D4 11010100U 85 55 01010101 213 D5 11010101V 86 56 01010110 214 D6 11010110W 87 57 01010111 215 D7 11010111X 88 58 01011000 216 D8 11011000Y 89 59 01011001 217 D9 11011001Z 90 5A 01011010 218 DA 11011010[ 91 5B 01011011 219 DB 11011011\\\\ 92 5C 01011100 220 DC 11011100] 93 5D 01011101 221 DD 11011101^ 94 5E 01011110 222 DE 11011110_ 95 5F 01011111 223 DF 11011111‘ 96 60 01100000 224 E0 11100000a 97 61 01100001 225 E1 11100001b 98 62 01100010 226 E2 11100010c 99 63 01100011 227 E3 11100011d 100 64 01100100 228 E4 11100100e 101 65 01100101 229 E5 11100101f 102 66 01100110 230 E6 11100110g 103 67 01100111 231 E7 11100111h 104 68 01101000 232 E8 11101000i 105 69 01101001 233 E9 11101001j 106 6A 01101010 234 EA 11101010k 107 6B 01101011 235 EB 11101011l 108 6C 01101100 236 EC 11101100m 109 6D 01101101 237 ED 11101101n 110 6E 01101110 238 EE 11101110o 111 6F 01101111 239 EF 11101111p 112 70 01110000 240 F0 11110000q 113 71 01110001 241 F1 11110001r 114 72 01110010 242 F2 11110010s 115 73 01110011 243 F3 11110011t 116 74 01110100 244 F4 11110100ASCII Tables A-4A D Hex Binary D Hex Binaryu 117 75 01110101 245 F5 11110101v 118 76 01110110 246 F6 11110110w 119 77 01110111 247 F7 11110111x 120 78 01111000 248 F8 11111000y 121 79 01111001 249 F9 11111001z 122 7A 01111010 250 FA 11111010{ 123 7B 01111011 251 FB 11111011| 124 7C 01111100 252 FC 11111100} 125 7D 01111101 253 FD 11111101~ 126 7E 01111110 254 FE 11111110127 7F 01111111 255 FF 11111111The Frequency Input modules feature a versatile input stage that can beused in a variety of applications. Figure B-1 is a block diagram of the inputsignal conditioning.Appendix BDIN-160 Data SheetFigure B-1. DIN-161 Input Signal Conditioning Block Diagram.The input signal is applied to a precision comparator through the + Input.Input protection is provided to withstand inputs up to 230Vac. The compara-tor output is then fed through an opto-isolator to the module’s microproces-sor for scaling and formatting. The input section is completely isolated fromthe power and communications lines. The isolation allows up to 500V ofcommon-mode voltage between the input ground and the power connec-tions.The input comparator employs hysteresis to provide reliable readings withnoisy or slow input signals. The amount of hysteresis may be controlled byconnecting the hysteresis control line (HYSTR) to ground or the 2.5Vterminal through an external resistor. Figure 2 shows the most frequentlyused connection.B-2 DIN-100 USERS MANUALFigure B-2. Controlling Hysteresis For Positive-Going SignalsThis connection is used for unipolar positive-going frequency signals. Thehysteresis is centered around a +2.5V switching level. If R is left open, theswitching levels are +3V and +2V, or 2.5V ±0.5V. If R is shorted, thehysteresis decreases with resulting switching levels of 2.5V ±5mV. Anyhysteresis value from ±5mV to ±0.5V may be obtained by selecting anappropriate value for R. Figure B-2 shows the relationship between thehysteresis and R.The input comparator may be setup for comparisons around zero volts byusing the connections in Figure B-3. This connection is useful for AC orbipolar signals. Since the input section is isolated, the +2.5V pin may beconnected to any signal with a common-mode voltage up to 500V. With thehysteresis control connected as in Figure B-3, the switching points occursymmetrically on either side of the +2.5V level. Since the low side of the inputsignal is connected to the +2.5V pin, the switching points appear to besymmetrical to zero, as referenced to the input signal. The hysteresis maybe varied from ±5mV to ±0.5V as shown in Figure B-2.R Vswitching ± VhysteresisOpen 2.5V ± 0.5VØ? 2.5V ± 5mVFor Vhysteresis >5mV and<0.5V: 34 VhysteresisR (in K?) =0.5 -VhysteresisDIN-160 Data Sheet B-3 R Vswitching ± Vhysteresis Open Ø? 1.7V ± 5mV 34 VhysteresisR (in K?) = 0.5 - VhysteresisVswitching = 2.5 -1417 + RThe hysteresis control may also be connected to ground (GND), whichproduces another set of switching levels. This connection is shown in figureB-4. If the HYSTR terminal is shorted to GND the nominal switching point is1.6V with ±5mV of hysteresis.To measure AC signals super-imposed on a DC value, the input may be ACcoupled by simply placing a capacitor in series with the +IN terminal. Themodule contains an internal 1M? resistor connected from the +IN to +2.5Vfor biasing. A .01 uf cap may be used for frequencies down to 10HZ.Figure B-4. Controlling Switching Level and Hysteresis.For Vhysteresis >5mV and <0.5V:2.5V ± 0.5VFigure B-3. Controlling Hysteresis For Bipolar Signals.SPECIFICATIONS: (Typical @ 25°C, V+ = +5V)RTD Types: =.00385, .00388, .00392 100? @ 0°CResolution: 0.1°Accuracy: ±0.3°CInput connections: 2, 3, or 4 wireExcitation current: .25 mAMax. Lead resistance: 50?Input protection to 120VacAutomatic linearization and lead compensationLead resistance effect: 3 wire—2.5°C per ? of imbalance4 wire—NegligibleSensor HookupsThe RTD sensor must be connected as shown in the accompanyingdiagrams to insure proper operation.3-Wire: The DIN-140 modules are shipped from the factory configured for3-wire operation. Connect the RTD sensor as shown in the diagram. Thewires connected to the +I and -I terminals should be matched in length andgauged for proper lead compensation. The +I and +SENSE terminals mustbe tied together at the connector with a short wire jumper. For proper 3-wirelead compensation, the RTD 3/4 wire set-up bit must be 0 (see Set-Up (SU)command). A typical set-up for 3-wire operation would be 31070182.Appendix CDIN-140 Data SheetJ3 = Wire JumperFigure C-1. 3-wire RTD Configuration4-Wire: For 4-wire operation, connect the RTD as shown in the diagram. Ifthe RTD has heavy excitation wires, they should be connected to the +I and-I terminals. For proper 4-wire operation, the RTD set-up bit must be set toJ1,J2 = Wire JumperFigure C-3. 2-Wire RTD Configuration.Start-Up: During normal operation, the RTD lead resistance is periodicallyscanned and filtered by the DIN-140 module. This may result in large initialerrors if the RTD sensor is connected while the DIN-140 is powered up. Toavoid this error, the sensor should be wired to the connector before poweris applied. The error may also be eliminated by performing a Remote Reset(RR) command.Lead Resistance Overload: If the lead resistance exceeds 50?, the outputdata is set to +99999.99.Sensor Grounding: The sensor input is electrically isolated from the powerand communications inputs for common-mode voltages up to 500V. If thesensor is to be grounded or shielded, the ground connection should be madeto the -I terminal.1 (see Set-Up (SU) command). A typical set-up for 4-wire operation wouldbe 31071182.Figure C-2. 4-Wire RTD Configuration.2-Wire: The 2-wire connection requires two jumpers on the connector (J1& J2) as shown in the diagram. This connection provides no lead compen-sation. The RTD set-up bit can be either 0 or 1 for this connection.Appendix DDIN-150 Data SheetThe DIN-150 Bridge Sensor Interface Modules contain all of the signalconditioning functions necessary to interface Strain Gage and other resis-tive bridge devices to an RS-485 computer port. Each module containsexcitation, an instrumentation amplifier, and a smart analog to digitalconverter to convert resistive bridge sensor signals to ASCII data.The user should become familiar with the generic DIN-100 informationdescribed in the DIN-100 User’s Manual before attempting any of theprocedures outlined below.Data FormatThe ASCII output data is expressed in millivolts with 10 microvolt resolution.For Example:Command: $1RD (Read Data)Response: *+00012.34In this case, the output data is 12.34 millivolts.Modules that are configured for ±30mV and have a usable span of ±60mV.Modules configured for ±100mV have a usable span of ±120mV. The extraoverhead is used to trim any bridge offsets.Setup DataThe factory setup for all versions of DIN-150 modules is 310701C2Sensor ConnectionsSee Figure 1 for the proper bridge sensor connections. Shields or groundsshould be connected to the -Excitation terminal.Offset TrimThe DIN-150 modules do not provide any means of trimming the analogoffset of the sensor bridge. However, sensor offsets may be nulled from theoutput data with the Trim Zero (TZ) command. This method of trimming isconvenient because the offset may be trimmed through the communicationsport at any time. There is no need to have access to the module since thetrimming is performed remotely.The input signal conditioning circuitry of the DIN-150 modules have a wideinput range to accommodate large sensor offsets without the need forexternal trims. Modules rated for ±30mV have an input range capability of±60mV. Modules rated for ±100mV have an input range of ±120mV.DIN-150 Data Sheet D-2Figure D-1 Bridge Circuit WiringTo perform an initial offset trim, attach the bridge unit to the module (asshown in Figure D-1). Clear out any previous offset trims with the Clear Zero(CZ) command. Apply the desired zero condition to the bridge sensor. Fora Strain Gage Bridge this would be the relaxed or unstrained condition. Forload cells, the zero condition could include any tare weight due to a weighingplatform or other attachments that would affect the zero balance. Obtain aninitial reading using the Read Data (RD) command. The output data willindicate the total offset of the system. Subtract the offset value from theusable input range of your module, either ±60mV or ±120mV. The result isthe maximum usable “input overhead”. If the overhead is not sufficient foryour application, the bridge must be trimmed externally to lower the offsetto an acceptable value. The bridge may be trimmed with a small seriesresistance or a large shunt resistance to the appropriate leg of the bridge (asshown is Figure D-2). If the initial offset is acceptable, the offset may betrimmed with the Trim Zero (TZ) command.DIN-150 Data Sheet D-3Example 1:A load cell to be used in a weighing application is mated to a DIN-152module. The load cell is rated for 3mV/V, which results in a maximum ±30mVwith 10V excitation. However, in this application, the load cell is used onlyin tension so its ideal output will be from 0 to +30mV.The load cell is mounted in position with the weighing attachments. Clearany offset data that may be stored in the DIN-152 module:Command: $1WE (CZ is write-protected)Response: *Command: $1CZ (Clear Zero)Response: *Verify that the Zero Trim is cleared:Command: $1RZ (Read Zero)Response: *+00000.00Obtain an initial offset reading from the load cell with no weight attached:Command: $1RD (Read Data)Response: *+00002.34Figure D-2 Bridge Circuit TrimDIN-150 Data Sheet D-4The initial offset is +2.34mV. The DIN-152 has a useful input range of±60mV. After subtracting the offset the “input overhead” is -62.34mV and+57.66mV. The expected 0 to +30mV output of the load cell easily falls withinthe overhead range and no external trimming is necessary.To Trim Zero:Command: $1WE (TZ is write protected)Response: *Command: $1TZ+00000.00 (zero output)Response: *Now read the data output to verify the trim:Command: $1RD (Read Data)Response: *+00000.00The load cell system has been trimmed to zero.Example 2:A strain gage bridge will be used to measure both compression and tensilestrains on a structural member. The bridge is attached to a DIN-152 moduleand the ideal output from the bridge is ±30mV full scale.Clear the Zero Trim:Command: $1WEResponse: *Command: $1CZ (Clear Zero)Response: *Measure the initial offset from the bridge:Command: $1RDResponse: *-00043.21In this case, the bridge exhibits a large initial offset of -43.21mV. Subtract thisvalue from the ±60mV useful range of the DIN-152 to obtain and “inputoverhead” value of -16.79mV to 103.21mV. In this case the -16.79mVoverhead is not large enough to cover the -30mV that may be obtained fromthe bridge. The bridge must be trimmed externally to bring the offset to within±30mV. It is not necessary to obtain an exact zero with the external trim.After the external trim has been performed, check the offset:Command: $1RDResponse: *-00022.22DIN-150 Data Sheet D-5This value is within the ±30mV offset necessary to provide enough head-room for the strain gage bridge.Trim out the remaining offset with the Trim Zero (TZ) command:Command: $1WEResponse: *Command: $1TZ+00000.00Response: *The bridge is now trimmed to zero. Verify:Command: $1RDResponse: * +00000.00The Trim Zero (TZ) command may be used at any time to balance out offsetsdue to temperature, residual stress, tare, etc.ExcitationDIN-150 modules may be ordered with either 5V or 10V excitation. Maxi-mum excitation current available is 40mA. Modules with 10V excitation maybe used with bridges that have input impedances of 166 ohms or greater.Half-bridges of 120 ? strain gages may be used with 10V excitation if thebridge is completed with 350 ? resistors. Modules with 5V excitation willsource bridges of 85 ? and up.The actual excitation voltage may vary ±0.5V from the nominal values of+10V and +5V. However, the module’s internal microprocessor constantlymonitors the actual excitation voltage and provides compensation for anydeviation from the nominal value. This results in a constant data output fora constant bridge load even if the excitation changes. From a user’s pointof view, the excitation voltage will appear to be exactly +10V or +5V.CalibrationSince the DIN-150 modules use a ratiometric technique to compensate forvariances in the excitation voltage, special consideration is required toproperly calibrate the unit. Figure D-3 shows the calibration setup. TheDigital Voltmeter (DVM) must be capable of measuring the excitationvoltage to 4 digit accuracy. The voltage source must be able to providemillivolt signals accurate to ±5 microvolts. The resistive divider may beconstructed from 1% resistors of equal value from 100 to 1000 ?. Theresistor divider places the voltage source in the center of the common-moderange of the input amplifier for best accuracy.DIN-150 Data Sheet D-6Step 1: power up the unit under test and let it warm up for at least twominutes.Step 2: set the voltage source to 0 volts (short). Perform a TZ+00000.00(Trim Zero) command to eliminate any common-mode offset errors.Step 3: measure the excitation voltage with the DVM. Divide the result by thenominal excitation voltage, either 10V or 5V, to obtain a “compensationfactor” = CF.Step 4: calculate the correct calibration voltage to apply to the unit.For ±30mV units the voltage is V = +50mV X CFFor ±100mV units the voltage is V = +100mV X CFSet the voltage source to the calculated voltage V.Step 5: trim the unit with the Trim Span (TS) command.For ±30mV modules the command is $1TS+00050.00For ±100mV modules the command is $1TS+00100.00Step 6: verify the trim using the $1RD command. The result should be either*+00050.00 or *+00100.00Calibration Example:We wish to calibrate a DIN-151 module. This unit contains 5V excitation anda ±30mV input.Step 1 is straightforward and needs no further explanation.Step 2: set the voltage source to 0 volts. Trim zero:Command: $1WEResponse: *Figure D-3 DIN-150 CalibrationDIN-150 Data Sheet D-7DIN-150 Data Sheet D-8Command: $1TZ+00000.00Response: *Step 3: measure the excitation voltage with the DVM. In this example themeasured voltage is 4.954V Calculate the “compensation factor”:CF = 4.954 / 5 = 0.9908Step 4: calculate the calibration voltage:V = +50mV X 0.9908 = +49.54mV.Set the voltage standard to +49.54mV.Step 5: perform the Trim Span command:Command: $1WEResponse: *Command: $1TS+00050.00Response: *Step 6: verify the calibration, continuing to apply +49.54mV to the input:Command: $1RDResponse: *+00050.00The span trim is now complete. The Trim Zero (TZ) command may be usedto trim sensor offsets without affecting the span trim.Appendix EDIN-100 SpecificationsSpecifications (typical @ +25° C and nominal power supply unlessotherwise noted.)Analog• Single channel analog input.• Maximum CMV, input to output at 60Hz: 500V rms.• Leakage current, input to output at 115Vrms, 60Hz: <2µA rms.• 15 bit measurement resolution.• 8 conversions per second.• Autozero & autocalibration—no adjustment pots.Digital• 8-bit CMOS microcomputer.• Digital scaling, linearization and calibration.• Nonvolatile memory eliminates pots and switches.Digital filtering• Small and large signal with user selectable time constants from 0 to 16 seconds.Communications• Communications in ASCII via RS-232C, RS-485 ports.• Selectable baud rates: 300, 600, 1200, 2400, 4800, 9600, 19200,38400.• NRZ asynchronous data format; 1 start bit, 7 data bits, 1 parity bit and 1stop bit.• Parity: odd, even, none.• User selectable channel address.• ASCII format command/response protocol.• Up to 122 multidrop modules per host serial port.• Communications distance up to 4,000 feet (RS-485).• Transient suppression on RS-485 communications lines.• Communications error checking via checksum.• Can be used with "dumb terminal".• Scan up to 250 channels per second.• All communications setups stored in EEPROM.PowerRequirements: 5V±0.5Vdc, 0.75W max (DIN-150, 2.0W max.).Internal switching regulator.Protected against power supply reversals.Specifications E-2EnvironmentalTemperature Range: Operating -25°C to +70°C.Storage -25°C to +85°C.Relative Humidity: 0 to 95% noncondensing.Warranty12 months on workmanship and material.DIN-110 Voltage Inputs• Voltage ranges: ±10mV,±100mV, ±1V, ±5V, ±10V, ±100Vdc.• Resolution: 0.01% of FS (4 digits).• Accuracy: ±0.02% of FS max.• Common mode rejection: 100dB at 50/60Hz.• Zero drift: ±1 count max (autozero).• Span tempco: ±50ppm/°C max.• Input burnout protection to 250Vac .• Input impedance: = ±1V input = 100M? min.= ±5V input = 1M? min.DIN-120 Current Inputs• Current ranges: 4-20mAdc.• Resolution: ±0.04% of FS.• Accuracy: ±0.04% of FS (4-20mA).• Common mode rejection: 100dB at 50/60Hz.• Zero drift: ±1 count max (autozero).• Span tempco: ±50ppm/°C max.• Voltage drop: ±0.1V max.DIN-130 Thermocouple Inputs• Thermocouple types: J, K, T, E, R, S, B, C (factory set).• Ranges: J = -200°C to +760°C B = 0°C to +1820°CK = -150°C to +1250°C S = 0°C to +1750°CT = -200°C to +400°C R = 0°C to +1750°CE = -100°C to +1000°C C = 0°C to +2315°C• Resolution: ±1°.• Overall Accuracy (error from all sources) from 0 to +40°C ambient:±1.0 °C max (J, K, T, E).±2.5 °C max (R, S, B, C)(300°C TO FS).• Common mode rejection: 100dB at 50/60Hz.• Input impedance: 100M? min.• Lead resistance effect: <20µV per 350?.• Open thermocouple indication.• Input burnout protection to 250Vac.• Overrange indication.• Automatic cold junction compensation and linearization.Specifications E-3DIN-140 RTD Inputs• RTD types: a = .00385, .00392, 100? at 0°C, .00388, 100? at 25°C.• Ranges: .00385 = -200°C to +850°C..00392 = -200°C to +600°C..00388 = -100°C to +125°C.• Resolution: 0.1°.• Accuracy: ±0.3°C.• Span tempco: ±50 ppm/°C max.• Common mode rejection: 100dB at 50/60Hz.• Input connections: 2, 3, or 4 wire.• Excitation current: 0.25mA.• Lead resistance effect:3 wire - 2.5°C per ? of imbalance.4 wire - negligible.• Max lead resistance: 50?.• Input burnout protection to 120Vac .• Automatic linearization and lead compensation.DIN-145 Thermistor Inputs• Thermistor types: 2252? at 25°C, TD Series• Ranges: 2252? = -0°C to +100°C.TD = -40°C to +150°C.• Resolution: 2252? = 0.01°C or F.TD = 0.1°C or F• Accuracy: 2252? = ±0.1°C.TD = ±0.2°C• Common mode rejection: 100dB at 50/60Hz.• Input protection to 30Vdc .DIN-150 Bridge Inputs• Voltage Ranges: ±30mV, ±100mV.• Resolution: 10µV (mV spans).0.02% of FS (V span).• Accuracy: ±0.05% of FS max.• Common mode rejection: 100dB at 50/60Hz.• Input burnout protection to 30Vdc .• Offset Control: Full input range.• Excitation Voltage: 5V, 10Vdc, 60mA max.• Zero drift: ±1µV/°C max.• Span tempco: ±50ppm/°C max.DIN-160 Timer and Frequency Inputs• Input impedance: 1M ?.• Switching level: selectable 0V, +2.5V.• Hysteresis: Adjustable 10mV-1.0V.• Input burnout protection: 250Vac .Specifications E-4Frequency Input• Range: 1Hz to 20KHz.• Resolution: 0.005% of reading + 0.01Hz.• Accuracy: ±0.01% of reading ±0.01Hz.• Tempco: ±20ppm/ °C.DIN-170 Digital Inputs/Outputs• 6 digital inputs or 6 output bits.• Input voltage levels: 0-30V without damage.• Input switching levels: High, 3.5V min., Low, 1.0V max.• Outputs: Open collector to 30V, 100mA max. load.• Vsat: 1.0V max @ 100mA.• Inputs/Outputs are read/set in parallel.• Isolated from power supply ground.DIN-190 RS-232/485 Converter/Repeater• Baud Rates: 300-115200 (Dip-switch selectable).• Termination and biasing resistors included (selectable via internaljumpers).MODBUS PROTOCOL OVERVIEWThis document describes the Modbus RTU protocol option included in theDIN-100 series of data acquisition modules. This implementation of theModbus protocol is a subset of the protocol as described in the ModiconModbus Protocol Reference Guide PI-MBUS-300 Rev F. Only the RTUversion of the protocol has been implemented.Modbus RTU mode communicates in standard NRZ asynchronous formatwith one start bit, eight data bits, one parity bit, and one stop bit. Even andodd parity is supported. If no parity is specified, the number of stop bits canbe user configured for either one or two stop bits.Baud rates supported at this time are: 300, 600, 1200, 2400, 4800, 9600,19,200 and 38,400.Modbus uses the RS-485 electrical specification for multidrop communica-tions. The RS-232 electrical specification is not supported.Modbus is a registered trademark of AEG Modicon Inc.The Modbus RTU protocol transmits data in 8-bit binary bytes (not ASCII).To illustrate the data in this document, the 8-bit byte is described as twohexadecimal nibbles. For example, the binary byte value “0101 1101” will bewritten as 5D.A typical Modbus RTU command may look like this:01 04 00 00 00 01 31 CARemember, this command string and others throughout this docu-ment are actually transmitted to a module as eight 8-bit binary charac-ters.The actual format of the data is dependent on the type of command desired.The example above is the Modbus ‘Read Input Registers’ function.The ‘01’ is the address of the slave device (DIN-100 module) beingcommanded. Each slave device must have its own unique address.The ‘04’ specifies the Modbus ‘Read Input Registers’ function. This isequivalent to the ‘Read Data’ command to obtain analog input data.Appendix FModbus ProtocolModbus Protocol F-2The next two characters ‘00 00’ specify the starting address of the registersto be read. The first Modicon input register 30001 is addressed as ‘00 00’.Register 30005 is addressed as ‘00 04’, etc.The next two characters of this command specify the number of registers tobe read, including the starting register. In this case the two binary characters‘00 01’ indicates only one register is to be read.The final two characters of the command string make up the CyclicalRedundancy Check (CRC), used to check for errors in the message.There are no prompt or terminating characters in the messages. Allmessages must be transmitted as continuous strings. Messages are termi-nated by a ‘silent’ interval of at least 3.5 character times. A ‘silent’ intervalof more than 1.5 character times marks the beginning of the next message.Therefore it is mandatory that the RS-485 bus must be biased in the MARKcondition during the ‘silent’ interval. This is usually accomplished by pull-upand pull-down resistors on the communications line.A typical response to this example command could be:01 04 02 80 00 D8 F0The ‘01’ and ‘04’ characters echo the slave address and the commandfunction.For this particular command function, the ‘02’ character indicates thenumber of data characters to follow, in this case, 2 characters.The two character string ‘80 00’ is the value read from Modicon input register30001. Register data is read back as 16 bits.The remaining two characters, ‘D8 F0’ is the CRC for the response.The A1000 and DIN-190 series of RS-232 to RS-485 protocol convertersand repeaters will not operate with the 9-bit data characters used by theModbus protocol.Getting StartedModbus Protocol F-3The DIN-100 series modules are initialized at the factory to communicateusing the DIN-100 ASCII protocol. This allows for all setup and configura-tions to be easily performed using the DIN-100 setup software or a dumbterminal. After the setup process has been completed the DIN-100 can beplaced in Modbus RTU protocol mode using the “MBR” command. Disablethe Modbus RTU mode using the Modbus Disable (“MBD”) command.Quick start steps:1 Connect a power supply to the DIN-100 between +Vs terminal and GNDterminal. The regulated supply voltage must be +5.0Vdc.2. Properly connect the DIN-100 series to a computer using the “quick hook-up” diagrams in chapter #1 of this manual using either an RS-232 or RS-485serial port.3. Locate the Windows Utility software CD-ROM and run the setup.exe fileto install the software. A DGH Data Acquisition menu selection will be addedto the Windows “Start, Programs” menu. The Utility Software will be listedunder that selection.4. Configure the host computer serial ports by selecting main menu selection“Edit” and “Serial Ports”. Select the correct COMx: port, baud rate and Paritytype. Note: If the “Default*” pin on DIN-100 is connected to GND then select300 baud as host computer baud rate and select no parity.5. Select main menu “Setup” and enter the DIN-100 device address andmodel number. For example, select “111 DIN +/-100mV/RS-485 Out”.6. At the next configuration screen make the necessary alterations to BaudRate, Parity type and other required parameters. Drop down the “Commu-nications Protocol” list box and select “Modbus RTU Protocol”. Specifiy thecorrect Modbus slave address and press the to transmit the newsetup values. Once the values have been transmitted press the keyback to the program main menu.7. Remove the connection between “Default*” and GND, which performsinternal reset, to enable Modbus RTU mode. If there was no connectionbetween “Default*” and GND then cycle the power on device to force a resetand enable Modbus Mode.The device is now configured for Modbus RTU mode and can be connectedModbus Protocol F-4to a RS-485 based Modbus master system.MODBUS Function CodesModbus protocol compatible devices communicate using a master-slavetechnique similar to that used in ASCII protocol. In a master-slave commu-nications system only one device (the master) can initiate a communicationssequence. All others devices (the slaves) respond when requested by themaster. Typical master devices can be personal computers or PLCs. Typicalslave devices are DIN-100 modules.The master can address any slave device. Slave devices return a messageto any command that was addressed specifically to them. The returnedmessages are considered response messages.The Modbus protocol format used by a master consists of a device address,a command function code which defines the operation to be performed, datarequired with the command, and an error checking value. The slaveresponse message contains any required data and an error checking value.If an error occurs, an exception code will be generated.The supported master function codes are discussed below.01 - Read Coil Status (Digital Inputs)04 - Read Input Register (Analog Inputs)05 - Force Single Coil (Digital Output)06 - Preset Single Register (Return to ASCII protocol)15 - Force Multiple Coils (Digital Outputs)Function (01) Read Coil Status (Digital Inputs)Modbus function (01) Read Coil Status will read the status of both the digitalinputs and digital outputs. Digital outputs are read as the state of the dataon the microprocessor output port before being buffered by the open-collector transistor. If the coil status of a digital output returns as ‘1’, thismeans that this particular bit (coil) is turned “on” or sinking current on thecorresponding module digital output pin. Depending on the module type,some of the digital outputs may not be implemented.Modbus relay input coils are considered digital inputs on the DIN-100 seriesmodules. Modbus relay output coils are considered digital outputs on theDIN-100 series modules. This function can be used to read status of thedigital inputs or the combined status of both the digital inputs and digitaloutputs.Modbus Protocol F-5DIN-100 digital output bits B00 to B05 correspond to Modbus coils 00 00 to00 05.DIN-100 digital input bits B00 to B05 correspond to Modbus coils 00 08 to00 0D.The DIN-100 series digital inputs and outputs are register mapped as two8-bit bytes (16-bits), one byte for inputs and one byte for outputs. The least-significant byte represent the status of up to 8 digital outputs. The most-significant byte represents the status of up to 8 digital input bits. The registercontents can be interrogated as 8-bits of digital input data or together as 16-bits of digital inputs and outputs data.Exception errors will be generated by the module if attempting to read orwrite to more than 16 bits.The following example can be used to read only the digital input status:Command: 01 01 00 08 00 08 BC 0EResponse: 01 01 01 FF 11 C8In the command string:01 is the slave address01 is the Read Coil Status command00 08 is the starting coil number00 08 is the number of bits to readBC 0E is the CRC to this messageIn the response string:01 is the slave address01 is the Read Coil Status command01 is the number of data bytes returnedFF is the Digital Inputs status data11 C8 is the CRC for this messageThe following example can be used to read the status of both the digitalinputs and outputs:Command: 01 01 00 00 00 10 3D C6Response: 01 01 02 09 FF FF ECIn the command string:Modbus Protocol F-601 is the slave address01 is the Read Coil Status command00 00 is the starting coil address00 10 is the number digital bits to read3D C6 is the CRC to this messageIn the response string:01 is the slave address01 is the Read Coil Status command02 is the number of data bytes returned09 is the Digital Output statusFF is the Digital Inputs statusFF EC is the CRC for this messageFunction (04) - Read Input Register (Analog Inputs)Read Input Register function (04) is the primary command to acquire analoginput data. This command function supports reading of up to 16 inputregisters starting from Modbus slave register 30001. The registers areaddressed starting from zero meaning registers 1-16 are addressed as 0-15.The response data for each channel is returned as two bytes that representa 16-bit binary value. The 16-bit value is scaled as a percentage of the fullscale input range. The first byte contains the high order bits and the secondcontains the low order bits. The binary analog values for each channel canrange from 0000-FFFF (hexadecimal).Only the register values for channel one are valid as each module containsa single analog input. The remaining data values for channels 2-16 willalways return as 0000 (hexadecimal).A typical command and response to read the analog input value fromModbus device address 01 is:Command: 01 04 00 00 00 01 31 CAResponse: 01 04 02 14 57 F7 CEIn the command string:01 is the slave address04 is the Read Input Registers command00 00 is the starting register to be read (Modbus address 30001)00 01 specifies the number of registers to be read, in this case, one register.Modbus Protocol F-731 CA is the CRC for this messageIn the response string:01 is the slave address04 is the command02 indicated the number of data bytes in the message, in this case, twobytes14 57 is the analog dataF7 CE is the CRC for this messageThis sample command reads two registers:Command: 01 04 00 00 00 02 71 CBResponse: 01 04 04 14 58 00 00 7F A7The analog data from Modbus register 30001 is 14 58.The data from Modbus register 30002 is set to 00 00.The analog data is scaled so that 00 01 represents the Negative Full Scalevalue programmed into the module. FF FE represents the Positive Full Scalevalue programmed into the module.For example, for a ±10 volt input module:00 01 corresponds to -10 volts80 00 corresponds to 0 voltsFF FE corresponds to +10 voltsA negative overload where the analog input exceeds minus full scale valueis represented by 00 00 (hexadecimal).A positive overload where the analog input exceeds the positive full scalevalue is represented by FF FF (hexadecimal).Function (05) - Force Single Coil (Digital Output)The Force Single Coil function (05) is used to set or clear a single Modbusoutput relay coil. Each output relay coil is considered a digital output on theDIN-100 series modules. Modbus Coil #1 equals DIN-100 series digitaloutput bit B00 and Coil #6 equals digital output bit B05.The following example can be used to turn on digital output bit B00:Modbus Protocol F-8Command: 01 05 00 00 FF 00 8C 3AResponse: 01 05 00 00 FF 00 8C 3AIn the command string:01 is the slave address05 is the Force Single Coil command00 00 is the address of the digital output bit, 00 07 would equal B07FF 00 indicates that the desired bit will be set or turned on8C 3A is the CRC for this messageThe valid address range of digital output bits is 00 00 to 00 07. Any otheraddress will produce an exception (error) response.To clear or turn off digital output bit B03, replace the FF 00 string with 00 00.For example:Command: 01 05 00 03 00 00 3D CAResponse: 01 05 00 03 00 00 3D CACommand values other than FF 00 or 00 00 will result in an exception (error)response.Function (06) - Preset Single Register (Return to DIN-100 ASCII Proto-col)The Preset Single Register function (06) can be used to temporarily suspendthe Modbus RTU protocol and force the module into DIN-100 ASCIIprotocol. Write a value of 0000 to Modbus register 40001 to temporarilysuspend Modbus RTU mode. The module will then communicate using theDIN-100 ASCII protocol only.The DIN-100 ASCII protocol can be used to alter or check setup informationand/or for troubleshooting purposes. The module will continue to communi-cate using the ASCII protocol until either a Remote Reset (RR) command(RR) is received or the power is cycled. At which time, the module will returnto the Modbus RTU protocol mode.Refer to the DIN-100 ASCII Modbus Disable command (MBD) for moreinformation on disabling the Modbus protocol.Command: 01 06 00 00 00 00 89 CAResponse: 01 06 00 00 00 00 89 CAFunction (15) - Force Multiple Coils (Digital Outputs)Modbus Protocol F-9The Force Multiple Coils function (15) is used to force multiple Modbusoutput relay coils to a desired ON or OFF state. This function is similar inoperation to the DIN-100 ASCII digital output command (DO) in that itupdates the status of all available output coils at once. The state of eachoutput coil is set ON or OFF according to the digital data value received withthe function.The digital output bits are referred to as “output relay coils” in the Modbusprotocol. The DIN-100 series digital output bit B00 equals Modbus outputrelay Coil#1 and digital output bit B05 equals output relay Coil#6. DIN-100series modules with less than eight digital outputs also equate output bit B00with output relay Coil#1 and count up by one for each additional output bit.The following example can be used to turn on two digital output bits on a DIN-113 module.Command: 01 0F 00 00 00 02 00 03 9F 06Response: 01 0F 00 00 00 02 D4 0AIn the command string:01 is the slave address05 is the Force Single Coil command00 00 is the starting address of the digital output bits to be changed, 00 07would equal B0700 02 specifies the number of output relay coils to be changed00 03 specifies the digital output data value in HI byte LO byte format.Note: The HI byte will always be zero as DIN-100 series modules contain upto eight digital outputs9F 06 is the CRC for this messageThe valid address range of digital output bits is 00 00 to 00 07. Any otheraddress will produce an exception (error) response.To clear or turn off the digital output bits, replace the 00 03 string with 00 00.For example:Command: 01 0F 00 00 00 02 00 00 DF 07Response: 01 0F 00 00 00 02 D4 0AModbus RTU Enable (MBR)Modbus Protocol F-10To place any DIN-100 module in Modbus protocol mode use the ModbusRTU (MBR) command. The MBR command must be used to specify theModbus device address and enable the Modbus protocol mode. The deviceaddress consists of a two character hexadecimal value and is stored inEEPROM. The two byte address specified is translated to a one byte, 8 bitaddress required by the Modbus protocol. The example below can be usedto specify a Modbus device address of “01”.Command: $1MBR01Response: *Command: #1MBR01Response: *1MBR019DAfter the Modbus address is specified, a reset is necessary to activate theModbus protocol mode. The reset may be accomplished in one of threeways:1) Removing power for about 10 seconds to perform a power-up reset.2) Momentarily grounding the Default* pin.3) Issue a Write Enable (WE) command followed by a Remote Reset (RR) command.After a reset is performed, the module is in Modbus protocol mode.Modbus Disable (MBD)The Modbus Disable (MBD) command is used to disable the Modbusprotocol. Any DIN-100 series module in Modbus mode can be returned toDIN-100 ASCII protocol mode by connecting a jumper wire between modulepins GND and Default* pin. This places the module in Default Mode, wherethe module will only communicate at 300 baud, no parity, DIN-100 ASCIIprotocol, and answer to any address. While in Default mode, transmit anMBD command to internally disable the Modbus protocol.Following the MBD command a device reset must occur. The reset isnecessary to activate the DIN-100 ASCII protocol. A reset can occur byremoving the Default* jumper, performing a power-up reset or by transmit-ting a Write Enable (WE) and Remote Reset (RR) command sequence.After a reset is performed, the module is in DIN-100 ASCII protocol mode.Modbus Protocol F-11Command: $1MBDResponse: *Command: #1MBDResponse: *1MBD2EModbus Exception ResponsesThe following standard Modbus exception codes (error messages) aresupported:01 Illegal FunctionThis exception code is generated when the function code is notrecognized by the module.02 Illegal Data AddressThis code is generated when the specified data address in thecommand is not supported by the module.03 Illegal Data ValueThis exception code is returned if the command data is out ofrange for the function.06 Slave Device BusyAfter the module is reset by power-up, a ‘RR’ command, or returnfrom Default Mode, the module performs an initial self-calibration for a pe-riod of about 3 seconds. During this time any command sent to the mod-ule will result in a ‘busy’ exception response.
