News:

  • May 13, 2024, 04:16:20 PM

Login with username, password and session length

Author Topic: Modbus to GS4 drive question on MRX command.  (Read 1367 times)

brucek

  • Sr. Member
  • ****
  • Posts: 57
Modbus to GS4 drive question on MRX command.
« on: October 23, 2019, 10:04:56 AM »
       I'm doing my first modbus project and have a question about the MRX command. I can use a UDT memory location in the MWX command on the  "From Do more Memory address" line but i can't on the MRX "To Do more memory address". I've made a UDT for Bin1, Bin2... Bin5. I want to use Bin1.Speed to send the speed and Bin1.Amps to read the amps from the drive. I can use the Bin1.speed but it says when i use the MRX and Bin1.amps

Found 1 error editing MRX

 Found 1 error editing MRX.
 Double click on an entry to jump back to that parameter.

        Parameter   Description
=====   =========   ====================
[  4]       P8 To Do-more Memory Address   Do-more Element not valid for the given Modbus Function: Element has an excluded attribute

Both speed and amps are set up the same in the udt, word hex and I've tried word native and neither seem to work.

My question is should it work in both or is there a reason you can't use it in MRX? I can use V0 and move it to my udt but i was hoping to keep things organized.

Can't seem to get my picture attachment to post so hopefully you don't need it.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3665
    • Host Engineering
Re: Modbus to GS4 drive question on MRX command.
« Reply #1 on: October 23, 2019, 10:43:08 AM »
There is no "read single register" command, only "read multiple registers".  Hence, when reading multiple registers (technically 1 is still multiple function, but we could look at that - see my comment at the end), so you must provide a BLOCK of WORD register, or a cast of a BLOCK of something else to a WORD.  Hence, individual structure members are not allowed in MRX "To" element (that is the excluded attribute - we should say that, shouldn't we   :-[).

Hence, for now, you must read it to a V or N or even a cast D as a WORD, then use a MOVE.

HOWEVER, we could definitely look at allowing structure members on an MRX "Read Multiple ?" when the "Number" is a hard coded "1".

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3665
    • Host Engineering
Re: Modbus to GS4 drive question on MRX command.
« Reply #2 on: October 23, 2019, 10:46:59 AM »
This isn't going to help, but FYI, the MWX fails the same way when you choose a WRITE MULTIPLE <whatever> (vs. WRITE SINGLE) function.  The WRITE SINGLE function ALLOWS structure fields, the WRITE MULTIPLE does NOT.

brucek

  • Sr. Member
  • ****
  • Posts: 57
Re: Modbus to GS4 drive question on MRX command.
« Reply #3 on: October 23, 2019, 01:14:18 PM »
Thanx for the response, I was just confused because I got it to work on the MWX and didn't see the difference. I will use the move command.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3665
    • Host Engineering
Re: Modbus to GS4 drive question on MRX command.
« Reply #4 on: October 24, 2019, 01:31:13 PM »
Fixed.  If the count is a const 1 or Symbolic Const 1, then we allow structure members on both MRX and MWX.

If the count is variable or >= 2, we report the error.  Oh, and I fixed the error message (see attachment).

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3665
    • Host Engineering
Re: Modbus to GS4 drive question on MRX command.
« Reply #5 on: March 25, 2020, 10:30:16 AM »
Fixed.  If the count is a const 1 or Symbolic Const 1, then we allow structure members on both MRX and MWX.

Fixed in Designer 2.7