Reading a measurement value from a transmitter using the RS-485 protocol

10 vues (au cours des 30 derniers jours)
Pradshaanth Yokanathan
Pradshaanth Yokanathan le 13 Avr 2019
Hi there. I am tasked to use Matlab to write a program to read in a measurement value from a transmitter using the RS-485 protocol. I've chosen the MAG6000 flow transmitter. I think I have managed to source the right manual. https://cache.industry.siemens.com/dl/files/906/44880906/att_70364/v1/USMII_MODBUS_AOM_OI_En_en-US.pdf However, I am not sure how to start doing this. Could I pls get some help. Thanks.
  2 commentaires
Walter Roberson
Walter Roberson le 13 Avr 2019
Are you planning to use a USB to RS-485 convertor that does regular serial port emulation, or are you planning to use GPIB drivers talking to a MODBUS device?
Pradshaanth Yokanathan
Pradshaanth Yokanathan le 13 Avr 2019
I am not connecting anything to my system. I am just doing an assignment. I was tasked to source for a transmitter. In this case, I have chosen the Sitrans MAG5000/6000 Flow transmitter. My task is to write a program in MATLAB to read in a measurement value from the transmitter using the RS-485 protocol.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 13 Avr 2019
As I read through several sources, it appears to me that the MAG6000 is a controller that can read remote magnetic flowmeter modules. Remote modules can be interfaced by optional MODBUS RTU/RS-485 card for the MAG6000.
The question then becomes how to communicate from PC to the MAG6000. That is not easy to find information on, but I do find
which says,
Operation of the transmitter can be carried out using:
  • Control and display unit
  • HART communicator
  • PC/laptop and SIMATIC PDM software via HART communication
  • PC/laptop and SIMATIC PDM software using PROFIBUS communication
These would require the optional HART or PROFIBUS card for the MAG6000 and some kind of interface device for the PC.
It does not appear to me that you can use RS-485 to control the MAG6000. RS-485 is a strict master/slave system, where only the master can initiate communications, and the MAG6000 expects to be the master for RS-485 purposes.
If the sensor device itself is interfaced by RS-485, then you would normally use one of a few arrangements:
  1. Have a RS-485 master interfaced to the PC, either by PC card or by USB to RS-485, with the sensor connected remotely to the RS-485, and the PC controlling the conversation. No specific "transmitter" (sensor bus controller) device would be used. Potentially VISA drivers would be used; Or
  2. Have a RS-485 master interfaced to something like an Arduino or Raspberry Pi running a control program able to react more quickly than the general purpose system running MATLAB can. The Arduino or Raspberry Pi would, I suppose, act as "transmitter". VISA drivers would not be used; Or
  3. Use something like TCP to communicate to a controller ("transmitter") that running RS-485 on your behalf. The MAG5000 and MAG6000 do not appear to support TCP cards; Or
  4. Use MODBUS over TCP to talk to a device that has the sensor interface, with the PC effectively acting as the controller. This would probably not use RS-485.
I find myself a bit confused over what the MAG6000 does. Given all the discussion about its reading accuracy being +/- 0.25% (main improvement over the MAG5000), that sounds like it has the analog to digital convertors built in and is talking about sensor accuracy. But then it talks about MODBUS cards, and those would be bringing in digital readings rather than analog readings, so it would not appear to make sense to talk about accuracy -- unless, that is, that a substantial part of the purpose of the MAG6000 is to convert raw sensor readings of magnetic intensity into flow readings, and the MAG6000 simply has better software for that purpose than the MAG5000 does (but if so then that would suggest that the MAG5000 is being deliberately restricted, unless it is a matter of code size and the existing code just barely fits in RAM or something like that.)
This leads me to question whether what you are required to obtain is a raw magnetic reading, or a "cooked" flow reading?

Catégories

En savoir plus sur Simulink Supported Hardware dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by