Getting Started
Note
Through out all pages relating to RS232 communications, reference is made
to SharpEdit (an application by SharpCam Ltd that is an editor that also has RS232
communications). SharpEdit's RS232 communications works identically to SharpCam,
the two terms can be used interchangeably, except that SharpCam cannot receive programs
from a machine. Any references to receiving should be ignored with respect to SharpCam.
All RS232 settings are shared between SharpEdit and SharpCam.
If you intend to use SharpEdit to send and receive programs you will need to set
up SharpEdit and/or your machine tool.
Note:
The information provided is intended to supplement the documentation provided by
the machine tool builder and should not be considered a replacement. It is your
responsibility to ensure that any changes made to the machine parameters/settings
are correct, and that any cabling is wired correctly, so as not to cause damage
or loss of data.
Cable
The quality of the cable used is very important. In an environment such as a factory
we recommend a cable that is specifically designed for RS232 communications. This
type of cable typically is 'Overall foil shielded', has 6 non paired conductors
(stranded) of 24 AWG (0.21mm2), and has a low capacitance. These
properties can be found in Belden 9536 cable or equivalent.
Cable Connections
Below is a generic cable that should work with most machines. If we have had experience
of successful communications for a particular control the connections are detailed
separately under their respective sections.
Machine End Pin No
DB 25 connector
|
Computer End Pin No
DB 9 connector
|
1*
|
Do NOT connect
|
2
|
2
|
3
|
3
|
4
|
8
|
5
|
7
|
7
|
5
|
6, 8 and 20 linked together
|
|
*There should be an uninsulated wire between the outer jacket and the foil shield.
Connect this wire to pin 1 at the machine end only. Never connect to pin 1 at both
ends or a ground loop can occur.
This cable is suitable for Software (XOn/XOff) and Hardware (Rts/Cts) Hand
Shaking.
Character Set
SharpEdit supports the ASCII/ISO character set. EIA is not supported.
RS232 Ports (Serial Ports)
Computer
The computer can be fitted with a 25 or 9 pin male connector, but, due to the system
requirements of SharpEdit, only a 9 pin connector
will be fitted.
You may see a 25 pin female connector, this is the parallel port and typically used
for printing. Under no circumstances use this port or damage may result.
Just to confuse matters, serial ports are not always fitted:
Laptops - are not fitted with a serial port anymore.
If the laptop is fitted with a PCMCIA slot (also known as PC Card) then a PCMCIA
to RS232 Serial Port adapter is required. Ensure drivers are available for your
version of Windows.
If the laptop is fitted with an ExpressCard slot, then an ExpressCard to RS232 Serial
Port adapter is required. Some adaptors are based on an USB interface and therefore
do not meet the hardware requirements. Ensure drivers are available for your version
of Windows.
Desktop - not all new computers are fitted with
a serial port. This can be easily remedied by fitting a RS232 serial port card into
a spare expansion slot.
USB to Serial Port adaptors - These adaptors are
just not reliable enough and therefore do not meet the hardware requirements for
use with SharpEdit as specified by the
Hardware Requirements.
Machine/Control
A 25 pin D connector is fitted to the
machine. Typically a female connector is fitted, but there are exceptions.
Setting the communication parameters
Before you can start communicating with your machine, there are a number of settings
that need to be matched between the machine and SharpEdit.
To access the settings, from SharpCam select the RS232 Settings command from the
Tools Menu, from SharpEdit select the RS232 Settings command from the Communications
Menu. From here you can create or edit machine settings.
Com Port
The Com Port refers to the name of the physical connection on the PC that the cable
plugs into. If you have a desktop PC or an older laptop that has a serial port,
then the name is typically COM1 or COM2. PCMCIA/ExpressCard adaptor tend to use COM3 and
above.
When setting the Com Port to use in SharpEdit, only the available ports are listed.
If COM1 is listed then try this first, if you are using a PCMCIA/ExpressCard adaptor then
it is best to use the Device Manager to determine
the name of the port.
Baud Rate
The Baud Rate determines the speed at which the Nc code is transmitted. This value
must be the same at the machine and at SharpEdit. You can either change SharpEdit
to match the machine or change the machine to match SharpEdit. A good starting rate
is 9600, see the documentation for your machine to establish how to change/check
the baud rate setting.
Parity
The parity settings must match. Not all machines allow this to be changed, so typically
you must change SharpEdit to match the machine. See the documentation for your machine
to establish how to check the parity requirements.
Hand Shaking
The hand shaking determines how the flow of data is controlled. There are two types
(apart from None, which is not recommended), Software and Hardware. Software is
called XOnXOf and Hardware RtsCts in SharpEdit. See the documentation
for your machine to establish what hand shaking is available. Typically most machines
use Software hand shaking. Hardware hand shaking requires additional connections
in the cable.
Data Bits
The data bits settings must match. Not all machines allow this to be changed, so
typically you must change SharpEdit to match the machine. See the documentation
for your machine to establish how to check the data bits requirements.
Stop Bits
The stop bits settings should be matched. See the documentation for your machine
to establish how to change/check the stop bits.
Other Settings
There a number of other settings available, most of which will not be needed. You
must set Characters to send at end of line, see below.
Characters to send at end of line
Typically a carriage return and line feed are required. To specify a character(s)
first choose the desired character from the
ASCII Table
Enclose the corresponding decimal value for each character in <> brackets,
without any form of punctuation in between. For example: <13> for carriage
return and <10> for line feed. This is the default when you create a new RS232
Settings for a machine.