Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: No Vector
Pengineer
Newbie
Posts: 8
Permalink
Pengineer
Post No Vector
on: March 2, 2013, 06:22
Quote

Hi all . I would like to say how much I appreciate all the hard work that Sandy has put into this project.
I have built a basic machine using an Adafruit stepper driver and an arduino uno. I can load and render images and thy look great, however, my machine
refuses to draw from a vector drawing . I can load it , move it around on the paper and set the frame. When I give the command to draw vectors, the Command Queue fills and the motors slowly move and the display shows it drawing the vectors but the pen end up drawing an image that looks like a river . the motors only unwind . Since it draws image files perfectly I think my motors are wired correctly and the move pen to point work correctly.
Does anyone have any ideas what I could have setup wrong...?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: No Vector
on: March 2, 2013, 08:18
Quote

Penengineer, welcome, and you're welcome 🙂 Any chance of a pic of your drawing that looks like a river? Usually when bitmap works and vectors don't, there's some mismatch between the machine spec in the controller and that in the machine itself (fixed by a "upload machine spec), or some more basic error in the specification - wrong number of steps per rev, or sprocket size, something like that. Remember when using the adafruit shield, your stepsPerRev should be double the steps of your particular stepper motors.

sandy noble

Pengineer
Newbie
Posts: 8
Permalink
Pengineer
Post Re: No Vector
on: March 2, 2013, 19:01
Quote

Thanks for the reply . I have checked spool size (130mm per/rev) , 400 steps per rev . I would like to add a couple of pictures but I dont know how to add it to this post so I have added the url to the photo locations. (I have never used forums before. I know I live a sheltered life!)

https://lh3.googleusercontent.com/-2eTJ8rOtC24/UTJKPm0xPOI/AAAAAAAAADE/gR3sLIagV1U/s1059/photo+%281%29.JPG

https://lh6.googleusercontent.com/-cFm8ON7C7ZM/UTJKPovaj8I/AAAAAAAAADc/0m5p5loIxYs/s1059/photo+2.JPG
I noted if i use the move direct command the motors only move in one direction.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: No Vector
on: March 2, 2013, 21:03
Quote

Don't worry, the image embedding in this forum isn't great - I can't even remember if it works or not.

Hum you're right that is pretty weird. The wiggly line down the middle of your page is the output from that vector command? That's a new one! Does an "upload machine spec" go ok? By go ok, I mean, if you open the console (press "c" key) and then hit upload, does the console show the machine receipting and acting on the instructions?

If it's drawing bitmap stuff ok, and it's doing the "move to point" type commands ok then there's obviously nothing wrong electrically. That is, it's moving in both directions with both motors. The machine works in a much more convoluted way when doing a "move direct" or any kind of vector stuff. Let us know what it does when you do a "upload machine spec", and it might be worth posting the contents of your default.properties.txt.

cheers!
sn

Pengineer
Newbie
Posts: 8
Permalink
Pengineer
Post Re: No Vector
on: March 2, 2013, 21:20
Quote

When I upload the file with the console open, the commands execute correctly with out any errors ( no out of limit errors.) I did notice that as it executes I see an incoming of dn.5 (down direction?) and its always 5 . If I draw a 360 deg circle it lookes similar to a letter "S" . I re downloaded the arduino code a made sure i am using the latest version
here is my default settings
# *** Polargraph properties file ***
#Thu Feb 21 21:56:58 MST 2013
controller.pixel.samplearea=10.0
controller.pictureframe.position.y=300
controller.pictureframe.position.x=100
controller.testPenWidth.startSize=0.8
controller.machine.colour=969696
machine.motors.mmPerRev=130
controller.window.width=1680
controller.frame.colour=C80000
controller.image.position.y=177
controller.image.position.x=177
machine.motors.accel=800.0
controller.image.height=118
controller.machine.serialport=2
controller.window.height=988
controller.maxSegmentLength=2
controller.page.position.y=300
controller.vector.scaling=100.0
controller.page.position.x=100
controller.pictureframe.width=510
machine.step.multiplier=1
controller.grid.size=35.0
controller.testPenWidth.endSize=2.0
controller.pictureframe.height=510
controller.page.colour=DCDCDC
controller.testPenWidth.incrementSize=0.5
controller.image.width=118
machine.motors.stepsPerRev=400.0
machine.pen.size=0.5
controller.page.width=510
controller.pixel.mask.color=00FF00
controller.machine.baudrate=57600
controller.vector.minLineLength=1
machine.width=680
controller.page.height=500
controller.vector.position.y=0.0
controller.background.colour=646464
controller.image.filename=
controller.vector.position.x=0.0
controller.homepoint.y=120.0
controller.guide.colour=FFFFFF
machine.motors.maxSpeed=1200.0
controller.homepoint.x=340.0
controller.density.preview.style=1
controller.pixel.scaling=1.0
controller.densitypreview.colour=000000
machine.height=900
picture or circle
https://lh4.googleusercontent.com/-5RtjasOrJcs/UTJs0xJGzAI/AAAAAAAAADw/LCz8EiGwXsU/w497-h373/photo%2B3.JPG

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: No Vector
on: March 2, 2013, 22:53
Quote

dn5 is a bit of a red herring - it's just a debugging trace left in that I NEVER REMEMBER TO TAKE OUT no matter how many times I notice it.

But that is so odd - drawing a circle draws four quadrants ok, but each one transformed in some way. Not turned 90 degrees or flipped (which might make me think I've left an ABS() in there somewhere). It's not a big machine, so it's not a problem with out-of-range number, or roll overs.

Ok the weird thing is, that the SVG _must_ have as it's first point, and as it's last, the very same coordinates. Yet somehow that's being translated to two different coordinates on the page. Would you mind sending me an email (sandy.noble@gmail.com) with that circle svg attached, along with the commands that get generated when you do "draw vector"? You can pause the command queue and do "export queue" on the queue tab to get it into a file.

Also, what source are you using to get your firmware for the machine? Just so I can synchronise things. I haven't made any updates lately, but it could well be something I've missed. Last of all - you say that you don't get any errors when you upload the file - but that isn't quite the same as upload machine spec.. I'm assuming that's what you meant, but can you clarify that? You've definitely done a "upload machine spec" (button on the setup tab), and there doesn't seem to be any errors in the console from it?

cheers!
sn

Pengineer
Newbie
Posts: 8
Permalink
Pengineer
Post Re: No Vector
on: March 4, 2013, 06:33
Quote

Update.... I finally got the machine to draw vectors properly . Out of pure frustrarion
I removed all evidence of the polargraph software and redownloaded the code from
an earlier version ( 1.2.4) It is working perfectly now ! . I dont know exactly what the problem was but i suspect it was something in my setup . I will try reinstalling ver 1.2.5
at a later date . Now to dig into the processing code a little !!

Regards....... Paul W

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: No Vector
on: March 4, 2013, 10:07
Quote

Well hopefully I've not broken something in the software since 1.2.4, but let me know how you get on and I'll have a closer look - it'll be something stupid, I'm good at doing those things. Actually not that unlikely - I tend to work on the polarshield branch and then retro-fit the changes to the a1 branch, but have very rarely got a machine with an uno available to test on. Are you compiling from source or using the binary hex files?

sn

Pengineer
Newbie
Posts: 8
Permalink
Pengineer
Post Re: No Vector
on: March 5, 2013, 01:46
Quote

I am compiling from source for the arduino but I am just running the processing from the downloaded executable. I want to also compile the processing but I am currently
getting errors when I try to compile it . I have a limited knowledge of processing so
it may take me some tinkering to figure out (understand ) what the problem is.
In the meantime I can now happily draw away !

Regards .... Paul W

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.023 seconds.