1 Custom ASCII Protocol Serial Communications Manual For Digital Panel Meter, Model SM980-Series TENSION MEASUREMENT Instruments For Test & Industry Tension Sensors available for fibers, optical fibers, wire, rod, cable, yarn, thread, EDM, coil winding, bands, belts, strapping, ropes, sheets, webs, tapes, film, filaments, etc... Digital and all analog signal conditioners available for use with any of the tension sensors manufactured by Tension Measurement, Inc. Tension Measurement, inc. P.O. Box 707, Arvada, CO 8000 USA For Sales & Service Tel: (0) -0 Fax: (0) -97
2 . TABLE OF CONTENTS. TABLE OF CONTENTS.... INTRODUCTION, CUSTOM ASCII SERIAL PROTOCOL.... JUMPER SETTINGS & FIELD WIRING FOR SERIAL COMMUNICATIONS.... FRONT PANEL SETUP, SERIAL COMMUNICATIONS CUSTOM ASCII COMMUNICATION PROTOCOL.... CONTINOUS MODE COMMAND MODE INTRODUCTION, CUSTOM ASCII SERIAL PROTOCOL This manual applies to our programmable digital panel meters. The Custom ASCII Protocol, which is the subject of this manual, is a simple serial communications protocol, which is optimized for use with this SM980-Series programmable digital panel meters. It is compatible with USB, RS and RS8 signals. It supports point-to-point and multipoint (or multidrop) communications, with addressing of up to devices on the same RS8 serial data line. Digital panel meters require a plug-in option board for serial communications. This can be an RS board, USB board, RS8 board, USB-to-RS8 converter board. The dual RJ or RJ connectors are wired in parallel to allow daisy chaining with no need for a hub. One of the jacks is equipped with two indicator LEDs. The USB-to-RS8 board has a USB connector to connect to a PC and an RJ RS8 connector to remote devices.
3 Multiple meters with a USB board can be connected to a single USB port of a PC via a hub or up to hubs in series. Each meter is then automatically assigned a virtual com port number, which can be addressed via software. The maximum length of a USB cable is specified as meters ( feet). A better way to connect multiple meters to a single PC USB port is to install an isolating USB-to-RS8 converter board in the first meter, and to daisy chain multiple meters with an RS8 board to the first meter. The cable from the first meter to the PC is a standard USB cable, Male Type A to Male Type B. The RJ output of each meter can then be connected to the next meter via a -conductor straight-through data cable. Up to 0 additional meters may be daisy chained and be digitally addressed using the Custom ASCII Protocol. LOADING THE USB AND USB-TO-RS8 DRIVER USB/RS8 a b c d RS8 b e RS8 b e f f c c a d a d USB RJ RJ RJ RJ RJ Computer with USB port Connect your meter to the computer. The computer will display Found new Hardware. Follow the instructions for installation from a CD. When the installation is complete, use the Device Manager to determine the Com port number. To get to Device Manger, go to Control Panel, click on System, on the Hardware tab and then on Device Manager. Go down the device list and click on Ports (COM & LPT) and USB serial port (com #). Note the com port # for use with communications to your meter, then exit the Control Panel. If you need to change the Com port, rightclick on USB serial port (com #), then click on Properties, Port Settings, and Advanced. Change port to the desired number and click OK, then exit Control Panel.
4 . JUMPER SETTINGS & FIELD WIRING FOR SERIAL COMMUNICATIONS. SAFETY WARNINGS Digital panel meters, may be powered with AC (mains) from 8-V ac or 90-V dc with the high voltage power supply option, or -0V ac or 0-8 Vdc with the low voltage power supply option. To avoid the possibility of electrical shock or damaging short circuits, always unplug the device before opening the case. Please refer to the respective device manuals for full safety information and instruction on how to open the case. Signal wiring changes external to the case can be made safely while the unit is under power.. CONNECTION OF METERS, COUNTERS & TIMERS TO A COMPUTER RS INTERFACE N/C ISO GND RX TX RTS N/C Computer GND TX RX RTS RS8 INTERFACE - FULL DUPLEX RS8 INTERFACE - HALF DUPLEX ISO GND BRX ARX ATX BTX ISO GND GND BTX ATX ARX ARX GND ISO GND ATX / ARX BTX / BRX ISO GND GND ATX / ARX BTX / BRX GND
5 RS & RS8 JUMPERS SETTINGS FOR DIGITAL PANEL METERS Shipped with jumpers in storage position, except as noted. The USB board does not have jumpers. RS Board, Rev J e - Normal operation. f - Slave display to RS from another meter. g - Pull-up resistor on RTS line. Note: Board is shipped with jumpers e and g installed. RS8 Board, Rev J, Full Duplex Operation b & d - Installed on last meter in long cable run. RS8 Board, Rev J, Half Duplex Operation a & c - installed for half duplex operation. d - Installed on last meter for long cable runs. USB-to-RS8 Board, Full Duplex b & d - Installed on last meter in long cable run. USB-to-RS8 Board, Half Duplex a & c - Installed for half duplex operation. d - Installed on last meter for long cable runs.
6 . FRONT PANEL SETUP, SERIAL COMMUNICATIONS. FRONT PANEL SETUP, DIGITAL PANEL METERS & SCALE METER Press Menu Select Key.SEr. Press until Ser is displayed. Fixed Parameters: - No parity - 8 data bits - stop bit.ser. Serial Setup Press Digit Select Key 000 Output filtering 000U Baud rate 000U Output update rate _0000U Line feed _0000U Alarm data with readings _0000U Control of data output _0000U Meter address Press Value Select Key 0 Send unfiltered signal Send filtered signal 0 baud 00 baud 00 baud 00 baud 800 baud 900 baud 900 baud 0 Hz 0 Hz sec 0.00 sec 0.8 sec 0. sec 0.7 sec 0.8 sec. sec. sec. sec.7 sec. sec. sec 9. sec 0.9 sec 7 8. sec.8 sec 8. sec. sec 9 7. sec 8.7 sec 0 No <LF> following <CR> <LF> following <CR> 0 No alarm data with reading Alarm data with reading 0 Continuous data output Data output on ASCII command only Select 0 thru F for addresses thru. Select 0. thru F. (with decimal point) for addresses thru.
7 Press Menu Select Key.SEr. Serial Setup SEr. Serial Setup _Addr Modbus Address Press Digit Select Key 00000U RS8 half or full duplex 00000U Special start & stop char U RTS mode 00000U Termination characters 00000U Data sent, digital panel meter only 00000U Data sent, scale meter only 000U Modbus ASCII gap timeout 000U Serial protocol 000U Parity Select digit to flash. Press Value Select Key 0 Full duplex Half duplex 0 Standard continuous mode Special start & stop characters 0 Normal non-latching RTS Single transmission, latching RTS 0 Only at end of all items At end of each item 0 Reading Peak Valley Reading + Peak Reading + Valley Reading + Peak + Valley 0 Net + Gross Net only Gross only Peak only (Net or Gross) Net + Gross + Peak Valley only 0 sec sec sec 0 sec 0 Custom ASCII Modbus RTU Modbus ASCII 0 None Odd Even 8 Select 0 through 9 for flashing digit. Address range is to 7. 7
8 . CUSTOM ASCII COMMUNICATION PROTOCOL. SERIAL COMMUNICATION FORMAT The Custom ASCII serial communication format for RS, RS8 and USB is the following: Duplex... Full duplex for RS & RS8. Half duplex selectable for RS8. Baud Rate..., 00, 00, 00, 800, 900, 900 selectable by front panel Menu item Ser, Sub-menu item Digit for DPM. Parity... None Word length... 8 data bits Stop bit.... MEASUREMENT DATA FORMAT The basic measurement data format consists of 8 ASCII characters for the DPM, such as <CR> where <CR> is the carriage return character. The first character is always a plus or minus sign. A decimal point is always furnished, even when it follows the last digit. Adding a Line Feed Character to the Basic Format Printers and other devices that receive the measurement data may require a line feed character <LF> following the <CR>. The line feed character <LF> may be selected in Ser. Adding a Coded Data Character to the Basic Format It is possible to add a coded character from A to f to the data string according to the following table to indicate the alarm and overload status of the device. If used, this character precedes the <CR>, so it is the last printable character in the string. With the optional <LF> and coded character selected, the data string will consist of 0 characters for the DPM A <CR><LF> and characters for the counter A<CR><LF>. Alarm # Alarm with No Overload A B C D I J K L Alarm with Overload E F G H M N O P 8
9 Q R S T a b c d U V W X e f g h For example, a coded character G indicates that Alarm only is set, that the DPM is in the overload condition, and that zero blanking has been selected. This information is useful when data is supplied to a computer for listing and analysis, or when data is supplied to a Remote Display in a Master-Slave configuration. The Panel Meter is capable of supplying more than measurement value (or Item ) with each reading, as selected in "Ser ". The meter can transmit Net, Gross and Peak weight. Values are transmitted in a continuous string with no space between them. If the th digit in Ser is set to, the termination characters of <CR> and optional <LF> appear after each value. If the th digit is set to 0, the termination characters appear only once at the end of the string. In either case, if included, the coded character appears at the end of the last value only.. NETWORK CONFIGURATIONS The panel meters can operate in a point-to-point mode using RS- or RS-8, or in a multi-point mode using RS-8. The point-to-point mode is a direct connection between a computer (or other digital device) and the panel meter. The multi-point mode is a connection from a host computer to a multiplicity of meters bused together with their inputs and outputs connected in parallel. For long cable runs, the last device should have a termination. resistor installed. It is necessary to set up each device on the bus with a different address from to. To command a particular device, its address is used in conjunction with the command, and only that device responds. The outputs of all of the devices on the bus are set to a high impedance state, except the device being addressed. The device addresses range from to, with 0 being a special address to which a meter responds only internally (e.g. Reset), but does not transmit any response on the output lines. All devices may be commanded simultaneously with a 0 address, and there will not be any output response contention. Addressing of meters can be set in Ser. A device operating in a point-to-point mode must also be addressed. Although any address will suffice, it is suggested address = be selected as a standard for the point-to-point mode. 9
10 . OPERATING MODES The meters and transmitters can operate in a Continuous Mode or Command Mode. In the Continuous Mode, measurements are continuously transmitted by the meter in a standard data format. Please see the next manual section. In the Command Mode, the meter does not send any data automatically, but responds to commands received from a host computer. Please see the manual section following the Continuous Mode. 0
11 . CONTINUOUS MODE. OVERVIEW In the Continuous Operating Mode, measurements are continuously transmitted by the meter or transmitter in a standard data format using printable ASCII characters at a user-selectable rate ranging from 0 or 0 Hz line frequency down to one measurement every 7 seconds. This data may be received by a remote display at a distant location, by a printer for data logging purposes, or by a host computer for data analysis or system control. Both hardware (RTS) and software (XON/XOFF) handshaking are available for RS, but neither is available for RS8.. METERS WITH DPM OR SCALE METER MAIN BOARD The transmission rate of the measurement data can be selected in Ser. The meter conversion rate equals the AC power frequency (0 or 0 Hz). Any baud rate may be used, but if less than the minimum baud rate in the table, the transmission rate will decrease accordingly. Output Rate Data Output Rate Minimum Baud Rate Ser Setting 0 Hz / 0 Hz Item Sent Items Sent Items Sent s /.08 s. s / 0.8 s.8 s / 0.7 s. s /. s.7 s /. s. s /. s.9 s / 9. s.8 s / 8. s. s /. s 8.7s / 7. s / 00 /
12 . RTS CONTROL RTS control does not apply to RS8. DPMs have two RS RTS modes: unlatched and latched. In the unlatched mode, the measurement transmission is enabled by a high RTS level and is disabled by a low RTS level. When disabled, any character being sent is completed. When enabled, any characters remaining in the data format are transmitted before the next measurement transmission. The computer, when its receive buffer is nearly full, takes the RTS line low to halt data transmission. When its receive buffer has emptied, it takes the RTS line high to enable more data transmissions. Some measurements could be missed in the process. The latched and unlatched modes are selected in "config" "digit " in the DPM. In the latched mode, the RTS input is polled every. ms. When a high level is detected, RTS is latched true, even though the RTS line goes low immediately. At the end of each calculation, the latched RTS value is checked. If it is true, a complete measurement transmission (from to values) is made without interruption, regardless of the state of the RTS line during that time. At the end of the complete transmission, the latched RTS value is reset false, even though the RTS line may be high at that instant. The RTS latch does not go true again until the RTS line is first returned to a low level after the completion of the transmission and then is taken high again. Latched control provides print command operation by sending a transmission for each RTS pulse. If a second pulse occurs during the transmission, it is not recognized.. XON / XOFF CONTROL Applicable to RS, not RS8. A measurement transmission is enabled by the receipt of an ASCII XON character. It is disabled by the receipt of an ASCII XOFF character..
13 7. COMMAND MODE 7. OVERVIEW In the Command Mode, the device does not send any data automatically, but responds to commands received from a host computer. These commands can be: To transmit the latest or peak measurement To reset the meter completely or just the peak value and/or latched alarms To display a value sent from the computer To transmit present setup parameters To receive new setup parameters, To monitor or alter data in selected memory locations of the meter. The selection of either the Continuous mode or the Command Mode can be made from the front panel Menu selection Ser. The meter will not respond to a command in the Continuous Mode, except the command A, which puts the meter into the Command Mode. 7. COMMAND MODE FORMAT The minimum format is characters. Example: *A CHAR - COMMAND IDENTIFIER All commands begin with * followed by the meter address, then a command letter followed by a sub-command number or letter. Additional characters may be appended. All commands terminate with <CR> (<LF> ignored). Char # Character Description * 0-V A-Z 0-U Command Identifier (Recognition Character) Device Address (0 addresses all devices, -V specific) Command Function Sub-command (or # Bytes or Words of data being transferred) CHAR - ADDRESS CODES The next table is the Serial Communication Address Codes following the * for each meter address number. Also shown is the corresponding character that is set in menu item SER.
14 Meter # Meter SER Digit () Serial Comm Address Code Meter # Meter SER Digit () Serial Comm Address Code A B C D E F A B C D E F A. B. C. D. E. F. G H I J K L M N O P Q R S T U V CHARS & - COMMANDS AND SUBCOMMANDS The examples below use a default address of following the *. Substitute the desired address from the above table of Serial Comm Address Codes. All command sequences shown must terminate with <CR>, followed by an optional <LF>. COMMUNICATIONS MODE Continuous mode *A0 Command mode *A REQUEST DPM VALUES Get reading** *B Peak reading *B Valley reading *B ** The meter transmits the value or values selected in Ser. REQUEST SCALE METER VALUES Get reading** *B Peak only *B Net only *B Gross only *B Valley only *B ** The meter transmits the value or values selected in Ser.
15 RESET FUNCTIONS, DPM & SCALE METER Cold reset *C0 Reads NVMEM into RAM locations after RAM is zeroed. Latched alarms reset *C Peak value reset *C Remote display reset *C External Input B true *C External Input B false *C External Input A true *C7 External Input A false *C8 Valley reset *C9 Tare function *CA Tare reset *CB