Pages: [1]   Go Down
Author Topic: Serial Interfacing with HXE12 electrical meter - IEC62056-21  (Read 2432 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to do serial communication with the optical port on HXE12 electricity meter, I have the software provided with the meter and it is working fine to fetch the data from it.

The settings in the software
IEC62056-21
Optical port
COM1
300

The problem is when i try to access it from hyperterminal i am unable to get any response, i have managed to get a serial dump when the software provided by the meter company is running.

Serial Dump
/?!<CR><LF>
/NEG4HX<CR><LF>
<ACK>041<CR><LF>
<SOH>P0<STX>(11111111)<ETX>`
<SOH>P1<STX>(00000000)<ETX>a
<ACK>
<SOH>R2<STX>C712()<ETX><ETB>
<STX>(00000000000000000000000000000000)<ETX><STX>
<SOH>B0<ETX>q
/?!<CR><LF>
/NEG4HX<CR><LF>
<ACK>040<CR><LF>
<STX>C.1.0(00000000)<CR><LF>
1.8.0(000000.40*kWh)<CR><LF>
1.6.0(000.781*kW)<CR><LF>
1.6.0.1(000.000*kW)<CR><LF>
!<CR><LF>
<ETX><ESC>
<SOH>B0<ETX>q

When i try to send the same command /?! to initiate the connection i am unable to get any response. there are several special characters in the dump before the start of any command.

I am relatively new to this field so any help would be highly appreciated

Thanks
Ahmed
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have managed to figure out the special characters in the start the ASCII the starting characters in 127 (DEL). Could the Stop bits be affecting the communication because I am still unable to get any response from the meter.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I realise this thread is a bit old, but seeing that no-one has replied and in case you're still trying...    ...I've had some limited success trying to do what you are doing, albeit with a different make/model of meter.

I'm assuming you're trying Hyperterminal from a PC, in which case try initial settings for the com port as follows:
300 bits per seconds, 7 Data bits, Even parity, 1 Stop bit and probably 'None' for flow control (unless the serial converting hardware you're using dictates otherwise..)

You will also need to ensure that the data you send is terminated with carriage return and line feed characters.

Without the spec for your meter I'm assuming it will start communicating at the lowest speed (300 baud) - however line 2 of your dump reads:

/NEG4HX<CR><LF>

where the '4' indicates that the meter is negotiating for a faster speed of 4800 (0 = 300, 1=600, 2=1200, 3=2400, 4=4800) so it may be using a different default.


I used Realterm instead of Hyperterminal as it allowed for sending pre-configured strings of data and also allowed for the baud rate to be changed more easily mid conversation if required.

Hope this helps.
Logged

Pages: [1]   Go Up
Jump to: