CrateCAL is a small Python script for accurately calculating the missing crates needed for empty running a production line.
It helps the user to get faster and reliable to needed information.
This also minimize the error of overfilling the magazine and needlessly extending the time to empty the production line.
It's lightweight, easy to use and should run on anything that can handle .py files.
CrateCAL is also tested and useable on Android phones via the Pydroid 3 IDE.
CrateCAL is focused to run on a Raspberry Pi (Linux), but you can run it on Windows or Android too.
-
Navigate to
/home/pi/on your Raspberry Pi and put theCrateCAL.pyscript in it. -
Now you have to open the
.bashrcfile that is also located in the directory. -
Add the following code at the end of the file and save it:
echo Running at boot sudo python /home/pi/CratCAL.py -
Restart the Raspberry Pi and the
CrateCALscript execute on boot up.
- Go to the Python download page and download the latest Python 3 version.
- Take the steps through the installer.
- Now you can execute the
CrateCAL.pyvia Python 3, and it should look like the pictures in Rundown.
INFO: This is NOT the intended way of using
CrateCAL!
Used lib's in the script will NOT WORK PROBABLY and can throw error's out in terminal!
1. Go to the Google Play Store and download/install Pydroid 3.
2. Open it on your phone, navigate to the Folder icon on the top right.
3. Click Open and search for the CrateCAL.py script and open it.
4. After loading up the script, you can run it via the yellow Play button
5. Now you can use it like on the other devices.
1. On startup, CrateCAL asks for the value of currently stored crates.
The user have to check for this value and enter it, in this case 1080
2. Now you can see the calculated values. There meaning is as following:
- Stored crates in %. (
40%) - Needed crates/hub to reach 85%. (
1246 crates,6 Hub,5.8 Hubtrue value) - Needed crates/hub to reach 100%. (
1656 crates,8 Hub,7.7 Hubtrue value)
INFO:
CrateCALshows the raised amount of crates needed to reach 85% and 100%. It also convert it in Hub needed, so the missing crates can easily be ordered.
The number for Hub needed always get raised to the next larger number (if decimal), so it is guaranteed that there are always enough crates.
For double-checking reasons the true value for Hub needed is in brackets.
3. In the last step, CrateCAL asks if you want to restart. If so, press 1.
Keep in mind that the screen clears after restarting.
With this GUI it is now possible to run this script on touchscreen interfaces.
It works almost the same way as the CrateCAL.py script execpt the true values.
In this version it always rounds to the next larger number.
INFO: Keep in mind that the graphical interface is set to an fixed resolution ( 800 x 480 ). Any changes to the resolution in the
.uifile WILL resolve in display issues.
1. This is the standard launch screen. On the right side you see a NumPad like button arrangment. So no need to install an virtual keyboard for this. When you enter the value of the current magazine,press the Enter button and it calculates the missing amount of crates. If you want to delete your input, press the Delbutton. This will only delete the user-input, so you can still see your last calculations.
2. On the left side you see a header with 85% and 100%. The calculations for these two will show up beneath them. The first row indicates the missing crates to get to the wished fillment of the magazine.
The second row indicates the amount of Hub that is needed.
- Develop GUI for user inputs via Touchscreen
- Communication Raspberry Pi and Siemens SPS (Automatically get current state of magazine)
- Adding additional language for more accessibility









