Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trend XNC Modbus Communication

Status
Not open for further replies.

RobWeston

Civil/Environmental
Jul 1, 2011
4
0
0
GB
Hi All, I am working on a system where I am using a Trend XNC controller to communicate to 2 Eliwell ERT400 AHU controllers via a RS485 2 core network and the Eliwell BUS Adaptor 150's.
I have setup the Trend controller ok and the Modbus driver stores to receive data from the Eliwell ERT400 controllers.

I cannot send information from the Trend to the Eliwell controllers i.e. heating setpoint or ON/OFF signal etc.

I have all of the Eliwell doc's and register address details but cannot work out the right Modbus command or correct setting within the ERT400 to allow data to be accepted.

Has anyone had any dealings with this kind of setup ? any tips, ideas or info would be of great help at this point.

Many thanks
 
Replies continue below

Recommended for you

Naw, it's fine here.

Apparently you can read values from the ERT 400 controller slave to the XNC controller Modbus master, but you can't write to the ERT 400.

It's hard to find documentation for this stuff. You might consider providing links to the specific documents for these devices.

One Eliwell Modbus document that I found, here:


on page 4 mentions only the "read" function for the 03 command used for 4xxxx holding registers.

"Command 0x03: this command enables to read multiple consecutive registers (holding registers). The block defined by the protocol as holding register contains data that can be changed by the application program and that has a length of 16 bits, that is 1 word."

Most Modbus slaves declare whether specific registers in the 4xxxx range addressed by the 03 command are read or read/write.

Does this mean that ERT 400 interpret 03 as read-only for all registers or that it's poorly documented? I don't know.

Further down, the 10(hex) [16 decimal] command is stated to do writes to multiple registers.

"Command 0x10: this command enables to perform writing operations on several and contiguous registers (holding registers)."

Page 10 has an example of a "write a variable" using 10h

Do these instructions cover the ERT 400 specifically? The document doesn't say.

I'd suggest you try the 10h (16 decimal) command to write to the ERT.
 
Hi danw2

Thanks for your rely,

I have the documentation for the ERT 400 Which I have attached.

The documantation states to write to a register to use function code 16, I think I have got my head around it to a point, the registers that I am interested in are....

2049 Cooling Setpoint
2050 Heating Setpoint
16525,8 Cooling Mode
16525,9 Heating Mode
16525,15 On/Off

The parts im unsure of as I have tried many differnt commands are in some doc's I have read I may need to change the register no. to write to some docs say use the ones stated, some say subtract 1 from the stated and some say if the register no. is above 10000 disregard the 1st digit ?
What I am thinking is for the heating/cooling setpoints if for instance unit address is 02 and trend cooling setpoint is assigned to input 10 in the modbus driver...

E002#F16#A2049#N01#I010#C05

If A2049 is the correct register no. to write to.

and for the 16525 digital status's I was thinking of setting unp a D TO A in the Trend software and sending the analogue value to register 16525 and letting the ERT 400 convert it back unless you can suggest another way ?

I'm open to any suggestions and happy for any ideas and input

Thanks
 
 http://files.engineering.com/getfile.aspx?folder=a71573aa-e50a-4cdc-897e-266ba5bf888e&file=8MA10048_ERT400_Modbus_ENG_11-04.pdf
1) My previous comment has some, shall we say, slurring, due to having celebrated a 3 day weekend here in the US. Let me restate some things.

03h command is always a read command
10h is always a write command

As you can see in the Modbus document you provided, the slave map has a RW column indicating (declaring) whether the value is read or read/write.

Those you've selected are RW so you can write to them.

2) I'm glad that you can figure out the device slave node address (section 2.4), it isn't clear to me at all.

3) The issue with 'one offset' or 'subtracting one' goes to the issue of whether the addressing starts at one or zero.

register 1 is at address 0000
register 2 is at address 0001
register 3 is at address 0002
register 4 is at address 0003

In this document, there is an 'index' column. It starts at one. But programmers usually start memory addressing at zero. So is the number given for a location an address or a register? Interpretation varies by manufacturer and implementer.

You write an integer value (within its valid range) to 2049 and see if changes. If it doesn't, offset the register address by one and try again.

4) The addresses are clearly decimal register (addresses), not hex. So register 16252 decimal needs a Modbus master that can handle a (4)16525 register address. Most modern ones do. The leading (4) is implied for holding registers, is not always stated, to distinguish the memory from input registers (3). It's a legacy thing.

5) >What I am thinking is for the heating/cooling setpoints if for instance unit address is 02 and trend cooling setpoint is assigned to input 10 in the modbus driver...

I'm not sure what you are saying.

These are controllers, so every unit has an input (PV) and a cooling setpoint (SP), which is the definition of a controller. So I'm not sure how a "cooling setpoint is assigned to input 10"? Aren't these single input devices?

Did you mean to say, write the value, 10°C, to the device at address 02, to be used as the cooling setpoint?

For that case, register 2049 (decimal) is the correct register.

10°C needs to be in a format that accounts for its 10^-1 exponent, where 100 (decimal) would be interpreted as 10.0.

The actual modbus packet for that is
device address (02), function code (10h), starting address (2049 = 0801h), quantity of registers in bytes (02h), value (100 = 0064h), CRC

6) >16525 digital status's I was thinking of setting up a D TO A in the Trend software and sending the analogue value to register 16525 and letting the ERT 400 convert it back unless you can suggest another way ?

The idea is that 16525 is a bit packed word.
LSB = 0
MSB = 15
bit 8 = cooling
bit 9 = heating
bit 15 = on/off

0000000100000000 = bit for cooling

You read the 16 bit word at register 16525 and compare it to known word values for whatever those bits represent, if you don't have logic masking tools to determine the bit itself.

I'm not at all clear on how converting to analog would do anything.

 
Hi Danw2

I admit that don't have much dealings with modbus commands and setup,
I am dealing with the Trend IQ3 XNC controller as my master device and the driver within the Trend controller uses its own format for reading and writing commands which it then must convert to the format you have indicated in your post,
your points are valid and are very helpful to me in understanding what is going on, but I need to get this system working via the Trend XNC device.

E002#F16#A2049#N01#I010#C05 is the format of the command within the Trend XNC

E = Unit address
F = Modbus function code
A = Register address
N = Number of values Read/Write
I or O = Trend Internal Ref. (explained below)
C = Format of message (i.e. word, bit mask, etc.)

I or O = within the trend controller like you say with all controllers there is PV's, Setpoints, Digital status's the Trend system is in my opinion back to front in the respect of the modbus driver has 2 tables Inputs & Outputs --- Inputs are sdetpoints/digital on/off commands that are sent to the 3rd party device and when we write them it is then an input to the 3rd party device from the Trend controller. Outputs are items that are wired into the 3rd party device like the supply air temperature sensor or the filter dirty DPS etc and when we read them it is then an output from the 3rd party device to the Trend controller.

So What I was saying when I stated the heating/cooling setpoints if for instance unit address is 02 and trend cooling setpoint is assigned to input 10 in the modbus driver...

Input 10 is actually a software setpoint adjustment knob within the trend controller which could be for instance Knob #2 but is then assigned to Input 10 within the driver ready for writing to any of the 3rd party modbus devices

I know this is a back to front and weird setup but it is all I have to work with on this site!!!

When i go back to site I will be setting up the comms direct to my laptop and using a program callded MODSCAN reccomended by the 3rd party manf.. which will be using the format you have indicated to me so I am very grateful that I now know the commands that the trend device should be sending and will hopefully be able to adjust it to suit.

My comment about reading and writing register 165252 is based on another post on another forum where a guy thinks that if I am able to read a whole number from 16525 within the 16 bit range then I may be able to write any combination of the desired bit states with 1 modbus command for instance.

Unit On & Heating Mode Selected 16525,15 & 16525,9
so In Decimal format ,15 = 32768 & ,9 = 512
so he thinks if I can write 33280 to register 16525 it shoul adopt the 16 bit state of 1000000100000000
I'm not sure this will work but anything is worth a go!!

PS the manufaturers got back to me yesterday after i emailed there tech dept. 3 weeks ago and apparently I need to Add 1 to the registers to write to them.

Aslo where you have stated the leading (4)16525 just to clarify would I need th write to 416525 + 1.

Many thanks for your thoughts, expertise and Info
 
Status
Not open for further replies.
Back
Top