Ejemplo n.º 1
0
def test_upload_prg():
    """Test that a program can be uploaded and run in the simulator."""
    hc = acsc.openCommDirect()
    txt = "enable 0\nVEL(0) = 1333\nptp 0, 1.33\nSTOP"
    acsc.loadBuffer(hc, 19, txt, 64)
    acsc.runBuffer(hc, 19)
    time.sleep(0.2)
    vel = acsc.getVelocity(hc, 0)
    pos = acsc.getRPosition(hc, 0)
    print("Position:", pos)
    print("Velocity:", vel)
    assert vel == 1333.0
    assert pos == 1.33
    acsc.closeComm(hc)
Ejemplo n.º 2
0
 def vel(self):
     return acsc.getVelocity(self.controller.hc, self.axisno)
Ejemplo n.º 3
0
 def getVelocity(self, axis):
     return acsc.getVelocity(self.hc, axis)
Ejemplo n.º 4
0
 def vel(self):
     return acsc.getVelocity(self.controller.hc, self.axisno)