RS 485 Communication

Pooyan

Member
Join Date
Feb 2010
Location
Canada
Posts
11
Hi,

I am using a PLC (XGB-DN16S). The problem is to make it talk to an Omega PID controller and read the process value located at 1000h.

I am using mod bus on RS 485 for communication. The wiring is right and I have the correct parameter settings (baud rate, stop bit, etc).

The communication is not happening though; there seems to be no frames being sent back and forth (I created a read frame under P2P setting). The tests I use was :

XG PD Diagnosis tool : Frame monitor and Oscilloscope.

Please help. I am patiently waiting.
 
I might be able to help you if you can provide some additional details, such as:

1. A link to the manual for the PLC.
2. A model number for the Omega part.
3. A link to the manual for the Omega part.
4. A description of how you wired things.

Some things that I can think of:

1. Try swapping the wires.
2. Address 1000h could also be known as 34097 or 44097 depending upon if it is FC3 or FC4. You may also have to address it in decimal as 4096.
3. The format may not be U16. It could be part of a dual register number format such as U32, BCD or float, where you would have to read two consecutive registers and the first may contain a '0' for the data.

Good luck. If you provide those details, I will look at it again later.
 
My prayers are answered

Thanks for your reply, I really sense you are someone with the knowledge:

PLC Hardware - DN16S (for the communication c/net module go furthur down in this link page)

http://www.4shared.com/document/Qjvhqiua/XGB_Hardware_Manual_090309_.html



cnet I/F ( RS-485 and RS-232) on this PLC:

http://www.4shared.com/document/Q96_5yIk/XGB_Cnet_10310000736_English_V.html

XG5000 is the software tool that is used to write and download PLC program and parameters....XG-PD is used to set the network parameters. there is utility Frame

monitor in there which currently does not show any frame exchange:

http://www.4shared.com/document/-HR7avrm/XG5000_ENG_V13.html

PLC Instruction set:

http://www.4shared.com/document/mtGoucwH/XGKXGB_Instructions_and_progra.html


This is the PID controller (model CN7663):

http://www.4shared.com/document/fMt2-7_7/CN7600_full_manual.html

Sample LS PLC communicating with a device called VFD. I have basically followed the settings for a read packet on 1 station.

http://www.4shared.com/document/TvWwRfix/VFD_comm__XGB-iG5A_.html



This is the Ethernet (not really necessary for this case)
http://www.4shared.com/document/HS4hMu0f/XGT-FEnet_ENG_V16.html

My sample P2P block:

http://www.4shared.com/photo/Ery4AyWc/P2P_Block.html

XG5000 program with CLK
http://www.4shared.com/photo/7a0opdgW/clk_added.html

XG-PD parameters
http://www.4shared.com/photo/Cp-5TXGx/parameter.html
 
Try reading address 0x44096. If that does not work try reading 0x44097. The Omega manual indicates that the function code to read registers is 03, which reads 4x registers. The format of the addresses in the manual is hex, indicated by the H at the end of the numbers and the fact that some of the addresses contain the numbers A-F. Normally, Modbus starts at 40001 when in the 5 digit decimal format, but the LS literature shows that they start at 0x40000. When numbers are given in hex, they start at 0 and need to be offset by 1 when converted to decimal. Following that, 1000H is 44097, or 0x44096 in the LS. You know that it is 0x44096 and not 0x34096 because of the function code mentioned earlier.
 
I don't see anything

I tried those addresses 44097 and 44096. I think the problem is more fundamental because I do not see anything from the sys diagnosis -> Frame monitor utility (search for 'frame monitor' in cnet).

And also when I run my PLC program with the clk, value of register D0006 is 0.

It is like the RS 485 module is not even on, otherwise it would have interacted at least a bit.

if you look at the presentation file (sample file with the 'VFD') it shows that:

modbus address = value address on device - 1

and in their example, reading x00007 (acceleration time) was mapped to x30006. It mentions that Modbus word input area is from x30000. Previously, I used 30000 for this reason and also because in the past when I was interfacing my HMI to PLC 3X addresses were used to access regs in read-only fashion and 4X for R/W from and to registers. That is what I understand.
 
I tried those addresses 44097 and 44096. I think the problem is more fundamental because I do not see anything from the sys diagnosis -> Frame monitor utility (search for 'frame monitor' in cnet).

And also when I run my PLC program with the clk, value of register D0006 is 0.

It is like the RS 485 module is not even on, otherwise it would have interacted at least a bit.

if you look at the presentation file (sample file with the 'VFD') it shows that:

modbus address = value address on device - 1

and in their example, reading x00007 (acceleration time) was mapped to x30006. It mentions that Modbus word input area is from x30000. Previously, I used 30000 for this reason and also because in the past when I was interfacing my HMI to PLC 3X addresses were used to access regs in read-only fashion and 4X for R/W from and to registers. That is what I understand.

Sorry, I don't have a solution to this. However, I am having a similar problem with RS-485 communication with a couple air compressors. Their set up as MODBUS slaves, but I can't squeeze an ounce of data out of them. The rest of the network works fine. It's like the communications module is non-existant, with the exception of the connection port!

Also, not all temperature controllers have DH-485, even though manufacturers literature may indicate it. I have a few controllers in the plant that seem to be different "flavors". They work OK, but some features (communications, Auto-Tuning, Ramp-Soak, etc.) may not be included.
 
I am not sure about the fundamental issues or using the LS product, but I do know from the Omega literature that reading the process variable at address 1000H, you need to use function code 03. That translates to 44097 when addressing in decimal. I am pretty sure that translates to 0x44096 in your 'P2P' setup.

What you need to do is get ModScan32 and ModSim32 for your PC and an RS-485 converter that either plugs into the USB port, or to the RS-232 serial port if you have one. ModScan32 simulates a Modbus master, so you would use that to try to read address 44097 from the Omega PID controller. That will assure you that the device is working. You do the same with ModSim32, which simulates a Modbus slave, but in this instance, you connect it to the LS PLC and try to read from the PC.
 
Thanks for your reply.

I have an RS 232 to USB converter that goes between computer and PLC.

So in this case I can use Mod sim32 and make the computer a slave?

and the PLC as master? what do I send from the PLC?
 
You need a USB to RS-485 converter to do this test. What you have will not work. With ModScan32, the PLC is the master and with ModSim32 the PLC is the slave. If you are testing a master device such as your LS PLC, you use ModSim32 to make the PC the slave. To test a slave device such as the Omron PID controller, you use ModScan32 to make the PC the master.
 
using oscilloscope

Hi there,

I see some frame pulses on a oscilloscope coming out of the RS 485.

I want to decode it and verify that it is the frame I have set up on XG PD to send.

It seems that it is really producing signal with 0D and 0A and 2 stop bits at the end...the rest of the frame is also ambiguous.

Other than using a sniffer what can I do since I have no access to RS-485 converter (usb)?
 
Rguimond,

Are you trying to communicate with Ingersoll Rand compressors? If so can you give details of the compressor? I will be able to help you out in this regard.

Rex.
 
RexIR
I HAVE A PROBLEM TO COMMUNICATE xgt PANEL WITH plc xgb
CAN U GIVE ME an idea about the protocol between them ???
plzzz
ty
 

Similar Topics

I'm trying to write a data in Arduino using MODWR function block .I used the code I got from online for both PLC and Arduino. I made the wiring...
Replies
4
Views
101
Hello, I need to access the bits from the fire system control panel through RS-485. So, I used Read Var block to read from the panel...
Replies
0
Views
185
Good evening guys, Please, I need help. This is my first time working with RS485 comm and I dont know what to do. Please, see attached files. I...
Replies
0
Views
411
I am having PLC S7 200 smart model- ST 30 . In which I am getting problem in modbus communication of PLC and VFD via built in RS 485 port of PLC...
Replies
3
Views
746
Hi all, I had a setup with 2 Micrologix 1100 connected to a Panelview C300 over DH-485. I was mandated to upgrade the HMI, and proposed to...
Replies
5
Views
888
Back
Top Bottom