Everything posted by SandstromDJ
SandstromDJ replied to SandstromDJ's topic in MitsubishiPLC type: Q04UDEH GX IEC Developer is the program of choice at the company for the moment. I looked at Swap and WAND, they will most likely be useful down the road. My main issue at the moment is how I should handle the bits best. Through an array as my idea or directly to WORD? The conversions between bit, array, word etc is not a problem. Problem is how I handle the overlapping words without overwriting or leaving an empty byte. The RIO will read everything and distribute the Data to the modules in the order they come in. It would be easy to just have everything in one block, but the objective is to make the module FB's "modular" so we can reuse and reorder them in future projects as well. Thank you Gambit for your reply!
SandstromDJ posted a topic in MitsubishiHi 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.