📜 ⬆️ ⬇️

Again about inventory automation

Introduction


On Habré wrote about inventory more than once, but for me there was nothing useful. Why? The answer is simple: the task was set before me: to automate the inventory process of the store's goods. The goods lying on the shelves of the warehouse do not respond to pings, they cannot collect statistics about themselves and send them to the server by command about themselves. At the same time, the store is not virtual, and not even a small retail store, where in an hour you can count everything with your hands, a notebook and a pen. This is a fairly large trading network that sells products of very different directions.



Until of Amazon , with its robots, we certainly have not grown yet, but, nevertheless, we must carry out an inventory of goods. Now, if each product could be uniquely identified! And here it was not necessary to invent a single bike. Each product unit uniquely identifies itself with a barcode . This is more than enough to automate the collection of information. In this article I will try to explain my experience in implementing inventory technology using a data collection terminal.
')

Initial data


Most of the goods sold has its own barcode. But even goods that do not have such a mark can get it in stock at the time of posting. In addition, the products produced (for example, with us, these are pastries, salads and other ready-to-eat dishes) also receive their own barcode label. Bar-coding of all goods was introduced at the enterprise not for the purpose of inventory, but in order to simplify sales - probably everyone saw how the goods are laid out in supermarkets with carts and scanned at the cash desks with special scanners. But this fact (total bar-coding of everything and everything) helped me a lot to solve the main problem - the recognition of goods on the shelf of a warehouse (or on the trading floor, does not matter) and its accounting. For these purposes, a special device with a proud name is usually used - the data collection terminal.



The choice among these devices is very huge, the characteristics are very different. Basically, terminals differ in data collection capabilities:


But, also, there are a number of other characteristics that are worth paying attention to:


Since initially it was only required to try the inventory with such devices, and if it turns out to be convenient, money will be allocated for mass implementation in all divisions, I chose a low price as the most important criterion. As a result of searches and comparisons, I chose CipherLab 8001L .

Integration


For accounting in a company, “1C: Enterprise 8. Manufacturing Enterprise Management” (SCP) is used. Therefore, the issue of integration with our system of this device was important for me. Fortunately, the terminal was on the list of officially supported devices . As planned, this should mean that we download and install the driver, 1C processing and start working, but I was not satisfied with such work.

Naturally, equipment can be integrated into any accounting system. The easiest way is to use files of the specified format for exchange between the terminal and the system. But the component written for 1C supports working directly with the terminal. I used software from ScanCode, the official representative of CipherLab in Russia, as a base. the terminal was purchased from a partner of the company and had the appropriate license for the firmware. In general, the seller does not really matter, because all the firmware are similar to each other and have similar application generators. On the example of this article, you can deal with other firmware. More information about firmware and applications for TSD is written below. To implement the terminal, you will need to download from the developer’s page :


If you plan to use the accounting system is not from 1C, then on the website of the manufacturer of the equipment you can download the Library for working with devices. This archive contains examples of using the library in different programming languages. On the same site, you can also download instructions that I understood in order to achieve convenient work with the terminal.

The driver of the docking station is installed as a regular device, after that the USB cradle should be detected normally and appear in the equipment as a COM port. We will need to remember the number of this port:



If you want to just start working, then all that's left is to install the component for 1C and connect the processing. The component is installed as ordinary software, and the processing is connected in through the directory of commercial equipment. For example, the SCP it will look like this:



Maintenance processing can be connected from the file installed earlier, or downloaded from the 1C server, specifying the registration data.

Sometimes the cipherlab.dll library does not register properly, so you can manually register it in the system with the command:

regsvr32 [__]\cipherlab.dll

A string is created in the “Trade Equipment” directory:



What you should pay attention to is setting up the terminal:



Here it is necessary to indicate the COM port that we memorized above when installing the IR stand, some specific parameters that can be left as default and two formats, DB and File, for exchanging with the TSD. Database format - depends on your needs; there is no actual screenshot for the article, but here is an example of the file format:



After these simple manipulations, it is already possible to use the terminal in operation, but this turned out to be somewhat inconvenient. Therefore, I decided to make some changes, which will be discussed later.

Analysis and refinement


After a long conversation with employees of different levels and different positions, the following chain of actions was built for convenient inventory:



Consider the points that need to automate in this process:

Document creation

It seems that everything is clear: an inventory document is created, into which it is necessary to hammer in the sums of the actual availability of the item in the warehouse and check them against the balance. It sounds simple, but you need to look forward and there (in front) you can see two options for filling:


The first option is simpler, practically nothing needs to be completed, we simply go with the terminal and stroke the entire nomenclature, enter the quantity, and then load the nomenclature into the document with standard processing.
The second option is much more convenient and practical. First, the operator will see the bar code of which nomenclature he now counted in the TSD, since the terminal will know to which nomenclature this barcode is assigned. You can also display the accounting number, but I refused this, so that the operator did not relax at all and did not poke the input button thoughtlessly, but checked the number and entered it with numbers. Someone may note that the input quantity is a hole in the system, since due to the human factor the wrong amount may be entered. To this I will answer that the position of inspector (auditor) is taken by people responsible, they should not be wrong, this is their job. In addition, if you “poke” every item of the nomenclature and auto-summarize the quantity (it’s necessary to note that I provided for the auto-summing mode as a result), the process is delayed, and it was important for me to shorten the inventory time (read - idle store that brings income). Secondly, in the first variant, it is possible that the nomenclature on the accounting balance is in stock, but in fact it is absent, then the terminal will not say anything about it, and the discrepancy will not be taken into account. However, this problem will disappear with the first option, if you first fill in the document with the remnants of the warehouse, and only then load data from the terminal into it, you just need to zero the column of the actual quantity.

So, here I chose the second option, there was a stage of uploading data to the terminal and I needed to write a processing that would do it. Filling a document with accounting balances is done by a standard function: “Fill” → “Fill in stock balance (Control. Accounting)”.

Uploading data to the terminal

The easiest way to unload a specific list of items from the document itself, because, firstly, the list is already present in the document, and secondly, the operator does not have to switch to another processing to fill the terminal. It also eliminates the error that may occur if the document is filled with one set of items, and the processing will unload another set. To implement the unloading of the document, I used the mechanism of external processing of filling tabular parts.

I will not give all the code, I will give only the processing file itself and describe one interesting point: only a fixed set of fields can be sent to the terminal, this is a limitation of the developers of the driver wrapper processing. If you write in another language or write your own wrapper, then of course these restrictions can be circumvented, but I was completely satisfied with the list of transmitted fields:


Moreover, I only need two fields from this set: a barcode and a name. True, here we face another problem: you can assign several bar codes to the nomenclature. How to be? Yes, just unload all bar codes with names. Why save the memory of the terminal, which is unlikely to ever be completely filled in a single inventory? Then the terminal one by one of the barcodes will still find an entry in the database for the correct nomenclature and supply the quantity, and when loading all the quantities from different entries are summarized for the same nomenclature. In addition to the terminal, I also transmit the quantity multiplication factor associated with the barcode. This is necessary for weight goods, but can also be used for packaging. It is true that I implemented work with packages much later and not for inventory.

The external form must be connected in the directory of external processing of filling table parts, which can be opened via the menu “Service” → “Additional external reports and processing” → “Processing of filling table parts”. The created item should look something like this:



Now, in the document itself, you can use the “Fill” → “Uploading Data to the Data Collection Terminal” section to send the list of items to processing. The processing itself was written for universal use, and you can select the item to be unloaded right in its window, but if it receives the list, then simply press “Unload” and wait.

Data collection using the terminal

The data collection terminal is a rather complicated device, and it needs a program to work correctly! Otherwise, he simply will not know what to do with this list. For CipherLab terminals there are two types of software: firmware and application. Firmware is something like a terminal operating system, laying between the application and the I / O system. You can develop your firmware. To do this, the site of the terminal manufacturer has everything you need - software, examples and documentation. I was completely satisfied with the standard firmware from ScanCode. Who wants to experiment with the development of the firmware, he probably guessed that it would also need to be flashed. This is done using the utilities supplied. It remains only to create an application. Why am I saying create and not develop? Yes, simply because this process is purely visual and is done using an application generator. The main window of the generator is a TSD emulator:



All the functionality of the program is hidden in the context menu (it opens with a right click of the mouse when the mouse pointer is pointed at the main form). The development process looks like this:



By default, the base application simply collects the barcode and quantity. As we defined above, it does not suit us, and the terminal should show the name of the item, the barcode of which it has just counted, and the accounting amount of this item. Therefore, such an application was stuck with the mouse. All it took to write it was to read the attached instructions for using the generator. I will note separately what I changed in the base file:

  1. Removed work with several databases (this model supports three databases simultaneously). To do this, simply deleted items from the menu that open forms of work with all but the first bases. This is done in order to reduce the likelihood of errors, i.e. The end user is not confused in these databases.
  2. I specified what information should be displayed to the terminal, for this in the “search in” fields I indicated the database fields to which I transmitted the necessary data with 1C processing. If it is necessary to display an accounting amount, so that the operator recklessly confirms it, you only need to set the value "Field 4" in the "search in" line # 8. The truth is that it is necessary to make sure that in this field 4 the processing of unloading into the terminal is filled in precisely by the quantity.
  3. Instead of the price, I passed the quantity multiplication factor tied to the barcode. I wrote about this above. For non-weight goods, this coefficient is always equal to 1 in this version (accounting for packages has not yet been implemented).

Now, at this stage, we have a document created in the accounting system and a terminal with a list of the nomenclature of this document loaded into it. It remains to go through the warehouse and, scanning all that is on the shelves, enter the quantity in the TSD.

Load the actual quantity of the item in the document

Then I didn’t do anything about it and used the standard load from the terminal from 1C. When connecting the TSD in the trade equipment, in the menu “fill in” many documents (including the document “Inventory of goods in stock”) appears the item “Fill from the data collection terminal”. This mechanism receives only the barcode and quantity from the terminal. And nothing else is needed, processing the filling of the table part of the document searches the database by barcode nomenclature, finds (or adds) this nomenclature in the document and fills the “actual quantity” field. After this, it is necessary to write down the document and carry out the remaining regulatory procedures (printing of the collation sheet, distribution of scum for lost goods, etc.). At this automated processes are over. The TSD is sent to the regiment, the auditors are sent home, and some employees are frantically searching for a “short time”.

Afterword


At the moment, I can say that on the scale that was planned by the management, the technology is not used. Although the terminal has accelerated the inventory of warehouses from 16 to 4 hours, but some employees have met with innovation with bayonets, having refused to use the terminal for a while, and as a result only one auditor uses it. But those responsible for shipping goods from warehouses to stores and receiving goods to the warehouse from the supplier became interested in the device itself. As a result, I was tasked with automating their process. For this, more sophisticated ipherlab 8500 were purchased, I had to go into the processing of work with the terminal and in general this is a completely different story. In addition to this equipment, on duty, I already had the opportunity to work with fiscal registrars and bank payment terminals. If this topic will be interesting to readers, I can state in my new articles my developments in these areas. I introduced all this about a year ago and could have forgotten something. If someone uses this material as an instruction, but encounters difficulties, I will try to help solve the problem. Maybe someone wants to see more details? Then specify which ones.

Source: https://habr.com/ru/post/151306/


All Articles