Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Modbus RTU not working.

Modbus RTU not working. 2 years 3 months ago #11299

  • Timon
  • Timon's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hi I am having trouble wit the configuration for Modbus RTU.

1) All seems to working, serialport is getting values but not in the tag.
What is wrong? return values is float but in the input buffert it is presented as int/word. Anyway result variable is always zero..
Newbi question I guess.

2) Are there any specification over the channels types, I cant found any info?

BR
Timo
Attachments:
The administrator has disabled public write access.

Modbus RTU not working. 2 years 3 months ago #11300

  • Timon
  • Timon's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
1) It's almost correct the modbus address is 0-based. But it is the conversion to float32 that hangs. Bytes in wrong positions. Byte swapping is needed to be done in plc program. Makes plc programing a pain.If something is corrected in a new Proview release, modification of old projects is needed.
The administrator has disabled public write access.

Modbus RTU not working. 2 years 3 months ago #11302

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hi Timon,

The standard representation of a transportation Modbus Frame is 16 bits unsigned integer (0..65535 in decimal mode).
It can represent a float number in a fixed-point form.
Ie : 125.36 can appear in the frame as 12536 integer or any other integer representation .
It basically not support floating numbers (with the Gould Modicon 1970 definition).

www.modbus.org/docs/PI_MBUS_300.pdf

However, you must link a ChanAi object (in the node column) with a corresponding (32 bit float number) Ai object in the Plant column.

This object convert Raw value (Unsigned integer) in Actual value (32 float number)

An example with Modbus TCP/IP:

Capturedu2022-01-0319-05-42.png


/BP
Last Edit: 2 years 3 months ago by brunad.
The administrator has disabled public write access.

Modbus RTU not working. 1 year 10 months ago #11456

  • gcorbaz
  • gcorbaz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hello,

Firs of all, I'm new with Proview.

I'm trying to read Modicon float32 value from a Kostal inverter. I get the value, but I don't understand how to correctly map them. As an example, a channel containing temperature is correctly decoded in wireshark sniffer, but I cant transform it into the correct temperature in the plant.

I'm using ChanAi on the node side and a Ai on the node side. I tested with ChanAi Uint16, Int16, Uint32, Int32, float32 as well as with different conversion parameters, but I don't understand what's going wrong.

Could someone be so kind as to help me ?

Thank you, Guy.
The administrator has disabled public write access.

Modbus RTU not working. 1 year 10 months ago #11458

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hello Guy,

First of all, you have to know if it is a big endian or a little endian kind of floating value.

skftechnicalsupport.zendesk.com/hc/en-us...nt-big-little-endian

You may have to swap registers.

www.proview.se/v3/index.php/forum/3-help...654-modbus-rtu#11118

/Bruno
The administrator has disabled public write access.

Modbus RTU not working. 1 year 10 months ago #11460

  • gcorbaz
  • gcorbaz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hello Bruno,

I had a look with a modus protocol analyser: it is coded in Floating point IEEE 754 single precision 32 bits inverse. I means, according to www.walchem.com/Literature/Controllers/W...0Modbus%20Manual.pdf that the two 16 bit register are swapped.

How can I swap them back in Proview ?

Regards, Guy.
Last Edit: 1 year 10 months ago by gcorbaz.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.158 seconds