|
Note: this wiring is NOT for PC to HAAS, but is for E232 to HAAS.
For a PC (personal computer) 9 pin connector RS232 you need a female instead of male, pins
2 and 3 are interchanged, and pins 7 and 8 are also interchanged.
The colors are our arbitrary choice, and arrows indicate data flow direction.
On the 25 pin connector --- pins 2 & 3 are data lines, 7 is common (ground), pins 4 & 5 are the
hardware handshake. Pins 6,8 & 20 are don't care from our point of view, but
on some CNC machines must be forced as shown.
If CNC pin 4 is high ( + voltage relative to pin 7 ) ( logic 1 ),
then the CNC is ready to receive data. If
it is low, then data to CNC pin 3 should stop immeadiately. Note that HAAS does
not set pin 4 low when the machine is not in receive or send mode. Thus,
you must not start sending data to HAAS before you initiate HAAS RECV.
In the opposite direction a logic 0 ( - voltage ) to pin 5 tells the CNC
machine to stop sending data immeadiately. This signal is based on the
fullness of the E232 buffer.
The data lines Rxd and TxD operate with negative logic meaning that a logic 1
is a negative voltage, and a logic 0 is a positive voltage. Typically around
+/- 7 volts unloaded. True RS-232 drivers have built in protective current
limiting to conform with the RS-232 specification.
The rest (idle) state for data to CNC pin 3 is logic 1 (low, -). The start
bit is logic 0 (high, +), and the stop bit is logic 1 because this is the
same as the rest state. Synchronization on the start of a new byte is
derived from the
transition from logic 1 to logic 0 at the beginning of the start bit.
Fanuc will not work without handshake signals on pins 6 and 8. HAAS does
not care. Our cable works with either HAAS or Fanuc.
General Troubleshooting Information on RS232.
The following data relates specifically to a 1993 HAAS VF-2. The RS-232 connector
on the machine is a 25 pin female. The only pins defined by HAAS in their manual are
1, 2, 3, 4, 5, and 7, and then the ambiguous statement "All other pins are optional
and are not usually used."
HAAS defines these as 1 - Shield Ground, 2 - TXD Transmit Data, 3 - RXD Receive Data,
4 - RTS (optional), 5 - CTS (optional), and 7 - Signal Ground.."
We have a little connector assembly with 7 LEDs, a 25 pin male input, and a 25 pin
female output. The only identification on it is "RS232 MINI-TESTER". Probably made
in the far-east. We purchased ours from Purchase Radio in Ann Arbor, Michigan.
It is a useful tool and has the following characteristics: Each
LED package contains two LEDs, one red and one green, connected back-to-back so
polarity can be detected. This also prevents excess reverse polarity on each LED.
The assembly glows green on a negative and red on positive voltage. The LED common is
pin 7. In an RS232 connection all signals are referenced to pin 7 on a 25 pin connector,
and pin 5 on a 9 pin connector. A near zero voltage produces no illumination. Approximately
-2 v to start to see green, and about +1.4 volts to start red. Note: a
negative voltage on either pin 2 or 3 corresponds to a logic 1, and a positive
voltage to logic 0.
The labeling on TESTER is as follows: pin 2 - TD, 3 - RD, 4 - RTS, 5 - CTS, 6 - DSR, 8 - CD,
and 20 - DTR.
To my suprise I found that with the TESTER only connected to HAAS that on jumpering
pins 4 and 6, that 6, 8, and 20 went red from nothing. On checking it appears that
HAAS pins 6, 8, and 20 are floating, and connected together.
The TESTER current load is about the same ether + or -. At 5 v about 9 ma, and 12 v about
30 ma. This calculates to 555 ohms at 5 v, and 400 ohms at 12 v. This is a load
resistance far lower than a normal receiver. If this tester were connected to the
CNC or PC while trying to send data on a long RS232 line it would greatly reduce the
workable line length.
The specified input impedance for an RS232 receiver is 3000 to 7000 ohms. In a rest state
the measured unloaded voltages on our VF-2 are pin 2 -11.38 v, pin 3 +0.196 v, pin 4 +11.36 v,
and pin 5 +0.196 v. All referenced to pin 7. With the minimum load resistance, 3000 ohms,
these values were pin 2 -9.14 v, pin 3 +0.069 v, pin 4 +9.15 v, and pin 5 +0.070 v. Now
if only the TESTER is connected, then pin 2 amplitude drops to -4.76 v from -11.38 v.
Similar effect on the other signals.
Next jumper HAAS pins 4 and 5 so that in hardware handshake mode HAAS will transmit data,
disconnect any load from the HAAS connector.
Have enough programs in memory so that a send all will run for a while. Monitor the
average dc voltage on pin 2 relative to pin 7. With a Fluke 87 digital meter the reading
is -11.38 v before sending data. When data is being transmitted Fluke does not average very
well but jumps around and does not read a steady -11.38 v. A simpson 260 or 270 set on
+ 10 v range will pin the needle negative before data transmission, and jump around
in the range of 0 to + 1 v during transmission.
If you have box similar to TESTER, then when at rest (no data being sent) the TD LED
will glow a steady green, and when data is being sent the LED will be an orange. For a
greneal random sequence of characters there is an approximately equal distribution
of 0s and 1s, and therefore rough 50% red and green each.
HAAS calls handshaking synchronization and this is set thru setting 14. In older machines,
for example our 1993 VF-2, the handshakes are XON/XOFF, RTS/CTS, and DC CODES. Later
machines have XMODEM also. RTS/CTS is what we call hardware handshake.
If you put HAAS into
XON/XOFF, then you do not need the pin 4 to 5 jumper. Also note in XON/XOFF mode
if an XOFF (ctrl-S, 13h, DC3) is sent to HAAS before the SEND button is pushed, then no
data is sent until an XON (ctrl-Q, 11h, DC1) is received.
stop.
Photos of Parts Made from Data Transferred via E232 System.
|