question

Benjamin H3 avatar image
0 Likes"
Benjamin H3 asked tannerp commented

I need some help with the flexsim coding language

Hello, I need some help with the coding on flexsim I am an absolute beginner and was wondering if anyone knew the coding language for the statement below

//Go to Global table

//Look at Row 1

// Check Column 1 value

// If value >0, then value = value -1

// Result = column number (holding area 1 output port 1 connected to staging area 1

// Break loop

// Else

// Check column 2 value

// Loop


FlexSim 17.2.5
codingflexsim 17.2.5
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

The language is c++. Please look yourself for a tutorial to learn this language. If you are familiar with a programming language and you need only a reference then basics are in the manual. Even online you find them. They are for later versions, but the structure hasn’t changed. Writing Logic in FlexSim

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 commented ·

Hi @Benjamin H3, was tanner.p's answer helpful? If so, please click the red "Accept" button on their answer!

0 Likes 0 ·

1 Answer

·
tannerp avatar image
1 Like"
tannerp answered tannerp commented

Hi @Benjamin H3,

Like Jörg mentioned, it's useful to know C++ to use FlexSim. That said, you can do many things in FlexSim without knowing any C++.

I've created a small example model that has a script that does what you've described. As you can see, it's pretty standard coding technique. Hopefully this helps you get started. Note that this can also be done using Process Flow. I recommend learning Process Flow so as to minimize the amount of hard coding you need to do.

flexsim coding help.fsm


· 1
5 |100000

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

tannerp avatar image tannerp commented ·

As one user pointed out, it appears that I misinterpreted the pseudo-code above. I've updated the model to be more accurate by request.

flexsim-coding-help_1.fsm

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.