Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

trying to communicate with a machine through RS232 interface.

Solved!
Go to solution

Hi There, i would like to communicate with my machine through RS232 DB-25 machine side which is configured as DCE and DB-9 my PC side as DTE, the machine is using only pin 2 (serial data in), pin 3 (serial data out), and pin 7 a ground. i wired the pins straight-through except for the ground which is in DB-9 pin 5, so I have tried to connect pin 2 to pin 2 and pin to pin 3, pin 7 to pin 5, but i couldn't manage to get through my machine, then i tried pin 2 from my pc to pin 3 machine, pin 3 pc to pin 2 machine, pin 5 to 7, unfortunately can't also. i set everything properly as i think but somehow couldn't do it.

(in the manual stated if the pc have db-9 so the connection db-9 to db-25 modem cable) does this make any sense.

 

I am seeking help on this issue. thanks for any help.

0 Kudos
Message 1 of 16
(5,020 Views)

maybe your machine also needs some wires shortcircuited (DTS and DTR)

and don't forget baudrate and stopbits (start at 2)

 

goodluck

greetings from the Netherlands
Message 2 of 16
(5,010 Views)

Hi Albert,

Thanks for your reply, my machine have a connection between RTS and CTS, and DTR is connected to DSR and each node pulled up to +5 VDC, the bauderate also I make both are same, the stop bits my machine require 1 bit. parity none. I still confuse what does it mean when they said a modem cable.

because my connection cable is known as a null modem cable. please any one clarify this.

 

thanks  

0 Kudos
Message 3 of 16
(5,003 Views)

It really sounds like it's a question you should be asking the manufacturer of the instrument. If they did not provide a wiring diagram in the manual, contact them and ask for one.

 

You have not even provided the make and model of the instrument so I'm not sure what anyone here can do to help.

Message 4 of 16
(5,001 Views)

A modem cable is wired straight at least DB25 to DB25

A null modem cable has the wires twisted because no modem is between the two devices (Data terminal and data communication equipment)

Now to prevent that both devices talk on the same line (pin 2) and both listen on pin 3 you need a twist when a modem is not available.

 

Also the hardware handshake lines need to be replaced correctly (mostly connected a bit more problematic than a simple twist)

But as Dennis said, give device and type and manufacturer and maybe we can be of more help.

greetings from the Netherlands
Message 5 of 16
(4,977 Views)

thanks so much for Dennis and Albert, the machine is a coherent Laser machine the model is Sabre MotoFRED Ion Laser, in the manual stated that for typical pcs, serial port  DB-25 will require DB-25 to DB-25 wired straight through cable, and serial port DB-9 will require DB-9 to DB25 (which is my case) a modem cable, the machine to defeat and handshaking it has shortcircuited inside it RTS to CTS and DTR is connected to DSR. so i have tried this but it does'nt work:

  DTE (PC) DB-9                DCE (Machine) DB-25

       Pin 3   TXD                         Pin 2    RXD

       Pin 2   RXD                         Pin 3    TXD

       Pin 5   GND                         Pin 7   GND

the machine only require these three pins signal to communicate with the machine. the manual is attached please refer to chapter 10.

 

thanks

0 Kudos
Message 6 of 16
(4,974 Views)

That looks correct though pin 2 on the DB25 is Txd and pin 3 is Rxd.

 

How exactly are you testng the communication? I would hope that this is through something like Hyperterminal and that you have it configured to send a CR and LF.

0 Kudos
Message 7 of 16
(4,967 Views)
I am using MAX to communicate with the machine, shall i need to send <CR><LF> with the command.
0 Kudos
Message 8 of 16
(4,939 Views)
Solution
Accepted by topic author Aneece
Yes, of course you do. That's stated in the manual. In MAX, you would use \r\n.
Message 9 of 16
(4,933 Views)

Hi Dennis, it is solved, sorry for late reply.

 

thanks a lot

 

Aneece

0 Kudos
Message 10 of 16
(4,812 Views)