Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: sd card reader on ramps
patricio.r-
ivera
Newbie
Posts: 12
Permalink
Patricio Rivera
Post sd card reader on ramps
on: August 28, 2015, 12:29
Quote

Hi Sandy! Thanks a lot for this awesome tool!
I am having a lot of problems losing connection between controller and arduino. Im sure is an issue with linux rxtx. While, I want to give a chance to the sd card reader. I am trying to debug but arduino doesn't write anything about the card...

POLARGRAPH ON!
Hardware: 2
MC_MEGA
Loaded width:2127
Loaded height:1300
Loaded mmPerRev:32.00
Loaded steps per rev:200
Loaded step multiplier:16
Loaded down pos:20
Loaded up pos:50
Recalc mmPerStep (0.01), stepsPerMM (100.00)
Recalc pageWidth in steps (212700)
Recalc pageHeight in steps (130000)
READY_100

Obviously i can't draw!

running ramps + mega + polargraph_server_a1

Any help?
Thanks!!!!

patricio.r-
ivera
Newbie
Posts: 12
Permalink
Patricio Rivera
Post Re: sd card reader on ramps
on: August 28, 2015, 13:19
Quote

UPDATE:

I've added sd_initSD(); to setup() in firmware and now im having:

READY_100
Successfully beginned.
card initialized.
COMM.TXT 170170
...
done!
READY_100

I am happy. But according to this post: http://www.polargraph.co.uk/2012/02/state-of-the-art-tangle/

In step 7... the machine still doesn't move!!

Help! Thanks!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: sd card reader on ramps
on: August 28, 2015, 15:51
Quote

You're bold to try this - I haven't tried it since February 2012!

When you do the queue->exec part, you enter COMM.TXT as the file to draw from? That gets turned into a command that looks like C34,COMM.TXT,END, and that gets put into the command queue.

When that C34 command is consumed by the machine, what response does the machine give? It'll be either a complaint "Can't find the file ...", or a message like "drawing commands from ...".

Filenames are case-sensitive, comm.txt will not work.

Your COMM.TXT file has a "set home" as one of it's first commands?

I'm going to be honest, it's entirely possible this just doesn't work ... but I appreciate you trying to get it moving!

sn

patricio.r-
ivera
Newbie
Posts: 12
Permalink
Patricio Rivera
Post Re: sd card reader on ramps
on: August 28, 2015, 16:10
Quote

Sandy, i saw that at polargraph_server_a1 the function impl_exec_execFromStore() is entirely commented, so i think nothing will happend... uncomment it give me an error... so I decided to move the firmware toward polargraph_server_polarshield
Now, everything seems to be ok. It recognize the card,read the file... but after start, the gondola moves to the first position and... nothing...

any ideas?

patricio.r-
ivera
Newbie
Posts: 12
Permalink
Patricio Rivera
Post Re: sd card reader on ramps
on: August 28, 2015, 16:59
Quote

More info:
https://www.dropbox.com/sh/1lv8c165wgz84vr/AADa7XMMPVqTXJFOaP08Wqf1a?dl=0

this is the beginning of the file COMM.TXT:
C08,2,2,END
C01,9855,4860,END
C13,END
C05,9900,4860,90,49,END
C08,2,4,END
C05,9900,4950,90,35,END
C05,9810,4950,90,52,END
C08,2,2,END
C05,9720,5040,90,56,END
C05,9810,5040,90,35,END
C05,9900,5040,90,37,END
C05,9990,5040,90,31,END
C08,2,4,END

The print seems to hang in the second line C01,9855,4860,END

Debug SD give this:

Last command:C34,comm.txt,END:616184625
incoming: Filename to read from: comm.txt
incoming: Array to read from: comm.txt
incoming: Opened file:comm.txt
incoming: Reading...
incoming: .C-Command building:C
incoming: Reading...
incoming: .0-Command building:C0
incoming: Reading...
incoming: .8-Command building:C08
incoming: Reading...
incoming: .,-Command building:C08,
incoming: Reading...
incoming: .2-Command building:C08,2
incoming: Reading...
incoming: .,-Command building:C08,2,
incoming: Reading...
incoming: .2-Command building:C08,2,2
incoming: Reading...
incoming: .,-Command building:C08,2,2,
incoming: Reading...
incoming: .E-Command building:C08,2,2,E
incoming: Reading...
incoming: .N-Command building:C08,2,2,EN
incoming: Reading...
incoming: .D-Command building:C08,2,2,END
incoming: Reading...
incoming: .
incoming: -New line
incoming: Stored command parsed.
incoming: Executing command:C08,2,2,END
incoming: Command building:
incoming: Reading...
incoming: .C-Command building:C
incoming: Reading...
incoming: .0-Command building:C0
incoming: Reading...
incoming: .1-Command building:C01
incoming: Reading...
incoming: .,-Command building:C01,
incoming: Reading...
incoming: .9-Command building:C01,9
incoming: Reading...
incoming: .8-Command building:C01,98
incoming: Reading...
incoming: .4-Command building:C01,984
incoming: Reading...
incoming: .6-Command building:C01,9846
incoming: Reading...
incoming: .,-Command building:C01,9846,
incoming: Reading...
incoming: .4-Command building:C01,9846,4
incoming: Reading...
incoming: .8-Command building:C01,9846,48
incoming: Reading...
incoming: .6-Command building:C01,9846,486
incoming: Reading...
incoming: .0-Command building:C01,9846,4860
incoming: Reading...
incoming: .,-Command building:C01,9846,4860,
incoming: Reading...
incoming: .E-Command building:C01,9846,4860,E
incoming: Reading...
incoming: .N-Command building:C01,9846,4860,EN
incoming: Reading...
incoming: .D-Command building:C01,9846,4860,END
incoming: Reading...
incoming: .
incoming: -New line
incoming: Stored command parsed.
incoming: Executing command:C01,9846,4860,END
incoming: SYNC,9846,4860,END

And hang! stop move!
-----

I printed directly from controller exactly the same queue, without any problem.

Help!!!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: sd card reader on ramps
on: August 29, 2015, 00:05
Quote

I've never used the SD card stuff on RAMPS before, so can't offer any experience to help around that.

Why this should hang on that command ... not clear. I'm away this weekend, so I'm not going to get a chance to look at this until next week.

The command is being executed at least, because I think the SYNC msg is right at the end of the actual move.

The problem, I guess, isn't with the _following_ command either (the C13), because that doesn't even start getting read. There is no "Command building" message being emitted.

Right now, I'm not sure. I'll have a think about it.

sn

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