HomeInterfacesRecipesChangelogFAQ
Log In
Interfaces

Port Flows

Putaway Process

//Build a port queue of empty bin content codes, 10 - 15 minutes of work++

//Open the port
binApi.openPort(port_id);

//Do this as long as we are putting away
while (putaway)
{
    //Open bin, we are not using any parameters so AutoStore
    //Brings the next content code bin in port queue
    var selectedBin = binApi.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. 
        binStateResponse = binApi.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 non empty content code
    binApi.closeBin(port_id, selectedBin, notEmptyBinContentCode);

    //Replenish a single content code to the port queue
    binApi.appendToPortQueue(port_id, null, new List<int>() { emptyBinContentCode });
}

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

Picking Process

//Build a prepare queue with 30 minutes of operation and give 30 minutes to prepare

//Build a port queue of bin ids needed in port, 10 - 15 minutes of work++

//Open the port
binApi.openPort(port_id);

//Do this as long as we are picking
while (picking)
{
    //Open bin, we are not using any parameters so AutoStore
    //Brings the next bin in port queue
    var selectedBin = binApi.openBin(port_id).parameters.bin_id;

    //Wait til the bin is open in port
    do
    {
        //For this example i am using a query, it is recommended to
        //use LogPublisher to monitor bin states and more. 
        binStateResponse = binApi.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));

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

    //Close bin
    binApi.closeBin(port_id, selectedBin);

    //Replenish a single bin to the port queue
    List<int> portQueueBins = new List<int>() { bin_id };
    binApi.appendToPortQueue(port_id, portQueueBins);
}

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

Inserting Bins Through An AutoStore Port

//Open the port in mode INSERT
binApi.openPort(portId, "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
    binApi.insertBin(portId, binId, contentCode, targetGrid, binType);
}

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