Modbus RS485 to CAN configuration

Hello everyone,

I am very new to modbus and so I apologize if I don't use all of the lingo correctly.

I have a flowmeter that can communicate vis RS485 and I have a I-7530A-MR modbus to CAN converter. My logging system is CAN based so I am using the converter for the purposes of integrating the flowmeter into my data set.

The modbus settings for my flowmeter are:

Hardware address : 9
Integer Multiplier: 1
From the manual, it says all data is stored in 2 16-bit registers with length 2.

I am interested in reading register number 65 which is 0x41 and type 32-bit integer. This is just temperature because I figure it would be best to obtain data I can verify easily.

The communication modes available on the I-7530A-MR are:

Normal
Pair Connection
Modbus Master
Modbus Slave
Uart Switch

I am assuming that I need to set the I-7530A-MR to Modbus Master in my config.
I have the following options in settings:

Slave Node ID: 09
Function Code: 03
Start Address (high): 41 (not sure if this is correct for either high or low)
Start Address (low): 41
Word Count (high): 02
Word Count (low): 02 (not sure if this is what the flowmeter refers to as length 2 or not)

My hope is that I can get transparent communication for logging data from the flowmeter into my CAN network with this setup.

Again I am completely new to this, so as of right now I really don't know what I am doing so any help would be incredibly appreciated!
 
HI

Well thanks for sharing here such datas...
May we know "logging" system that you referring to...
One should first draw kind of topology/architecture of studied system..
For instance Iam not sure about Master config that you setted up...
What is the result of your work..
Is the communication and datas treating is transparent..
Manuel for the Modbus /Can converter is quite good..
Have you consulted it?
Accord g to this manual.. Plc or kind of datas treatment system would be Master on
Modbus RTU.
Regards
James
 
Good idea to pick temperature that will give you a value that you know whether it is correct or not.

I would think that the multiplier factor would be 0.1 for temperature so that the integer value * 0.1 would read out in tenths of a degree.

The data entry mimics a Modbus message that has two bytes for the start address and two bytes for the word count.

Try:
Slave Node ID: 09
Function Code: 03
Start Address (high): 00
Start Address (low): 41 or 40, depending on the slave's map
Word Count (high): 00
Word Count (low): 02 (this is the number of contiguous, consecutive registers that you want to read in one read transaction. If these are 32 bit values that are two Modbus registers, then you need to read a minimum or 2 registers).

If the temperature register is (4)0065, that's a one-based register with the register map starting at (4)0001. So 65th register above register 40001 is (4)0065.

Hexadecimal addresses are zero based and start from 0x0000.

The equivalent hexadecimal value for the 65th register above the start address of 0x0000 is 0x0040
0x0000 = 0 = 1st
0x0001 = 1 = 2nd
0x0002 = 2 = 3rd
0x0003 = 3 = 4th
...
0x0040 = 64 = 65th
 
Thank you both for the quick responses. I tried the parameters that you posted and I don't seem to be having luck. Just in case I am referring to something incorrectly, I attached a screenshot for the register map for the flowmeter as well as the interface for the I-7530A-MR.

Here is a screenshot of the register map for the flowmeter.

Register Map.jpg

Screenshot of the interface for I-7530A-MR
i-7530a-mr.jpg

and a screenshot of the test interface:
Test interface.jpg

The test interface can be set to either:
Normal
Pair Connection
Modbus Slave

I know I am asking a lot here so I really appreciate the help.
 
Is that UART CAN utility that you using throw this work?

Did you perform communication test before..if yes what is the result..

Looks like you need to set Port Comm PARAMETERS correctly for transparent communication ...
According to OEM manual .
I have them set according to the defaults in the manual:
Baud Rate: 38400
Stop bits: 1
Parity: None


The UART utility is just being used to verify communication. I don't have a filter defined so, I am assuming that means all CAN traffic goes through.
 
Suggestions for Modbus appear to be correct.

Your screen shot for the Modbus setup is for Function Code 01 (not FC03), so it shows bit count (FC01), not register count (FC03). I assume you're on the page that is for FC03.

I have no idea what the CAN side should be, I've never used it. Nor do I know what the "normal/pair/or slave" setting does.

The map shows temperature, Deg C at 0x0040 and temperature, Deg F at 0x0041.

The drive multiplies the temperature in tenths of degree by 10, so the receiver has to multiply by 0.1 to get back to normal.

If you populate the Read IO page, doesn't that populate the test interface page with teh ID/FC, start address, and word count? Then you click "Send". I'm asking because every device is has its own method. I'd think the received reply would be shown down where the @ characters are, but who knows?

If this is serial RS-485 or RS-232 on the Modbus side then you have to have the serial setting identical on both ends. 485 (+) is supposed to wire to 485(+), (-) to (-) but some vendors implement it the opposite of others, so their (+) connects to (-) and vice versa. No way to predict, but if it doesn't work try swapping (+) and (-) on one end and see if it works. Slave devices almost always need to power cycle after serial settings are changed before the device recognizes the changes.
 
Suggestions for Modbus appear to be correct.

Your screen shot for the Modbus setup is for Function Code 01 (not FC03), so it shows bit count (FC01), not register count (FC03). I assume you're on the page that is for FC03.

I have no idea what the CAN side should be, I've never used it. Nor do I know what the "normal/pair/or slave" setting does.

The map shows temperature, Deg C at 0x0040 and temperature, Deg F at 0x0041.

The drive multiplies the temperature in tenths of degree by 10, so the receiver has to multiply by 0.1 to get back to normal.

If you populate the Read IO page, doesn't that populate the test interface page with teh ID/FC, start address, and word count? Then you click "Send". I'm asking because every device is has its own method. I'd think the received reply would be shown down where the @ characters are, but who knows?

If this is serial RS-485 or RS-232 on the Modbus side then you have to have the serial setting identical on both ends. 485 (+) is supposed to wire to 485(+), (-) to (-) but some vendors implement it the opposite of others, so their (+) connects to (-) and vice versa. No way to predict, but if it doesn't work try swapping (+) and (-) on one end and see if it works. Slave devices almost always need to power cycle after serial settings are changed before the device recognizes the changes.
I took a screenshot after populating the read command table with the correct settings as you pointed out earlier. It just defaults to FC01 for each new command. I will give the wire swap a try as well and see if anything changes.

Really appreciate all of the help and insights. I'm sure with a little bit more headbanging/questions/help it'll get there. I'll report back with any new findings.
 
Here is a screenshot of the register map for the flowmeter.

Register Map.jpg
This register map seems wrong or perhaps this vendor's implementation of Modbus is incorrect. The text above the table states that data is stored in 2 16-bit registers (note that in Modbus each 16-bit register requires its own unique address), but the register addressing in the table only increments by 1 between consecutive 32-bit integer registers (instead of by 2 like you would expect).

Before even considering the CAN side or doing anything with your Modbus to CAN converter, I recommend confirming the Modbus operation of your flow meter by trying to read the temperature register using your computer, a USB to RS-485 adapter, and a Modbus tool such as one of the following:

ModScan
https://www.win-tech.com/

Modbus Poll
https://www.modbustools.com/modbus_poll.html

Simply Modbus
https://www.simplymodbus.ca/RTUmaster.htm
 
This register map seems wrong or perhaps this vendor's implementation of Modbus is incorrect. The text above the table states that data is stored in 2 16-bit registers (note that in Modbus each 16-bit register requires its own unique address), but the register addressing in the table only increments by 1 between consecutive 32-bit integer registers (instead of by 2 like you would expect).

Before even considering the CAN side or doing anything with your Modbus to CAN converter, I recommend confirming the Modbus operation of your flow meter by trying to read the temperature register using your computer, a USB to RS-485 adapter, and a Modbus tool such as one of the following:

ModScan
https://www.win-tech.com/

Modbus Poll
https://www.modbustools.com/modbus_poll.html

Simply Modbus
https://www.simplymodbus.ca/RTUmaster.htm
That is my next step. Probably should have started there in fact. I will also reach out to the flowmeter company and see if there are indeed some misprints in their manual.
 
I wouldnt be too surprised if the 32-bit registers work. You ask for register x, 2 registers, and get the values back. This is not like x and x+1 as usual. Very strange, but could work; the manual says it does. Just wondering why a vendor would make such a device that probably has trouble communicating with many masters.
 
Just wanted to follow up here. I talked to a rep from the flowmeter manufacture and they confirmed that this setup should work. I also, obtained an RS485 to USB converter to simply everything and together the rep and I tried a few things and still no luck. We are seeing a time-out error. Will update when I get more info.
 
Thanks for your inputs!

That should work ! I am not nearby you but if I was there this equipment would surely work smoothly...

Just keep on it! that will work !
Do not hesitate to reach me out here Any time!

James
 
Timeout errors are typically caused by either incorrect wiring or mismatching configuration settings.

Make sure you've connected the RS-485 +, RS-485 -, and 0V common signals of your USB to RS-485 converter to the flow meter. If your RS-485 converter or the flow meter supports 4-wire RS-485, make sure it is properly configured for 2-wire or jumper the TX+ and RX+ together and the TX- and RX- together. If your converter or the flow meter labels its RS-485 terminals as A and B instead of + and -, try swapping your + and - wires.

Confirm the following settings match in both your Modbus software and on the flow meter:
- Protocol is set to Modbus RTU
- Number of Data Bits set to 8
- Baud Rate
- Parity
- Stop Bits
- Slave Address
 
Timeout errors are typically caused by either incorrect wiring or mismatching configuration settings.

Make sure you've connected the RS-485 +, RS-485 -, and 0V common signals of your USB to RS-485 converter to the flow meter. If your RS-485 converter or the flow meter supports 4-wire RS-485, make sure it is properly configured for 2-wire or jumper the TX+ and RX+ together and the TX- and RX- together. If your converter or the flow meter labels its RS-485 terminals as A and B instead of + and -, try swapping your + and - wires.

Confirm the following settings match in both your Modbus software and on the flow meter:
- Protocol is set to Modbus RTU
- Number of Data Bits set to 8
- Baud Rate
- Parity
- Stop Bits
- Slave Address

Turns out the flowmeter also broadcasts RS485 over it's built in USB port so I was also able to test this and we saw the same result.

I have double checked everything you have mentioned including wires and still no luck.
 
1. > I was also able to test this and we saw the same result.
And that result was ? ? ? ?

2. Modbus slaves do not broadcast, so there's a setting somewhere on the flow meter that defines whether the RS-485 port is Modbus mode or 'broadcast' mode. Have you found that setting to make sure that it's Modbus RTU?
 
Top