IET
Decrease font size
Increase font size
Topic Title: Sending serial port commands from PLC to DMX Controller
Topic Summary: Sending and receiving serial port commands from PLC to DMX Controller
Created On: 27 February 2014 06:43 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 27 February 2014 06:43 AM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

I Want to interface a DMX controller with a PLC.The DMX Controller accepts and responds to simple ASCII commands.The DMX controller has RS232 port on it DB-O9 Connector.
This works perfectly from hyperterminal but the customer wants to process this using PLC and sent it to a remote SCADA system using MODBUS-RTU for remote control.

Please suggest a technical way of acheiving this.

The link to the dac quad dmx controller manual
Link removed/pdf/manuals/DAC-Quad-Manual.pdf
my email
 27 February 2014 04:59 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

You seem to have been asking very similar questions to this on other forums from mid-December 2013 in regards to a SCADA to PLC profibus link.

Given that it is now end of February 2014 what progress have you made since then?

Are you trying to promote a product on various forums or do you have a real problem to solve?



-------------------------
James Arathoon
 27 February 2014 06:54 PM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

Yes actually I have a real problem to solve.Actually we are swimming pool and water features specialist and we have got a contract for a dmx fountain and everything was ok then interfacing with scada came.the consultant is insisting on interfacing to scada via plc .we told him there is rs232 port and this accepts serial port commands and responds to it he is not satisfied and telling us stupid commands like he want modbus connection directly like this.so we are forced to explain the complete details with programs and interface details so that our dmx fountain can be monitored using scada.we are not experts in scada but had to do it
Now almost sending ascii commands problem is solved but I'm not sure how to interpret with the reply received from controller to plc in HyperTerminal it shows a lot of details but not know how to interpret and sent to scada through modbus
Sorry for trouble caused
 27 February 2014 09:51 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

MODBUS-RTU protocol from the PLC is a binary serial protocol with error checking words added to the end all messages. If this has to be used then this is not compatible with the ascii protocol you say is needed by your DMX controller.

1. Is the PLC currently acting as a Modbus master to control multiple slave devices hanging off a RS-485 serial bus, one of them being your fountain controller? Or is there a dedicated point to point RS-232 link (Single master to single slave) from the PLC to your controller?

2. Do you need to control and monitor the fountain from the PLC or just monitor it?

3. How much I/O needs to be controlled and/or monitored?
- Number of Digital Inputs (Discrete Inputs in Modbus terminology)
- Number of Digital Outputs (Coils in Modbus terminology)
- Number of Input/Output Word Registers (16 bit) e.g. positive integer number to control or monitor a flow rate.

The modbus-rtu protocol sees the world in terms of Discrete Inputs, Coils and Input/Output Word Registers.

Some of the previous advice given to you was to use an off-the shelf protocol converter. I have not used any of these products so am unable to advise you. Have you looked into this possibility? If you provide some of the information above other people may be able to advise you.

I have written bespoke modbus master and slave code for Microchip PIC microcontrollers, so could make up a bespoke protocol converter given a few thousand pounds, obviously not ideal if this solution is going to be a one off.

If all you need to do is monitor a few digital inputs and feed this back to the plc it may be feasible to parallel off the required digital input signals into an off-the-shelf modbus I/O module. However if you can do that why not wire them back directly to the PLC.



-------------------------
James Arathoon
 28 February 2014 08:38 AM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

I will explain the problem correctly
Our dmx fountain is a standalone system controlling 72 dmx programmable lights,five relay controllers that control the on/off of 72 water switches.we have the dmx controller in the pumproom along with the pumps.the fountain pumps are controlled via vfd.the speed of the vfd is also controlled through (0-10)v dmx controlled output in the controller.
To monitor the pumproom through Scada they have placed a plc which communicates to scada through modbus rtu.the different inputs/outputs are connected to the plc.but the problem comes while interfacing the dmx controller.it can be interfaced in two ways either through gateway/rs 232 port.the difference is that through gateway they can monitor only the channel value details but cannot control.but if using rs232 port they can control,monitor the system.the commands are simple ascii commands like a00,i00
The problem comes in setting up ascii in plc.the consultant is not willing for that he says its difficult.so we are forced to explain with all details.
The sending I have figured out but problem comes with receiving.
The communication between controller and plc is rs232 point to point communication.i am not sure how to interpret with reply got from controller through plc and convey to scada.thats now remaining problem
Link for dac quad manual
Link removed/dacquad manual pdf
 28 February 2014 09:56 AM
User is offline View Users Profile Print this message



oneye

Posts: 177
Joined: 25 February 2008

"This works perfectly from hyperterminal but the customer wants to process this using PLC and sent it to a remote SCADA system using MODBUS-RTU for remote control
Please suggest a technical way of acheiving this. "


You have not indicated which PLC you are using, but control / monitoring using Modbus protocols from PLC systems is quite common which may explain your customer's demands.

Off-the shelf protocol converters are available if there is no alternative, but Rockwell have had PLc rack mount modules with dual ports having Modbus protocol availability for many years.

It was a few years ago, but I demonstrated both peer-to-peer and multidrop capability as described by jarathoon point 1.

Do you need simple ASCII commands or Modbus - and if the latter is it 7 0r 8 bit ?
 28 February 2014 12:43 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

Having just had a quick look at the dmx manual.

The Rs-232 serial port runs a ascii VT emulation protocol for setting the device up as a DMX-512 show master. This is presumably why the plc consultant said he/she can't interface with it.

The DMX-512 network itself is different it is a separate RS-485 multidrop serial bus without automatic error checking and correction designed for non-hazardous applications.

There is a single master - multiple slave arrangement on this network just as on a multi-drop RS-485 network using the Modbus-RTU protocol.

It seems that your DAC-Quad card can operate in master mode, as you are trying to use it at the moment or alternatively in dumb slave mode, controlled by a remote DMX-512 master.

If run in dumb slave mode you must attach a separate DMX-512 control master to its RS-485 control interface (with in your case a separate Modbus control interface) . All the intelligence and show control is then shunted to the PLC and multiple dumb slaves are possible.

A product that may handle this is advertised here

http://www.t-mac.co.uk/uploads...-to-DMX_interface.pdf

I haven't used it so can't say whether it will match your particular application.

-------------------------
James Arathoon
 28 February 2014 05:44 PM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

Actually I think the best way to interface is by using rs232 serial port through ascii commands.
If using protocol converters only mapping of channels is possible but no other details like which show is playing like this.
If i00 commands is sent we get a reply like this in hyperterminal

shows:2,Ch:123@_____0,ADL:Autodownload_filename
DAC-Quad Name@serial Address:______0
Show#____1,show_file name looping@frame_____38
Input Apen
Input Bpen

If I setup ascii communication port in plc and sent command i00 by defining a functional block and triggering input using some inputs how I will receive the reply in plc.It is sent to Scada through modbus rtu.
The problem is I am not sure how I will receive the message in plc through ascii port and parse using plc and convey it to scada through modbus rtu.
I think rather than checking and monitoring on dmx-512 channels which is unidirectional and does not provide error checking it is better to control the device using ascii commands through which they can start,stop,pause,select specific shows and also enquire status.
Please advice me how to setup plc to send these messages and parse the reply so that it can be processed within the plc and plc can convert and sent messages to scada.the scada will trigger the functional blocks to sent these messages.
The plc will be mostly siemens s7 400.
 28 February 2014 07:56 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

Originally posted by: arclivin

Actually I think the best way to interface is by using rs232 serial port through ascii commands.



Depends what you mean by the word "best".

With VT emulation you don't get a reply as such, but a large stream of acsii characters intended to update the VT display in different ways that depend on the context.

If you code your own comms handling software on a PC or microcontroller it is technically possible to write code to parse these text streams for the precise information that you want. On a PLC it would be much harder (A complex and difficult to test software kludge in my opinion.)

[Many years ago I worked with someone who had to do such a thing for legacy support reasons because they had no other choice. It took them ages to get things working and debugged (weeks). Because the VT emulation isn't a standard documented comms protocol as such, if the DMX controller failed at some point in the future and was replaced with another with a different firmware version, your expensively engineered software kludge may suddenly stop working.]

A S7-400 plc could be used to replicate the DMX show functionality that you currently get from the DMX master controller using new code blocks running on the PLC. These could access specific stored timing and control data configured into dedicated PLC datablocks via SCADA. However this might take several weeks effort as well, depending on exactly what needs to be done.



-------------------------
James Arathoon
 01 March 2014 05:46 AM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

thanks Mr James Arathoon
Now I understand why they dont want ASCII communication.But if we change our controller most of our fountain hardware need to change since we have to implement DMX+RDM a new technology which have status as RDM signals sent back from devices.
But in our case it would be painful as we have to change all devices to RDM capable devices(whole mechanical and electrical to be modified painful)

So please suggest a method what way would be better for them to monitor through DMX to Modbus rtu gateway(icc product gateway)/ascii communication because they dont want plc to be sending dmx signals .
 01 March 2014 04:07 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

From what you are saying you have quite a complex installation, with a number of contraints that don't make things easy for you.

More questions that have an impact on the engineering choices...

What does your customer expect to be able to control and monitor on their PC SCADA interface?

Is there a reason why the PLC needs to know about your fountain (to interact and synchronise with other things)? or do you have the option of feeding information into the PC SCADA package independently of the PLC?

Does your customer want to create their own shows via SCADA or just choose from a list that you have preconfigured for them in the DMX master?

Do you want to effectively replicate all the DMX master VT emulation screens and functionality on SCADA via the PLC or just a very limited sub-set (such as select show, start show and stop show)?



-------------------------
James Arathoon
 01 March 2014 05:45 PM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

What our customer is asking for is as follows
1)system healthy status
2)system running status
3)system fault code
4)select show from the list of shows we are providing
5)start show
6)stop show
7)show status
8)system auto/manual selection
These are the things he is asking.The Purpose of the plc is just to function as RTU for the scada system not necessary that it should be through plc
Please suggest
Thank you
 01 March 2014 08:20 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

Given the constraints there does not appear to be any neat and cheap solution to this.

For most of the functionality you require you can use the Serial Port Commands at the end of the document, and this is much simpler than entering configuration mode. How you determine which mode the board is in I don't know.

In terms of communicating with the DMX board, one possibility is to write a small software application on the PC which runs all the time; this attaches to the serial port (or via a USB to serial port converter) and communicates with the DMX master. This application could communicate with the SCADA somehow (e.g. for Siemens WinCC SCADA via an OPC server.)

The system healthy fucntion can come from a PLC input attached to the DMX master power supply.



-------------------------
James Arathoon
 02 March 2014 03:35 PM
User is offline View Users Profile Print this message



arclivin

Posts: 7
Joined: 27 February 2014

Today we had a meeting the problem is almost getting less in our last discussion they reduced their demands and now what they want is
1)select show
2)controller status(i00 command)
They are saying they have to do through the RS232 port
They already is planning to put a PLC possibly Siemens S7 400\Schneider Quantum/ GE fanuc
Now only thing is that they want confirmation that this can be done by setting up RS232 communication via PLC and parse the information received in PLC and sent it to SCADA
Do you think it can be achieved right?
Your valuable suggestions are always welcomed.
 03 March 2014 09:18 AM
User is offline View Users Profile Print this message



mickleshawn123

Posts: 2
Joined: 03 March 2014

What does your customer expect to be able to control and monitor on their PC SCADA interface?

Is there a reason why the PLC needs to know about your fountain (to interact and synchronise with other things)? or do you have the option of feeding informat[url=Link removed/]i[/url]on into the PC SCADA package independently of the PLC?
 03 March 2014 12:21 PM
User is offline View Users Profile Print this message



oneye

Posts: 177
Joined: 25 February 2008

We have successfully used Siemens S7 400 systems with
HMS AB700 ANYBUS COMMUNICATOR PROFIBUS-DP Model ABC-PDP
from http://www anybus.com/products/prodindex.shtml

This gateway takes data from the PLC via profibus and converts to modbus.
You send commands, you request data back. There is minimal software setup to what your external device requires.
 03 March 2014 03:14 PM
User is offline View Users Profile Print this message



jarathoon

Posts: 1043
Joined: 05 September 2004

Originally posted by: arclivin

Today we had a meeting the problem is almost getting less in our last discussion they reduced their demands and now what they want is

1)select show

2)controller status(i00 command)

They are saying they have to do through the RS232 port

They already is planning to put a PLC possibly Siemens S7 400\Schneider Quantum/ GE fanuc

Now only thing is that they want confirmation that this can be done by setting up RS232 communication via PLC and parse the information received in PLC and sent it to SCADA

Do you think it can be achieved right?

Your valuable suggestions are always welcomed.


The ability handle free form ascii serial comms will vary from plc manufacturer to manufacturer and from one plc model series to another.

In terms of Siemens S7-300's and S7-400's the parsing can be done by writing handling blocks in STL (using pointers) or much more easily in SCL (which compiles to native STL). In terms of other plc families you will have to ask other people or go to the appropriate support websites.

To guarantee that any plc the customer chooses can meet the specification (as long as there are up to 8 free digital inputs and up to 8 free digital outputs) you could put the serial handling functionality on a separate microcontroller card with one serial port with 8 digital inputs and 8 digital outputs.

Inputs from PLC
1 input (start show stop show)
1 input (spare - perhaps pause show)
6 inputs (number 0-63 to make show choice - selection updated when show starts)

[or no spare/pause and 7 inputs for show selection 0-127]

Outputs to PLC
1 output system heathy
2 outputs (4 show statuses (stopped, running, paused, fault)
2 outputs (up to 4 fault codes)
3 output spare


-------------------------
James Arathoon
 04 March 2014 08:02 AM
User is offline View Users Profile Print this message



oneye

Posts: 177
Joined: 25 February 2008

I'm sorry but I wouldn't suggest the use of discrete I/O
It appears to me the customer is looking for a straightforward interface on an industry standard for 3rd party systems, with one lead / plug connection.

The Anybus modular unit above gives you that.
Statistics

See Also:



FuseTalk Standard Edition v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.