Ejemplo n.º 1
0
def gripperDisableServos(can):
    print "gripperDisableServos() called"
    writer = WriteSDO( 0x7F, 0x2100, 1, [0x0] )  # disable servos
    for cmd in writer.generator():
        if cmd:
            can.sendData( *cmd )
        writer.update( can.readPacket() ) 
    reader = ReadSDO( 0x7F, 0x2100, 1 )
    for packet in reader.generator():
        if packet != None:
            can.sendData( *packet )
        reader.update( can.readPacket() )
    print "RESULT DATA (after):", reader.result 
Ejemplo n.º 2
0
def setup_faster_update(can):
    reader = ReadSDO(1, 0x1801, 5)
    for packet in reader.generator():
        if packet != None:
            can.sendData(*packet)
        reader.update(can.readPacket())
    print "RESULT DATA (before):", reader.result

    writer = WriteSDO(1, 0x1801, 5, [50, 0])
    for cmd in writer.generator():
        if cmd:
            can.sendData(*cmd)
        writer.update(can.readPacket())

    for packet in reader.generator():
        if packet != None:
            can.sendData(*packet)
        reader.update(can.readPacket())
    print "RESULT DATA (after):", reader.result
Ejemplo n.º 3
0
def setup_faster_update(can):
    reader = ReadSDO( 1, 0x1801, 5 )
    for packet in reader.generator():
        if packet != None:
            can.sendData( *packet )
        reader.update( can.readPacket() )
    print "RESULT DATA (before):", reader.result 

    writer = WriteSDO( 1, 0x1801, 5, [5, 0] )
    for cmd in writer.generator():
        if cmd:
            can.sendData( *cmd )
        writer.update( can.readPacket() ) 

    for packet in reader.generator():
        if packet != None:
            can.sendData( *packet )
        reader.update( can.readPacket() )
    print "RESULT DATA (after):", reader.result 
Ejemplo n.º 4
0
def setupHandModule( can ):
  reader = ReadSDO( 12, 0x1801, 5 )
  for packet in reader.generator():
    if packet != None:
      can.sendData( *packet )
    reader.update( can.readPacket() )
  print "RESUT DATA (before):", reader.result

  #  writer = WriteSDO( 12, 0x1801, 2, [1] )
  writer = WriteSDO( 12, 0x1801, 5, [50, 0] )
  for cmd in writer.generator():
    if cmd:
      can.sendData( *cmd )
    writer.update( can.readPacket() )

  for packet in reader.generator():
    if packet != None:
      can.sendData( *packet )
    reader.update( can.readPacket() )
  print "RESUT DATA (after):", reader.result

  reader = ReadSDO( 12, 0x2100, 1 )
  for packet in reader.generator():
    if packet != None:
      can.sendData( *packet )
    reader.update( can.readPacket() )
  print "Function Select, 8bit channel status:", reader.result

  """
Ejemplo n.º 5
0
def setupHandModule(can):
    reader = ReadSDO(12, 0x1801, 5)
    for packet in reader.generator():
        if packet != None:
            can.sendData(*packet)
        reader.update(can.readPacket())
    print "RESUT DATA (before):", reader.result

    #  writer = WriteSDO( 12, 0x1801, 2, [1] )
    writer = WriteSDO(12, 0x1801, 5, [50, 0])
    for cmd in writer.generator():
        if cmd:
            can.sendData(*cmd)
        writer.update(can.readPacket())

    for packet in reader.generator():
        if packet != None:
            can.sendData(*packet)
        reader.update(can.readPacket())
    print "RESUT DATA (after):", reader.result

    reader = ReadSDO(12, 0x2100, 1)
    for packet in reader.generator():
        if packet != None:
            can.sendData(*packet)
        reader.update(can.readPacket())
    print "Function Select, 8bit channel status:", reader.result
    """