Use Omron PLC by OPC DA use Sensor Tag and Control Tag.

Use Omron PLC by OPC DA use Sensor Tag and Control Tag.

IEThai
Not applicable
432 Views
6 Replies
Message 1 of 7

Use Omron PLC by OPC DA use Sensor Tag and Control Tag.

IEThai
Not applicable

[ FlexSim 22.1.1 ]

Hello. I have a question about Emulation + PLC

In this project. I use Omron PLC CP2E-N30DT1-D

And I hope the answer and solution in my question will be helpful for other at they want to build the project about emulation.


1667929581713.png1667929590379.png

I has building ladder of PLC in CX-Programing. The equipment consists of 2 object detect sensor, conveyor set controlled by motor and 1 air solenoid for push item to conveyor.

So, I create the 4 address at symbol like the picture and each symbols will be Boolean type.


1667929610451.png

And I use OPC TechNet for try to connecting between PLC and FlexSim Emulation.

I use OPC Tech at Demo version.

1667929628644.png1667929636106.png

In FlexSim Emulation I use OPC DA Connection and I found OPC server and connected.

Them, I create 2 Sensor Tag and 2 Control tag like the picture an it same in picture of my OPC Tech window.

1667929654844.png

So, In this model I have 2 way that I want to know.

First way :

How can I use Photo Eye 1 at near Source to control Sensor Tag On_Motor for trig to PLC for control the conveyor motor ON at real world. And want to use Photo Eye 2 at near Sink to control Sensor Tag Stop_Motor for trig to PLC control the conveyor motor OFF in real world.

Second way :

How can I use Control Tag On_item for associate to Source, When the first sensor in real world detected item then Source in FlexSim will creating item. And want to use Control Tag motor for associate to Motor object, When the second sensor in real world detected item (Cover) then in FlexSim will be stop conveyor and it will be release item in FlexSim to Sink (Uncover).

I’m not sure this way to use PLC in real world for control in FlexSim that I want to use some coding or Flexscript in control tag.

That is my project.

I would be very grateful if you answer me for done this project.

And I believe your answer in this question it can help many people.

Thank You for sharing.

0 Likes
433 Views
6 Replies
Replies (6)
Message 2 of 7

support5CRPZ
Advocate
Advocate
You can find the key to solve your issue in Help Tutorial > Emulation. You can use Process Flow to solve your issue.
email ID : support@flexsim.co.kr & support@simflex.co.kr
0 Likes
Message 3 of 7

IEThai
Not applicable

In First way to send data of sensor tag (Photo Eye) to OPC Tech to control PLC.

Now I can send Bool data to OPC Tech it can detect data but I don't sure how to connecting to send data from OPC Tech to control PLC.


And In second way if I can use Process Flow to get data from PLC to control FlexSim model. Where can I get samples? to be clearly seen.

0 Likes
Message 4 of 7

support5CRPZ
Advocate
Advocate

You can use the 'Variable' activity in Process Flow to read/write between PLC and FlexSim. Two variables are used for sensor and control. To read the data from PLC, you can use 'Get Variable' activity and to write the data, use 'Set Variable' activity.

You can find the issue model and questions in this forum.

email ID : support@flexsim.co.kr & support@simflex.co.kr
0 Likes
Message 5 of 7

IEThai
Not applicable

I try to use variable in process flow from your advicing.

1668009454594.png

Once of variable will be OPC DA Connection. It can Browse to OPC server at the same in connection of Emulation Properties.

1668009619248.png

But in Control Tag and Sensor Tag variable it can't Browse to OPC Tag. Even though a Control and Sensor Tag in Emulation Properties they can Browse to OPC Tag.

0 Likes
Message 6 of 7

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Pongsakorn S,

Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes
Message 7 of 7

lcavallero
Enthusiast
Enthusiast

Do you tried with Flexsim 2023.0?

0 Likes