Meanwell DRS-240 comms with ControlByWeb X404

I'll apologize up front, I only dabble in MODBUS as a fraction of the monitoring and control I do, I'm not an expert but I often get things done but this time is not one of them.

I'm attempting to comm with a Meanwell DRS-240 power supply using MODBUS over RS-485, I've used several RS-485 RTU - TCP bridges with my scripts with no success. A co-worker picked up a ControlByWeb X404 for a project and I borrowed it and tested . The X404 is able to discover the DRS-240 at it's default address, 131, as it is the only device on the wire, but I cannot poll any holding or input registers with the X404. That it is discovering it tells me that wiring and comms *should* be OK. I increased the timeout on the X404 to 1000ms and I am specifically interested in the input registers and when I try to read the likes of 40050, 40060 I get nothing. I've tried it configured with one or two registers, I've tried offsetting the register by 1. Nothing is yielding any output. I'm not sure where to go for the next step of troubleshooting. Suggestions?

DRS-240 Pages 21-24 of interest:
https://www.meanwell.com/Upload/PDF/DRS-240,480-E.PDF

X404 Pages 81-2 of interest:
https://www.controlbyweb.com/x400/x-400_users_manual.pdf
 
Sometimes you need to swap the A and B lines on RS485. I think you already tried that.
I use a lot of pro-face touchpanels, and the 1st address I always read from a temperature controller is (decimal) 400001 using the generic modbus driver.
The list on page 21 of the DRS-240 manual shows hexadecimal addresses. So when you want to read VOUT_SET (hex 20, which is 32 decimal) the address that I would read for that register would be 400032+1 (always 1 higher because of the offset), so actually 400033.
 
Thanks, I don't think it's a signal polarity issue and probably not a signal issue because the X404 autodetecting its address at 131. I set up another unit with a Moxa MB3180 and using Modbus Poll, ran a scan on it, looked at the packets it was sending and it looks right, I'd think that sending ID 0x83 a function code 0x03 to read registers in a scan including 0x0020 and 0x0040 would get results but I am not getting responses nor errors. I have a RS485-RS232 adapter, I'll have to try that.
 
I sometimes encountered a problem with slaves that don't support multi read function codes. Then I set the driver in Pro-face manually from write function call 10 (multiple) to 06 (single) in the 40000x area......
Maybe you can try that also......

single.jpg
 
Thanks! The DRS pitches an error when you query non-existent registers in a bulk request, so your point is correct. That is going to make coding a client harder.

I got Modbus Poll app and finally got an error message out of it and that led me to the right way to put the address into Modbus Poll. Now all I have to do is figure out how it works with Python. I could have sworn I used all possible combos of hex and decimal addresses trying to talk to it with my code. So far I have it working with MBP app and with Moxa MB3180 and a ZLAN 5143D
In case it helps anyone, including future me, this is what I ended up with settings and decode output:

Modbus Poll settings
Unit ID 131 "04 Read Input Registers (3x)" hex, addr 50 "PLC addr 30081"

Decoded successful request:
Part of Data Package Description Value
00 00 Transaction identifier 0x0000 (0)
00 00 Protocol identifier 0 = MODBUS protocol
00 06 Length 0x0006 (6)
83 Unit identifier 0x83 (131)
04 Function code 0x04 (4) - Read Input Registers
00 50 Starting address Physical: 0x0050 (80)
Logical: 0x0051 (81)
00 01 Quantity 0x0001 (1)

Clear as mud, let's use decimal here, hex there, then offset this from that. This makes me like SNMP even more.
 
Wow, thanks very much for your post. Luckily Google found it because I was starting to pull my hair out trying to talk to this DRS-240 I have here. WHY is it at ID 131? The manual says ID 0-3, and based on the fact that the jumpers are all open it should be ID of 3. Sure enough, I put in ID 131 into my code and it started working. Just unreal.

Did you ever find out why that's the address?

Thanks, I don't think it's a signal polarity issue and probably not a signal issue because the X404 autodetecting its address at 131. I set up another unit with a Moxa MB3180 and using Modbus Poll, ran a scan on it, looked at the packets it was sending and it looks right, I'd think that sending ID 0x83 a function code 0x03 to read registers in a scan including 0x0020 and 0x0040 would get results but I am not getting responses nor errors. I have a RS485-RS232 adapter, I'll have to try that.
 
I just found the answer to my own question. The manual does state that the if the jumpers are all open (default) then it would equate to 3, but you have to add it to 0x80 making it 0x83 and therefore 131! Problem solved, but would have been nice for them to mention that in the manual for a MODBUS noob like me ;)

Wow, thanks very much for your post. Luckily Google found it because I was starting to pull my hair out trying to talk to this DRS-240 I have here. WHY is it at ID 131? The manual says ID 0-3, and based on the fact that the jumpers are all open it should be ID of 3. Sure enough, I put in ID 131 into my code and it started working. Just unreal.

Did you ever find out why that's the address?
 
I could use some help with modbus on the DRS. Im powering an ABB controller (XIO) with the DRS 240 24. The controller doesn't show system voltage and I would like to monitor the controllers system voltage in case of power outage through remote comms.

Im able to see voltage with modbus poll with slave address 131 using hex registers.
Slave address 131 says response OK. But when I connect it to the XIO controller with that slave address, all I get is errors and a response status of 255 in a holding register.

I assume I'll use 96 or 97 as starting registers for output voltage?
Also, is it 32 bit? 16 bit? Float? Integer?
 
Maybe it is 32 bit (2 16 bit words combined). Read 1 word higher and 1 lower and see what is in those registers (if it makes sense at all)
It can also be signed iso unsigned.
Is it not in the manual, see the modbus addresses list of the device
 
Top