01-21-2008 06:18 AM
Hi,
I am trying to use Modbus TCP to set the time / date on my cFP-2120 running Labview Real-Time 5.0.1. For this purpose I have set up four holding registers that hold two single precision floats, one for the time (format: hhmmss) and one for the date (mmddyy). The idea is that each time the Modbus Master writes to the holding registers, the time / date of the cFP2120 gets set.
In my application, I have implemented Modbus communication similar to the MB Ethernet Example Slave.vi, which came with the NI Modbus library for Labview 8.2. This is also similar to the Modbus tutorial here. Essentially, I am reading the appropriate Modbus holding registers using the MB Register Manager.vi (also part of the Modbus library) and use their values to set the controller.
The problem arising is that I set the controller time even if the Master has not written to the holding registers, which results in wrong times/dates. Is there a way to determine whether these holding registers have been written to by the Master, so that I can react on it as soon as this happens?01-22-2008 03:18 PM
01-23-2008 01:56 PM
01-24-2008 06:01 PM
01-25-2008 09:06 AM