HomeInterfacesRecipesChangelogFAQ
Log In
Interfaces

Port Flows Examples

Putaway Process

The process begins by opening a port with openport, providing an empty bin content code to ensure that only bins classified as empty are delivered to the port. While the putaway operation is active, the WMS repeatedly calls openbin for the port without specifying selection parameters, allowing AutoStore to automatically choose an appropriate empty bin that matches the configured content code.

After requesting a bin, the WMS monitors its status by calling getbinstate until the bin is confirmed to be OPEN (bin_mode = O) at the correct port.

⚠️

For production use, monitoring bin state via Log Publisher segments BM and BL is recommended instead of polling.

Once the bin is OPEN, items are placed into the bin.

The WMS then finalizes the putaway by calling closebin, supplying a non-empty bin content code to update the bin’s classification.

This sequence is repeated for each putaway operation. When all putaway activities are complete, the WMS closes the port using closeport.

//Open the port with empty bin content code
taskApi.openPort(port_id, new List<int>() { emptyBinContentCode });

//Do this as long as we are putting away
while (putaway)
{
    //Open bin, we are not using any parameters so AutoStore
    //decides what empty bin to bring from the empty bin content code
    var selectedBin = taskApi.openBin(port_id).parameters.bin_id;

    do
    {
        //For this example i am using a query, it is recommended to
        //use LogPublisher to monitor bin states and more. 
        var binStateResponse = taskApi.getBinState(selectedBin);
    }
    //Wait til the bin is open in correct port
    while (!(binStateResponse.parameters.bins.bin[0].bin_mode == "O"
    && binStateResponse.parameters.bins.bin[0].port_id == port_id));

    //Put content into the bin, enter to continue when finished
    Console.ReadKey();

    //Close bin, with a non empty bin content code
    taskApi.closeBin(port_id, selectedBin, null, notEmptyBinContentCode);
}

//Close port when we finish putaway
taskApi.closePort(port_id);

Picking Process

Initially, the WMS creates enough task groups to cover at least 30 minutes of picking and allows time for AutoStore to prepare the required bins.

The process starts by opening a port using openport, specifying the category from which task groups may be selected. While the picking operation is active, the WMS repeatedly calls openbin without additional parameters. This allows AutoStore to automatically select the next available task from the specified category and deliver the corresponding bin to the port.

After requesting a bin, the WMS monitors its status by calling getbinstate until the bin is confirmed to be OPEN (bin_mode = O) at the correct port.

⚠️

For production use, monitoring bin state via Log Publisher segments BM and BL is recommended instead of polling.

Once the bin is presented, the operator picks the required items.

When picking is complete, the WMS calls closebin, providing both the bin_id and the task_id. This signals that the task has been completed and removes it from the system. If the WMS detects that a task group has been fully processed, it creates a new task group using create_taskgroup, specifying the category, requested time, priority, and tasks to replenish the workload and maintain continuous picking.

This sequence continues as long as picking is active. Finally, when all picking operations are complete, the WMS closes the port using closeport.

//Create taskgroups for atleast 30 minutes of operation and give 30 minutes to prepare

//Open the port in the category you want to pick from
taskApi.openPort(port_id, null, new List<int>() { category });

//Do this as long as we are picking
while (picking)
{
    //Open bin, we are not using any parameters so AutoStore
    //decides what task to bring from the selected category
    var openBinResponse = taskApi.openBin(port_id);

    do
    {
        //For this example i am using a query, it is recommended to
        //use LogPublisher to monitor bin states and more. 
        var binStateResponse = taskApi.getBinState(openBinResponse.parameters.bin_id);
    }
    //Wait til the bin is open in correct port
    while (!(binStateResponse.parameters.bins.bin[0].bin_mode == "O"
    && binStateResponse.parameters.bins.bin[0].port_id == port_id));

    //Pick content from the bin, enter to continue when finished
    Console.ReadKey();

    //Close bin with bin id and task id to remove the task from the system
    taskApi.closeBin(port_id, openBinResponse.parameters.bin_id, openBinResponse.parameters.task_id);

    //Replenish a taskgroup if we have finished what we worked on
    if (taskgroupEnd)
    {
        taskApi.createTaskgroup(taskgroup_id, category, DateTime.Now.AddMinutes(30),
        priority, new List<task>() { new task(task_id, bin_id) });
    }
}

//Close port when we finish picking
taskApi.closePort(port_id);

Inserting Bins Through An AutoStore Port

The process begins by opening the port using openport, explicitly specifying the port mode as INSERT. In this mode, the port is dedicated to manual bin insertion and does not follow normal task group or picking logic.

While bin insertion is active, the operator places a bin at the port and confirms when it is safe to proceed. The WMS then calls insertbin, providing the port_id, bin_id, content code, and bin_type. If the bin has already been created in the system, only the port_id and bin_id are required. This operation instructs AutoStore to accept the bin and insert it into the grid.

Once all bins have been inserted, the WMS must close the port using closeport. This step is especially important in INSERT mode, as robots may otherwise buffer at the port and wait indefinitely for further insert operations. Closing the port releases the robots and returns the system to normal operation.

//Open the port in mode INSERT
taskApi.openPort(portId,null, null, null, "INSERT");

//Do this as long as we are inserting bins
while (insertingBins)
{
    //Place the bin in the port, click enter when it is safe to insert
    Console.ReadKey();

    //Insert bin to the grid, if bin is allready created
    //you only need to pass portId and binId
    taskApi.insertBin(portId, binId, contentCode, binType);
}

//Close port when we finish inserting bins
//Very important in port mode INSERT as robots
//will buffer at port and wait "forever" 
taskApi.closePort(portId);