question

Ryosuke S avatar image
0 Likes"
Ryosuke S asked Matt Long commented

How to automate IO connections in Emulation Module

This seems like it could be done easily if you could create ProcessFlow from Flexscript or C++. But I've been going through the Community regarding the topic, and found a thread but says that FlexSim doesn't support such. Is it still true? (The thread was in 2017, so I'm asking.) I read the thread: https://answers.flexsim.com/questions/42248/creating-processflow-with-flexscript-code.html

The reason I'm asking is because I want to automate the IO connection between the 3D Object in FS and OPC. (I created such feature in both DELMIA and VC, and customer appreciate it.)

My understanding is that currently, if you were to connect using Emulation,

1. Create new Emulation in Toolbox.
2. Define connection between the OPC Server (in Emulation)
3. Create necessary Variables for IO connection (in ProcessFlow)
4. Define each Variable whether 'Sensor' or 'Control'.
5. Define necessary activity for all Variables.

If there is only 10 or 20 IOs (like in demo models), we can live with manually setting for each IO, but in actual case, there will be at least about 100, more than 300 in many cases, and customer will not do all the settings manually. So, we need to automate this part.

Is there a way to define connection not using ProcessFlow? Or would it be possible with C++?

FlexSim 20.0.3
process flowemulationemulation module
5 |100000

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

1 Answer

·
Matt Long avatar image
0 Likes"
Matt Long answered Matt Long commented

You are correct that there isn't any support in creating process flows with code. (Not saying that it's not possible, but we don't support it) You can however use instanced process flows with emulation. I don't know exactly what functionality you need for each of these variables, but this may be the solution for you.

If you create an instanced process flow with some number of emulation variables, you can have those emulation variables looking at some dynamic tag id or other value. You can either use process flow variables that are defined locally or use object labels. reference those variables in each of your emulation variables.

or

Then reference those from the emulation variable activity:

or

Then each instance of the process flow could have it's own set of data. And creating new instances dynamically is very easy. All you have to do is copy the 3D object.

Your ladder logic could be created in sub flows either as their own Sub Flow process flow object or inside of a single General process flow object.


tagid.png (14.6 KiB)
pfvariable.png (13.2 KiB)
labels.png (9.5 KiB)
taglabel.png (10.0 KiB)
· 2
5 |100000

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

Ryosuke S avatar image Ryosuke S commented ·

Hello @Matt Long,

Thank you for you support. Sorry for my late reply. So, I understand that you cannot create any process flow with code.

Then I need to change my question. How can I establish connection with OPC Server without using process flow. I assume that you are explaining how to do that. Am I correct?

However, I can't seem to find variable tab in my processor object. I'm using version 20.0.3.

Do you need to place another object as set with processor like I see in your reply?

Thank you in advance,

Rick

0 Likes 0 ·
Matt Long avatar image Matt Long Ryosuke S commented ·

Sorry, let me send you to our user manual and you can go through this tutorial on process flow instances and refer to these other pages as well. This should help my answer make more sense.

https://docs.flexsim.com/en/20.0/Tutorials/ProcessFlow/Tutorial4Instances/InstancesOverview/

https://docs.flexsim.com/en/20.0/ModelLogic/AdditionalConcepts/ProcessFlowInstances/

https://docs.flexsim.com/en/20.0/ModelLogic/AdditionalConcepts/ProcessFlowVariables/

Let me know if you have questions after that.

0 Likes 0 ·

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.