AB Micro850 modbus and double words/floats

Nearbyatom

Member
Join Date
Jul 2017
Location
USA
Posts
38
This is all pertaining to the Micro850 and modbus. A couple things:

1.) How do you read double words? I can read/write words but there's no good way to read double words. I found a UDFB called "words into real" but I can't just read those 2 words, put them together, do a "any to dword" conversion and expect a dword. It seems the formatting is different.

2.) How do you write the dword and float? It seems I have to somehow break apart the dword/float into 2 words, send those out as words, then have the slave put the words back together. Is that right? But how? :confused:

I've been using this tech note to help me:
https://rockwellautomation.custhelp.com/app/answers/detail/a_id/1032507/page/1

Please advise. Thanks.
 
You probably have a "endianness" problem, modbus doesn't define in which order double word values are send, some plc put the high 16 bit word first, others do the reverse.
In some place your modbus driver should have the option to reverse word order.
The only data type supported by Modbus (both RTU & TCP) are 16-bit words.

The way how these words are interpreted at both ends of the connection does not depend on Modbus.

Modbus does not define how a floating point number is transmitted,
neither a 32-bit integer, neither a character string encapsulated in the 16-bit words.
Hope it will help
 
You can use the COP instruction. There is a good guide in the 850 manual.
http://literature.rockwellautomation.com/idc/groups/literature/documents/qs/2080-qs002_-en-e.pdf

Basically you split the DWORD to 2 WORDs send and the joint them together again at the other end.

Heres one I did with 5000, so looks different, but the principle is the same. I am reading a HWord and a LWord from a Lenze drive and making a DINT.

4h9h7n.png
 

Similar Topics

Hello, This is my first exposure to CCW Micro8xx family. Someone will write to my existing micro850. Modbus TCP is turned on and I created a...
Replies
2
Views
166
Hello. I want to use micro850 to read and write registers from 120 modbus tcp devices. I want to know if anyone that implemented such a solution...
Replies
2
Views
473
Hi all IÂ’m working on a problem in which I have to read sensor data from a data acquisition module in the field that only communicates using...
Replies
2
Views
1,727
Hello All, I am posting this in hopes of getting a little help as I am very new to Modbus. I need to control the speed of a compressor VFD with...
Replies
0
Views
1,332
Hi, Iam Working in a project where Micro850 and Epson ROBOT is there, I need to read and write bits to and from ROBOT. Iam Using TCP/IP and...
Replies
1
Views
1,257
Back
Top Bottom