Examples of MotorRequestPosition2


Examples of com.infiniteautomation.rq.motor.MotorRequestPosition2

public class RQDriver {
 
  private CommPort port;
 
  public void demoCall(){
    Transmission t = new MotorRequestPosition2("A3");
    this.request(t);
       
    //Do we have a valid message and valid data.
    if(t.getResponse().hasErrors()||t.getRequest().hasErrors()){
      //Capture errors
      List<ErrorCode> errors = t.getRequest().getErrors();
      for(ErrorCode error : errors)
        System.out.println("Request Error Code: " + error);

      errors = t.getResponse().getErrors();
      for(ErrorCode error : errors)
        System.out.println("Response Error Code: " + error);

    }else{
      System.out.println("Data Recieved: " + ((MotorRequestPosition2Data)t.getResponse().getData()).getMotorPosition());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.