Help me connect a process display to a serial port via RS232

Nickolassc

Member
Join Date
Sep 2010
Location
Maine
Posts
5
Hello! I have an issue I hope the experts here can help me with. I've been working on connecting a Baumer PCD41 process display to my laptop via an RS232 3 wire connection (ground, TxD, RxD) but I can't seem to get it to work correctly and I think it's one of three issues. I was hoping I could get some feedback on these.

The first issue, Baumer technical support could not tell me whether the process display was a DCE or DTE device, which is necessary for wiring TxD and RxD correctly. I would assume that a process display/PLC would generally be considered a DTE device, is that correct?

The second issue, which I think is my problem, is finding a good software program for reading the data input. Does anyone have a good software program they recommend for data input?

The third issue is configuring the ports on the computer. I know the process display is putting out the following signal: 4800 Baud, 1 stop bit, even parity, I am not sure on the flow control but I assume there is none, and I'm not sure on the data-bit rate, but I'm assuming it's 8 bit. Do those sound right and do I need to go into the control panel in windows xp and configure the serial port to match the settings for the process display?

Thanks,
Nick
 
Hello! I have an issue I hope the experts here can help me with. I've been working on connecting a Baumer PCD41 process display to my laptop via an RS232 3 wire connection (ground, TxD, RxD) but I can't seem to get it to work correctly and I think it's one of three issues. I was hoping I could get some feedback on these.

The first issue, Baumer technical support could not tell me whether the process display was a DCE or DTE device, which is necessary for wiring TxD and RxD correctly. I would assume that a process display/PLC would generally be considered a DTE device, is that correct?

The second issue, which I think is my problem, is finding a good software program for reading the data input. Does anyone have a good software program they recommend for data input?

The third issue is configuring the ports on the computer. I know the process display is putting out the following signal: 4800 Baud, 1 stop bit, even parity, I am not sure on the flow control but I assume there is none, and I'm not sure on the data-bit rate, but I'm assuming it's 8 bit. Do those sound right and do I need to go into the control panel in windows xp and configure the serial port to match the settings for the process display?

Thanks,
Nick

Can you give us a link to the Manual for the Display?

Stu.....
 
Problem 1:

Are you using a real Serial Port with a DB9 Connector or a USB to Serial Converter? I can provide you with a Wiring Diagram. It should be the same wiring either way.

Problem 2:

I don't have a suggestion for a Communications Program at this point. I would start with HyperTerminal. What Version and Service Pack of Windows are you using?

Problem 3:

The RS-232 Parameters are set on Lines 51 to 54. You will have to set your PC the same, or Visa-Versa. Flow Control is either none, or XOn/Xoff, but probably none.

Stu......
 
http://motion.baumer.com/motion/products/downloads/Betriebsanleitung/BA_PCD41_Schnittst_DE_EN.pdf

1) I don't know how DCE, DTE makes a difference. If you're connecting to a PC COM port, Tx connects to Rx on either side and the signal grounds connect to each other.

2) If the manufacturer doesn't offer a software program, then why would anyone else?. The interface manual (link above) spells out the protocol. It appears to be a roll-your-own write your own program situation.

3) "Transmission is effected character by character in ASCII code. Each character consists of 8 bits. The 8th bit is the parity bit; in case of "no parity", the 8th bit will always be transmitted as a zero."

That means words are 7 bits, not 8 bits. (ASCII is 7 bit)

I would avoid no parity since no parity is forced to a zero bit. It's too easy to set even or odd parity.

Most programs that talk serial have a comm setting.

Without a software program, setting comm settings is just an exercise.
 
Problem 1:

Are you using a real Serial Port with a DB9 Connector or a USB to Serial Converter? I can provide you with a Wiring Diagram. It should be the same wiring either way.

Problem 2:

I don't have a suggestion for a Communications Program at this point. I would start with HyperTerminal. What Version and Service Pack of Windows are you using?

Problem 3:

The RS-232 Parameters are set on Lines 51 to 54. You will have to set your PC the same, or Visa-Versa. Flow Control is either none, or XOn/Xoff, but probably none.

Stu......

Thanks for the advice, I am using a real serial port with a db9 connector and not a serial to usb adapter. On the wiring, I've connected it as RxD (PD) to TxD (PC) and TxD (PD) to RxD (PC) assuming both the computer and the process display are DTE devices.

I'm using windows XP SP3, I tried using Eltima data logger to collect data, but I haven't been able to succesfully log any data input. I think it's because I have the communication settings wrong. Here is the program I tried using:

http://download.cnet.com/RS232-Data-Logger/3000-2094_4-10497745.html

I left the Process Display parameters on the default settings and changed the com port settings in window xp control panel device manager and the data logger program to match the default settings of 4800 baud, 1 stop bit, even parity. I've tried running through different combination of the settings for the bit rate and the flow control, but haven't had much luck yet receiving a signal. Thank-you for looking at this for me.
 
Your Serial Wiring looks ok. If you have not done it already, you need to download the PCD41 Interface Manual. I looked at the RS-232 Data Logger, and it appears to just passively listen. Looking at the PCD41 Interface Manual, you have to Poll it with the Line Number you want to read. In other words, before it will send you anything, you have to send it a command to do so.

Grab the Interface Manual, and for the time being, use HyperTerminal, and send the PCD41 a simple Command, and see what it spits back at you. At least you can confirm your Serial connection that way.

Stu......
 
On the wiring, I've connected it as RxD (PD) to TxD (PC) and TxD (PD) to RxD (PC) assuming both the computer and the process display are DTE devices.
Connect the RS-232 GND to the PC's signal ground (pin 7?). Lack of a ground reference will revent comm from running.

I've tried running through different combination of the settings for the bit rate and the flow control,

Flow control involves the RS-232 control signals like RTS, DSR, CTS. Those don't exist in the hardware.
So flow control = none; or it's regulated by the software keeping track of when the transmission is complete and then sending the next command.
 
Thanks for the tips so far. I have the ground wire connected to the 5th pin, according to the db-9 pinouts I've seen, this should be the correct pin. I tested the connection by crossing the RxD and the TxD wires and using the terminal to send commands. Each letter I typed in the terminal appeared twice, once for sent and once for receive, so I believe I have that part working correctly.

When I wire up the process display and send a few commands, I'm not getting any response back in the terminal and the control commands I'm sending to the process display are appearing to have no effect.

I sent the following command with no response:
<STX>35IT<ETX>
Which according to the programming manual, I should have a response of:
<STX>35BPCD41 01<ETX><CR>

Does it sound like the connection parameters aren't setup correctly?

Thanks,
Nick
 
I've found the Hyperterminal on XP rapidly 'forgets' its comm settings and reverts to 8-N-1, which is problematic for ASCII comm using 7 bit words.

And, as I recall, resetting comm isn't easy, it requires closing Hyperterminal and re-launching it. I have been unable to get Hyperterminal to save a setup using 7 bit ASCII and have it recall the setup correctly. It always reverts to 8-N-1.

Make sure you're really set up for 7 bit ASCII.
 
Just going to toss this in: I don't use Hyperterminal for terminal applications anymore. I've seen it do too many plain-weird things (deleting every three repeated characters in VT100 mode, the aforementioned forgetting serial settings, etc).

RealTerm is an open-source alternative. It's a little hairy looking at first and not perfectly intuitive, but I like the display options for unprintable characters, as well as the capture and append to file feature. I've used it as my quick-and-dirty data logger as well as a terminal.

http://realterm.sourceforge.net/

Does the target device support an "echo" command of any type ? That's often a simple way to prove serial connectivity.
 
<snip>
I sent the following command with no response:
<STX>35IT<ETX>
Which according to the programming manual, I should have a response of:
<STX>35BPCD41 01<ETX><CR>

<snip>

How are you sending the <STX> and <ETX>, you realize those are 02H and 03H respectively. How would you send those characters in ascii? You're not typing in "<"+"S"+"T"+"X"+">" in ascii right?


Read-out of tachometer value (Line=01, Displayed value=1500)​
Polling: <STX>3501<ETX>​
Answer: <STX>3501R001500<ETX><CR>

Now, this is going to sound like a crazy question...

The examples in the comms manual use the ADDRESS = 35 for their examples, which you have used for yours. In fact the factory default ADDRESS = 00 as shown in the manual.

You can change the unit number to whatever you choose through the front panel of the device by the look of it. When you send a serial command to the device, if the address at the beginning of the command does not match the address of the device it will just ignore the command (no response). It's assuming the query was for someone else.

See your programming manual for the PCD41, page 37.

Line 54 54 00
Address * from 0 to 99


Good luck!
Paul
 
Just going to toss this in: I don't use Hyperterminal for terminal applications anymore. I've seen it do too many plain-weird things (deleting every three repeated characters in VT100 mode, the aforementioned forgetting serial settings, etc).

RealTerm is an open-source alternative. It's a little hairy looking at first and not perfectly intuitive, but I like the display options for unprintable characters, as well as the capture and append to file feature. I've used it as my quick-and-dirty data logger as well as a terminal.

http://realterm.sourceforge.net/

Does the target device support an "echo" command of any type ? That's often a simple way to prove serial connectivity.

+1

This is going to be required to send your HEX <STX> <ETX> etc...

What is the "end-game" for this application? Other than it's a fun diversion? ie. once you have your comms working, then what?
 
<stx> <etx>

I found this note on implementing control characters in Hyperterminal. I can not vouch for its accuracy, because I've never had to use it.

0x means 'hex'

---------- implementing <STX> <ETX> ----------
It is a common misconception that you can't send hex values using hypertermimal.

One way to send STX and ETX is by using the CTRL key.
You can send STX as CTRL+B and ETX as CTRL+C.

A-Z map to 1-26 respectively so for example CTRL+O would be the equivalent of sending (0x0F).

Another method you can use to send any hex value between 01-FF is done using the ALT key and the decimal equivalent of the value you want to send.

Holding down the ALT key and entering 02 and releasing the ALT key will send STX (0x02).

Note for hyperterminal you need to add the leading zero so to send 0xFF you would use ALT+0255. If you enter anything larger than the maximum for a 1 byte value it will just roll over so ALT+0257 will give you 0x01.
---------------------------
 
Thanks for all the tips so far. I am using the address of 18 for the device and I have been sending the commands as <STX>18ID<ETX>. I will attempt to send the first and last characters as Hex, I am using the terminal program Termite 2.4 right now, I'll try the open source alternative that was linked. Thanks for your help so far! Once I poll the process display to ensure it works I'm shipping it off to our programmer. He is going to write a VB program to capture data from a laser distance sensor.
 

Similar Topics

I am going to daisy chain a couple Modbus devices off of a Click plc using rs 485. There will be three slave devices daisy chained off one another...
Replies
16
Views
9,125
Hi group I had successfully established a connection earlier today but I goofed something up and have now been banging my head against a wall for...
Replies
6
Views
2,519
hi, i try to connect sick clv490 barcode scanner to hyperterminal to send some command like "21" turn on laser beam. it work fine with sick...
Replies
0
Views
1,471
hi to all i have a laptop Dell3521 with , windows 7 Sp1 ultimate , security kis16 i install step7 v5.5 sp1 and upgrade it to sp4 i can't connect...
Replies
2
Views
1,795
Thank for your kind reply mickey... we are using MITSUBISHI FX5U-32MT/ES TYPE PLC.. we are in need to control the Permanent magnet dc motor...
Replies
1
Views
2,129
Back
Top Bottom