06-27-2012 01:23 AM
Hi,
I am a new user to the labview programming.
Now I am trying to read data from my power meter through RS485communication.
The attached is the labview software and the message I am trying to read.
But I have the issue that "The message that received from the meter is the same message that I have write to the meter".
Thanks to advice any instruction.
BR,
Thi Ha
06-27-2012 05:53 AM
You should set your RS-485 device to 'Auto'
Since RS-485 uses two wires for receive and transmit the receiver must be (automatically) disabled during transmit. If not you will receive the transmitted data before the data from the slave.
Kees
06-27-2012 08:59 PM
Hi,
Thanks for your prompt reply.
But I am using the Panasonic KWH meter and the user manual is attached.
For the setting of serial communication is refer to the section 4.2.3, page 27 & 28.
As there is no setting for 'Auto' and only response time is presence, could you please advice more.
Thanks.
06-28-2012 01:59 AM
Hi,
Sorry for mentioning 'device' it should be your computer interface.
The serial port you use for RS-485 communication should have a setting for Auto 2-wire connection. What interface are you using ? USB, Plug-in board ?
Kees
06-28-2012 03:16 AM
Hi,
Thanks for your reply.
I am using NI cRIO-9073 and serial communication module - NI 9871 with 10P10C-DE9 Cable.
RS-485 2-wire communication is used between meter terminal and NI 9871 modules.
Details connection as below
1. Meter terminal + to Pin No. 4 <RXD+> and Pin No. 8 <TXD+> of 10P10C-DE9 Cable
2. Meter terminal - to Pin No. 5 <RXD-> and Pin No. 9 <TXD-> of 10P10C-DE9 Cable
Thanks to advice.
BR.
06-29-2012 05:30 AM
Hi,
Your kWh device has a built in terminator resistor. You should also ad a terminator resistor at the cRIO-9073 side. See page 12 of the manual.
On page 13 you see the Transceiver enable control setting. I do not know if this is a software setting but you must be sure that this one is OK.
An error in the manual (imho) is the absents of the 0V connection between the devices. When you have isolated ports (like your kWh device) it can happen that a RS-485 connection will not work without a 0V connection. I always suggest that the 0V connection is used in every RS-485 connection.
Kees
07-02-2012 10:14 PM
Hi,
Thanks for your reply.
I have set the RS-485 transceiver mode into "Wire2/Auto" in the software setting.
But I think there is some issue to read the message from my meter to the labview.
Please refer to the attached command message,
1. Refer to message 1, reading the electricity rate, I have received the status message "1073807339" is received when I set the "number of bytes to read = 1" and the error message "-1073807339".
2. Refer to message 2, setting to the electricity rate, the command message is successfully recieved at Power meter and confirmed by checking the electricity rate. But the error & status message is received.
Error and status messages can find in the message file.
Thanks to advice.
BR,
Thi Ha
07-03-2012 02:52 AM
Hi,
The error message you get is a 'Time out message'. Reading one byte with the first read can also be result from a connect or power-up.
Be sure that you disable the Termination character setting.
The problem you have now is that you do not know if the problem is HW or SW related.
Maybe you can try to test this with the ModBus Loopback command. Hex data: 0108 0000 8844 8638 (the bytes 0x88 and 0x44 are user data)
With this command you do not have to worry about correct addresses. This should always work with a ModBus slave.
Kees