Stanford Research Systems SIM900 Operator Manual

Operation and Service Manual
Stanford Research Systems
Mainframe
SIM900
Revision 1.51 July 19, 2005
Certification
Stanford Research Systems certifies that this product met its published specifications at the time of shipment.
Warranty
This Stanford Research Systems product is warranted against defects in materials and workman­ship for a period of one (1) year from the date of shipment.
Service
For warranty service or repair, this product must be returned to a Stanford Research Systems authorized service facility. Contact Stanford Research Systems or an authorized representative before returning this product for repair.
Information in this document is subject to change without notice.
Copyrightc Stanford Research Systems, Inc., 2003 – 2005. All rights reserved.
Stanford Research Systems, Inc. 1290–D Reamwood Avenue Sunnyvale, CA 94089 USA Phone: (408) 744-9040 Fax: (408) 744-9049
www.thinkSRS.com e-mail: info@thinkSRS.com
Printed in U.S.A.
SIM900 Mainframe
Contents
General Information iii
Safety and Preparation for Use . . . . . . . . . . . . . . . . iii
Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . vi
1 Operation 1 – 1
1.1 Introduction to the Instrument . . . . . . . . . . . . . 1 – 2
1.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . 1 –3
1.3 Timebase . . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 4
1.4 Configuration Switches . . . . . . . . . . . . . . . . . . 1–4
1.5 Activity Monitors . . . . . . . . . . . . . . . . . . . . . 1 – 6
1.6 SIM Interface Connector . . . . . . . . . . . . . . . . . 1 – 6
2 Remote Programming 2 – 1
2.1 Index of Commands . . . . . . . . . . . . . . . . . . . 2 – 2
2.2 Alphabetic List of Commands . . . . . . . . . . . . . . 2– 5
2.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 – 9
2.4 Port Communications . . . . . . . . . . . . . . . . . . 2–10
2.5 Commands . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 12
2.6 Register Model . . . . . . . . . . . . . . . . . . . . . . 2 –41
3 Communications Examples 3 – 1
3.1 Introduction to Communications . . . . . . . . . . . . 3 – 2
3.2 Streaming Example . . . . . . . . . . . . . . . . . . . . 3–4
3.3 Message-Based Example . . . . . . . . . . . . . . . . . 3 – 8
3.4 Combination Example . . . . . . . . . . . . . . . . . . 3 –16
4 Circuitry 4 – 1
4.1 Circuit Descriptions . . . . . . . . . . . . . . . . . . . . 4–2
4.2 Parts Lists . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 6
4.3 Schematic Diagrams . . . . . . . . . . . . . . . . . . . 4 – 8
i
ii Contents
SIM900 Mainframe
General Information
Safety and Preparation for Use
Dangerous voltages, capable of causing injury or death, are present in this instrument. Use extreme caution whenever theWARNING! instrument covers are removed. Do not remove the covers while the unit is plugged into a live outlet.
Line Voltage
The universal input power supply of the SIM900 accommodates any voltage in the range 90 VAC to 260 VAC, with a frequencyin the range 47 Hz to 63 Hz.
Line Fuse
The line fuse is internal to the SIM900 and may not be serviced by the user. If the Standby LED does not turn on when line power is provided, contact Stanford Research Systems.
Line Cord
Service
The SIM900 has a detachable, three-wire power cord for connection to the power source and to a protective ground. The exposed metal parts of the instrument are connected to the outlet ground to protect against electrical shock. Always use an outlet which has a properly connected protective ground.
Do not attempt to service or adjust this instrument unless another person, capable of providing first aid or resuscitation, is present.
Do not install substitute parts or perform any unauthorized modi­fications to this instrument. Contact the factory for instructions on how to return the instrument for authorized service and adjustment.
The SIM900 Mainframe is not intended for hot-swapping applica­tions. Be certain to switch power to Standby before inserting or ejecting modules in the mainframe. Do not connect a module to the remote port while power is on.
iii
iv General Information
Symbol Description
Alternating current
Caution - risk of electric shock
Frame or chassis terminal
Caution - refer to accompanying documents
Earth (ground) terminal
Battery
Fuse
On (supply)
Off (supply)
Symbols you may Find on SRS Products
SIM900 Mainframe
General Information v
Notation
The following notation will be used throughout this manual:
Front-panel indicators are set as Overload.
Remote command names are set as *IDN?.
Literal text other than command names is set as OFF.
Remote command examples will all be set in monospaced font. In these examples, data sent by the host computer to the SIM900 are set as straight teletype font, while responses received by the host computer from the SIM900 are set as slanted teletype font. Command terminators explicitly sent by the host computer are set
with the symbol “”.
SIM900 Mainframe
vi General Information
Specifications
Performance Characteristics
Power Supplies Voltages ±15 VDC, ±5 VDC, +24 VDC
Regulation ±0.5 % (±15 V, ±5 V)
±2 % (+24 V)
Current limits 5 A max (+5 V)
3 A max (all others)
Power limit 70 W total, all voltages
Timebase Internal timebase 10 MHz VCXO, ±10 ppm
External connector Rear panel BNC
External input 10 MHz, 1 V to 5 V pp Capture range ±50 ppm (±500 Hz)
Interfaces SIM ports 8 internal + 1 Remote
DB–15 (female)
Aux. RS-232 2; DB–9 (male) DTE
Host interface RS-232; DB–9 (female) DCE
GPIB (optional)
Eavesdrop RS-232; DB–9 (female) DCE
Indicator Lights Interface RS-232, GPIB
Operating Temperature 0◦C to 40◦C, non-condensing
General Characteristics
Timebase Internal, External Lock, External Fault
Activity 8 slots, Remote SIM,
Aux A, Aux B, Mainframe, Data Send, Data Receive, Data Error
Startup Script Enabled
Power On, Standby, Overload, Trip
Power 90 VAC to 260 VAC, 47 Hz to 63 Hz
150 W max
Weight 12.6 lbs
Dimensions 17.000W × 5.300H × 9.000D
Rack mount O900RM (optional)
SIM900 Mainframe
1 Operation
In This Chapter
This chapter describes the operation of the SIM900 Mainframe.
1.1 Introduction to the Instrument . . . . . . . . . . . . 1 – 2
1.1.1 Front Panel . . . . . . . . . . . . . . . . . . . 1 – 2
1.1.2 Rear Panel . . . . . . . . . . . . . . . . . . . . 1 – 3
1.2 Getting Started . . . . . . . . . . . . . . . . . . . . . 1 – 3
1.3 Timebase . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 4
1.4 Configuration Switches . . . . . . . . . . . . . . . . 1 – 4
1.4.1 Baud Rate/GPIB Address . . . . . . . . . . . 1 – 4
1.4.2 Host Select . . . . . . . . . . . . . . . . . . . . 1 – 5
1.4.3 Clock Distribution Enable . . . . . . . . . . . 1 – 5
1.4.4 Startup Script Enable . . . . . . . . . . . . . . 1 – 6
1.5 Activity Monitors . . . . . . . . . . . . . . . . . . . . 1 – 6
1.6 SIM Interface Connector . . . . . . . . . . . . . . . 1 – 6
1 – 1
1 – 2 Operation
1.1 Introduction to the Instrument
The SIM900 Mainframe is the platform on which a SIM system is assembled. The mainframe provides power, computer interfaces, clock synchronization, and individual module status.
1.1.1 Front Panel
The SIM900 front panel consists of a power switch and a collection of indicator lamps (see Figures 1.1).
Figure 1.1: The SIM900.
Figure 1.2: The SIM900 rear panel (shown with a full complement of SIM modules).
SIM900 Mainframe
1.2 Getting Started 1 – 3
1.1.2 Rear Panel
The SIM900 rear panel is shown in Figure 1.2. In addition to the host interface connector(s) and power entry module, the rear panel contains an external timebase reference input, auxiliary RS-232 inter­faces, and a window for access to SIM module rear panels.
1.2 Getting Started
The SIM architecture does not support hot insertion or extraction of modules. Before installing or removing any SIM modules, the mainframe power must be switched to “Standby.”
To install a module, align the back of the module with the black guide-ramps in the mainframe slot. Ease the module in until the connector begins to mate. Be careful to not apply pressure directly on any module display; it is better to push along the upper part of the edge of the module side covers until a positive “click” is heard. At this time, the module will be fully mated and locked in place.
To remove a module, press firmly on the ejection button below the module slot. When ejecting a double-wide module, the left-hand button must be pressed to eject.
When the arrangement of desired SIM modules is installed, turn on the mainframe power switch to begin operation.
SIM900 Mainframe
1 – 4 Operation
1.3 Timebase
The SIM900 Mainframe provides a common 10 MHz clock reference to the SIM modules. By synchronizing clocks, low-frequency mix­ing products (beat tones) of independently running module clocks is avoided. A common timebase also allows precision time and frequency modules to be synchronized. This feature can be en­abled or disabled using the rear-panel configuration switches (see
section 1.4.3) or with the CLKD remote command.
In a laboratory employing multiple SIM900’s or where a high­precision clock reference is desired, this feature can be extended by synchronizing the mainframe(s) to an external 10 MHz reference. An auto-detect circuit senses the presence of an AC signal at the TIME­BASE IN connector on the rear panel, and attempts to phase-lock the internal oscillator to the applied signal. The TIMEBASE block of the SIM900 front panel (see Figure 1.3) indicates the clock status as one of three states:
Internal 10 MHz : No signal is detected at the timebase input, and the SIM900
internal oscillator is being used.
External Lock : The SIM900 detected an external clock reference and success-
External Fault : An external clock signal was detected, but the SIM900 failed to
The phase-locked loop has a capture range of ±10 ppm (±100 Hz), and should lock reliably with input signals of 1 V to 5 V peak-to­peak amplitude.
1.4 Configuration Switches
The rear panel DIP switches (see Figure 1.3) provide basic configura­tion of the SIM900 Mainframe host interface. The switches selecting the remote interface are read only at power-up time, but may be changed at any time.
1.4.1 Baud Rate/GPIB Address
The rightmost five (5) switches program either the default baud rate for the “COMPUTER” RS-232 port, or the GPIB address.
The RS-232 default baud rate can be set to 1200, 9600, 19.2k, 57.6k, or
115.2k. Select one rate by setting that switch in the down position; if no switch is selected or more than one is down, the SIM900 defaults to 9600 baud and Error lights for several secondsafter power-up. The host baud rate can be changed after power-up under remote program
fully phase-locked to it.
phase-lock to it.
SIM900 Mainframe
1.4 Configuration Switches 1 – 5
control (see the BAUD command), but will revert to the rear-panel
default after power cycling or a Device Clear (RS-232 hbreaki) signal.
For GPIB, the 5 switches set the binary-encoded bus address for the SIM900. To add 2nto the address, set switch An in the lower position.
For example, to set the GPIB address to 19 (= 16 + 2 + 1) set switches A0, A1, and A4 down (on).
1.4.2 Host Select
The next switch to the left of the Rate/Address field (position # 3) selects the mainframe host interface: up selects RS-232, down selects the (optional) GPIB interface.
1.4.3 Clock Distribution Enable
The next switch to theleft of the Host Select field(position #2) controls the mainframe timebase distribution. When this switch is in the on (down) position, the 10 MHz timebase is distributed to all 8 module slots and the rear-panel Remote SIM port on pins 5 & 12. When the switch is in the o(up) position, no clock signals are distributed, and pins 5 & 12 on all SIM ports both idle at 0 V. In either case, all SIM modules will continue to operate properly.
Figure 1.3: The SIM900 front and rear panels.
SIM900 Mainframe
1 – 6 Operation
Note that unlike the other DIP switch settings, the Clock Distribution Enable switch is continuously monitored, and anychanges take eect
immediately (although they can be later overridden with the CLKD
remote command).
1.4.4 Startup Script Enable
The SIM900 has a 4000 byte non-volatile memory to store a se­quence of remotecommands to execute upon power-up (the “Startup Script”). In order for a stored script to execute automatically after power-up, the left-most switch must be in the on (down) position.
When the script is enabled and executed, the front-panel indicator flashes and then remains lit.
See section 2.5.8 for the remote commands to configure the startup script.
1.5 Activity Monitors
The ACTIVITY section of the front panel monitors data transfer to and from the mainframe. When bytes are received from any port, the corresponding port indicator (18, Remote SIM, Aux A (RS-232) or Aux B (RS-232)) flashes together with From SIM. When the main­frame transmits data to the host interface, Mainframe and From SIM both flash as well.
When data is received at the mainframe host interface or transmitted to one of the ports, To SIM flashes, along with the corresponding port indicator.
If a communication error is encountered, Error will flash briefly.
1.6 SIM Interface Connector
The DB–15 SIM Interface connector carries all the power and com­munications lines between the mainframe and SIM modules. The module-side of the interface is DB–15 male (plug), while the main­frame side is DB–15 female (socket). The connector signals are spec­ified in Table 1.1
Note that all SIM modules are specified to operate with or without the presence of the ±REF 10MHZ signals, so these lines are optional in any cabling interface between the mainframe REMOTE SIM port and a module.
SIM900 Mainframe
1.6 SIM Interface Connector 1 – 7
Direction
Pin Signal Src Dest Description
1 SIGNAL GND MF SIM Ground reference for signal 2 STATUS SIM MF Status/service request (GND=asserted, +5V=idle) 3 RTS MF SIM HW Handshake (+5 V=talk; GND=stop) 4 CTS SIM MF HW Handshake (+5 V=talk; GND=stop) 5 REF 10MHZ MF SIM 10 MHz reference 6 5V MF SIM Power supply (fast analog circuitry) 7
15V MF SIM Power supply (analog circuitry) 8 PS RTN MF SIM Power supply return 9 CHASSIS GND Chassis ground
10 TXD MF SIM Async data (start bit=“0”=+5 V; “1”=GND) 11 RXD SIM MF Async data (start bit=“0”=+5 V; “1”=GND) 12 +REF 10MHz MF SIM 10 MHz reference 13 +5V MF SIM Power supply (digital & fast analog circuitry) 14 +15V MF SIM Power supply (analog circuitry) 15 +24V MF SIM Power supply (power circuitry)
SIM900 Mainframe
Table 1.1: SIM Interface connector pin assignments, DB–15
1 – 8 Operation
SIM900 Mainframe
2 Remote Programming
This chapter describes how to control the SIM900 Mainframe, and any connected SIMs or generic RS-232 devices, from a host computer.
In This Chapter
2.1 Index of Commands . . . . . . . . . . . . . . . . . . 2 – 2
2.2 Alphabetic List of Commands . . . . . . . . . . . . 2 – 5
2.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . 2 – 9
2.4 Port Communications . . . . . . . . . . . . . . . . . 2 – 10
2.5 Commands . . . . . . . . . . . . . . . . . . . . . . . 2 – 12
2.6 Register Model . . . . . . . . . . . . . . . . . . . . . 2 – 41
2.3.1 Device Clear . . . . . . . . . . . . . . . . . . . 2 – 9
2.3.2 Queues and buers . . . . . . . . . . . . . . . 2 – 9
2.4.1 Message-based communication . . . . . . . . 2 – 10
2.4.2 Connection-based communication . . . . . . 2 – 10
2.4.3 Port map . . . . . . . . . . . . . . . . . . . . . 2 – 11
2.5.1 Command syntax . . . . . . . . . . . . . . . . 2 – 12
2.5.2 Examples . . . . . . . . . . . . . . . . . . . . 2 – 14
2.5.3 Communication commands . . . . . . . . . . 2 – 15
2.5.4 Configuration commands . . . . . . . . . . . 2 – 17
2.5.5 Eavesdropping commands . . . . . . . . . . 2 – 21
2.5.6 Serial commands . . . . . . . . . . . . . . . . 2 – 22
2.5.7 Status commands . . . . . . . . . . . . . . . . 2 – 24
2.5.8 Script commands . . . . . . . . . . . . . . . . 2 – 28
2.5.9 Housekeeping commands . . . . . . . . . . . 2 – 31
2.5.10 Interface commands . . . . . . . . . . . . . . 2 – 34
2.6.1 Control registers . . . . . . . . . . . . . . . . 2 – 41
2.6.2 Status registers . . . . . . . . . . . . . . . . . 2 – 44
2 – 1
2 – 2 Remote Programming
2.1 Index of Commands
symbol definition
p Port number i,j Integers z Literal token b Multi-byte (string) block
(?) Required for queries; illegal for set commands var Parameter always required
{var} Required parameter for set commands; illegal for queries [var] Optional parameter for both set and query forms
Communications
CONN p,b 2 – 15 Connect to Port SEND p,b [,i] 2 – 15 Send Message to Port SNDT p,b [,i] 2 – 15 Send Terminated Message to Port ECHO? b 2 – 16 Echo Message back to Host BRDC b [,i] 2 – 16 Broadcast Message to Ports BRDT b [,i] 2 – 16 Broadcast Terminated Message to Ports GETN? p,i 2 – 16 Get Bytes from Port RAWN? p,i 2 – 17 Get Raw Bytes from Port
Configuration
NINP? p 2 – 17 Input Bytes Waiting NOUT? p 2 – 17 Output Bytes Waiting AINP? p 2 – 18 Input Spaces Available AOUT? p 2 – 18 Output Spaces Available DONE? [p] 2 – 18 Transmit Complete BRER(?) [p,] {i} 2 – 18 Broadcast Enable RDDR(?) [p,] {i} 2 – 19 Receive Data Disable RPER(?) [p,] {i} 2 – 19 Receive Pass-Through Enable MSGL(?) {i} 2 – 19 Maximum MSG Length TMOT(?) p,{i} 2 – 19 Timeout TERM(?) p,{z} 2 – 20 Message Termination CEOI(?) {z} 2 – 20 Generate EOI on hLFi EOIX(?) {z} 2 – 20 EOI conversion during CONNect
Eavesdropping
VERB(?) [i],{j} 2 – 21 Verbosity EAVS b 2 – 22 Echo Message to Eavesdrop EIDN 2 – 22 Identify to Eavesdrop
Serial Configuration
PRTC(?) {z} 2 – 22 Port C Function PRTD(?) {z} 2 – 23 Port D Function BAUD(?) p {,i} 2 – 23 Baud Rate
SIM900 Mainframe
2.1 Index of Commands 2 – 3
FLOW(?) p {,z} 2 – 23 Flow Control PARI(?) p {,z} 2 – 24 Parity WORD(?) p {,i} 2 – 24 Word Length SBIT(?) p {,i} 2 – 24 Stop Bits
Status
SSCR? [p] 2 – 25 SIM Status Condition SSPT(?) [p,] {i} 2 – 25 SIM Status Positive Transition SSNT(?) [p,] {i} 2 – 25 SIM Status Negative Transition SSEV? [p] 2 – 25 SIM Status Event SSEN(?) [p,] {i} 2 – 25 SIM Status Enable CESR? [p] 2 – 26 Comm Error Status CESE(?) [p,]{i} 2 – 26 Comm Error Status Enable TOSR? [p] 2 – 26 Timeout Status TOSE(?) [p,] {i} 2 – 26 Timeout Status Enable IOSR? [p] 2 – 26 Input Overflow Status IOSE(?) [p,] {i} 2 – 27 Input Overflow Status Enable FCSR? [p] 2 – 27 Flow Control Status FCSE(?) [p,] {i} 2 – 27 Flow Control Status Enable CTCR? [p] 2 – 27 CTS Status Condition CTSR? [p] 2 – 28 CTS Status CTSE(?) [p,] {i} 2 – 28 CTS Status Enable PDPR? [p] 2 – 28 Port Data Pending PDPE(?) [p,] {i} 2 – 28 Port Data Pending Enable
Script
APSS b 2 – 29 Append to Script ATSS b 2 – 29 Append Terminated to Script ERSS 2 – 29 Erase Script LKSS(?) {z} 2 – 29 Lock Script LISS? 2 – 30 List Script NBSS? 2 – 30 Bytes Used in Script AVSS? 2 – 30 Space Available in Script ENSS? 2 – 30 Script Enable RNSS 2 – 30 Run Script
Housekeeping
TBIN? 2 – 31 Timebase Input Detect VTBI? 2 – 31 Timebase Input Analog PLLC(?) {z} 2 – 32 Timebase Control CLKD(?) {z} 2 – 32 Clock Distribution LOCK? 2 – 32 Timebase Status VLOC? 2 – 33 Timebase Status Analog VVCO? 2 – 33 Timebase VCO VMON? 2 – 33 Primary Voltage
SIM900 Mainframe
2 – 4 Remote Programming
IMON? 2 – 33 Primary Current PMON? 2 – 33 Primary Power UNDV? 2 – 34 Undervoltage TICK? 2 – 34 Elapsed Time DIPS? [i] 2 – 34 DIP Switch
Interface
*RST 2 – 35 Reset FLOQ 2 – 35 Flush Output Queue SRST [p] 2 – 35 SIM Reset FLSI [p] 2 – 36 Flush Port Input Buers FLSO [p] 2 – 36 Flush Port Output Queues FLSH [p] 2 – 36 Flush Port Buers *IDN? 2 – 36 Identify *TST? 2 – 36 Self Test *CLS 2 – 36 Clear Status *STB? [i] 2 – 37 Status Byte *SRE(?) [i,] {j} 2 – 37 Service Request Enable *ESR? [i] 2 – 37 Standard Event Status *ESE(?) [i,] {j} 2 – 37 Standard Event Status Enable *PSC(?) {i} 2 – 37 Power-on Status Clear *OPC(?) 2 – 38 Operation Complete *WAI 2 – 38 Wait to Continue CONS(?) {z} 2 – 38 Console Mode WAIT i 2 – 38 Wait REQT(?) {z} 2 – 38 Announce REQT REQF(?) {z} 2 – 39 Announce REQF LEXE? 2 – 39 Execution Error LCME? 2 – 40 Command Error TOKN(?) {z} 2 – 40 Token Mode
SIM900 Mainframe
2.2 Alphabetic List of Commands 2 – 5
2.2 Alphabetic List of Commands
?
*CLS 2 – 36 Clear Status *ESE(?) [i,] {j} 2 – 37 Standard Event Status Enable *ESR? [i] 2 – 37 Standard Event Status *IDN? 2 – 36 Identify *OPC(?) 2 – 38 Operation Complete *PSC(?) {i} 2 – 37 Power-on Status Clear *RST 2 – 35 Reset *SRE(?) [i,] {j} 2 – 37 Service Request Enable *STB? [i] 2 – 37 Status Byte *TST? 2 – 36 Self Test *WAI 2 – 38 Wait to Continue
A
AINP? p 2 – 18 Input Spaces Available AOUT? p 2 – 18 Output Spaces Available APSS b 2 – 29 Append to Script ATSS b 2 – 29 Append Terminated to Script AVSS? 2 – 30 Space Available in Script
B
BAUD(?) p {,i} 2 – 23 Baud Rate BRDC b [,i] 2 – 16 Broadcast Message to Ports BRDT b [,i] 2 – 16 Broadcast Terminated Message to Ports BRER(?) [p,] {i} 2 – 18 Broadcast Enable
C
CEOI(?) {z} 2 – 20 Generate EOI on hLFi CESE(?) [p,]{i} 2 – 26 Comm Error Status Enable CESR? [p] 2 – 26 Comm Error Status CLKD(?) {z} 2 – 32 Clock Distribution CONN p,b 2 – 15 Connect to Port CONS(?) {z} 2 – 38 Console Mode CTCR? [p] 2 – 27 CTS Status Condition CTSE(?) [p,] {i} 2 – 28 CTS Status Enable CTSR? [p] 2 – 28 CTS Status
D
DIPS? [i] 2 – 34 DIP Switch DONE? [p] 2 – 18 Transmit Complete
SIM900 Mainframe
2 – 6 Remote Programming
E
EAVS b 2 – 22 Echo Message to Eavesdrop ECHO? b 2 – 16 Echo Message back to Host EIDN 2 – 22 Identify to Eavesdrop ENSS? 2 – 30 Script Enable EOIX(?) {z} 2 – 20 EOI conversion during CONNect ERSS 2 – 29 Erase Script
F
FCSE(?) [p,] {i} 2 – 27 Flow Control Status Enable FCSR? [p] 2 – 27 Flow Control Status FLOQ 2 – 35 Flush Output Queue FLOW(?) p {,z} 2 – 23 Flow Control FLSH [p] 2 – 36 Flush Port Buers FLSI [p] 2 – 36 Flush Port Input Buers FLSO [p] 2 – 36 Flush Port Output Queues
G
GETN? p,i 2 – 16 Get Bytes from Port
I
IMON? 2 – 33 Primary Current IOSE(?) [p,] {i} 2 – 27 Input Overflow Status Enable IOSR? [p] 2 – 26 Input Overflow Status
L
LCME? 2 – 40 Command Error LEXE? 2 – 39 Execution Error LISS? 2 – 30 List Script LKSS(?) {z} 2 – 29 Lock Script LOCK? 2 – 32 Timebase Status
M
MSGL(?) {i} 2 – 19 Maximum MSG Length
N
NBSS? 2 – 30 Bytes Used in Script NINP? p 2 – 17 Input Bytes Waiting NOUT? p 2 – 17 Output Bytes Waiting
P
PARI(?) p {,z} 2 – 24 Parity PDPE(?) [p,] {i} 2 – 28 Port Data Pending Enable
SIM900 Mainframe
2.2 Alphabetic List of Commands 2 – 7
PDPR? [p] 2 – 28 Port Data Pending PLLC(?) {z} 2 – 32 Timebase Control PMON? 2 – 33 Primary Power PRTC(?) {z} 2 – 22 Port C Function PRTD(?) {z} 2 – 23 Port D Function
R
RAWN? p,i 2 – 17 Get Raw Bytes from Port RDDR(?) [p,] {i} 2 – 19 Receive Data Disable REQF(?) {z} 2 – 39 Announce REQF REQT(?) {z} 2 – 38 Announce REQT RNSS 2 – 30 Run Script RPER(?) [p,] {i} 2 – 19 Receive Pass-Through Enable
S
SBIT(?) p {,i} 2 – 24 Stop Bits SEND p,b [,i] 2 – 15 Send Message to Port SNDT p,b [,i] 2 – 15 Send Terminated Message to Port SRST [p] 2 – 35 SIM Reset SSCR? [p] 2 – 25 SIM Status Condition SSEN(?) [p,] {i} 2 – 25 SIM Status Enable SSEV? [p] 2 – 25 SIM Status Event SSNT(?) [p,] {i} 2 – 25 SIM Status Negative Transition SSPT(?) [p,] {i} 2 – 25 SIM Status Positive Transition
T
TBIN? 2 – 31 Timebase Input Detect TERM(?) p,{z} 2 – 20 Message Termination TICK? 2 – 34 Elapsed Time TMOT(?) p,{i} 2 – 19 Timeout TOKN(?) {z} 2 – 40 Token Mode TOSE(?) [p,] {i} 2 – 26 Timeout Status Enable TOSR? [p] 2 – 26 Timeout Status
U
UNDV? 2 – 34 Undervoltage
V
VERB(?) [i],{j} 2 – 21 Verbosity VLOC? 2 – 33 Timebase Status Analog VMON? 2 – 33 Primary Voltage VTBI? 2 – 31 Timebase Input Analog VVCO? 2 – 33 Timebase VCO
SIM900 Mainframe
2 – 8 Remote Programming
W
WAIT i 2 – 38 Wait WORD(?) p {,i} 2 – 24 Word Length
SIM900 Mainframe
2.3 Introduction 2 – 9
2.3 Introduction
The SIM900 Mainframe provides fully buered multiplexed commu­nications between the host computer and up to 9 SIM modules plus 2 (optionally as many as 4) external RS-232 devices. These SIM/RS­232 connections are generically called Ports here, and each port has a dedicated UART (universal asynchronous receiver & transmitter) with hardware input and output FIFO buers. The host computer (typically a PC) communicates with the mainframe through the host interface, which can be either RS-232 or (optionally) GPIB. The active interface is selected with rear-panel DIP switches at power-on.
No protocol requirements are placed on the communications across the ports—any sequence of bytes can be transmitted to or received from any port. Simultaneous ongoing communications with multi­ple ports can be maintained using a packet-message style of com-
mand (see SEND, BRDC, GETN?, RPER commands below). Sim­ple host-to-port communications are provided with the CONN com-
mand.
2.3.1 Device Clear
2.3.2 Queues and buffers
If the host interface is GPIB, the IEEE–488 DCL (Device Clear) or SDC (Selected Device Clear) interface messages will cause the mainframe to flush the host input buer and output queue, and reset the parser to the idle state.
If the host interface is RS-232, the same action is initiated by theRS-232 hbreaki RS-232 hbreaki signal (space level (0) for at least one full character frame). This single “out-of-band” signal allows the host to reset the mainframe interface to a known state, independent of the current operating mode.
In particular, a Device Clear event (either from DCL, SDC, or RS­232 hbreaki) will cause the mainframe to abandon an active connect
session (see CONN command).
Each port is separately buered with a port input buer and port output queue, while the host interface is buered with the host input buer and host output queue. All queues and buers are 512 bytes deep.
Data is initially received from the host interface into the host input buer. If the mainframe is not currently in connect mode, then bytes from the host input buer are read by the parser until a valid com­mand is found. Command Errors detected by the parser are reported
SIM900 Mainframe
2 – 10 Remote Programming
through the CME flag in the ESR register. Mainframe-directed com­mands and queries are then handled directly, and responses (if any) transferred to the host output queue for the host computer to read.
2.4 Port Communications
2.4.1 Message-based communication
Port-directed messages SEND,SNDT and BRDC,BRDT are parsed
for syntax, and then given to the Message Handler for delivery. The message payload is stripped out of the command, and copied to the appropriate port output queue(s) for delivery. If the port out­put queue is full (because the SIM or external RS-232 device has asserted flow control, or simply because of data rate mismatch), the
mainframe will wait up to TMOT milliseconds until there is su-
cient room in the port output queue for the data. In the meantime, commands and queries from the host will simply accumulate in the input buer until that fills as well. At that point, flow control on the host interface should hold oany further transmissions from the host until the buers clear up.
Data received from the ports is initially stored in the corresponding port input buer. If the corresponding bit in the ReceivePass-through Enable Register (RPER) is set and there is sucient room in the host output queue, then the data is wrapped into a MSG unit and transferred to the output queue for delivery to the host. If the output queue was too full, the message will be sent as soon as sucient space becomes available. If the corresponding bit in RPER is clear, then the corresponding bit in the Port Data Pending Register (PDPR) is set.
2.4.2 Connection-based communication
If the mainframe is connected to a port via the CONN command, the
situation is somewhat dierent. Bytes received from the host accu­mulate in the input buer, where they are scanned for matching the
escape string provided with CONN. Non-matching bytes are directly
transferred to the port output queue. A partial match is held o until an unambiguous complete match or non-match is present. On a successful complete match, the connect mode is terminated and the mainframe is ready for new commands.
Concurrently, bytes received in the port input buer are transferred directly to the host output queue. Data received at the unconnected ports will be held in their port input buers (causing the correspond­ing bit(s) in the PDPR to be set).
SIM900 Mainframe
2.4 Port Communications 2 – 11
2.4.3 Port map
The SIM900 Mainframe ports are defined in the following table:
Port Type Description 1 SIM Slot 1 SIM port 2 SIM Slot 2 SIM port 3 SIM Slot 3 SIM port 4 SIM Slot 4 SIM port 5 SIM Slot 5 SIM port 6 SIM Slot 6 SIM port 7 SIM Slot 7 SIM port 8 SIM Slot 8 SIM port 9 SIM Remote SIM port (DB-15-F back panel connector) A RS-232 Aux–1 DTE (DB–9/M back panel connector) B RS-232 Aux–2 DTE (DB–9/M back panel connector) C RS-232 Eavesdrop DCE (DB–9/F back panel connector) D RS-232 COMM DCE (DB–9/F back panel connector)
Ports 1 through B are always available as user ports, with A & B as generic RS-232 ports. After power-on, ports 1–B default to 9600 baud, 8-bits, no parity, and 1 stop bit.
Port C (Eavesdrop) is normally dedicated to monitoring communi­cations between the mainframe and host, but can be remapped as
an additional general purpose port with the PRTC command. At
power-on, this port defaults to 9600/8/N/1. Baud rate, parity, word size, and stop bits can be reconfigured by command after power­on, regardless of whether Port C is used for eavesdrop or general communications.
Port D (COMM) is normally dedicated as the RS-232 interface to the host computer. At power-on, this port defaults to the baud rate selected by the rear-panel DIP switches, or 9600 if the DIP settings are invalid (8/N/1). If RS-232 is NOT the active host interface, then Port D is normally inactive, but can be remapped as an additional general
purpose port with the PRTD command. Baud rate, parity, word
size, and stop bits can be reconfigured by command after power-on, regardless of whether Port D is used for the host interface or general communications.
When Port C or D are not reconfigured for general port communi­cations, the corresponding PC and/or PD bits in the RPER, BER, and PDPR registers are undefined; they can be written or read, but will have no eect.
SIM900 Mainframe
2 – 12 Remote Programming
2.5 Commands
All commands for the SIM900 Mainframe originate at the host com­puter1, and are sent to the mainframe via the host interface. The commands are organized according to functional groups, beginning with commands that directly control communications with the SIM modules. Other groups of commands configure the mainframe com­munications hardware, status reporting mechanism, startup script, internal housekeeping, and host interface.
2.5.1 Command syntax
All command names are 4-characters long and are case-insensitive.
IEEE–488.2 defined commands begin with the “*” character followed
by 3 letters, while SIM900-specific commands are composed of 4 letters.
The four letter mnemonic (shown in CAPS) in each command se-
quence specifies the command. The rest of the sequence consists of parameters.
Commands may take either set or query form, depending on whether
the “?” character follows the mnemonic. Set only commands are listed without the “?”, query only commands show the “?” after the mnemonic, and optionally query commands are marked with a “(?)”.
Parameters shown in { } and [ ] are not always required. Parameters in { } are required to set a value, and are omitted for queries. Parameters in [ ] are optional in both set and query commands. Parameters listed without any surrounding characters are always required.
Do not send ( ) or { } or [ ] as part of the command.
The command buer is limited to 255 bytes, with multi-byte block pa­rameter bytes separately stored in an independent 255 byte buer— any command that exceeds this size will generate a command error and be discarded.
If the host interface is RS-232, commands are terminated by either hCRi (ASCII 13) or hLFi (ASCII 10) characters that are outside any protected binary block or string. If the host interface is GPIB, then commands are terminated by either hLFi or hEOIi or hLF-EOIi. Exe­cution of the command does not begin until the command terminator is received.
Unlike most SIM modules, nomulti-command messages(i.e., “;” separated commands) are allowed for the SIM900.
1
or from the startup script
SIM900 Mainframe
2.5 Commands 2 – 13
The following table summarizes the notation used in the command descriptions:
symbol definition
p Port number (19, ad, AD, but see below)
i,j Integers
z Literal token
b Multi-byte (string) block
(?) Required for queries; illegal for set commands
var parameter always required
{var} required parameter for set commands; illegal for queries
[var] optional parameter for both set and query forms
2.5.1.1 Ports
Port parameters can be given as either simple decimal integers, or a single-letter hexadecimal value (without any leading 0x).
Many of the commands to set/query a register accept an optional port parameter. In these cases, if the optional parameter p is given, then the command only sets/queries the single bit corresponding to the binary weight 2p. Typically, this bit represents Port p, but in a few cases additional flag bits are packed into the register. For these additional flag bits, the optional p still restricts the command to the single bit, but it no longer corresponds to a port. Thus, it is possible in these cases for p to be E, despite the maximum port value of D.
2.5.1.2 Integers
2.5.1.3 Tokens
SIM900 Mainframe
Integer parameters follow “C-language” style. Simple decimal inte­gers are indicated by beginning with a non-zero digit (19). Octal integers are represented with a leading zero digit (0). Hexadecimal integers are given by a leading 0x or 0X.
For example, 26, 032, 0x1A all refer to the integer value 26.
Tokens are listed here as word–integer pairs, such as AUTO 2. For set commands, token parameters must either be the exact text word indicated (case-insensitive), or the corresponding decimal integer code. For example, to set the response termination sequence to hCRi+hLFi, the following two commands are equivalent:
TERM CRLF —or— TERM 3
2 – 14 Remote Programming
For queries that return token values, the return format (keyword or
integer) is specified with the TOKN command.
2.5.1.4 Blocks
Multi-byte block parameters can follow one of 3 formats (4 on GPIB).
Quote-delimited strings : An arbitrary byte sequence bounded by either " or charac-
ters. All characters (including control characters) are allowed. The quoting character itself (either " or ) can be included by escaping with an additional quote. For example,
"It is a ""good"" quote"
is identical to
’It is a "good" quote’.
Hex-formatted binary : #Hxx xx xx, where xx are hexadecimal bytes (00 through ).
Whitespace is ignored.
Definite-length arb. : #abbbrrrr, where a is a single non-zero digit equal to the digit
count in bbb, bbb is a decimal integer count of the number of data bytes to follow, and rrrr are the raw data bytes.
Indefinite-length arb. : #0rrrrhLF-EOIi, where rrrr is the raw data block, and
2.5.2 Examples
hLF-EOIi is the newline character (ASCII 10) with the GPIB-EOI line simultaneously asserted. (only on GPIB)
Each command is provided with a simple example illustrating its usage. In these examples, all data sent by the host computer to the SIM900 are set as straight teletype font, while responses received the host computer from the SIM900 are set as slanted teletype font. Command terminators explicitly sent by the host
computer are set with the symbol “”.
The usage examples vary with respect to set/query, optional param­eters, and block parameter formats. These examples are not exhaus­tive, but are intended to provide a convenient starting point for user programming.
SIM900 Mainframe
Loading...
+ 68 hidden pages