Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: brucek 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.
-
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".
-
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.
-
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.
-
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).
-
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