+ All Categories
Home > Documents > Computers in Surveying SVY2301 / E4006 Automated Surveying.

Computers in Surveying SVY2301 / E4006 Automated Surveying.

Date post: 24-Dec-2015
Category:
Upload: barrie-lawrence
View: 268 times
Download: 3 times
Share this document with a friend
Popular Tags:
43
Computers in Surveying SVY2301 / E4006 Automated Surveying
Transcript
Page 1: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Computers in Surveying

SVY2301 / E4006Automated Surveying

Page 2: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Communication Ports

• There are two basic types of communication ports available in most computers. These are:

• • serial port; and• • parallel port.

Page 3: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Communication Ports

• serial ports (COM1 or COM2) are generally used for connection of peripherals such as:– Digitisers modems;– Mice plotters.

• parallel ports (LPT1 and LPT2) are generally used for connection to printers or external disk drives.

Page 4: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication• Surveyors can be faced with interfacing

problems when trying to establish a connection between a data recorder and a computer.

• Survey equipment manufacturers usually supply standard interfacing cables for the most popular brands of computer but these may not be satisfactory in all cases.

• In addition to these problems interfacing problems can also occur when a surveyor tries to do something different such as connect his total station directly to a computer.

Page 5: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication• Surveyors require a good

understanding of at least the basic principles of interfacing and communications

Page 6: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Number System & Codes• A byte consisting of 8 bits can represent a

total of 256 numbers in the range 0–255.– 00000000 = decimal 0, and – 11111111 = decimal 255.

• a character code system based on an 8-bit byte would allow 256 characters to be coded.

• The ASCII-8 character code system is normally only used internally in the computer.

Page 7: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Number System & Codes• ASCII 7-bit code is the recommended

data representation code for communications between devices.– allows 128 characters to be represented

by the numbers 0–127. • 1111111 is the binary representation of 127.

• 8th bit of the byte is often used for error detection purposes. – providing a check that the other 7 bits

were not corrupted during transmission.

Page 8: Computers in Surveying SVY2301 / E4006 Automated Surveying.
Page 9: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices• a number of standard interfaces are

adopted by the computing and electronics industries.

• These standards fall into two categories, – serial interfaces, and – parallel interfaces.

• Serial communication interfaces can support longer distances between devices. – telephone is a serial communication device.

Page 10: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Serial Interfaces• data signals are transmitted over a

two wire line by sending each bit one after the other as either a high or low voltage

• A standard signal code such as the ASCII 7-bit character code is used to control the data transfer.

Page 11: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Serial Interfaces• The most common standard serial

interface in the computer industry is the RS232C standard.

• It was intended to describe the interface between data terminal equipment (DTE) and data communications equipment (DCE).– A ‘dumb’ computer terminal is a DTE – a modem is an example of a DCE.

Page 12: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The RS232C is actually a voltage

standard. • Logic state 0 is defined by a voltage

between +5V and +15V whilst logic state 1 is defined by a voltage between –5V and –15V. A line is in logic state 1 or ‘high’ during idle time. The transmission of a data signal can be represented by a block diagram with the 1’s represented as highs and the zeros as lows.

Page 13: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The RS232C is actually a voltage

standard. • Logic state 0 is defined by a

voltage between +5V and +15V

Page 14: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• logic state 1 is defined by a voltage

between –5V and –15V. • A line is in logic state 1 or ‘high’

during idle time.

Page 15: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The 7-bit binary code for the

character ‘A’ is 1000001.

Page 16: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• To advise the receiver that a

character is being sent the transmitter prefaces each character with a start bit, a zero. – the line switches from a negative voltage

to a positive voltage.

Page 17: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The character bits are followed by;

– a parity bit, and – one or two stop bits that leave the

signal high until the next character is sent

Page 18: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The transmitting device must have at

least as many stop bits as the receiver requires.

• When two way communication occurs both must have the same number of stop bits.

Page 19: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• The parity bit is often used for a

simple error checking technique.

Page 20: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• even parity

– The transmitting device counts the number of 1s in each character and if there are an even number then the parity bit is set to 0.

– If the number of 1s added to an odd number then the parity bit would be set to 1 so the total was even.

• When the data bits are received the receiving device counts the number of 1s and if they add up to an even number the character is accepted. If they total to an odd number the transmitter may be asked to re-transmit the character. It should be noted that this simple check only checks an error in one bit as errors in two or more bits may cancel each other and the wrong character is then accepted.

Page 21: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• even parity

– The transmitting device counts the number of 1s in each character and• if there are an even number then the parity bit is set to 0. • If the number of 1s added to an odd number then the parity bit would be set to 1 so the

total was even.

– the receiving device also counts the number of 1s and • if they add up to an even number the character is accepted.• If they total to an odd number the transmitter may be asked to re-transmit the character.

– only checks an error in one bit as errors in two or more bits may cancel each other and the wrong character is then accepted.

Page 22: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Odd parity

– the parity bit is set such that the number of 1s in the data bits (including the parity bit) add up to an odd number.

• No Parity– If ‘none’ is selected then no parity check is carried out by

the receiver. – This option is only available when 8-bit words are used as a

parity bit is not sent.

Page 23: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• Basic Characteristics. – Most equipment that surveyors use

would communicate using asynchronous, half-duplex signals at RS232C voltage levels.

• Baudrate. – Both devices must be set to the same

baud rate – i.e. bits per second.

Page 24: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• Parity. – Both devices must be set to the same

parity.

• Start and stop bits. – All devices attach one start bit to the

data bits and either one or two stop bits. – Some devices allow the user to select

either one or two stop bits. – Both devices must be set to the same

number of stop bits.

Page 25: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• Word length. – The standard word length is 8 bits (7

data bits + 1 parity bit). – Many devices however allow the user

to select a 9 bit word (8 data bits for the character + 1 parity bit). In this case if a parity bit is selected then only one stop bit may be used.

Page 26: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• ACK/NAK. – Normally the transmitting device sends all of the

data continuously, one block after another. – When protocol is selected as a parameter

however, the transmitter waits at the end of each block of data until it receives acknowledgement from the receiver that the data has been received. The character ACK is sent from the receiver to the transmitter in this case.

– If the data block was not received or was corrupted then the character NAK is sent to the transmitter. In this case the transmitter re-transmits the data block.

Page 27: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• XON/XOFF. – Some devices use these control

characters to control the flow of characters.

– When a device receives an XOFF character (DECIMAL 19) during output, it suspends transmission until an XON character (Decimal 17) is received from the other device, after which it continues with the transmission.

Page 28: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• Last characters. – The user is often able to select the

last characters that will be transmitted after a block of data.

– Normally the characters CR and LF (carriage return and line feed) are sent to end the data block.

– With some devices the user may select CR only as the last character.

Page 29: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Signal Format (RS232C)• Communication Parameters

• Most devices have a set-up or configuration program that enables the user to select the required parameters from a menu that can be scrolled through all of the alternative settings.

• Alternatively the user must carefully set a series of microswitches on the device. These switches are often called dip switches.

Page 30: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• The Canon D range of 25 way connectors – only between 3 and 10 wires are used

for computer communications.

Page 31: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)Pin Signal Function

1 PG Protective Ground2 TXD DTE TRANSMITS DATA  RXD DCE RECEIVES DATA3 RXD DTE RECEIVES DATA  TXD DCE TRANSMITS DATA4 RTS REQUEST TO SEND5 CTS CLEAR TO SEND6 DSR DATA SET READY7 SG SIGNAL GROUND8 DCD DATA CARRIER

DETECT20 DTR DATA TERMINAL

READY

Page 32: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• The connector may be male or female i.e. having pins or holes respectively. Generally – a DTE device will have a male

connector, and– a DCE will have a female connector

Page 33: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• An RS232 interface may be successfully achieved with just three wires if no hardware ‘handshaking’ is required.

• The lines used in this case are lines 2, 3 and 7.

DTE DEVICE DCE DEVICE

Comment Signal Pin Data Flow Pin Signal Comment

Transmits Data TXD 2 2 RX Receives Data

Receives Data RXD 3 3 TX Transmits Data

Signal Ground SG 7 7 SG Signal Ground

Page 34: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)• the transmit pin on one device is connected to the

receive pin of the other device. – Obviously this must also be the case if communication is

to occur.

• both devices may be configured as DTEs. • In this case both transmit on pin 2 and receive on

pin 3. The normal solution is to cross the lines to achieve a successful interface,

DTE DEVICE DCE DEVICE

Comment Signal Pin Data Flow Pin Signal Comment

Transmits Data TXD 2 2 RX Receives Data

Receives Data RXD 3 3 TX Transmits Data

Signal Ground SG 7 7 SG Signal Ground

Page 35: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• both devices may be configured as DTEs. – both transmit on pin 2 and receive on pin 3.

• The normal solution is to cross the lines to achieve a successful interface,

DTE DEVICE DCE DEVICE

Comment Signal Pin Data Flow Pin Signal Comment

Transmits Data TXD 2 2 RX Receives Data

Receives Data RXD 3 3 TX Transmits Data

Signal Ground SG 7 7 SG Signal Ground

Page 36: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• both devices may be configured as DTEs. – both transmit on pin 2 and receive on pin 3.

• The normal solution is to cross the lines to achieve a successful interface,

DTE DEVICE

Data Flow

DTE DEVICE

Signal Pin Pin Signal

TXD 2 2 TXD

RXD 3 3 RXD

SG 7 7 SG

Page 37: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)• the flow of characters can only be in one

direction at a time – Communications would normally have to be software

controlled

• Normally other lines on the interface are used to control the flow. When these control lines are used the term ‘handshaking’ is used to describe their function DTE DEVICE

Data Flow

DTE DEVICE

Signal Pin Pin Signal

TXD 2 2 TXD

RXD 3 3 RXD

SG 7 7 SG

Page 38: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

• Normally other lines on the interface are used to control the flow. When these control lines are used the term ‘handshaking’ is used to describe their function

Page 39: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)

Protective GroundDTE transmits dataDCE receives dataRequest to sendClear to sendData carrier detectData set readyData terminal

readySignal ground

DATA RECORDER COMPUTER

PG 1 1 PG

TXD 2 2 TXD

RXD 3 3 RXD

RTS 4 4 RTS

CTS 5 5 CTS

DCD 8 8 DCD

DSR 6 6 DSR

DTR 20 20 DTR

SG 7 7 SG

Page 40: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)Pin 20 is set high

by each device when it is switched on. Thus each device informs the other that it is ready

DATA RECORDER COMPUTER

PG 1 1 PG

TXD 2 2 TXD

RXD 3 3 RXD

RTS 4 4 RTS

CTS 5 5 CTS

DCD 8 8 DCD

DSR 6 6 DSR

DTR 20 20 DTR

SG 7 7 SG

Data terminal ready

Signal ground

Page 41: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)When a device is

ready to transmit data pin 4 is set high

DATA RECORDER COMPUTER

PG 1 1 PG

TXD 2 2 TXD

RXD 3 3 RXD

RTS 4 4 RTS

CTS 5 5 CTS

DCD 8 8 DCD

DSR 6 6 DSR

DTR 20 20 DTR

SG 7 7 SG

DCE receives data

Request to sendClear to sendData carrier

detectdetected on pin 8 of the other device

Page 42: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Pin & Line Assignment (RS232C)If it is ready to

receive a message it will respond with a clear to send (CTS) on pin 5

DATA RECORDER COMPUTER

PG 1 1 PG

TXD 2 2 TXD

RXD 3 3 RXD

RTS 4 4 RTS

CTS 5 5 CTS

DCD 8 8 DCD

DSR 6 6 DSR

DTR 20 20 DTR

SG 7 7 SG

DCE receives data

Request to sendClear to sendData carrier

detectdetected on pin 8 of the first device

Page 43: Computers in Surveying SVY2301 / E4006 Automated Surveying.

Interfacing & Communication

Signal Devices – Parallel Interfaces• each bit of a data byte travels down its

own wire. – for an 8-bit byte the interface would consist of

at least 8 wires.

• Normally used for one way communication between a computer and an output device such as a printer or plotter.

• If two-way parallel communication is required then additional cables are required for hardware handshaking.

• The Centronics pin connectors have become the standard parallel interface for printers. This connector has 36 pins.


Recommended