modbus and DL205 (250-1 CPU)

snaggletto

Member
Join Date
Jul 2004
Posts
61
Hello,
I've got some CNC control software (G-Code interpreter, etc) used for retrofitting lathes, mills etc... It has the capability to be a modbus RTU master and can communicate with PLC's as a slave and utilize their IO.

According to the DL250 CPU manual, you have to setup the 2nd port on the CPU (15pin high density) and set it to modbus. All I have right now is the standard 9pin to 'phone jack' programming cable that plugs into port1 on the CPU.

Will modbus only work through the 2nd port (15pin HD)?

AD looks to be out of stock of the cable that I need. However, they do have;
http://web1.automationdirect.com/adc/Shopping/Catalog/PLC_Hardware/DirectLogic_205/Programming_SW_-a-_Cables/FA-15HD

Can I use this to adapt my programming cable to port 2 and then use modbus comminications? Thanks for any help.
 
snaggletto said:
Will modbus only work through the 2nd port (15pin HD)?

AD looks to be out of stock of the cable that I need. However, they do have;
http://web1.automationdirect.com/adc/Shopping/Catalog/PLC_Hardware/DirectLogic_205/Programming_SW_-a-_Cables/FA-15HD

Can I use this to adapt my programming cable to port 2 and then use modbus comminications? Thanks for any help.

Yes you have to use Port 2 for Modbus. Port 1, which is the 'phone jack' is a fixed port used for programming the PLC. Best thing to do is make your own cable. You can find the 15pin HD connectors at most electronic stores, such as Radio Shack.
 
Thanks for the reply. Sorry about the 'phone jack' comment. I know it's not a phone jack, but I didn't know what else to call it at the time ;) I'll look into making my own cable.
 
:) Well, that's what it is, a 6-Pin phone jack. It saves space and costs less, that works for me.
 
Ok, I bought the parts and made a cable, I used this as a guide, D2-DSCBl-1;

http://web1.automationdirect.com/static/specs/directsoftcables.pdf

I ohmed out and double checked my connections, multiple times. my cable should be good despite my crappy soldering skills.

Windows device manager, COM1 is set to 38400 baud, 8-Odd-1 and no flow control (as compared to hardware, or XON, XOFF).

DS32 V5 'setup secondary ports' is set to; port 2, modbus is selected, RTS on delay is 5ms (default) and RTS off delay is 0ms (default). The station # is 1 (but I've tried 2 also) and 38400 baud, 1 stop bit and Odd parity.

My config in my Modbus master software is setup similarly and I can open COM1 with no errors. However, whenever I try to 'read' the inputs, or do any communications with the PLC I get a 'response timed out'. I've tried upping my timeout to 1000ms with no luck.

Obviously, nobody can comment on my modbus master software, but can anybody see anything obviously wrong on the DS32/PLC setup or cable wiring errors? Thanks.
 
Presumably, you're using the phone jack port for communications with DirectSoft. To check your cable out, try setting up the 15-pin port identical to the phone jack port and then see if you can connect to DirectSoft through it.

Are you sure that when you set up the 15-pin port for Modbus, you set it to be a slave?

Are you sure identified the correct pin as pin 1 on both ends of the cable?

Are you sure your Modbus master software is using Modbus RTU and not Modbus ASCII?

You might also want to try a slower baud rate. Also, it probably doesn't matter how Windows Device Manager sets up the COM port. Your Modbus master software is probably going to overwrite it with its settings.
 
Your cable is pinned out 'exactly' as the D2-DSCBL-1? In other words, if you don't have the RTS to CTS jumper on the PLC side, he will never respond.
 
Hey,

I verified my new cable for port 2. I can connect to the PLC in DS32 on port2 just like I do with my 'phone jack' programming cable on port1. My cable has a jumper on the 9pin end and the 15pin end, just like shown in the previous link, where RTS and CTS are jumpered.

I'm not POSITIVE that it's not Modbus Asci, but I'm pretty sure it's modbus RTU.

Here is a link to some documentation for my modbus master software,

http://www.machsupport.com/MachCustomizeWiki/index.php?title=Modbus_in_Mach

disregard the ModIO stuff, that is a 3rd party product specially made for this software. There are several people that have had success using this software with DL05's and 06's.

Of special note is the section labelled "Configuring Modbus in Mach3". This is the setup/configuration pages I'm working with from within the software itself. Note the "slave address" and "starting registers". I've been using 2048 for the starting registers (as shown in the D2-250 CPU manual) and I've tried 1 and 2 for slave address (which I've matched with the address configured in DS32 in "Setup Sec. Comm port").

I know my cable is right, I've just got some settings messed up somewhere. Thanks for all the help guys.
 
I talked to another guy who has it running with his DL05 PLC. Only the DL06 and D2-260 CPU's take ASCI correct? I take this to mean that I'm dealing with Modbus RTU and not ASCI... Any other comments appreciated.
 
I got some new information;

"It has to be in Run, or you get timeout, and there also has to be a program
in memory that turns on ModBus Communications. Brian is the expert though,
he setup mine. If the ladder logic doesnt connect the C0 points to the
modbus address's, you get a timeout. Try asking on the web forum, Brian
monitors that forum, he's too busy to get here most days. He really knows a
DL5/6 well.."

It looks like I was missing a crucial part of the equation. Don't laugh, I didn't know. I'm reading about read/write from network instructions in the manual now. So far it seems to be geared more for making the PLC a master rather than slave... I would still appreciate advice or a point in the right direction... Thanks.
 
If the PLC is the Modbus Slave, you do not need any logic to enable the Modbus. You only need setup the port 2 configuration for Modbus as you mentioned that you did earlier.

Are you setting up starting register 2048 as Holding Register or bits? I would try Holding Register first. If you are trying bits, that could be a problem because I "believe" that the first Modbus bit in that particular model CPU is 2049.
 
CJH,

I've tried about every possible combination of settings on the software modbus master side. There simply aren't that many configuration options. I think I'm still missing something on the PLC side, as I'm new to PLC's since last week, that is highly probable.

From my last post, from the guy that actually wrote the software I'm using, he mentioned needing a program to map C0 registers to modbus addresses. He's most definitely NOT a PLC guy as his DL05 was setup for him, but I can't help but to wonder.
 
If you're trying to read inputs starting at X0, just for grins, try using a starting address of 2049 instead of 2048.

The only reason I suggest this is because in the section on 484/584 addressing modes in my DL05 manual it shows X0 - X1777 as mapping to modbus addresses 12049 - 13072.
 
Here are a couple other people that tried to help me;


"I think the best thing that I can do for you is post an example program. The program will send a16bit register that represents 16points of I/O. and to do this in Directsoft you do the following command (B2000.0)| |-------------(OUTY0) The B2000 is register V2000 and the .0 is saying close this contact if bit 0 is a one. The same thing is done on the input (X0)| |-------------------------------(OUT B2100.0) this will turn bit 0 in register V2100 to a 1 and Mach3 will read this as the switch is on....

This should get you on the right page and I will give you a program that I use on the DL06

The mod bus config page should be set up like the Pic

index.php

Mod setup.JPG (58.01 KB, 709x423 - viewed 16 times.)




Another, saying about the same thing...

"Before you can turn on/off output you need to program the coils in
the PLC to your outputs. So in your ladder logic program you will
have C0 (the coil register you write to in mach) on the left side,
and Y0 on the right side (the output). You should be setup with
slave address 1, unless your plc cpu is set to something else. The
other thing you need to setup is your start registers. You will need
to look at the documentation for the PLC CPU to find out what address
the descrete inputs (and the coils for your outputs) start at. The
plc's use octal addressing, and the start registers entered in mach
are decimal values, so you will need to convert these values."

Finally, another guy said that on my D2-DSCBL-1 cable, that I should have 1, 4 and 6 jumpered together on the 9 pin D-sub side in addition to 7 and 8 being jumpered.

I've tried loading up these simple programs IE. |B2000.0|-----(Y0), etc... but still it times out.

Can you guys understand what they are trying to tell me here? I need to map my physical IO to internal V-memory locations so that the PC software (modbus master) can read/write to my physical IO.
 

Similar Topics

I am trying to connect a DL205 PLC to an equipment monitoring network to record when the machine is in cycle. I have an H2-ECOM100 connected to a...
Replies
1
Views
1,599
Hello- what is the best way to interlock the VFD if i lose the communication link? if the drive is running and i pull the comm connection it...
Replies
2
Views
1,597
O boy- my pea brain is taxed right now... here's the issue i have a chiller that will only communicate when the parity is set to none and the stop...
Replies
9
Views
1,982
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
48
I am having a problem communicating my PLC with Drive via Modbus connection. I start by opening the port and there is no problem, but then when I...
Replies
5
Views
73
Back
Top Bottom