def Set_ElevateAngle(self,angle): self.write(f'LD 3 DV') #Set Arm self.write(f'LD 10 AF') #Set Speed self.write(f'LD {angle:.2f} DG NP GO') def Set_ElevateSpeed(self,speed): #Speed: 1-20 degree/sec self.write(f'LD 3 DV') #Set Arm self.write(f'LD {speed} AF') def Set_ElevateStop(self): self.write(f'LD 3 DV') #Set Arm self.write(f'ST') ############################################################################### ### Debug Main. Won't run when imported ############################################################################### if __name__ == "__main__": if 1: ATS1000 = OTA() ATS1000.EOL = '\x00' ATS1000.jav_Open('192.168.1.50',port=200) else: ATS1000 = OTA() ATS1000.EOL = '\n' ATS1000.jav_logscpi() ATS1000.jav_Open('192.168.1.109',port=5025) # print(ATS1000.Get_ElevateAngle()) # print(ATS1000.Get_AzimuthAngle()) print(ATS1000.Get_IDN())
def Set_AzimuthStop(self): self.query(f'CONT:AZIM:STOP') def Set_ElevateAngle(self,angle): self.query(f'CONT:ELEV:POS:TARG {speed}') self.query(f'CONT:ELEV:STAR') def Set_ElevateSpeed(self,speed): #Speed: xx degree/sec self.query(f'CONT:ELEV:SPE {speed}') def Set_ElevateStop(self): self.query(f'CONT:ELEV:STOP') ############################################################################### ### Debug Main. Won't run when imported ############################################################################### if __name__ == "__main__": if 1: ATS1800 = OTA() ATS1800.EOL = '\x00' ATS1800.jav_Open('192.168.1.50',port=200) else: ATS1000 = OTA() ATS1800.EOL = '\n' ATS1800.jav_logscpi() ATS1800.jav_Open('192.168.1.109',port=5025) # print(ATS1800.Get_ElevateAngle()) # print(ATS1800.Get_AzimuthAngle()) print(ATS1800.Get_IDN())