Browse FAQs

How do you set up an XXMIT Read function on a Momentum CPU with Control Expert?

Published date: 28 June 2019

Establishing communication with XXMIT

Product Line:
Modicon Momentum

EcoStruxure Control Expert

When using a Momentum CPU with Control Expert, first, you must make sure the cabling is correct. You will need to refer to the wiring of your slave device for the wiring diagram.
The wiring of the Momentum CPU for both RS-232 and RS-485 are shown in the attachment "Momentum Modbus Pinout".

The next thing to keep in mind is that the Serial settings need to be the same between the Master and Slave devices.
Double check the following configuration settings. 
-Physical Line
-Transmission speed
-Stop bits

You will also want to make note of the Channel you are using and that the Modbus Node addresses are unique for each Slave device.

When setting up the XXMIT block, you will want to apply the settings you noted and apply them to the inputs of the XXMIT as well as adding the response timeout and constructing the MSG_OUT and the size of MSG_IN.

The MSG_IN must be at least 1 greater than the number of registers you are reading or you will get an error. Also, the MSG_OUT must be an array of 6 elements and the MSGLen to 5 or you will get an error. Only the first 5 registers in the MSG_OUT array are used, the last one is not used.
The first register holds the Modbus function code.
The second register has the number of registers you are accessing.
The third register holds the Modbus node address of the slave device.
The forth register represents the register where the data in the Master is located.
The fifth register represents the register where the data in the Slave is located.
Because of this, for a Modbus Read, the data being read can be found in both the MSG_IN array and the memory location shown in the fifth word of the MSG_OUT.

The start of the XXMIT should be triggered by a R_trig. The XXMIT will keep the Active bit as 1 while it is processing the request. The Active will go to 0 and either DONE or ERROR will be produced when the process is complete and the data will appear in the MSG_IN and specified memory location. The attachment XXMIT_EXAMPLE illustrates this.


Was this helpful?

What can we do to improve the information ?

Can't find what you are looking for?

Reach out to our customer care team to receive information on technical support, assistance for complaints and more.