First, read the article on how to generate MAC addresses on the server.
This article describes how to retrieve the addresses from a client.
First, download and install the WATS client, see Install WATS Client (>22.214.171.124).
During the installation, select the Development version.
Then, you need to make a setup program (we will provide this in a later version). This setup program can be made in any tool that can call a .NET assembly (dll). Visual Studio, LabView, Teststand....
The assembly to be referenced is called WATS in the Gclobal Assembly Cache (GAC) and can also be found in the folder C:\Program Files\Virinco\WATS\DesignSupport. The assembly is Virinco.WATS.Interace.MES.Production, an the class to create is called SerialNumberHandler.
The test program needs to call one function to prepare the client for MAC retrieval:
Here in C#
public void Initialize(
Here is the meaning of the parameters:
tokenID - Authentication token generated on the WATS server according to this procedure:
serviceUrl - The service address, e.g.:
requestType - The client can operate in two different modes:
Take: Client must be online and requested number of serialnumbers will be marked as Taken in the SN database when fetched.
Reserve: Client download a batchSize number of serialnumbers and makes a reservation in the SN database.
The downloaded serial numbers are stored and maintained in an XML file on the client (C:\ProgramData\Virinco\WATS\AddressStore)
When there are fetchWhenLessThan serialnumbers left in the local store, new serialnumbers are downloaded from server.
onlyInSequence - If set to true, requested serialnumbers will be contiguous (NB: Only MAC addresses)
batchSize - How many serialnumbers that are reserved on the server (When requestType=Resvere)
fetchWhenLessThan- Number of remaining offline serialnumbers before server is polled for a new batch
siteName- Serial numbers will be registered to a site with this name (NB: Must be defined on the server, can be null)
token- Special Guid needed to perform this function (password), contact firstname.lastname@example.org
After calling this function, the client is ready to retrieve serialnumbers by calling the GetSerialNumber or GetSerialNumbers function.
There are more functions in the api. Use this as the latest documentation of the client api.
To open it, click Start, All Programs, WATS and WATS Client Documentation - or on Windows 10.
You will find all function calls here:
Here is a sample VI with Labview for setup with Reserve:
To retrieve a serialnumber: