Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How to map one modbus register to another modbus register in labview?

How to map one modbus register to another modbus register in labview? For example, let 40001 equal to 30001. Thank you.

Steven
0 Kudos
Message 1 of 9
(4,468 Views)

Hi Steven,

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

Maybe I am missing something. Can you explain more about what exactly you're trying to accomplish.

Regards,

Khalid


0 Kudos
Message 2 of 9
(4,468 Views)
Thank you very much for your prompt reply.

I am using Lookout Protocol drivers OPC server to create an object modbusslave. I editted the database to separate the registers. Then I went to Labview to build some controls and indicators and connect them with these registers using datasocket. I need to access both modicon float and 32bit float. I can use F40xxx to get 32bit float. But for modicon float, I have to switch the value in register pair 40xxx and 40xxx+1. So I use another F40yyy and try to map its register pair to F40xxx register pair in switching order(40yyy to 40xxx+1, 40yyy+1 to 40xxx). Is it the right way to deal with modicon float?

I did not find way to map two registers in Lookout Protocol drivers OPC server. So I turn to Labview. I did not fi
nd Lookout on my DAQ.

Thanks

Steven
0 Kudos
Message 3 of 9
(4,468 Views)


Hello Steven,

Sorry, I was under the impression that you were using the complete Lookout development software (as opposed to just the Lookout Protocol Drivers). You cannot do any development (connections, mapping, etc.) with the Lookout Protocol Drivers (LPD). So, you were right. We have to do this in LabVIEW.

I ain't sure how exactly the Modicon floats work, but assuming what you're saying is correct, in your LabVIEW VI(s) you would read the DataSocket item corresponding to 40yyy+1 first, and then write this value back to the DataSocket item corresponding to 40xxx. Similarly, you would read the DataSocket item corresponding to 40yyy and then write the value read back to the DataSocket item corresponding to 40xxx+1.

A tip: I wou
ld at first make sure I have the OPC communication between LabVIEW and LPD working. Make sure you can read and write to the LPD registers via their DataSocket/OPC equivalents in LabVIEW. You can then implement the mapping as described above.

Hope this helps,

Khalid


0 Kudos
Message 4 of 9
(4,468 Views)
Steven,

Another thing you could try is to set the option for "Modicon 32-bit floating point order" in the Lookout protocol drivers. Launch the Lookout protocol drivers and navigate to

Object>>Modify.....

You should see your modbus object listed here. Select the object and click OK. When the "Revise Modbus Secondary" dialog appears, click the "Advanced" button. Then you should see a check box near the bottom for the Modicon floating point order. Check this box and see if your values are displayed correctly.

Just a thought,

Patrick R.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 9
(4,468 Views)

I believe Steven is using ModbusSlave object -- which doesn't have this functionality. Or is he? Does LPD include ModbusSlave object?

Khalid


0 Kudos
Message 6 of 9
(4,468 Views)
You are right. If Steven is using the ModbusSlave Object, then the option is not available. Sorry for the mistake.

Good Luck,

Patrick R.
0 Kudos
Message 7 of 9
(4,468 Views)
Thank you all for your help.

I solved the problem after dealing with the float point data directly in Labview. Thanks.

Steven
0 Kudos
Message 8 of 9
(4,468 Views)
Hey no probs. I wasn't 100% sure either.
-Khalid
0 Kudos
Message 9 of 9
(4,468 Views)