Thursday, April 01, 2010

XG5000 and Mod bus Command

I would like to solve the following problem:

A LSIS PLC needs to talk to PID controller over RS 485 and Modbus (PLC master - PID slave)

LSIS XG5000 software interacts with PLC manufacturer.

But the problem I have is that I do not know where in the PLC I can put the ASCII commands to send to the PID.

From the manuals I have read, so far I am able to set up both the cnet interface of the PLC and the PID controller to have the same settings (baud rate, parity, etc).

The only other thing I can think of right now is that the modbus settings in the PLC software (XG5000 provides a bit and word address range: like word read is p06, word write is p070, etc....

Side note: In ModBus ASCII, I need to put:

address unit 1 | address unit 2 | Command 1 | Command 0 | ....|End1|End2

Here the string to read the process value of the PID. It starts with ASCII character ':' (3A) and ends with 'CR LF' (0D 0A). Everything in the middle is the protocol definition like address of who receives this, what to do (read/write) and etc.

3A 31 30 33 31 30 30 30 30 30 30 31 45 42 43 0D 0A

Note that code has the beginning 3A which is ':' character indicating beginning of ASCII frame. CR and LF (0D 0A) mark the end.

Let's talk generalities, rather than specifics.

If you need to talk either Modbus RTU or Modbus ASCII, you typically have go back to the PLC manufacturer and ask, "what hardware/firmware/software do you have to talk Modbus RTU or Modbus ASCII?" and procure whatever that is i order to implement Modbus on a PLC.

If your PLC doesn't talk Modbus in any form, but talks some other serial protocol, there are commercially available gateway boxes that can be programmed to talk serial on one side and Modbus on the other to do protocol conversions.

Frankly, I'd be surprised if your Omega controller actually talks Modbus ASCII.  Does the spec/manual say "Modbus ASCII"?  

I suspect it talks the Modbus RTU protocol.  Very few commercial PID controllers nowadays talk Modbus ASCII.

Modbus ASCII is a derivative of Modbus RTU without some of Modbus RTU's critical timing requirements, the trade off being a halving of the effective data transfer rate, since RTU transmits binary values, whereas ASCII transmits the two hex values of an 8 bit byte literally as ASCII characters, doubling the amount of bytes for the same information/data.  

You mention a 'cnet interface', which is a total unknown to me.


Post a Comment

Subscribe to Post Comments [Atom]

<< Home