adccommunitymod (AutomationDirect) asked a question.

Minor Modbus application

Created Date: June 25,2007

Created By: clintonp

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I'm using a DL06 for a standalone OEM application. One of my customers is demanding a Modbus link. They want (today) to be able to read the status of four lamps. I can give them the status of 4 y-outputs, but to me it makes sense to do something more generalized and give them the ability to read a number of V-memory locations, the x-inputs, and the y-outputs. I know almost nothing about Modbus. What I think I know is that their 'master ' will interrogate the DL06 and I'll send them back a block of data. I will tell them how to interpret the data. My intention is to add a D0-DCM i/o card. (I need to find out for sure that they are using simple twisted pair and RTU, and that I don't have to provide an Ethernet connection.) I barely know where to begin. I'm thinking that their Master will assign an address to me, and that all I have to care about is that when I get an interrogation on that address, I spit out a block of data. Am I right so far? Is there a primer somewhere that will enable me to learn more about this? Will I readily be able to use another DL06 to test the link? Load one up with my application, set the other up as a Modbus master and have it tickle the address I'm assigned, and see if the data arrives? I 've done a lot of networking in my time, but most of it was back when it was hard (late 60s-early 70s). I'm thinking that this is probably a trivial application; I just don't quite know where to start... I'll be grateful for any pointers. Regards to all, Paul in WI


  • adccommunitymod (AutomationDirect)

    Created Date: June 25,2007

    Created by: clintonp

    Two quick clarifications:

    -- when I said "They want (today)... ", I didn't mean that I have to provide a solution on this date, I just mean that their initial requirement is limited, but that one might reasonably expect their requirements to grow.

    -- I'm intending to add the little comm card because I'm using one DL06 port to talk to my touch-panel, and I want to keep the other one free for PC communication -- program updates and so forth.

    Regards,

    Paul

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 25,2007

    Created by: bcarlton

    Be sure to get AN-MISC-010 from http://support.automationdirect.com/technotes.html#plccomm

    Use the left side of the spreadsheet. Set an address within the DL06 and read the appropriate MODBUS addrress which will be used by the master device to get that location's information.

  • adccommunitymod (AutomationDirect)

    Created Date: June 25,2007

    Created by: KPrice

    clintonp, Yes, your customer's master will issue the commands for the required data and your DL06 will respond. The calculations shown in the manual or the link that bcarlton listed will help you calculate the Modbus addresses to supply to your customer. I have found that simulating a Modbus master is very helpful. Look at www.modbustools.com or www.win-tech.com for simulating Modbus with your PC or laptop. Other than configuring the network address and comm settings, you will not need any other ladder logic. Although, the master may look for a range of Modbus registers, so you may need to group your PLC data (bits or words) so they are in a word or consecutive V-memory locations. Also, if your using RS422 or RS485, look at the FA-ISOCON for isolation.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 25,2007

    Created by: clintonp

    Thanks, bcarlton and KPrice, for the prompt replies. I haven't made sense of the spreadsheets yet -- tried plugging in some v-memory locations, no calculations seemed to happen...

    It looks to me as though I can put the data that they want to see in a buffer of consecutive v-memory locations, and then tell them the function to use and the address to query. It doesn't get much simpler than that!

    I suppose also that I will have to give them a way, on one of my screens, to tell my system what it's slave address is, and set that up.

    I'm unclear about what function code to tell them to use. It looks as though probably 3x is appropriate -- 'read holding registers. '

    It's going to be interesting...

    Paul

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 25,2007

    Created by: clintonp

    Do these simulator tools allow a trivia connection, such as selecting com1 as the interface and connecting a cable to the D0-DCM?

    Paul

  • adccommunitymod (AutomationDirect)

    Created Date: June 26,2007

    Created by: KPrice

    I have the WinTech Modscan simulator running now. The software allows you to select the COM port, station address, baud, data bits, parity, stop bits, and modbus protocol. You can connect your laptop point-to-point using RS232 or use a converter to go on your RS485 or RS422 network. The software allows you to monitor V-memory and C bits and also to change the values in the V-memory or change the state of the C bits, I should say the Modbus registers corresponding to the V-memory and C bits. For example, the V-memory and C bit that I just checked: V2412 calculates to register 41291, and C25 calculates to 3094.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 27,2007

    Created by: zmanvortex

    Be sure to read sheet 1 (Directions) on that spreadsheet. I had problems too until I read the directions where I had to enable Analysis Toolpack. Worked great after that.

  • adccommunitymod (AutomationDirect)

    Created Date: June 27,2007

    Created by: clintonp

    Originally posted by zmanvortex:

    Be sure to read sheet 1 (Directions) on that spreadsheet. I had problems too until I read the directions where I had to enable Analysis Toolpack. Worked great after that.

    Yeah, RTFM/RTFI -- I figured it out, suddenly it all works -- but one needed only look at the embedded formulae to see what they are up to. Now to try to make it all work...

    Paul

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 02,2007

    Created by: clintonp

    I LOVE these products, but I find configuring them and buying them to be challenging sometimes...

    I would swear that I saw a little adapter that allows for a short cable to the D0-DCM (that's what I plan to use for Modbus i/o)and that has screw connections for the cable. Anybody know what it is? The D0-DCM is too new to be in my catalog, and this thing that I'm looking for doesn't pop up as an accessory when I look up the D0-DCM on-line.

    Thanks in advance,

    Paul M

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 03,2007

    Created by: KPrice

    clintonp, I am using a DN-15TB module with a ZL-DN15TB-CBL. It makes connection very neat and easy. The DN-15TB is DIN-rail mount. I do not like to use the 15-pin connector-to-terminal block (available from other suppliers) because you either have to hang a lot of weight on the port or have it lay around in the panel (or tie-wrap it somewhere). But the pin-terminal block unit is available from www.L-com.com and may work for your application. Hope this helps.

    Expand Post
10 of 11