Mitsubishi to B&R RIO through Profibus. Byte problem.

SandstromDJ

Member
Join Date
Jan 2016
Location
Finland
Posts
1
Hi all.
Long time reader, first time poster.

I am tasked to make a couple of module specific function blocks for communication between our Mitsubishi PLC (GX IEC Developer 7.04) and a B&R remote IO over Profibus. A number of these blocks would then be used, depending on the RIO setup.

Reading should be straight forward, just read X amount of words, starting from address Y.
Writing is trickier as Mitsubishi prefers 16/32 bit Data whereas B&R batches Data in bytes!

As I have several output modules in the RIO. I need to send my info "chained" together.
Example:
Module 1: 2 Bytes
Module 2: 3 Bytes
Module 3: 2 Bytes
Totals: 7 bytes or 4 words.

Sending the first word is no problem. Neither is the next two words (I will just have 1 empty byte at the end of the third word). But then the info to the third module should start in the middle of the third word.

Any idea how I could solve this?

Experimental: At the moment the blocks have inputs (bits), which are stored to a bit-array inside the block and then linked to an output. My idea at the moment is to merge all module-wise output bit arrays to one big bit array, converting that to INT and sending it off to the Profibus address. But I have not yet found a way to merge the arrays and shift them so all data is where it should be.
Above example:
ARRAY [0..15] OF BOOL
+ ARRAY [0..23] OF BOOL
+ ARRAY [0..15] OF BOOL
Totals: ARRAY [0..63] OF BOOL
or [0..71] counting the spare byte.
Converted to 8 Words and forwarded through Profibus.

Thank you in advance.
 
Last edited:

Similar Topics

Hello! If someone can help me with the following problem. I can't change the phone number. Do I really need the interface (AL-232CAB - Programming...
Replies
0
Views
51
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
43
I'm at a new job as the sole control engineer and trying to piece together where my predecessor left off. One machine I'm trying to get online...
Replies
2
Views
109
I'm looking to get some spare keys for this PLC. Does anyone know a source or have a part number? My searches are turning up nothing at the moment.
Replies
1
Views
81
Back
Top Bottom