roboticsparallel-portlpt

Control a robotic arm


I have a Cyber Robot CYBER 310 and a Sciento CS-113 robotic arm with no documentation. Both use a parallel port.

How could I program those?

For the Cyber one, I found this:

enter image description here

Nothing at all on the Sciento one.

Any pointers or examples in Python/Java/C/whatever appreciated.

[update] This page contains some information, but I'm still lost: http://www.anf.nildram.co.uk/beebcontrol/arms/cyber/software.html


Solution

  • I am not entirely sure I understand what the question is.

    Are you unfamiliar with with programming the parallel port?

    My memory on it is hazy, but iirc it's pretty simple. It's a "dumb" interface so you simply need to write to it.

    If you are running under linux then there are some great resources on it:

    Linux Device Drivers: Chapter 9: An Overview of the Parallel port - Talks a bit about parallel port programming and goes on to talk about writing device drivers for it. A bit overkill I think for your application, but the entire book is fascinating, and enlightening.

    Linux I/O port programming - essentially you can write to /dev/port, or include asm/io.h and use inb() and outb() (I haven't done this in a while, but im sure if you run into a specific problem there will be a multitude of answers out there once you have it narrowed down to something specific)

    If you are on windows or mac, then id still suggest reading the above so you know what you are trying to do, they are straightforward in my opinion, then search for the windows/mac equivalent.

    Now for what I assume the crux of the question is, what do you write to the ports?

    For the Cyber 310 you have the pin layouts, although there seems to be multiple different pin layouts if you browse the site you have listed, and if we follow anf.nildram.co.uk here we can find some PIC assembly that will show us how to rotate the base.

    I have never touched PIC assembly before today, but with some help from the internet and the comments, I think we can translate what this is trying to do (snipped out the relevant portion, as most of it is timing and looping )

    ; 6: Symbol prf = PORTA.0
    ;       The address of 'prf' is 0x5,0
    ; 7: Symbol strobe = PORTA.1
    ;       The address of 'strobe' is 0x5,1
    ; 8: Symbol base = PORTB.0
    ;       The address of 'base' is 0x6,0
    ; 9: Symbol shoulder = PORTB.1
    ;       The address of 'shoulder' is 0x6,1
    ...
    ; 16: main: 
    L0001:
    ; 17: base = 1
    BSF 0x06,0          // set bit 0 at 0x06 to 1 essentially set base bit to 1
    ; 18: strobe = 1
    BSF 0x05,1          // set strobe bit to 1
    ; 19: strobe = 0
    BCF 0x05,1          // set strobe bit to 0
    ; 20: While a <> 730 // now we loop 729 more times
    

    So it appears, from my naive perspective, that to rotate the arm you need to set the motor bits (grabbed from your pinout) then set and clear strobe.

    Let me know if I am completely off base, this is a fascinating project.