Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Also, where's the Java?

2006-04-28
2013-05-02
1 2 > >> (Page 1 of 2)
  • plaasjaapie
    plaasjaapie
    2006-04-28

    I must be blind, but I haven't been able to find the raw java for the module that controlls the stepper controller on the website.  Could someone point me at that?

    Also, will we be seeing an API for the extruder controller before too long?

     
    • The java for the stepper controller is at:
      http://reprapdoc.voodoo.co.nz/cvs/reprap/host/src/org/reprap/devices/GenericStepperMotor.java

      The extruder API is fairly complete and usable now.  Or do you mean the documentation?  There is more work to do on much of the documentation, but I'm only so many people at once.

      Is there something specific you're trying to make it do, or are you trying to re-implement everything in something like VB?

      If you're just trying to set the output power levels, I'd recommend just holding off for a wee while until somebody compiles a windows version for you.  That would free you up some time to do cooler stuff.  The Java application is probably the way to go...  Alternatively, you could compile it yourself if you download the JDK.  That is probably much easier than implementing the protocol from scratch.

      I'll hopefully have a chance to make a Windows distro this weekend.  One day, that should be automated.

       
      • plaasjaapie
        plaasjaapie
        2006-04-28

        ***Is there something specific you're trying to make it do, or are you trying to re-implement everything in something like VB?***

        I've begun to worry that you've bit off more than you can easily chew with all this, so yes, I had been thinking of writing a VB.NET comms package that could control the boards so that lesser mortals like myself could look after themselves more effectively without plaguing you to death all the time.

        Obviously, Java would be preferable to VB.NET except that if I'm to do it I either use VB.NET or take six months to a year off to get up to speed with Java.  I frankly haven't got that kind of time right now and doubt if I will anytime soon as I'm trying to get up to speed both with Perl and Python at the moment.

        I've already established serial comms with coms board in VB.NET.  If I can find out the format of the messages you're squirting out along the serial loop I can probably make the rest of that happen.  That, of course, depends on documentation at a level of resolution that I've discovered just isn't there yet and given the work load on you, isn't likely to be there any time soon, I'm guessing.

        I've been sifting through the Java and C code that I've been able to recover from the tarball this evening, an exercise that seems very much like playing patience with half a dozen cards missing from the deck.

        I don't know that there's a workable answer to my frustration in this.  I doubt there is, other than to take a deep breath and wait till you can get it done. 

        I hate black boxes, though, and frankly, the controller system has too many of 'em for me to feel very comfortable with it.  For instance, you're current limiting via the PIC programme and I haven't got a clue how that works in the code or when I might be sticking a thumb in the gears if I try to fiddle with it.

         
    • I honestly think at this stage that a VB.NET implementation would be a big step backwards.  Maintaining two entirely separate systems at this stage seems like a waste of effort that could be better focused.  Of course, if that's what you really want to do, you should, because that's the whole point of making this open source.  But I can't help feeling that you have some real expertise in other areas that would go to waste if all your time was spent re-writing code that already works.

       
      • plaasjaapie
        plaasjaapie
        2006-04-28

        I'd rather be doing different things, too.  It worries me more than a little, however, when I think about what would happen to reprap if you stepped in front of a furniture lorry tomorrow morning on your way to work. 

        I figure reprap would be set back way over a year, easy.

        I have a client who carries quite a substantial insurance policy on me with his firm as beneficiary just in case something like that happens to me, so I know something of the situation you find yourself in vis a vis reprap.

         
        • Adrian Bowyer
          Adrian Bowyer
          2006-04-28

          I don't want to sound too immodest, but I have a reasonably complete understanding of Simon's code (though he may disagree after answering some of my questions to him over the last few days :)

          So we would need two busses, 12,000 miles apart...

           
    • Java programmers are a dime a dozen and it wouldn't take long for somebody to familiarise themselves with the relatively small amount of code in the project.  In fact, I think we're kind of relying on that to be the case, otherwise nobody will be able to extend the software.  Also you don't have to have a working knowledge of all of the low level code in order to call it.

      If you have some specifc thing in mind, I could give you a simple single file java application to do the operation.  I think you would find it very straightforward to extend that to do other things you want without learning about the rest of the library implementation and without learning the full extent of the java language.

      If you download and install Eclipse, I can get you up and running and I think you'll be surprised how easy it is.

      On the other hand, depending on what you want to do, you may find that the application we're working on building will do what you want anyway. 

      Adrian is working on the slicing code and once that's integrated, it will already be capable of simple production -- bugs and tweaking aside.

      Unless you have something special you need to do, just hold off for a moment because I think we're getting pretty close.

       
      • lordcat
        lordcat
        2006-12-29

        Ok... how about some instructions on how to setup/use eclipse?  I'm finally to the point where I'm ready to delve into the java code (and learn java in the process!), but I'm not sure how to go about doing it...

        I was able to 'check out' the code before with the software sourceforge told me to use, but I'm trying to use the built in functionality of eclipse to check out the code, and I'm not having any luck!

        I installed the JRE 1.5 (i think) a couple days ago, and just installed the win version of eclipse today, but it won't accept my password when trying to open reprap from the cvs.

         
        • plaasjaapie
          plaasjaapie
          2006-12-29

          If nobody else is using it my son is familiar with it having taken a couple of Java courses last year and used Eclipse with Java.  He'll be back at his PC on the 7th and I'm sure he will be happy to walk you through it.

           
        • Adrian Bowyer
          Adrian Bowyer
          2006-12-30

          There's now a complete set of software installation instructions for Linux/Unix at

          http://reprapdoc.voodoo.co.nz/bin/view/Main/RepRapLinuxSoftware

          which includes complete instructions for setting up Eclipse.

          We do need someone to write the Windoze equivalent...

           
          • lordcat
            lordcat
            2006-12-31

            Thanks! That helps some...

            So far I've:

            1> Installed JRE
            2> Installed the Java 3d stuff
            3> Installed Eclipse
            4> Installed Subclipse (http://subclipse.tigris.org/install.html)
            5> Checked the software out with SVN

            I'm having two major problems though...

            #1 https keeps giving me a nagging error message about the certificate not being trusted... I have to hit 'always accept' on every single folder I browse through, and it doesn't seem to save between sessions...
            #2 I'm having a horrible time trying to get comms working, I don't recall exactly how I got it working before with an older version of the code (but that code was 'packaged' for windows if i recall...)

             
            • lordcat
              lordcat
              2006-12-31

              oh... and #3 my monitor on that machine is going bad and is all fuzzy... I've got quite the headache now...  I've really gotta get around to replacing that...

               
            • lordcat
              lordcat
              2006-12-31

              The authentication issue seems ignorable (it doesn't seem to do it much/at all once I've got the project setup...)

              I think I figured out the comms stuff, the two java files into the lib directory to overwrite the existing ones, and the dll in the system or system32 directory...

              Except now I'm getting some odd behavior... as if the host software is no longer compatible with my firmware!

              The stepper exerciser menu loads, and I'm able to manipulate the axis, but as soon as i hit calibrate, I get an ioexception, and it starts telling me reprap type errors... (i think the first one is something about an ACK, and then it seems to be echoing a command back to itself or something...)

              I've been running with an older version, packaged for windows, without problem (i think the 4/30/06 that's up on here)... and i downloaded the firmware for the pics only a few months ago when I got the board together... is there some new changes that I'm missing here?

               
              • lordcat
                lordcat
                2006-12-31

                First problem: When loading, I get this pair of errors, and there is no '3d model' in the main screen (like the older version)

                STLObject(): Exception loading STL file from: file:/C:/WINDOWS/workspace/Reprap/lib/reprap-wv.stl
                com.sun.j3d.loaders.IncorrectFormatException: java.io.IOException: File size does not match.
                    at org.j3d.renderer.java3d.loaders.STLLoader.load(STLLoader.java:119)
                    at org.j3d.renderer.java3d.loaders.STLLoader.load(STLLoader.java:78)
                    at org.reprap.gui.STLObject.<init>(STLObject.java:92)
                    at org.reprap.gui.RepRapBuild.createSceneBranchGroup(RepRapBuild.java:191)
                    at org.reprap.gui.Panel3D.initJava3d(Panel3D.java:266)
                    at org.reprap.gui.Panel3D.initialise(Panel3D.java:153)
                    at org.reprap.gui.RepRapBuild.<init>(RepRapBuild.java:125)
                    at org.reprap.Main.createAndShowGUI(Main.java:313)
                    at org.reprap.Main.access$24(Main.java:77)
                    at org.reprap.Main$23.run(Main.java:574)
                    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
                    at java.awt.EventQueue.dispatchEvent(Unknown Source)
                    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.run(Unknown Source)
                STLObject(): cannot create a valid STL object.
                STLObject(): Exception loading STL file from: file:/C:/WINDOWS/workspace/Reprap/lib/reprap-wv.stl
                com.sun.j3d.loaders.IncorrectFormatException: java.io.IOException: File size does not match.
                    at org.j3d.renderer.java3d.loaders.STLLoader.load(STLLoader.java:119)
                    at org.j3d.renderer.java3d.loaders.STLLoader.load(STLLoader.java:78)
                    at org.reprap.gui.STLObject.<init>(STLObject.java:92)
                    at org.reprap.gui.PreviewPanel.createSceneBranchGroup(PreviewPanel.java:95)
                    at org.reprap.gui.Panel3D.initJava3d(Panel3D.java:266)
                    at org.reprap.gui.Panel3D.initialise(Panel3D.java:153)
                    at org.reprap.gui.PreviewPanel.<init>(PreviewPanel.java:24)
                    at org.reprap.Main.createPreviewPanel(Main.java:346)
                    at org.reprap.Main.createAndShowGUI(Main.java:324)
                    at org.reprap.Main.access$24(Main.java:77)
                    at org.reprap.Main$23.run(Main.java:574)
                    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
                    at java.awt.EventQueue.dispatchEvent(Unknown Source)
                    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.run(Unknown Source)
                STLObject(): cannot create a valid STL object.

                Then I try and use the stepper exerciser to calibrate...

                Opening port COM2
                Device at address 8 not present
                Received data packet when expecting ACK
                Ignored IO exception in position update: java.io.IOException
                Receive error, re-sending
                0->3: 5 f5 0 0
                Receive error, re-sending
                0->3: 5 f5 0 0
                Receive error, re-sending
                0->3: 5 f5 0 0

                and the error keeps repeating itself until i kill power to the reprap...

                It doesn't seem to happen the moment I hit calibrate, it will start to move a little before the error, and then just keep moving after the error (but the calibration has aborted)

                 
                • Adrian Bowyer
                  Adrian Bowyer
                  2007-01-02

                  ******First problem: When loading, I get this pair of errors, and there is no '3d model' in the main screen (like the older version)

                  Looks as if the STL file that represents the working volume has been corrupted.  Can you e-mail me C:/WINDOWS/workspace/Reprap/lib/reprap-wv.stl and I'll check?

                  The comms problem is strange.  Device 8 is the extruder, and the stepper exerciser shouldn't care if it's there or not.  I'll look into it.

                  Also - the axes won't work properly unless they have end-sensors on them (or the corresponding PIC pins are grounded).  It's best to have (at a minimum) zero sensors.  The max-range ones can just be shorted to ground if you know how long your axes are.

                   
                  • lordcat
                    lordcat
                    2007-01-02

                    I'm not home right now, but can email that file to you later.  It should be whatever came out of the SVN, I didn't edit it or anything at all...

                    The extruder error doesn't seem to cause problems, but it does popup whenever I go to the stepper test screen.

                    I do have limiters on my setup (physical limiters, switches normally set to 'closed circuit' unless tripped...)

                    I have been running this setup before on the win32.zip copy that's up on sourceforce (months old), same machine, same board, same setup... I can switch back and forth (sort of, slow machine with not much memory), and it works fine under the older copy...

                    I'm wondering what changes might have been made since then that would cause this... The reprap itself doesn't seem phased by it; it'll run through the calibration routine properly even after the exception has been thrown...

                    ...I have noticed that my 'max' limiter switch has been 'sticking' lately, but I don't think that is causing the problem here...  I've also noticed the wiring to my limiters 'failing' once in a while (just twisted on, haven't soldered it together yet), but again, I don't think that's causing the problem (neither cause this problem with the old code)

                     
    • plaasjaapie
      plaasjaapie
      2006-04-28

      Thanks!  I gave it a try and it won't load.

      I tried to imprint what was on the little DOS window as it flashed on and off in about a microsecond.  From what I can tell it is getting some sort of exception error.

      Glancing further down the diagnostic it appears to be trying to access Java3D rather than regular Java.

      Am I reading that right?

       
    • plaasjaapie
      plaasjaapie
      2006-04-28

      Ah yes, I see that I should have loaded Java3D.  Okay, that's done.  Now I figure out where in this big window the stepper controller exerciser is.  Got that...  doesn't work.

      Hmmm...

      Check to see if it works with the old exerciser.  Yup...

      Check the date of the latest hex file on the wiki...  7 April.  Check the date of the hex file programmed into my stepper controller card...  6 March.  Need to reprogramme the PIC on my controller card.  That will have to wait till this evening.  Got to make some money. 

      I owe... I owe...  it's off to work I go...  :-p

       
    • Ah... you may also need an extruder controller installed for it to work at the moment because the stepper exerciser also lets you control the extruder.  I'll double check and if you like I can disable the extruder portion of it.

       
      • plaasjaapie
        plaasjaapie
        2006-04-29

        LOL!  Since I'm well behind you New Zealand boffins I haven't built up a extruder controller board just yet, so I'd appreciate it if you could fix it so that it didn't require anything but one stepper controller board.  :-p

         
        • Adrian Bowyer
          Adrian Bowyer
          2006-04-30

          I have several boards with just a 16F628, a smoothing capacitor, and power and data pins.  That way I can program them up and chain them together to test things.  They don't actually do anything other than pass and originate messages of course.

          I've left a little real estate blank on each so I can turn them into extruder or stepper controllers later.

           
          • Vik Olliver
            Vik Olliver
            2006-04-30

            I've done a similar thing, but just built a couple on socket-type prototyping breadboard. I've added a bunch of LEDs in lieu of a stepper driver.

            Vik :v)

             
    • I've added some testing so that if the extruder isn't available it won't try and talk to it in the stepper tester.

      New version is uploaded.

      Works fine for me with or without the extruder in now.

       
      • plaasjaapie
        plaasjaapie
        2006-04-29

        Are you sure you uploaded it?  I downloaded it again using the same link, viz,

        http://reprapdoc.voodoo.co.nz/bin/view/Main/Downloads

        and it still doesn't run here.  I checked the dates on the executables and they're unchanged from the last version you posted.

         
1 2 > >> (Page 1 of 2)