09-14-2011 08:03 PM
I am trying to control a laser through a serial port. I am using the NI USB to RS232 cable connected to the computer. Accordiing to the laser user guide in need a DTE-DTE interface. The laser pin out shows a 3 wire connection so GND-GND, Cable Tx to Laser Rx, and Cable Rx to Laser Tx.
I am using the Labview example "Basic Serial Write and Read.vi" Set the parameters to match the user menu. Sending the command code and carriage return yields nothing. I am supposed to be able to send only a carriage return and get a response of "BCMD". Nothing there either.
The only time I get anything is if I disconnect the GND-GND. Then I get a loopback response.
I have tried to loopback all the other connections not used for the 3 wire configuration for the USB cable but that doesn't help. Disconnected the system and checked the DC voltages on the pin outs and there is a negative 5.9 V between ground and each Tx pin for both the USB cable and the laser.
Any suggestions?
09-15-2011 01:20 AM
I expect you have already tried it: Swap the line 2 and 3 (Rx and Tx) )
Next play around with the baudrate , databits,parity.
09-15-2011 02:21 PM
Seems I have fixed the problem. There was a special enable code that needed to be sent before any other commands would be accepted. Once the enable code was sent, all the others worked just fine. This was no where in the manual.
09-15-2011 02:35 PM
09-15-2011 02:55 PM
The laser is a YLR-series high power fiber system manufactured by IPG Photonics. To use the remote operation through the RS-232. A "EEC" (enable external control) needs to be sent first. The laser will not respond to any code such as "RFV" (read firmware version) or even invalid command code unless the "EEC" is received first.