Previous in Forum: TSOP IC in Proteus Professional   Next in Forum: More Budget Tablets Coming - Shock
Close
Close
Close
12 comments
Rate Comments: Nested
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369

How To Capture The Data Following Via RS232 in ASCII Format.

10/14/2013 2:45 AM

Hi;

We have a slitter scorer machine in which tools are placed via servo motors. Servo motor is controlled with servo drive and each servo drive is sent the values of a set of parameters to set a job. The main control system is DOS based which sends the values of parameters to all drives according to job. The data flowing is as MS DOS_RS232 port >>> RS232 to 485 converter >>> parallel connection to all servo Com ports. I want to monitor the data following from MS DOS to drives for which I have arranged another RS232 to 485 converter and connected a wire from TX+ terminal of 1st Comm module to the TX- terminal of 2nd Comm module. If I enable the hyper terminal, I see the data following but un-understandable format.

The format of data following from MSDOS PC to drives is like "7E-BF-02-04-3C-00" in ASCII format. So to read it, I downloaded MS "PortMon" software which is used to monitor data following via RS232 port. I have windows XP and when I run the software, "Not Connected" is shown on the top bar. Please help how to make it "Connect" to capture the data. Or if anyone has any other idea to capture the data following, please assist.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#1

Re: How to capture the data following via RS232 in ASCII format.

10/14/2013 4:08 AM

Just to make sure we understand correctly - do you see "7E-BF-02-04-3C-00" (or similar) on the Hyperterminal screen?

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#2
In reply to #1

Re: How to capture the data following via RS232 in ASCII format.

10/14/2013 6:37 AM

Dear JohnDG;

Actually we are working to design a new system to control the tools. In new system, we have written codes in MS VB to send the parameter values to servos and we send the same format successfully. I want to know that on what sequence the original DOS based system writes the parameter values to the drives. So what does "7E-BF-02-04-3C-00" mean as following;

7E = Comm start,

BF = WRITE operation on Node 31

02 = Parameter length which is here 2bytes

04 = Serial address of parameter and here it is Pr06

3C-00 = Value in Hex and here is 0.6.

In above message checksum is not included as system calculates automatically.

If i read via hyper terminal, system reads something but understandable.

Please read the attached picture of one page of drive's manual.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Power-User

Join Date: Jul 2010
Posts: 136
Good Answers: 19
#3

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/14/2013 3:05 PM

>connected a wire from TX+ terminal of 1stComm module to the TX- terminal of 2nd Comm module.

Positives NEVER get connected to negatives on RS-485.

Check out the diagram:

Register to Reply
Power-User

Join Date: Jul 2010
Posts: 136
Good Answers: 19
#4

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/14/2013 7:24 PM

I need to elaborate on positives and negatives because there are cases where + wires to (-).

The EIA standard did not and does not define which line is positive with respect to the other.

So some manufacturers will label a lines one way, some the other.

The intended RS-485 wiring with a common manufacturer's components, all of the same polarity, as it were, would be + to + to +, (-) to (-) to (-), or A to A to A or B to B to B.

However, mixing manufacturers' devices might result in wiring + to (-) or A to B. Different divisions of Phoenix Contact label 485 terminals the opposite of the other.

The test is whether it works and a connection is made. If the wiring is backwards, it'll never work, but it won't damage the driver. It is very common to have to swap 2 wire wiring when commissioning devices from different manufacturers.

Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#5
In reply to #4

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/15/2013 12:41 AM

Hi Bud;

Please see the wiring diagram which i did. OUT (commands to drives) of original module to the IN of arranged module and GND with GND. Please don't consider Red (IN of original module) wire as i showed it by mistake. It is un-connected.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#6
In reply to #5

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/16/2013 3:57 AM

If someone guide me about PortMon that how to make it "Connected" it would be enough for me. This time when i run PortMon, "Not Connected" displays at the top write corner.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Power-User

Join Date: Jul 2010
Posts: 136
Good Answers: 19
#7

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/16/2013 9:11 AM

The image in your post 5 is unreadable. Post it at tinypic dot com, a free image hosting site and post the link to it back here.

Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#8
In reply to #7

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/16/2013 1:40 PM

Hi Bud

Please see

http://i1155.photobucket.com/albums/p553/signode/Untitled_1_zps4522eecd.png

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Power-User

Join Date: Jul 2010
Posts: 136
Good Answers: 19
#9

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/16/2013 10:04 PM

My opinion is that you should be looking at the RS-232 COM port on the PC, looking at its traffic and its timing. By sniffing the RS-485 side of the network, you're making basic network connection more difficult by involving the converter.

In the original, small diagram, it looked like the nodes were 4 wire RS-485 because 4 wires ran to each node, but apparently not, they appear to be 2 wire 485 with a signal ground and a shield.

Typically, when there are 4 RS-485 terminals for 4 wire comm: Tx+, Tx-, Rx+ and Rx-; but the network is a 2 wire network, then Tx+ is jumpered to Rx+, Tx- is jumpered to Rx-.

Your converter has 4 terminals, but your converter terminals are not jumpered. Nothing is wired to terminals 7 or 8, the receive Rx- and Rx+ terminals. How do the receiver terminals 'see' the bus signal?

I have to guess that some jumper or setting runs the 485 side as 2 wire, otherwise, the software could not receive any data, but maybe it talks only, never listens? If the nodes never talk, and the softare never listens, then you have to investigate how your converter2 will be able to 'see' the bus signal, given that there's no visible connection to the receive terminals on either converter1 or converter2.

I haven't wired an RS-485 sniffer tap before. I would assume that the 2nd converter is connected as though it were an additional node, so that it can read (receive) what ever traffic is on the 485 side of the network. So whether the 2nd converter's receive terminals 'see' the bus signal is critical.

My guess is that you need to redo the wiring: connect converter2 Tx- to converter1 Tx-, converter1 Tx+ to converter2 Tx+; based on the normal wiring scheme where Tx- goes to Rx-, Tx+ goes to Rx+. Since there's nothing connected to the Rx terminals, hopefully they're jumpered internally.

If there's some jumper or setting to tell converter2 to be run as 2 wire RS-485, do that.

Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#10
In reply to #9

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/17/2013 4:08 AM

Hi Bud;

Thanks for your answer. I explain in more detail to understand.

Normally DOS PC sends parameters values to all 20 servo drives and also reads values of some parameters of drives. So the operation is READ/WRITE type. This time m/c is working with DOS system and we want to replace that old system with latest where we have written the codes in MS Visual Basic without any kind of help from OEM of m/c and drive (because m/c has been obsoleted) We have completed almost all coding and verified. We just remove the DB9 connector from DOS PC and connect it to our new system and do the operation. At last stage, we have stuck at one point for which we are needed to see that on which pattern the original DOS system do the READ/WRITE operation.

The "Original Module" in image is that module which has originally installed at m/c and working and the "Module Arranged" is the same Comm module which I have connected to SEE the codes send by DOS system to drives. It is impossible to remove the DB9 connector from DOS PC and then connect my DB9 connector to RS232 port of DOS as when I remove the connector from original DOS PC, system goes in fault; can not perform read/write operation as system checks the Drive Healthy bits of drives every 5sec.

So I want to capture the data following via system during a typical JOBSET operation of machine. I have tried to capture by following above wiring scheme and by using another Software named "Terminal" and what I captured is as following;

E0 91 60 EC 80 60

AD 7F 73 9C 12 60 6D 80 60 45 9A 8E 86 00 60 DD

80 60 56 7F 73 9C 04 60 36 80 60 AB 7F 73 9C 00

60 6B 80 60 2F 9F BB CA FE F3 45 00 60 EF 80 60

55 7F 73 9C 00 60 35 80 60 29 3F 33 BF FA 00 60

E9 80 60 17 9F BB CA FE F3 43 00 60 77 80 60 2A

7F 73 9C 04 60 EA 80 60 14 3F 33 BF F6 00 60 74

80 60 AE 9F BB CA FE F3 41 60 6E 80 60 AA 9A 8E

76 00 60 9A 80 60 A8 3F 33 BF F2 00 60 68 80 60

8B 9F BB CA FE F3 3F 60 BB 80 60 2C 9F BB CA FE

F3 39 60 EC 80 60 62 36 FE BF EE 00 60 EE 03 B5

F7 6E FD CA FE F3 3D 00 60 6D 80 60 C5 9F BB CA

FE F3 37 00 60 DD 80 60 A7 3F 33 BF EA 00 60 67

80 60 56 9F BB CA FE F3 3B 00 60 36 80 60 AB 9F

BB CA FE F3 35 60 6B 80 60 53 3F 33 BF E6 00 60

33 80 60 2F 7F 5D 7F 11 60 EF 80 60 55 9F BB CA

FE F3 33 60 35 80 60 29 3F EE FB 7A 00 60 E9 80

60 17 7F 5D 7F 0B 60 77 80 60 2A 9F BB CA FE F3

31 00 60 EA 80 60 14 3F EE FB 76 00 60 74 80 60

I can not get any idea by above data and I am not sure if data is correct. PortMon can help me out as it captures each command in a separate line with detail.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Power-User

Join Date: Jul 2010
Posts: 136
Good Answers: 19
#11

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/17/2013 10:42 PM

>capture by following above wiring scheme and by using another Software named "Terminal" and what I captured is as following <snip> I can not get any idea by above data and I am not sure if data is correct. PortMon can help me out as it captures each command in a separate line with detail.

Good, it sounds like whatever wiring you have is seeing the traffic. Now you need to analyze it.

Register to Reply
Power-User

Join Date: Aug 2007
Location: Lahore
Posts: 369
#12
In reply to #11

Re: How To Capture The Data Following Via RS232 in ASCII Format.

10/28/2013 2:57 AM

Hi Bud;

As I mentioned in last post that after wire up the both modules, I started receiving the data on my Laptop via software "Terminal" but the data is not valid. Because the commands send by system to drives are not > 10cheractor and each command starts with "7E" and ends with modulus but the captured data is entirely different. I am wondering what to do. Please have a look on attached image of comm module terminal description and suggest what I should do to achieve the goal in right way.

__________________
Don't assume any thing, always check/ask and clear yourself
Register to Reply
Register to Reply 12 comments
Copy to Clipboard

Users who posted comments:

Bud (5); JohnDG (1); Signode (6)

Previous in Forum: TSOP IC in Proteus Professional   Next in Forum: More Budget Tablets Coming - Shock

Advertisement