IXSAUTO

How to read "input register" using function 04h for QJ71MB91..?

11 posts in this topic

Hi,

I am trying to read data from modbus device, and data is on input register 04h...  how can i config parameter on QJ71MB91 for.. pls advise..

I can read holding register 05h.. and when i using buffer memory 2000h for input register then data is incorrect..

Hope someone can help me..

Thank in advance..

Share this post


Link to post
Share on other sites

BFM for reading devices is 1000-1FFF, writing is 3000-3FFF. Can you post a screenshot of your current non-working setup? it shouldn't be a problem, are you sure your slave device supports FC:04?

Share this post


Link to post
Share on other sites

Hi Kaare_t, 

Thank for your reply and helpful.. 

I attached file to you... and I used CH2 (RS485) to connected with devices and , My devices have some data for Holding register and Input register.. You can see in "Automatic Communication Parameter".. and in Automatic Communication Parameter1-6 are for Holding register , Automatic Communication1 is for input register..  and I setup Auto Refresh is for D2000 (1000 points).. 

if I read data from Holding register as Automatic Communication Parameter1-6 (Target No.1) have no problem and when I connected Input Register as Automatic Communication Parameter7 (Target No.2) then Target No.2 is not reading.. 

My questions.., 

-I don't understand how to config BFM 2000h and the BFM 2000h = D2000 in auto refresh or not..? 

-In Automatic Communication Parameter1, BFM is 2000h and Modbus device number is 16384-16385 (floating) , I filled access point is 2 and is it correct..? 

-the data from 16384-16385 (floating)  is store in D2000-D2001 right..? if right that.. why data from 16394-16409(floating) are not store in D2003-D2018..? 

-when we have too many Modbus devices number and used for auto refresh store in D2000.. I must found data stored by devise/buffer batch monitor and check on this page where is my data stored.. How can we count up is right way on auto refresh for D2000 to D2999 as my data are in stored from 2000h 

-for data is Input register.. I should setting "Input Register" column on MODBUS_Device assignment such as Device, Head Modbus device number, Access points or not..? and how can I config for "Input register" column..? 

waiting your reply., 

thank in advance.. 

QJ71MB91.zip

Share this post


Link to post
Share on other sites

I'm not sure if I fully understand what you are trying to do, but I can explain a little about the setup:

First of all, BFM is not the same as dataregisters (D). You create pointers to/from dataregisters to BFM's, so basically the module itself stores data in BFM, while the CPU interchanges data between BFM and CPU devices. In the AutoRefresh page you have set this correctly (BFM<->D). Note that BFM are HEX address based, while dataregisters are DEC address based, so BFM2010 = D2016...

Secondly, Device Assignement is used ONLY when the QJ71MB91 is a slave. These are the areas that an external master device can access and are basically the cross-reference between CPU devices and Modbus addresses. One Modbus channel cannot be slave and master at the same time, but from what I understand you want to read both Holding Registers and Input Registers from an external device into the MB91 module? If so, you can disregard the Device Assignment and look only to the Automatic Communication Parameter.

Let us know if anything was misunderstood, or unclear.

Share this post


Link to post
Share on other sites

Hi Kaare_t, 

thank for your explained.. and this is my point "Note that BFM are HEX address based, while dataregisters are DEC address based, so BFM2010 = D2016... " from your answers.. then I can know that where is data stored from 2000h --> Dxxx.. (HEX ->DEC) 

Thank you very much.. 

Share this post


Link to post
Share on other sites

Hi Kaare_t, 

Ref: BFM2010 = D2016 that you mention.. I have to count like this is correct..? 

Auto Comm Parameter1 , Access Points = 2 

2000h  = D2000-D2001

Auto Comm Parameter2 , Access Points = 16

2002h  = D2002-D2017

Auto Comm Parameter3 , Access Points = 10

2020h  = D2032-D2041

Is it correct..? 

 

Edited by IXSAUTO

Share this post


Link to post
Share on other sites

Hi,

If you set BFM2000 = D2000, then the following will happen:

  • 2000h-2001h = D2000-D2001 (2 points)
  • 2002h-2012h = D2002-D2017 (16 points)
  • 2020h-202Ah = D2032-D2041 (10 points)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now