Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use MODBUS for my application?

I am going to use DAQ, acting as a MODBUS slave, to simulate a meter. The application will be written in Labview. I checked the member of MODBUS slave in Lookout and found that the float point holding registers start from F40001. But the MODBUS slave address of float point register pair of the meter starts from 200xx. How can I match them? I am quite new with lookout and appreciate if anyone can give me some suggestions.
0 Kudos
Message 1 of 4
(3,437 Views)


Hi Steve,

So, you'll be using Lookout to make your DAQ device a Modbus Slave? For this, you will first read the DAQ device into Lookout (using the NIDAQ-OPCClient Object, or even LabVIEW and writing it back to Lookout via OPC), and then map the data to a ModbusSlave Object so that the rest of the world sees this as a ModbusSlave Meter.

By the way, I don't see 200xx registers for ModbusSlave. Are you sure your meter uses 200xx? ANd are they 16-bit input/holding registers? Maybe you can instead use 300xx or 400xx?

Anyways, if the meter you are trying to simulate uses two registers to represent the floating point values, I am assuming the value is split into two registers using the IEEE floating point notation. If this is the case, you will have to, norm
ally, divide the value you read from DAQ into two and write to the two consecutive 300xx registers.

However, what you can instead do is, write the DAQ-value to the F400xx register. And then map these to the 300xx registers. For example, if you write the DAQ value to F40001, the value is actually split and written to two 16-bit consecutive registers: 40001 and 40002. You can now easily map these two to say, 30001 and 30002. (Edit connections and connect Modbus1.40001 to Modbus1.30001 and so on).

Here's a good KB article on the background of 32-bit registers in Lookout-Modbus:
http://digital.ni.com/public.nsf/websearch/4EF459F549FCC7028625660A000A7629?opendocument&Submitted&&node=133020_US


Hope this helps.

Regards,

Khalid

0 Kudos
Message 2 of 4
(3,437 Views)
Thank you very much for your help.

I have a further question about how to edit connections to connect MODBUS1.40001 to MODBUS1.30001 in labview. Thanks.

Steven.
0 Kudos
Message 3 of 4
(3,437 Views)

Hi Steven,

From what I understand of your application, you would map the two registers Modbus.40001 to Modbus1.30001 in Lookout, and not in LabVIEW.

Maybe you can explain more about what exactly you're trying to accomplish.

Regards,

Khalid


0 Kudos
Message 4 of 4
(3,437 Views)