Exemple #1
0
 def get_mean_velocity(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     mean_vel = cia402.GetMeanVelocity()
     self.meanvelocity.delete('0', END)
     self.meanvelocity.insert(0, str(mean_vel))
Exemple #2
0
 def get_filtered_amps(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     famp = cia402.GetFilterdAmps()
     self.filtamps.delete('0', END)
     self.filtamps.insert(0, str(famp))
Exemple #3
0
 def get_amps(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     amps = cia402.GetAmps()
     self.amps.delete('0', END)
     self.amps.insert(0, str(amps))
     m_tor.append(amps)
Exemple #4
0
 def get_velocity(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     vel = cia402.GetVelocity()
     self.velocity.delete('0', END)
     self.velocity.insert(0, str(vel))
     m_vel.append(vel)
Exemple #5
0
 def get_position(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     pos = cia402.GetPosition()
     self.position.delete('0', END)
     self.position.insert(0, str(pos))
     m_pos.append(pos)
Exemple #6
0
 def SwitchOff(self):
     port = int(self.port.get())
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     cia402.SwitchOff()
     self.var1.set(False)
     self.var2.set(True)
     self.port.delete('0', END)
Exemple #7
0
 def SwitchOn(self):
     global porter
     porter = int(self.port.get())
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(porter, pm1)
     cia402.Reset()
     cia402.SwitchOn()
     self.var1.set(True)
     self.var2.set(False)
Exemple #8
0
 def torquemode(self):
     self.varv.set(False)
     self.varp.set(False)
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     cia402.Setup_Torque_Mode()
     self.spos['state'] = 'disabled'
     self.svel['state'] = 'disabled'
     self.stor['state'] = 'active'
Exemple #9
0
 def bspos(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     posit = float(self.setpos.get())
     cia402.SetPosition(posit)
Exemple #10
0
 def bstorque(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     torq = float(self.settorq.get())
     cia402.SetTorque(torq)
Exemple #11
0
 def bsvel(self):
     port = porter
     pm1 = SocketCanPort.SocketCanPort("can1")
     cia402 = Cia402device.CiA402Device(port, pm1)
     veloc = float(self.setvel.get())
     cia402.SetVelocity(veloc)
Exemple #12
0
import Cia402device

cia402 = Cia402device.CiA402Device()
cia402.GetPosition()
Exemple #13
0
import SocketCanPort
import Cia402device

pm1 = SocketCanPort.SocketCanPort("can1")
cia402_pos = Cia402device.CiA402Device(31, pm1);
cia402_pos.Reset();
cia402_pos.SwitchOn();