rotw
Mechanical
- May 25, 2013
- 1,143
Hello All,
First of all, apologize for my ignorance on the topic but my problem is as follows:
I am trying to create a small program that fetches data from Modbus e.g. TCP/IP;
I've used a Modbus simulator available for free in internet. Now I try to make sure I can read the Modbus data from program directly by connecting to the correct port, address, etc.
The concept is as follows:
Sensors A (say a pressure transmitter) sends an analog output 4-20 mA to control system.
The control system pass the same signal to DCS via Modbus protocol. We know the Modbus address of the subject Analog output.
What I've been able to do so far is read via the correct port and settings from host Modbus (simulated) the value of register (0,1,2 etc.) based on address, directly with the program. Whatever the value format is, I can fetch it as is.
Suppose (virtually) that my pressure transmitter outputs 10 mA (say this corresponds to 10 bar pressure just to put things into context).
My question,
Knowing the address (say it is '30001'), how will 10 mA value typically / usually be passed/written by DCS to register?
Is it as floating 32 bit? If this is so, can I read then the value from the register directly (which will get me the value=10) in which case I would convert it to 10 bar knowing the calibration range afterward? Is this how it works?
It would be then 'relatively easy' to simulate 10 bar, just by typing in '10' as value in the simulator register and then read the data in my program.
Can someone help me and provide some pointers... thanks!
Life is not about waiting for the storm to pass. It's about learning dance in the rain.
First of all, apologize for my ignorance on the topic but my problem is as follows:
I am trying to create a small program that fetches data from Modbus e.g. TCP/IP;
I've used a Modbus simulator available for free in internet. Now I try to make sure I can read the Modbus data from program directly by connecting to the correct port, address, etc.
The concept is as follows:
Sensors A (say a pressure transmitter) sends an analog output 4-20 mA to control system.
The control system pass the same signal to DCS via Modbus protocol. We know the Modbus address of the subject Analog output.
What I've been able to do so far is read via the correct port and settings from host Modbus (simulated) the value of register (0,1,2 etc.) based on address, directly with the program. Whatever the value format is, I can fetch it as is.
Suppose (virtually) that my pressure transmitter outputs 10 mA (say this corresponds to 10 bar pressure just to put things into context).
My question,
Knowing the address (say it is '30001'), how will 10 mA value typically / usually be passed/written by DCS to register?
Is it as floating 32 bit? If this is so, can I read then the value from the register directly (which will get me the value=10) in which case I would convert it to 10 bar knowing the calibration range afterward? Is this how it works?
It would be then 'relatively easy' to simulate 10 bar, just by typing in '10' as value in the simulator register and then read the data in my program.
Can someone help me and provide some pointers... thanks!
Life is not about waiting for the storm to pass. It's about learning dance in the rain.