Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

ComBox MODBUS - Trouble writing to R.W registers

Solved!
Go to solution
Highlighted

ComBox MODBUS - Trouble writing to R.W registers

Hey guys, 

 

I am trying to talk to an inverter (ComBox XW+) through MODBUS TCP. I can read values from the Read only registers just fine, and they line up exactly with what I see on the web page interface they have. However, when I try to write a particular r/w register, I get a function mismatch error (-538172 using smithd's modbus API). Moreover, when I try to read the R/W register, I always get the value 65535. This leads me to believe there's something wrong with my device setup, but just in case, I'd thought I'd make sure that I wasn't doing anything weird in the code. Please the the image of the block diagram, as well as the manual I am using for the device in the attachment.

There's a little MODBUS note online as well:
http://solar.schneider-electric.com/wp-content/uploads/2014/04/Conext-TL-Using-Modbus-Application-No...


0 Kudos
Message 1 of 6
(2,977 Views)

Re: ComBox MODBUS - Trouble writing to R.W registers

Hey,

 

According to the LabVIEW Modbus API page, support for this library should be directed to https://decibel.ni.com/content/thread/17712.

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 6
(2,948 Views)
Solution
Accepted by topic author Shehzaada
12-16-2015 10:23 AM

Re: ComBox MODBUS - Trouble writing to R.W registers

Hey Thomas!

 

Thanks for your assistance, however, that link isn't available anymore when I try to open it.

 

In any case, this problem is solved. I was simply writing to the wrong slave ID! The other slave was present on the network but it's MODBUS map is completely different, which is why I was seeing those weird values.

0 Kudos
Message 3 of 6
(2,944 Views)

Re: ComBox MODBUS - Trouble writing to R.W registers

Hey,

 

Thanks for the great news!

 

Sorry for the broken link.  I think I missed a character in the Copy/Paste:

https://decibel.ni.com/content/thread/17712

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 4 of 6
(2,923 Views)

Re: ComBox MODBUS - Trouble writing to R.W registers

Hi, I would like some help in reading the Modbus registers of a XW+ thru a Combox,  Very new to this so need the baby steps.

 

Thanks


@Shehzaada
0 Kudos
Message 5 of 6
(585 Views)

Re: ComBox MODBUS - Trouble writing to R.W registers

Hey Newhumless, 

 

1) You can obtain the LabVIEW Modbus API here: https://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Modbus-API/ta-p/3524019

 

2) Ensure MODBUS is enabled on the Combox by using the web setup (it should be accessible via the IP address assigned to the Combox). Record the important information like Modbus Port and Slave/Unit IDs of all associated devices of the combox (The control panel (SCP) will have a different ID, the inverter/battery will have another).

3) Open a MODBUS Master connection to the device using the TCP/RTU settings, and then also use the Set Unit ID VI to set the appropriate unit ID of the device you want to talk to. That's a detail that's usually omitted in he LabVIEW API (it says that the Set Unit ID is only really used for Serial connections, but that's not exacty true in this case).

4) Use the connection reference to read/write registers of your choice.

 

Good luck, 

Shehzaada

0 Kudos
Message 6 of 6
(574 Views)