Today is...
Tuesday, April 24, 2018
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
Watch an animation of a conveyor stacking operation demonstrating the use of a move on a gear command.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
This Need a Controller?
Reverse a system input according to obtained output


I am trying to simulate a Zigzag maneuver, which consist of reversing the input (reference signal) when we obtained the same value in the output (Our system has one state, and it's a SISO) both input and output are angles. I don't know how to proceed.

Thank you

It's unclear what you are trying to achieve - but if you can explain mathematically or by flowchart than that might help.

I recall trying to do something almost opposite - control a variable speed pump in a constantly emptying tank using one level probe. the maths was quite simple even though the process engineer thought it extremely complicated!

Hello Kenza,

It is not clear what your goals and expectations, I guess you are trying to simulate and implement some mathematical formula / algorithm to PLC.

what I can suggest to you are:

1. Develop IO (Input Output) list that consolidates all of IO devices planned to be connected to your PLC

2. Select what PLC brand (hardware and software) you are going to use

3. Develop control Philosophy, the control philosophy may consisting of narrative and flow chart that you can elaborate your mathematical formula/algorithm details, what is the relation of your formula/algorithm with the IO list and how you are going to implement that formula/algorithm to PLC programming

4. If IO list and control philosophy already prepared and clear, then you can start your PLC programming based on both reference.

PLC can be programmed using several methods:
- Function Block
- Structured Text
- Instruction List
- Sequential Function Chart

For your case, which I believe is related to implementation of mathematical formula/algorithm, combination of Function Block and
Structured Text will be the most common way.

4. Once the program is developed , you have to test your PLC program to validate if your program is working as planned on the control philosophy or not. For testing you can use external simulator hardware. If the external simulator is not available then you may want to simulate the process to be controlled within the PLC itself by
create program routine that will simulate behavior of your process or alternatively you can use software such as Matlab or Labview to simulate your process and connect to your PLC thru OPC.

Hope this helps

Best regards