========================================================================== Kave 2000 and communication with other databases ========================================================================== Kave 2000 uses local XML tables (Paradox tables until 2007) to save the local data. Local tabes is used for following reasons: - the unit is independent of network failures - the same program can be used also in no networked factories - one common program gives better and cheaper maintenance, because there is no differences between customers (compared that program has connection to factory database that is different in every factory) - with local database it is possible to get the fastest responce times independent of network load - in Network down situations it is easy to continue with manually input orders The local database tables are described in file database.txt Kave 2000 computers are equipped with network card (f.ex 3M 3Com Etherlink III Combo). Communication to other databases can be done with shared files. ========================================================================== ========================================================================== ========================================================================== Manual importing/exporting ========================================================================== The idea of manual importing is following (next is for example ordernr A007): 1) Server writes a file A007.ord 2) Kave reads the file and renames it A007.$$$ so that server knows it has been read. In Manual mode the read is done by pressing Import. 3) After the order is totally ready, Kave renames the file as A007.rdy so that server knows the order is ready. In manual mode this is doe by pressing Export Ready. ========================================================================== ========================================================================== ========================================================================== Importing data to Kave ========================================================================== Write a text file (f.ex to ordernr A007): A007.ORD: ========= [OrderNr] OrderNr=A007 ColorCode=RR34 Material=SIL Thickness=0.55 MachineNr=T35 [OrderLn] Line1=4500;5 Line2=5300;7 [OrderRolls] Roll1=ABC126;;;;;;30000;;20000722 Roll2=ABC128;B19 [Rolls] Roll1=ABC127;B16;SIL;0.4;RR33;123000;40000;20000701;20000721 --------------------------------------------------------- That means that roll ABC126 and ABC128 is added to Rolls.db if they are not there. Same time their material would come SIL;0.55 and color RR34. They are also added to OrderRoll.db under order A007, so they are valid to choose for that order. Roll ABC127 is added only to Rolls.db (or the information is updated if they allredy exists). So that gives you a way to update the information in particular machine local Rolls.db. If there is no section [OrderRolls] then no change is made for particular orders OrderRoll.db. But if there is even one item under that section, then all previous items a deleted. If you want to remove some rolls from local roll database, you can use format: [SQL] sql1=Delete from rolls where RollNr="ABC127" sql2=Delete from rolls where RollNr like "ABD%" Actually you can request few localSQL-update command with this syntax if you want to update local databases (maybe you do not need to use other than delete the rolls). I put that syntax if there still comes something if have not taken account. Or maybe you can add users for users.db with this way, so every machine is added a user in same time if a new user comes to the house. The [SQL]-section is done as a first thing reading the file, then [OrderNr]-section, then [Rolls]-section and the [OrderRolls] section as last. The most minimal .ord file that works for orders is: ------------------------- [OrderNr] OrderNr=A007 MachineNr=t12 [OrderLn] Line1=4500;5 Line2=5300;7 ------------------------- So there MUST be a line for MachineNr. If there is no line MachineNr under the [OrderNr]-section, then the file is kept just as to update rolls. The same syntax is used, so --------------------------------------------------------- [OrderNr] OrderNr=A007 ColorCode=RR34 Material=SIL Thickness=0.55 [OrderRolls] Roll1=ABC126;;;;;;30000;;20000722 Roll2=ABC128;B19 [Rolls] Roll1=ABC127;B16;SIL;0.4;RR33;123000;40000;20000701;20000721 --------------------------------------------------------- Will do for rolls.db and OrderRolls.db the same thing as the previous file. But this file will not do anything for ordernr.db or orderln.db. So hope there will be a previous file that has added the order. There is also a database material.db. If a material/thickness combination that does not allready exeist in material.db, that combination is added to material.db with keyvalue "SIL 0.4". This is that all machines would have same keyvalue for material. The other way would be that manually copy the material.db's to every machine. There still is matcolor.db and color.db that must be copied or updated by [SQL]-syntax. If there is no line for particular Order in OrderRoll.db, then I would accept any roll with correct material and color. I will not ask the rolls just after I have read the order-file, if one of the correct rolls is allready in the machine. But every time the user will choose a new roll, I will ask from you new roll-file (with syntax I tried to explain above). ============================================================================ Format of .rdy file: ============================================================================ The format of .rdy file is same than .ord file, except to order lines is added how many has been done and the user code and timestamp. A007.ORD: ========= [OrderNr] OrderNr=A007 ColorCode=RR34 Material=SIL Thickness=0.55 MachineNr=T35 [OrderLn] Line1=4500;5/5/Klaus # 20070920 180752.68 Line2=5300;7/7/Klaus # 20070920 180759.23 ========================================================================== ========================================================================== ========================================================================== Automated Import/Export to other databases ========================================================================== Then there is possibility to automate the use of Import and Export. F.ex on ready made system is based to shared directory between server and Kave 2000. The shared directory should be on the Server end for Speed reasons. Kave writes to the shared directory a file Request.txt. Below is the possible requests. Then server reads the file and writes the file result.txt possibly with file order.txt and rolls.txt. Below is also the format of result.txt. ========================================================================== ======================== KAVE COMMAND LIST ======================== Write to request.txt "GET NEXT ORDER" + Get the next order from the Kave Server software. "GET CURRENT ORDERID" If the Kave software has been down and can't resolve the current order number use this function to receive the number of the current order assigned. "GET ORDER STATUS xx" Get the current status for order 'xx'. 'xx' is the order number. "GET COILLIST xx" + Get a list of possible coils for order 'xx'. All possible rolls for this order are listed in the 'ROLLS.TXT' file and both the barcode and the warehouse location are given. Optionally the xx may include also matereail, thickness and color, so f.ex xx may be 95;HP200;0.5;1e244 "GET COILINFO xx" + Get a list of rolls filling condition 'xx'. All possible rolls for this condition are listed in the 'ROLLS.TXT' file and both the barcode and the warehouse location are given. xx is normally the coilcode for the coil needed, so f.ex C%1234 but in future it may contain wildcards like C%1* "REPORT COIL INUSE xx" + Report the Kave Server that we are about to use the coil with barcode 'xx'. Replace 'xx' with the scanned barcode. "REPORT COIL EMPTY xx" + Report the Kave Server that we the coil with barcode 'xx' is empty. Replace 'xx' with the scanned barcode. "ORDER READY xx" + Report the Kave Server Simulation that the production of order 'xx' has been completed. "PRINT LABEL xx" - Tell server that the label print for order xx is needed. "PRINT ORDER xx" - Tell server that the ordersheet print for order xx is needed. "START OF PRODUCTION xx" + Report the Kave Server that the production of order 'xx' has been started. "CANCEL CURRENT ORDER" + Cancel the order currently in production. "REPORT USED MATERIAL xx" + (without xx) Report the used material to the Kave Server Simulation for order 'xx'. Used material should be specified in the 'USAGE.TXT' file. ================================= SERVER REPLY LIST ================================= Read from result.txt "ORDER READY" + The Kave Server Software successfully created an order for Kave2000. Kave2000 may now open the file 'ORDER.TXT' which contains all order data. The format of ORDER.TXT is the same the previously mentioned .ord file. "COILLIST READY" + The coillist is successfully created. Kave2000 may now open the file 'ROLLS.TXT'. "COILLIST FAILED" The Kave Server Software was unable to create a rolls list the user must choose from. "COILINFO READY" + The coillist is successfully created. Kave2000 may now open the file 'ROLLS.TXT'. "COIL ACCEPTED" + The coil scanned is accepted "COIL EMPTY" + The coil informed empty accepted "PRINT OK" + The order print accepted "COIL REJECTED" The scanned coil is rejected. The user must change the coil use another coil. "START ACCEPTED" + Start of production is accepted. Kave2000 may start producing now. "ORDER PENDING" There is currently an order pending; must finish or cancel current order first. "ORDER CANCELLED" + The current order is successfully cancelled. "NO PENDING ORDERS" There is no order pending so no order number can be given; ask for a new order instead. "NO ORDER IN PRODUCTION" Could not finish an order because there is currently no order in production. "NO ORDER QUEUED" The Kave Server Software is unable to create an order for Kave2000. "ORDER FINISHED" + The current order is successfully completed. "NO MATERIAL SELECTED" The user must scan a valid roll barcode before trying to start production. "CURRENT ORDERID xx" The ID of the order the machine is currently producing. 'xx' represents the order id. "GET ROLLS LIST FIRST" Before trying to report the roll in use ask for the rolls list. "COULD NOT FINISH ORDER" The requested order could not be finished because the order id is not valid. "CURRENT ORDER STATE xx" The current state of the order requested. 'xx' represents the state. "ORDER NOT FOUND" The requested order is not found. The order id is not valid. ======================= KAVE SERVER ORDER STATE ======================= WAITING = 0 The order is waiting to be queued for the KAVE2000 software. QUEUED = 1 The order is queued for the KAVE2000 software. INPRODUCTION = 2 The order is in production. READY = 3 The order is successfully completed. ONHOLD = 4 The order is set on hold by the supervisor. This order can't be queued for KAVE2000 software; it must be set to 'waiting' by the supervisor. PARTIALREADY = 5 The order is partial ready. CANCELLED = 6 The order is cancelled. COILSELECTION = 7 The user is selecting the roll to use. COILSELECTED = 8 The user selected the roll to use and is about to start producing. ========================================================================== ========================================================================== ========================================================================== Kave Report export file formats: ========================================================================== The use of text file is chosen for reason that it is easy to implement to almost any system. The file sharing can be done to Unix machines for example with Samba mounts. Kave 2000 raports used material with text file usage.txt that has following format: DTime OrderNr Nr Len Cut Brutto Material Color RollNr UserNic MachineNr 20000722 121648.80 0 8 1001 1001.6 1023.3 3 IP71 ABC123 User? 20000722 122130.38 -1 -1 50 50.1 50.1 3 IP71 ABC123 User? 20000722 125953.90 0 9 1001 1001.6 1023.3 3 IP71 ABC123 User? 20000722 130017.68 A102 1 1000 1000.4 1022.1 3 IP71 ABC123 User? 20000722 130030.89 A102 1 1000 1000.4 1022.1 3 IP71 ABC123 User? 20000722 130043.18 A102 1 1000 1000.4 1022.1 3 IP71 ABC123 User? 20000722 130055.93 A102 1 1000 1000.7 1022.4 3 IP71 ABC123 User? 20000722 130109.15 A102 1 1000 1000.4 1022.1 3 IP71 ABC123 User? 20000722 130135.05 A102 2 1000 1000.7 1022.4 3 IP71 ABC123 User? 20000731 102213.46 -1 -1 50 50.5 50.5 SIL 0.4 RR35 ABC123 User? 1 20000731 102247.00 A00105 1 1200 1200.5 1232.5 SIL 0.4 RR35 ABC123 User? 1 20000731 102644.98 A00105 1 1200 1200.2 1232.2 SIL 0.4 RR35 ABC123 User? 1 20000809 151655.63 -1 -1 50 50.5 50.5 HP200 55 18B17 C%45804641 User? 20000809 173019.42 6 1 7300 7300.9 7514.2 HP200 55 10B19 C%69908365 User? 20000816 215633.33 9 1 4600 4600.8 4728.8 HP200 55 12B21 C%08803608 User? Kave 2000 raports usage of coils with text file rusage.txt that has following format: DTime RollNr Material Color Capacity InDate LastUsedDate Used Location 20010616 191426.94 123 HP200 0.55 10c31 A1 1 20010616 194231.05 C%01709334 HP200 55 RAL6002 B9 20010616 194256.91 123 HP200 0.55 10c31 300000 16.6.2001 0 20010616 195019.69 123 HP200 0.55 10c31 300000 16.6.2001 0 20010616 195405.52 123 HP200 0.55 10c31 300000 16.6.2001 0 ========================================================================== ========================================================================== ========================================================================== Possible other communication methods: ========================================================================== The communication can be done also by direct TCP/IP connection or even over direct connection to database, but this would be more expensive, than communication over some more common interface like text files. The ready made communication can be used also by using 3½" floppy disks. Kave reads orders from FD and writes ready made orders to the same disk. It is also possible to use barcode reader to read the coil codes if coilcode starts with some predefined sequence. ========================================================================== ========================================================================== ========================================================================== Localization ========================================================================== Kave 2000 has a language independent kernel and a full databse for every text that is show to the display, so it is easily localized to countries where text is written left to right. To right to left languages some work must be done. This localizing system gives a benefit to customer that new Kave versions is immediatly usable to every customer independent of their language. If some pharse is missing form lanugage databse, the english pharse is show to the user. ========================================================================== ========================================================================== ========================================================================== User security levels and backups and maintanance ========================================================================== Users can be divided to 10 different levels. Mostly 3 different is used: - base user (level 3) - one allways in factory (level 7) - superuser (level 9) For every user level it is possible to decide what functions are visible to user and what function can be used by user. So rarely needed parameters is possible to change only for superuser. Every day Kave is closed, it makes a backup from all files needed to return to situation of that day. The remote maintenace is done by PcAnywhere that can be used over telephone line or over TCP/IP. Also RAS can be used, but for speed reason it is normally not started as a default. ============================================================================ Test the manual import: ======================= 1) Take a new zip from: http://users.jyu.fi/~vesal/kave/k2000/doc/ 2) Unzip is either same or different place 3) Go to command line and give command k2000p 0 0 (or make a shortcut for that) 4) Goto tab Automatic 5) Press Edit orders 6) Goto tab Orders 7) Goto tab Options (in left center of Orders tab) 8) Change correct value for "Directory for machine export" (can be any dircetory, even with UNC name \\kaveserver\t12 but not more directories in UNC formt for some reson, I will study that). 9) Now the Import-button will work. Do somehow .ord files to that directory. 10) The .ord file SHOULD contain line MachineNr, in this simu example it can be MachineNr=t12 11) Pressing Import opens a dialog box where the operator can choose which orders to import. 12) Choose the order(s) and press Read and close the dialog. The .rdy names will change to .$$$ 13) Choose the order to do from Orders-window and click OK 14) Press The button with two Arrows to put the order to production. 15) Press Patch Run 16) After the order is ready, the .$$$ file changes to .rdy file and there is also operators name in every line done. 17) The Kave xml database files can be explored by running the patch file xml\db2xml.bat ============================================================================