question

ROBIN avatar image
0 Likes"
ROBIN asked Felix Möhlmann commented

Using Flexscript to create a production line (automation)

Hello !
I have this project where I should write a flexscript to create items and then flows with a table of opérations.

To be more precise this table "flexsim stations" contains the work stations in our production line and each workstation is represented in the figure down the table. First of all I need to create the production line (precessors in their right places) and a source from where we will get the first two types of items that I'll specify below. screenshot-2025-03-18-at-035544.pngIn this table below, we have the operations needed to create two types of pieces A and B, these operations are ordered chronologically, each operation has the station it's affected to, the machine as well and how many machines are allowed to operate the operation in the column "machine authorised". Part reference In and Out are the labels on the items respectively in the entrance and the exit of the machine. Finally the duration of every operation.


So our source should provide us with two types of items labled as x#57 and x#58.

In this part I should write a flexscript that does all of these operations continuously.

screenshot-2025-03-18-at-040034.png

Please feel free to provide anything that can help because I'm new to the software and it's very hard to read all of the command reference in such a short time.


Thank you everyone !


FlexSim 23.0.15
flexscriptproblemflexscript code
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
@ROBIN, I provide here a comment, that I support truly.
0 Likes 0 ·
ROBIN avatar image ROBIN Joerg Vogel commented ·
I understand, and I'm not looking for an answer in here I just need some help. even if you have a flexscript that helps with anything else it can help me to see how it kinda works.
0 Likes 0 ·
ROBIN avatar image ROBIN Joerg Vogel commented ·
And this is not an academic project, what I'm providing is a small part of a bigger project.
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann commented ·
Do you want to create the entire model logic from nothing using FlexScript? Or would you build the logic manually to follow the data from the tables (adjust number of machines and routing)?
0 Likes 0 ·
ROBIN avatar image ROBIN Felix Möhlmann commented ·
the goal is to create the entire model and its logic from nothing using flexscript
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann ROBIN commented ·

I would still suggest to first build the model manually, so you know what you later need to create via code. And don't use Process Flow because those can't be set up by code.

Then you can start to write code that recreates what you have build. Here's a very simple example with some commands that will likely be useful.

create-model-with-logic.fsm

0 Likes 0 ·

0 Answers