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.
 
Top