Package org.openpnp.spi

Examples of org.openpnp.spi.JobPlanner


        fireJobEncounteredError(JobError.MachineMovementError, e.getMessage());
        return;
      }
    }
   
    JobPlanner jobPlanner = machine.getJobPlanner();
    Head head = machine.getHeads().get(0);
   
    jobPlanner.setJob(job);

        Set<PlacementSolution> solutions;
    while ((solutions = jobPlanner.getNextPlacementSolutions(head)) != null) {
        LinkedHashMap<PlacementSolution, Location> placementSolutionLocations = new LinkedHashMap<PlacementSolution, Location>();
        for (PlacementSolution solution : solutions) {
                BoardLocation bl = solution.boardLocation;
                Part part = solution.placement.getPart();
                Feeder feeder = solution.feeder;
View Full Code Here


   * The base Safe-Z is the maximum of:
   *     Highest placement location.
   *     Highest pick location.
   */
  protected void preProcessJob(Machine machine) {
        JobPlanner jobPlanner = machine.getJobPlanner();
        Head head = machine.getHeads().get(0);
       
        jobPlanner.setJob(job);

        Set<PlacementSolution> solutions;
        while ((solutions = jobPlanner.getNextPlacementSolutions(head)) != null) {
            for (PlacementSolution solution : solutions) {
                BoardLocation bl = solution.boardLocation;
                Part part = solution.placement.getPart();
                Feeder feeder = solution.feeder;
                Placement placement = solution.placement;
View Full Code Here

  @Override
  protected void preProcessJob(Machine machine) {
    Set<PlacementSolution> solutions;
//    Machine machine = configuration.getMachine();
    Head head = machine.getHeads().get(0);
    JobPlanner jobPlanner = machine.getJobPlanner();

    for (BoardLocation jobBoard : job.getBoardLocations()) {
      Board board = jobBoard.getBoard();
     
      for (Placement placement : board.getPlacements()) {
        if (placement.getSide() != jobBoard.getSide()) {
          continue;
        }
       
        Part part = placement.getPart();
        if (part == null) {
          fireJobEncounteredError(JobError.PartError, String.format("Part not found for Board %s, Placement %s", board.getName(), placement.getId()));
          return;
        }
      } 
            // Dry run of solutions to look for errors
      jobPlanner.setJob(job);
      while ((solutions = jobPlanner.getNextPlacementSolutions(head)) != null) {
          for (PlacementSolution solution : solutions) {
         
          BoardLocation bl = solution.boardLocation;
          Part part = solution.placement.getPart();
          Feeder feeder = solution.feeder;
View Full Code Here

  @Override
  public void run() {
    Set<PlacementSolution> solutions;
    Machine machine = Configuration.get().getMachine();
    Head head = machine.getHeads().get(0);
    JobPlanner jobPlanner = machine.getJobPlanner();

    //pre job stuff
    state = JobState.Running;
    fireJobStateChanged();
    try {
      head.home();
      Nozzle nozzle = head.getNozzles().get(0);
      Location l = new Location(LengthUnit.Millimeters, 5.0, 20.0, 1.0, 0.0);
      nozzle.moveTo(l, 1.0);
    }
    catch (Exception e) {
      fireJobEncounteredError(JobError.MachineMovementError, e.getMessage());
      return;
    }
   
   
    //pre-test for we have feeders, etc
    preProcessJob(machine);
    jobPlanner.setJob(job);
       
    while ((solutions = jobPlanner.getNextPlacementSolutions(head)) != null) {
        LinkedHashMap<PlacementSolution, Location> placementSolutionLocations = new LinkedHashMap<PlacementSolution, Location>();
        for (PlacementSolution solution : solutions) {
        firePartProcessingStarted(solution.boardLocation, solution.placement);
       
        BoardLocation bl = solution.boardLocation;
View Full Code Here

TOP

Related Classes of org.openpnp.spi.JobPlanner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.