[Posted via the Google Groups frontend, my emails seem to be getting eaten.]
On 22/08/15 22:39, Omar Cacciotti wrote:
Hi, I'm writing here for a "None" common issue. I readed many posts but actually I've not solved the problem. #Environment Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)" Python 2.7.3 ###################################################### I've a RTU device and i need to get data from it. This is a short description that the vendor gived to me: ADDR BYTES HEX Description BYTES *40068*130 Ch3TGP mmHg4
#starting add, num of reg to read, slave unit. result= client.read_holding_registers(*40068*,3,unit=1)
Try register 67 or 68. A common (but confusing!) notation with Modbus is that the first digit gives the register type; 4 being for a holding register. So register 40068 is in reality type 4 register 68 (or 4/68). I suggest 67, because the Modbus standard (see [1] section 4.4) actually numbers registers from 1 onwards: the official register range is from 1 to 65536, with one being subtracted when the register number is serialised in the Modbus frame. Software like ModScan or MacroView number from 1 onwards. pyModbus on the other hand, just passes the register number through unchanged, thus you need to subtract 1 from the number given in some datasheets (assuming they use traditional Modbus addressing). Regards,-- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere. 1. http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
On 23/08/15 00:14, Omar Cacciotti wrote:
result= client.read_holding_registers(4,67,unit=1)
That just told it to read 67 registers starting at register address 4 (register ID 5). Try: result= client.read_holding_registers(67,unit=1)
On 25/08/15 04:07, Omar Cacciotti wrote:
I've not solved my problem. This kind of probe is an rs485 so I think it's asyncronous device.
I assume the USB serial device is RS-485 as well? Have you tried plugging it into another box and trying an alternate package like qModMaster to verify the device communications?
I’ve attached the MODBUS structure for the transmitter. Please refer to row 202. There you’ll see 8 floats for the different sensor channels. You will be interested in TGP mmHg, BP mmHg, TGP % and dP mmHg. These are in MODBUS registers 40068 to 40077.
You will need to use the following MODBUS settings:
Baud: 9600
Byte Size: 8
Parity: Even
Stop Bits: 1
Modbus ID: 1
Protocol: Modbus RTU--
You received this message because you are subscribed to a topic in the Google Groups "pymodbus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pymodbus/IwdkEU4ZL2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pymodbus+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.