• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Cannot send data over USB

Scheduled Pinned Locked Moved Unsolved
General Discussion
1
2
131
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Arnix_2
    last edited by Arnix_2 11 Jun 2019, 10:53 5 Nov 2019, 19:22

    Hi to all.
    I have one strange problem that and i can not find error / bug in my code.
    I write one external program that used to access to duet. Nothing much,
    the program is sending data from vision system to duet.

    Now, this has worked before without any problems but now i just can not send any data.
    Meanwhile, I did make firmware update but this should have (or has) no affect to this situation.

    Computer and OS is still the same as before and DUET is recognized as OpenMoko at ttyACM0.
    Am using Linux distro Ubuntu 16 / 64 bit. I will attach file that am using for comm settings but if someone has some simpler test code i can use, please share...

    This is the part that i use for comm and "serial" file is in attach....

    try:
    #ser = serial.Serial("/dev/ttyAMC0", baudrate=115200, timeout=3.0)
    ser = serial.Serial("/dev/ttyAMC0", baudrate=115200)
    for object in self.current_objects:
    x, y = object
    strCode = 'G1 X' + str(x) + ' Y' + str(y) + ' Z5' + ' F1000'
    ser.write(str.encode(strCode + '\n'))
    # settings for vacuum pump
    if bRecycleBin:
    if x < 0:
    strCode = 'G1 X-200' + 'G1 Y0' + ' Z5' + ' F4000'
    ser.write(str.encode(strCode + '\n'))
    else:
    strCode = 'G1 X200' + 'G1 Y0' + ' Z5' + ' F4000'
    ser.write(str.encode(strCode + '\n'))
    # settings for vacuum pump
    ser.flush()
    except:
    print("Fail to connect...")
    1 Reply Last reply Reply Quote 0
    • undefined
      Arnix_2
      last edited by Arnix_2 11 Jun 2019, 10:55 6 Nov 2019, 10:54

      I forget to write that i have try different baudrate settings and i also try to remove it but nothing changes.
      BTW. it looks like attached file did not pass so am sending again (rename txt to py ).
      serialutil.TXT

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Unless otherwise noted, all forum content is licensed under CC-BY-SA