If you configure it as a Modbus TCP gateway, then your datalogger will need to use the appropriate port (RS232 or CSIO) and will function as an RTU.This means that the data logger is configured to implement the Modbus communications protocol and listen for Modbus polls from a Modbus Master, such as a SCADA (supervisory control and data acquisition) system.Turning your data logger into a Modbus TCPIP slave is a great way to allow systems that use the Modbus protocol to have access to your live measurement data.
You may remember our previous discussion about SCADA systems and Modbus from the Why Modbus Matters: An Introduction blog article. Scada Modbus Protocol Update That ArrayTo do this, we need to use the ModbusSlave() instruction, declare a variable array to hold our Modbus data, and then update that array with our measurements. The instruction is added between the BeginProg and Scan statements. The ModbusSlave() instruction is placed between these two statements because it only needs to execute once at compile time rather than being executed during each scan. In our example, we use 502, because we are using an Ethernet connection and 502 is the default Modbus TCP port. In our example, this parameter ( 0 ) is ignored because our communications are over an Ethernet connection. In our example, we set our data logger to have an address of 1. Because we have declared our ModbusVariable as a floating point number (32 bits), it will be spread across two Modbus Registers (16 bits in each). If a 0 is entered for this parameter, the discrete commands are mapped to the data logger control ports C1 to C8, and a compile warning is generated. In our example, I have chosen to format our Modbus Map floating point variables with the byte order ABCD. Scada Modbus Protocol Generator Also HasPlease note that the Short Cut program generator also has the capability to generate the code we have discussed above. By taking advantage of the concepts shown above, you can add more measurements to your program, as well as to the Modbus Register Map of your data logger. The result is that your SCADA system can access live measurement data for a more complete weather station implementation. In the meantime, share any Modbus comments or questions you have below. ![]() Scada Modbus Protocol Series Of PlantHis first experience with Campbell equipment came soon after graduating from college while working on a series of plant-growing experiments conducted on the International Space Station. Paul enjoys leveraging unique Campbell Scientific technology to solve challenging measurement problems. He has a bachelors degree in Electrical Engineering and an MBA. Paul also enjoys the outdoors, fly fishing, and spending time with his family. Im testing the server with an Obvius Acquisuite 8810 ModBus TCP client, which has not yet established communition with the loggerserver. Were pretty good with ModBus here, but not as good with network communication. Its interestinng that, whichever of the 2 possible answers (RS-232, CS IO) is the case, there will be ModBus TCP transmitted over a serial cable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |