Anyone have experience with having an Arduino talk to rosemount transmitters through the Rosemount 1410 gateways?
Im looking for a lead on code to make a call from the Arduino to a transmitter.
thanks,
sean
Anyone have experience with having an Arduino talk to rosemount transmitters through the Rosemount 1410 gateways?
Im looking for a lead on code to make a call from the Arduino to a transmitter.
thanks,
sean
After digging, I believe I can restate my question:
Does anyone have experience with Arduino and Modbus TCP/IP?
Thanks,
Sean
How do you want to communicate?
The 1410 gateway seems to be designed for wireless HART, so that's 802.15.4. You'd need an Arduino shield compatible with that. Maybe there's a new Arduino that supports 802.15.4?
If you want wired Modbus TCP, you'll need a shield that has an Ethernet port. If you can do wired serial, a basic Arduino can use the UART and send Modbus RTU commmands. The RTU protocol is pretty simple.
Thanks, everyone. Here's the full story:
I've partnered with Emerson/Experitec to design a mobile fixed equipment datalogger. With Rosemount wireless transmitters, I can sense strain, temperature, metal thickness of pipes and vessels, and vibration. This is used when a vessel or pipe corrodes or erodes below API code tolerances, but has been calculated as safe using API 579 Fitness for Service calculations. To continue running the equipment under Fitness for Service, we have to have a mitigation plan. To date, we pay people to routinely go take these measurements. My plan is to make a mobile data logger that will do it 24/7 that we swing by to simply swap an SD card out of to gather the data.
So, we have Rosemount transmitters wirelessly sending sensor data once a minute to the 1410 gateway. The gateway stores the data into MODBUS registers. A proprietary device called the Roclink poles those registers and datalogs them once a minute as well.
The kicker is it has very limited storage for data logging. It's intended to be a multi valve controller that stands alone in the middle of corn fields - not to be a data logger. I have already outgrown it in that it can only take up to 3 days data from the 12 transmitters I'm collecting every 1 minute.
Since they don't have a good alternative out of the box - and every solution they bring tends to cost 5 figures, I jumped on the chance to make my own supplemental logger to wire in.
The vendor says I can use the Roclink's RS485 as a slave to pole its registers. Not sure if that is true since it is acting as a MODBUS master to talk to the 1410.
He also said I can share with the existing RS 485 terminals. Not sure on this either since I would imagine this would cause conflicts if they both tried to poll for data at the same time.
For low power consumption, I'm going with an Arduino Pro Mini to make use of its deep sleep mode. It will deep sleep, wake up, and then write to an SD card once a minute. I found a breakout board that will let me use the Arduino with an RS485.
So far, I have an Arduino library that is simple enough. I'm just curious if anyone has talked to MODBUS. I'd like to hear your story and anything I should look out for.
Thanks,
Sean
There is a few options I see where your going with that but check this out see if this might be a option polling the modbus tcp data source in intervals alternative to the ones currently running. Seen a few projects with it for Arduino but more so with the pi this is one I remembered.
I was thinking of cloning having the data going to multiple registers not sure how that would go sounds like a fun tho lol
I tried this one out on my LUBUNTU laptop, but I ran into some package issues.
It led me to this one: https://github.com/sourceperl/pyModbusTCP
Unfortunately, the Rosemount 1410 doesn't isn't clear on how to open a port to poll MODBUS registers. So, I hit a dead end. I can ping the 1410 and access its web page interface when connected. That's a promising start, but I still have more to decipher.
See ya',
Sean
Found the problem with the Rosemount 1410 not having the TCP/IP port open for Modbus. The vendor did not enable the feature on the 1410. I just need to enable the feature - or if it doesn't have the feature as an option, I just need to update the firmware.
Can't wait to get back to work Monday!!! (woah...scary)
-Sean
sweet!
Well, it worked! Using a python script with the pyModbusTCP library, it read in the registers. It took some detective work to find the address IDs to send.
I also learned how Rosemount passes numbers through the Modbus protocol. It uses IEEE 754 floats which are represented by a 32 bits. Two 16 bit registers are polled which return a decimal value to the python script.
You have to move the last one in front of the first and then convert each to binary. To get it from binary to the actual value, you have to solve a series of riddles such as bit one represents if it is a positive or negative number. It's crazy, but allows for super accuracy of the data. In the end, my script was 90% converting the two register values to an actual single float!
Here's a reference of the IEEE 754 format: https://www.h-schmidt.net/FloatConverter/IEEE754.html .
See ya,
Sean
Well, it worked! Using a python script with the pyModbusTCP library, it read in the registers. It took some detective work to find the address IDs to send.
I also learned how Rosemount passes numbers through the Modbus protocol. It uses IEEE 754 floats which are represented by a 32 bits. Two 16 bit registers are polled which return a decimal value to the python script.
You have to move the last one in front of the first and then convert each to binary. To get it from binary to the actual value, you have to solve a series of riddles such as bit one represents if it is a positive or negative number. It's crazy, but allows for super accuracy of the data. In the end, my script was 90% converting the two register values to an actual single float!
Here's a reference of the IEEE 754 format: https://www.h-schmidt.net/FloatConverter/IEEE754.html .
See ya,
Sean