Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS422 Decoding

Hello,

We have an application in which we have to monitor a serial protocol between a battery management control system and modules that transfers information of voltage,current,and the temperature of each cell in the battery pack .There's no information available about the protocol, this is propietary information of the manufacturer.the intention of the project is to replace the BMS with PlC,so I need to decode this serial protocol.

Finally I measure the baudrate which is 8928,and I used a piece  code in Matlab so I collect the transfered data from modules to the controller.all of them are decimal numbers,or when I change int to char ,I can see some not readable data.,anybody have any suggestion how to find out some valuable information from these codes?  I do not have any information about parity and stop bit but I also will try to find something by changing them randomely, and see the results.I just think that by chaging and discharging the battery and see the changes on these values maybe I can recogoniyed the relation between those values and the temperature,voltage an current.

thanks 

elham

0 Kudos
Message 1 of 9
(4,155 Views)

Hi Elham,

 

If you can receive the data without any errors you now that the parity and baudrate are OK. Although 8928 baud ?!?

It would help if you post a piece of the data here.

 

Kees

0 Kudos
Message 2 of 9
(4,096 Views)

  

0 Kudos
Message 3 of 9
(4,095 Views)

Hi,

unfortunately when I try to read char data they are not readable data ,so I am not really sure that would be the correct one.But,I measure with  the oscilloscope many times the minimum width of the signal is 120 microseconds so the baudrate is 8928 but I also try the nearest standard buadrate 9600 but those data were not readable too.here you can see the collected data with another software.moreover ,Im not sure about the parity and the stop bit but I try to change them and I found nothing.

0 Kudos
Message 4 of 9
(4,091 Views)

There are a number of settings other than baudrate. 

  • Number of bits which is typically 7 or 8
  • Parity of Odd, Even, or None
  • Number of Stop bits
  • Flow Control - Xon

This does not fully capture all options above.  If you read 7-E-1 or 7E1 in the document, that would infer 7-bits with Even parity and one stop bit.  Also, if there is no information on flow control, default to no flow control.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 9
(4,086 Views)

I know but unfortunatelly there is no information about them.

0 Kudos
Message 6 of 9
(4,084 Views)

You can forget the number of stopbits. The UART will take care of this. But to make it more complex the number of data bits could also be 9 !! or whatever.

 

If you connect it to a COM port at 9600 what kind of error do you get ? If you get different errors and framing errors probably the speed or number of bits are wrong. Try 9600 baud and different databits and look at the errors. Do the same for the speed you think it should be.

Once you receive only parity errors your almost there.

Just some thoughts

0 Kudos
Message 7 of 9
(4,080 Views)

Ok thank you for your help,I will try to do so.

0 Kudos
Message 8 of 9
(4,075 Views)

There's no information available about the protocol, this is propietary information of the manufacturer.the intention of the project is to replace the BMS with PlC,so I need to decode this serial protocol.


Seeing how this is a proprietary coding, it may be that they have encoded the bus.  This means that you will need to do a whole lot more sleuth work.  First, I would try to perform a few simple operations while listening on the serial port.  Setup your scope/logic analyzer to capture the bit pattern for some simple commands like an ID query.  Watch what is sent along with the reply from the instrument.  I did mention that typically the bits are 7-8; however, they could be almost any length.  You might even be able to see any termination characters that were used as well.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 9 of 9
(4,074 Views)