Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Standalone command queue runner - machine settings ? [Solved]
boris
Newbie
Posts: 10
Permalink
Post Standalone command queue runner - machine settings ? [Solved]
on: March 19, 2018, 19:35
Quote

Hi,

as next step in my setup I tried to get a standalone command queue runner working thus combining a raspberry feeding the arduino as described here:

https://github.com/euphy/polargraph/wiki/Standalone-command-queue-runner

Communication principally works very well as you may see on the attached pictures. However, it doesn't draw as feedback from my machine is that item to be drawn is out of boundaries and therefore skipped.

According to my opinion this somehow is related to the calculation of the pagewidth/height, which yields a high negative number as if there was an overflow. This does not happen when arduino is connected to processing, see logs in second picture.

I found in older release notes that in earlier releases there was a problem with bigger machines, but it was fixed years ago...

Could I just set pagewidth parameters statically into arduino source code?

Thanks for Your support!!
Image
Image

Shorn
Beginner
Posts: 33
Permalink
Post Re: Standalone command queue runner - machine settings ?
on: March 20, 2018, 15:35
Quote

I put the machine specifications into the Arduino firmware.. Also when I make a new drawing text file I add all the machine information to the start of the file as a backup.

Hardware:
*Running an Arduino Nano reflashed with an Uno bootloader
*Modified knockoff GRBL CNC shield with knockoff DRV8825 step drivers
*400mA -200 step motors set to 16x microstepping
*2mm belt with 36 tooth drive gears
*Machine set to 1500 Max speed and 5000 motor acceleration

Software:
*Stock Polargraph Controller to make command queues
*D2S version 2
*Send.py on remote Raspberry Pi

boris
Newbie
Posts: 10
Permalink
Post Re: Standalone command queue runner - machine settings ?
on: March 20, 2018, 16:09
Quote

Hi Shorn,
thanks for Your quick reply. I did the same, maybe I missed a critical comand.
Could You maybe check if my "header" sent from Raspi to Arduino is complete ?

C02,3.01,END
C31,1722.0,END
C32,1242.0,END
C25,PGXXABCD,END
C24,1680,1806,END
C29,40,END
C30,400,END
C37,16,END
C45,35,130,1,END
C31,800,1,END
C32,200,1,END
sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Standalone command queue runner - machine settings ?
on: March 20, 2018, 17:51
Quote

It looks like the command to set mmPerRev has failed, which means it's nan (not a number), and that throws off all the other calculations.

That's the C29,40,END command. You can troubleshoot a little by seeing if the machine gives you any errors when the C29 command is received. It should say " ".

You can send the command manually by typing it into the Arduino serial monitor while it's connected.

I'd also be interested to know if there's any different behaviour if you add a decimal point to the value in the middle, so try C29,40.0,END.

Re: sending machine spec lots of times, it's actually possible to "wear out" the eeprom by writing to it too many times. It's usually around 10,000 times, which is pretty unlikely, but if your machine ever got stuck in a loop for a couple of hours, it could easily get there. That's one reason why I'm very sparing with my eeprom writes, even though it'd be much easier to have lots of them to get consistency.

Fingers crossed!

Sn

boris
Newbie
Posts: 10
Permalink
Post Re: Standalone command queue runner - machine settings ?
on: March 21, 2018, 11:19
Quote

Thanks for the comment/good ideas,
(I have to admit that in the meantime I switched back to my Arduino MEGA, yesterday I used Arduino UNO, config was adapted accordingly but settings were comparable)

I prepared a file with a single command:

C29,40,END 

and sent it from Raspberry to Arduino using the python script. Answer from Arduino was:

received: .ch: C

After that, I adapted this single command to

C29,40.0,END 

, which caused troubles, see attached picture.

Afterwards I tried to load a complete gcoded drawing from raspberry to arduino, and failed... after the first line

C02,3.01,END

the error occurs that the device does not answer although messages from setup sequence were received (and also indicate that mmPerRev is calculated correctly)

I think I am very close, but I am not sure about it 😉
Image
Image
Image

boris
Newbie
Posts: 10
Permalink
Post Re: Standalone command queue runner - machine settings ?
on: March 23, 2018, 16:22
Quote

I think I solved it mostly, there were two problems:

1) My Arduino Mega isnt an original one, its a clone. However this clone seems to loose connectivity every now and then. Solution: I changed back to an original arduino uno and loosing connection disappeared and feedback loop to python script works fine.
2) of course it is necessary to start everything, with a C09 (= set home) command... also a gcode file feeded from a raspberry to an arduino... (apologies Sandy, you write it everytime and everywhere, I oversaw it...)

After doing so, python script works and the polargraph starts turning.
Only remaining problem: currently it moves into the wrong direction, means: It goes up where it should go down (which it does not while directly connected to PC/processing).
So, working file structure looks like this:

C09, Point x,Point y, END //Pointx and Pointy are numbers of Sethome command
C14, END //move pen up
C17, xxxx,xxxx,END //move to starting point
C13, END //move pen down
C17, ... //start drawing 
boris
Newbie
Posts: 10
Permalink
Post Re: Standalone command queue runner - machine settings ?
on: March 28, 2018, 09:29
Quote

Last issue were dimensioning differences between Arduino and Processing/Polargraph controller, which are solved now. Raspi / Python script work like a charm and very stable. Many thanks for Your support!!
Image

Shorn
Beginner
Posts: 33
Permalink
Post Re: Standalone command queue runner - machine settings ? [Solved]
on: March 28, 2018, 22:37
Quote

Awesome.!! Looks great!

Hardware:
*Running an Arduino Nano reflashed with an Uno bootloader
*Modified knockoff GRBL CNC shield with knockoff DRV8825 step drivers
*400mA -200 step motors set to 16x microstepping
*2mm belt with 36 tooth drive gears
*Machine set to 1500 Max speed and 5000 motor acceleration

Software:
*Stock Polargraph Controller to make command queues
*D2S version 2
*Send.py on remote Raspberry Pi

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