#753

The program archive needs no installation: unpack it and run the program file. Below is what happens on the first start and how to make sure there is a connection to the server.

Where to unpack

Into a folder where the user has write permission, for example C:\cnc_client. The program creates its working files next to itself: settings, the orders database and logs. Folders like C:\Program Files are not suitable — Windows will block writing.

How the program knows your firm

The firm key (KEY) and the server address (API_URL) are already written into the config_gui.txt file next to the program: the server fills them in when you download the archive from the admin panel. The program window has no such fields — you can check them only in the file. More: The “Settings” tab.

What you will see

  • In the window header — your firm’s name, below it the caption “Download Client” and the version number. The name comes from the server by the key and is remembered, so next time it appears at once. Until there is a reply — a neutral caption.
  • On the left, in a column — the tabs; on the right — the content of the selected one. More: Window overview.
  • At the bottom — the status bar: a coloured dot, the current state and the clock.
  • By default the program starts polling the server right away and minimizes to the taskbar. Both habits are switched off with the boxes on the “Settings” tab.

Connection check in three steps

  1. On the “Main” tab press “↻ Check Now”. If the key in the file is empty, the program replies with the message “API key is not set” and does not start polling.
  2. Look at the top of “Main”. While everything is fine, there is no red bar; if the server rejected the request, a bar with the reason appears together with the “Details in the log” button.
  3. Open the “Log” tab. It shows step by step: the address the request went to, the server reply, how many orders are to download, the download and unpacking of each one.

How long to wait

  • One new order goes the whole way — request, download, unpacking, copying to machines, conversion — in roughly 10–40 seconds.
  • The first round is usually the longest: the server returns all orders for the last days (60 by default, set in time.txt). For a large firm that is hundreds of orders.
  • After that the program polls the server on schedule: the interval is set by the every_minutes parameter in config_gui.txt, three minutes at least.

If there is no connection

The reason is shown in the red bar on “Main” and in the log:

  • “The server does not know this API key” — the key is wrong or revoked. Download the archive from the admin panel again or put a fresh KEY into config_gui.txt and restart the program.
  • “The server asks to send requests to another address” — press “Use this address” in the bar: the program writes the new API_URL itself and suggests repeating the check.
  • “Address not found”, “The server did not answer in time”, “Cannot connect” — a network or address problem. Check the internet and API_URL in the file.
  • “The server replied with code 500” — a problem on the server side, not in the program. Try again later.
  • “API key is not specified” — the KEY parameter in the file is empty, polling does not start.
  • Full breakdown — Common errors and what to do.

No orders, but no errors either

This is normal if the files for the orders have not been generated yet. The program takes only what the server returned as ready; orders that are still waiting are shown in a separate “Generation” counter and will be picked up on one of the next rounds.

Next — Route rules: without them the files stay in the orders folder and never reach the machines.

If you also plan an exchange with the accounting system, the step after the routes is Connecting the BAS / 1C data processor: the address of this computer, the port and the token, which is issued right here by the “API for 1C” button on the “Goods” tab.

Related topics