def Set_AzimuthAngle(self,angle): self.query(f'CONT:AZIM:POS:TARG {angle}') self.query(f'CONT:AZIM:STAR') def Set_AzimuthSpeed(self,speed): """Speed: 1 to 150 degree/sec""" self.query(f'CONT:AZIM:SPE {speed}') def Set_AzimuthStop(self): self.query(f'CONT:AZIM:STOP') def Set_ElevateAngle(self,angle): self.query(f'CONT:ELEV:POS:TARG {angle}') self.query(f'CONT:ELEV:STAR') def Set_ElevateSpeed(self,speed): """Speed: 1 to 150 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__": # http://169.254.2.10/Tc3PlcHmiWeb/Port_851/Visu/webvisu.htm ATS1800 = OTA() ATS1800.jav_Open('169.254.2.10',port=200) print(ATS1800.Get_IDN())
def setUp(self): #run before each test self.ATSxxxx = OTA().jav_OpenTest(host)
def test_OTA_ATS1800(self): from rssd.OTA.ATS1800 import OTA #pylint:disable=E0611,E0401 self.OTA = OTA() self.assertEqual(self.OTA.Model,"ATS1800")
def test_OTA_Common(self): from rssd.OTA.Common import OTA #pylint:disable=E0611,E0401 self.OTA = OTA() self.assertEqual(self.OTA.Model,"OTA")
self.write(f'ST') def Set_AzimuthTrigger(self,angle): self.write(f'LD 1 DV') #Set Azimuth self.write(f'TR 1 GO') #Trigger enable self.write(f'LD {angle} DG TR') 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__": ATS1000 = OTA() ATS1000.jav_Open('192.168.1.50',port=200) # print(ATS1000.Get_ElevateAngle()) # print(ATS1000.Get_AzimuthAngle()) print(ATS1000.Get_IDN())
def setUp(self): #run before each test self.ATSxxxx = OTA().open(host, type='test')
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())