we are trying to read various parameters from a SMA battery inverter SI6.0H using the modbus I/O servers on a CRio. The battery temperature for instance is stored in two adjacent registers 30849 and 30850. Converted to LabVIEW's syntax, these result in 300849 and 300850. Using LabVIEW's modbus library make the readout of various registers possible. The problem arises using the modbus I/O servers. The procedure applied is the following one:
Has anyone an idea how to tackle this problem?
You need to first create a Modbus Slave I/O server on the cRIO to allow the Modbus Master to communicate with the device. After configuring the Modbus Slave I/O Server, you can then create the Modbus I/O Server on a host computer or your master device to communicate with the cRIO.
Configure Modbus Slave I/O Server Dialog Box: https://zone.ni.com/reference/en-XX/help/372572E-01/sysman/dsc_config_modbus_slave/
Configure Modbus I/O Server I/O Server Dialog Box: https://zone.ni.com/reference/en-XX/help/372572E-01/sysman/dsc_config_modbus_instance/
thanks a lot for your reply. The current constellation forsees the CRio as a Modbus-Master because it makes the data queries towards the battery inverter (slave). So far the I/O-server approach has worked perfectly with other PLC's (i.e. Beckhoff EK9000) with the CRio as a Master and the PLC's as slaves. The problem arises when we try to receive data via modbus from the SMA battery inverter with the same topology.
Concerning your advice, I don't understand how to read specific registers from the battery inverter if you define the CRio as slave. How do you define which registers to read from the inverter? Is it possible that you elaborate your advice a bit more?
My apologies, I misinterpreted your setup. I originally thought the cRIO was your Modbus slave that you were trying to communicate with. Thanks for the clarification.
How are you setting up the Modbus I/O Server? If you create a Modbus Master VI that reads out the registers as shared variables and also output the an error indicator, do you receive any errors or warnings that may better indicate what is going wrong?
if I connect the error handler to my shared variable, I get the following error code (decimal): -1967353901
Error -1967353901 states "the Modbus I/O server failed to connect to the Modbus Ethernet slave device. Ensure the Modbus Ethernet slave device works properly and that the connection between the Modbus master and slave devices is configured correctly".
This error is being thrown because the Master I/O server is not able to communicate with the Slave I/O server.
Are you communicating over Modbus Serial or TCP?
How is your Modbus Ethernet Slave device configured?
Are you able to use the Modbus I/O server to connect to a Modbus simulator device? There is a Modbus Simulator.lvproj example available in the Example Finder that you can use.
we are communicating over Modbus TCP. We have managed to read/write registers from the slave (SMA battery inverter) using the modbus library. The problem arises using the I/O server approach. The I/O server approach has been succesfully tested with other modbus slaves such as a Beckhoff's ethernet bus coupler EK9000.