Пример #1
0
    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())
Пример #2
0
        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())