Product FAQs

Ask a Question

How can I configure a Concept Xxmit function block to write from a Quantum to a M238?

Goals and Symptoms

The goal of this resolution is to provide a solution for reading data from a M238 to a Quantum via the serial comm port.

Causes and Fixes

This resolution will use Modbus RS232 Comm port # 1 on the Quantum (DB9) and the SL1 on the M238 (RJ45)
Cable Pinout Requirement:

Quantum Comm Port 1 (DB9)...........................M238 SL1 (RJ45)
2) RX.......................................................................2) TX
3) TX.......................................................................1) RX
5) GND....................................................................8) GND

4 and 6 jumped) DTR, DSR -(Quantum side)
7 and 8 jumped) RTS, CTS - (Quantum side)
3 and 6 jumped) RTS, CTS - (M238 side)

Hardware requirement:
Quantum
M238

Software requirement:
SoMachine v1.1.10
Concept v2.6 SR6

 

1) Configure a Xxmit function block in Concept IEC to write from a Quantum comm port 1 to a M238 SL1.




**Command = 256 Decimal = Bit 8 = Enable Modbus messaging
Set to 1 when you want to send Modbus messages out of the PLC. Modbus messages may be in either RTU or ASCII formats. When data bits=8, XXMIT uses Modbus RTU format. When data bits=7, XXMIT uses Modbus ASCII format. Only use Bit 7 OR Bit 8, do not try to use both.


**MsgOut = WordArr9
MsgOut[1] = Modbus Function Code
16 = Write multiple holding registers (4x or %mw)

MsgOut[2] = Amount of memory word you want to read from the M238

MsgOut[3] = Slave Modbus PLC address

MsgOut[4] = Slave (m238) PLC data area. For example, enter 10 if you want to start reading at %mw9 from the m238. The address is offset by one since in a M238 it starts at %mw0.

MsgOut[5] = Master (Quantum) PLC data area the data will be copied to. For example, enter 10 if you want to copy the data to 40010 in the Quantum.



 

 

2) Configure the M238 using SoMachine to be a slave device.



2.1) Add a Modbus-manager object







2.2) Modbus-Manager Configuration


 

 

3) Download both Concept and SoMachine applications and run the Quantum and M238
 

 

4) Concept

 

5) SoMachine v1.1.10 watch window.

Was this helpful?
What can we do to improve the information ?