Hi There, has anyone here had any experience in pulling data out of a flow meter from this manufacturer?
Our client has a bunch of measuring stations with the following equipment:
-DANFOSS MAGFLO Flowmeter Type MAG 3100 WATER
This is the mechanical flow meter module that measures flow of water and (allegedly) mechanically stores the accumulated reading along with reading the instant water flow
-DANFOSS MAGFLO Flowmeter Type MAG 5000
This seems to be the electronic module that couples with the one above, somehow "captures" its reading, shows it on a display, and allegedly supports the "HART (R) Communication" protocol to (I guess) share it's readings with an external device
Now, I need to read the water flow data (accumulated and instant), and I am not being very lucky finding much data on how to deal with this. I get some google hits for Siemens webpages with the same model numbers (MAG3100 and MAG5000), it looks like Siemens ended up buying Danfoss.
Has anyone here ever had to read data from one of these devices??
Yes Im aware of the physical details, its a FSK signal (0=2200hz, 1=1200hz) modulated over the clasical analog 4-20 signal.
That funtion is taken care by specific chips (CD5700, 20C12...), but I would like to discuss with someone who has worked with this before, I need the commands to demand certain mesaurements from the flow meter, handshaking...
The water flow meters datasheet doesn't provide any details on using the HART protocol with it
Hi,
if the problem already exists, consider the following:
Almost every HART device is also a device that uses one of its measurements to shape a 4-20mA Signal (usually the current taken by the electronic). If the device has a local display and some buttons, you can set the measuring you want to read as "Primary Variable", which makes it the companion of the 4-20mA Signal. You need to know the measuring upper and lower range, which might be also adjustable via the display/buttons. If there is no local display, you need a configuration software. For free you can get PACTware and some DTM (Youtube has some details how to use this software)
Additionally to PACTware, you will need a HART Modem. There are some available for less than 150€, just ask Google. If the configuration is done you can measure the current and you will have an idea about the flow. Remember the range settings: 0% is 4mA, 100% is 20mA. Just some simple math...
I think this is much much easier than to understand how HART works and how to perform a dialog with a HART device.
If 150€ is too much money, you can try to adapt a bell202 modem. But don't fry the device
YES! After my last message here I was able to get in touch with Siemens (who took over Danfoss) Technical Dept, who very kindly called me back to answer all my questions. They said that in all these meters there's at least one digital output, which by using the on-screen menu can be programmed to put a pulse for every X volume units, and also there's an analog output that in the same way can be set up to provide a current that's proportional to the instant flow, so a link can be established between mA <-> liters/min
The project is actually alive, only pushed back by our client and we're still awaiting for some signatures and certification.
All these meters do have a local display+buttons (the MAGFLO 5000 referred above) whihc is the electronic part of the device that shows values and lets you program lots of variables
Yeah, a device with a pulse output! So you are a lucky guy! This is the perfect connection for a microcontroller, much easier to use than a noisy A/D conversion. Usually these frequency outputs are "open collector" outputs. An NPN transistor is connected to ground with its emitter and its collecter is open. Sometimes there is an option to use a buildin resistor which is pulled-up from that collector to higher voltage(24V?). You can adapt an optocoupler with a matching resistor to keep the 24V away from the arduino. There are fast and slow couplers available but I do not remember their names...
For your next project I would recommend to use a ModBus device. They are connected via cheap RS-485 or ethernet (ModBus TCP) and the protocoll is widely known for more than 40 years. Downside: Back in these days the fight for "the best endian ever" was at its hight. So each device can be configured how a 32bit variable is stored in two 16bit pieces and there was never a standard evolved where these important switches can be read out. But the datasheet will tell you details about this.
I hope you pass all certifications and can continue your work!
Yes later on I found all these details on some PDF's I found on this product and it describes in all detail these outputs. Yes they are open collector so I can apply my own pull up voltage and read when it get grounded.
About modbus, honestly if I have the chance to work down to the pulse level with all these devices and Im still using low-level microcontrollers (Arduino and its variants) and not a PLC I would prefer to use a pulse output
Thanks!
If it works, do not try to make it better than good. You are right.
But for the future...never say never, the protocol is made in the 70s when computer where slow 8bit machines with a few kb of RAM. Sounds like the grandparents of arduino...
If you need to read only a few values, short static hexstrings are enough to request the answers, and the answers itself have only a few additional bytes.
In worst case, there seem to be an arduino library available: https://playground.arduino.cc/Code/ModbusMaster?action=diff