question

Pongsakorn S avatar image
0 Likes"
Pongsakorn S asked Luciano Cavallero commented

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

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.

FlexSim 22.1.1
emulationplc emulationopc daopc da emulation
1667929581713.png (70.2 KiB)
1667929590379.png (58.5 KiB)
1667929610451.png (164.1 KiB)
1667929628644.png (107.6 KiB)
1667929636106.png (109.8 KiB)
1667929654844.png (239.3 KiB)
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

David Seo avatar image David Seo commented ·
You can find the key to solve your issue in Help Tutorial > Emulation. You can use Process Flow to solve your issue.
0 Likes 0 ·
Pongsakorn S avatar image Pongsakorn S David Seo commented ·

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 0 ·
David Seo avatar image David Seo Pongsakorn S commented ·

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.

0 Likes 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ commented ·

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 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.