question

Ryan M avatar image
0 Likes"
Ryan M asked Ryan M commented

Database Connection

Hello,

I have created several models on manufacturing lines but I am now looking to create a new model which is essential a digital twin. I have access to an SAP database where the data I need is stored. The data is mostly numercial (quantities + times).

I have read about the database connector but have not yet been able to test it as I am waiting on a few things. I'm seeking any advice about how I should go about this and how I should use this database? Should I be running SQL through FlexSim itself via code editor or otherwise?

Also is there anything specific to using SAP that I should know?

Thanks in advance.

FlexSim 25.0.0
database
· 5
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
What data do you want to retrieve, store or update in/from the SQL database? Also have you checked it has been deployed on a standard DB or has an ODBC connector, or is it on a (proprietary) cloud service?


You can predefine import/exports via the DB Connector's properties GUI or you can use FlexScript directly. Imports use SQL while the export reads from a FlexSim table. To export using FlexScript you'd probably use sql INSERT INTO statements.

1 Like 1 ·
Ryan M avatar image Ryan M Jason Lightfoot ♦♦ commented ·
I won't be updating the database, just retrieving data from it. The data varies but most of the data I need is times in seconds. Specifically cycle times of machines. I want to get the latest of these times to import the average into the model.

The data is on a standard DB, no connector.

0 Likes 0 ·
Ryan M avatar image Ryan M Jason Lightfoot ♦♦ commented ·
@Jason Lightfoot The current plan is to import without using a connector. Just to confirm...here I will be importing using SQL in Flexsim?


Should this SQL be exclusively in the import logic or can this SQL be used anywhere in Flexsim?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ryan M commented ·

Wherever you can use Flexscript in the model you can use it to import data - whether this makes sense as the model runs is another matter.

I've also been able to load external data and create empirical distributions from that - which would save you from having to use just the average value - you could sample empirical values or fit a curve to the data.


0 Likes 0 ·
Show more comments

0 Answers