Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How to map one modbus register to another modbus register in labview (continued)

"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 Lo
okout Protocol drivers OPC server. So I turn to Labview. I did not find Lookout on my DAQ.


Thanks


Steven"
0 Kudos
Message 1 of 4
(3,309 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 would at first make s
ure 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 2 of 4
(3,309 Views)
Thank you for your help.

I was using the way you mentioned above. The datasocket and OPC is working. When I subscribed a register value using labview numeric control, I could see new value from the front panel. But when it passed the value to other objects and functions, it passed old value. If there was a breakpoint before data passing, everything is ok. But without breakpoint, the operation was wrong. It looks as if there is delay there. That's why I try to find if I can map the registers directly.

Do you have any idea how to solve my problem?

Thks

Steven
0 Kudos
Message 3 of 4
(3,309 Views)


Can you create a really small bare-bones VI which will demonstrate this behavior and attach it to your post?

Looks like there's some race condition going on.

I repeat: do not attach your complete VI(s), but only a new, simplified, bare-bones, test VI which ALSO exhibits the same incorrect behavior. Comment the VI liberally.

Khalid


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