Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Modbus configuration issues
PostPosted: Sat Oct 19, 2013 6:50 pm 

Joined: Sat Oct 19, 2013 6:19 pm
Posts: 8

Offline
First off, I'm new to most of this: iX, Modbus and PLCs. So any patience is greatly appreciated. Secondly I have poured over the documentation for just about everything related to what I'm doing and am still stuck.

I am currently working on my first HMI project for a small hydro site (family owned). My background is in software so the C# foundation in iX is what drew me to it. Here's my setup:

iX T12B (not that it's relevant at this point)
Ethernet Network
Koyo/DirectLogic DL06 with H0-ECOM100 Ethernet Adapter.

Since iX only communicates with Koyo via Serial, I have chosen to go with Modbus which the Koyo supposedly supports just fine.

As part of my debugging, I used two different utilities (Modscan64 and Simply Modbus TCP) to verify that I could retrieve register values via modbus over ethernet. I was concerned that the DL06 ECOM100 adapter was not being configured correctly. By pointing the utility at the PLC's IP address, setting the slave ID to 1 and using the modbus command 03 to access register 44106 (decimal) or V10011 on the DL06, I was able to retrieve the BCD value of 610 which was the current value set via the DirectSoft 5 debug tools.

Attachment:
File comment: Modscan utility showing correct value at requested register.
modscan.JPG
modscan.JPG [ 51.76 KiB | Viewed 5154 times ]


Having verified that registers were available via Modbus I moved over to iX Developer. I set up the MODICON MODBUS MASTER controller in iX as shown in the attached screenshots (ModbusController). I proceeded assuming that the "node" value corresponds to the typical modbus slave ID. I set up the PLC IP as the station.

Attachment:
File comment: Modbus settings in iX
modbus config.JPG
modbus config.JPG [ 69.63 KiB | Viewed 5154 times ]

Attachment:
File comment: Modbus Stations in iX
modbus stations.JPG
modbus stations.JPG [ 52.14 KiB | Viewed 5154 times ]


Under Tags I have 44106 set under the ModbusController Column. The data type is set to int16. It's BCD on the PLC but I figured it would come across as an unconverted INT and I could deal with it later if I got it working. It was my understanding that nothing else was needed. So to test I created a text field and bound it's Value to the TagId ("TestTag").

Unfortunately, when I run the project I get nothing. The text field reads "0". I'm not sure where to go from here. I've poured over the DL06 and ECOM100 documentation but that side seems to be working. I've also dug through the iX manual reading about controllers and tags. I've read the modbus driver documentation over and over but find that the driver does not seem to correspond to everything else I'm reading about modbus. For example, is the modbus command (03 for example) handled behind the scenes?

I've played with most of the settings in the modbus controller with no effect. I feel like I must be missing something small.

If anyone can provide any advice or suggestions I would be HAPPY to hear.

Thank you!


 Profile  
 
 Post subject: Re: Modbus configuration issues
PostPosted: Mon Oct 21, 2013 8:52 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
You have the Modbus Master addressing set to use Decimal. Which means that the address range for the Holding resisters is 400000.0 - 465535.15.

By using the 44106 address you are referencing the Coil status registers (000000 - 065535), which I do not think you want to do.

The controller driver documentation tells you the address ranges when you have the driver set to use Hex or Decimal. I think you need to change the Modbus Master addressing to Hex.

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Modbus configuration issues
PostPosted: Mon Oct 21, 2013 12:21 pm 

Joined: Sat Oct 19, 2013 6:19 pm
Posts: 8

Offline
Thank you for your reply. I think this is the right track but it's not quite right. The address I'm using, 44106, is a decimal address converted from Octal. In the PLC the address is V10011 which converts to 4105 in decimal which gets added to 40001 according to the automation direct documentation which creates the 44106 that I'm using.

In the two modbus debugging tools I'm using 44016 provides the result I'm looking for. I've tried turning it into 444106 to see what happens but I had no luck. I've also just tried switching to HEX and using 44106 with no luck. Based on the modbus debug tools I don't see how I can get another significant digit into the address.

I'm continuing to dig into this line of thinking but the addressing scheme in the modbus driver documentation seems to be consistently 10X what the AutomationDirect addressing scheme is. The AD scheme seems to work with generic modbus tools so I know that address works in some form. Am I using the right modbus driver?

Thanks.


 Profile  
 
 Post subject: Re: Modbus configuration issues
PostPosted: Mon Oct 21, 2013 1:46 pm 

Joined: Sat Oct 19, 2013 6:19 pm
Posts: 8

Offline
So after some additional experimentation I now am able to retrieve the value that I was after. My explanation is frustrating but it seems to be working.

The DL06 PLC modbus documentation states that the Octal Address (V10011) should be converted to decimal (4106) and added to 400001. Which gave me 44106, which would never work. Upon the suggestion of a colleague (who is NOT familiar with iX) I changed my address to 44105 and was suddenly able to read the value.

Apparently my PLC start address is 1-based. :(

Changing the start address setting to 1-based now allows 44106 to work properly.

I'm not sure why the documentation states that it needs 6 digits for the address. That doesn't really make sense but I'm up and running now.

Thank you for the suggestions!

Aaron


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: