The Simulation and the Preprocessor are based on the datatypes in the programmhandler. The main three Types are:
- I40AssetWorkingStation
- I40AssetOrder
- I40AssetProduct
For every type of asset, a subscription is needed to save historical data in the CrateDB
With the help of the production simulation datase traffic is generated on FIWARE. Thereby the traffic for the data types i40AssetOrder and i40AssetWorkstation is created. The prerequisite is that the corresponding i40AssetOrder and i40AssetWorkstation datasets already exist in FIWARE. After starting the simulation, the following patches are carried out:
With patches, the "produced components" and the "produced components with sufficient quality" are changed in real time (after a specified cycle time has elapsed). Furthermore, the order status is set to "Completed" after completion of the order.
For this dataset, the following attributes are changed during runtime:
- Current cycle time
- Status drawer 1
- Status drawer 2
- Robot running
The cycle time is determined and set after each cycle (when the "Complete" status is set). Robot running is always set to true when the robot is running a process, otherwise it is set to false. The drawer statuses are set in a specific order:
- raw part drawer 1
- process finished drawer 2
- process in drawer 1
- raw part drawer 2
- process finished drawer 1
- process in drawer 2
- Open Program.cs
- Change the property "ID" to the ID of the workingstation
- Change the property "ON" to the ID of the order
- If the simulation is running outside of a docker container change also the URL. This is the URL of fiware
- The next property which needs to be changed is "PlanParts".
- If needed the cycle time can be adjust with "CycleTimeBase" (it will differ randam in a certain range)
- Now you can do a docker-compose up.
- If you start the program without docker run the following command in the terminal:
dotnet watch run
See how to use video: https://www.youtube.com/watch?v=F6mC325THfM
The preprocessor calculates the following oee metrics:
- quality
- performance
- oee
Every 10 seconds data is retrieved from crateDB and these metrics are calculated on the basis of the historical dat. The calculated data is sent to the PATCH endpoint of the dataset (i40AssetOrder) of FIWARE.
At least one entry of every single assettype in the crateDB. The preprocessor gets all the data from the crateDB, except the types which are specified in the code. If the type changes, a change in the code is needed (app.js)
- if docker is used just do a docker-compose up otherwise run following command in the terminal:
node app.js