Weird behavior with Arduino and Repetier

Talk about the Repetier Host software here (http://repetier.com)
Post Reply
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Weird behavior with Arduino and Repetier

Post by taav »

About a week ago i powered up my printer and was able to effectively communicate with it via my laptop.

I issued M119 successfully. And G28 caused my arm to move downwards.

Instead of rewiring i used Arduino to invert the axis'.

I noticed after pressing upload the TX light started flashing orange.

I ruled out the possibility of any wiring failures because i have not touched any wires since last week, and as far as i know the usb cable seems fine.

I stumbled upon someone with a similar problem here. http://forum.arduino.cc/index.php?topic=27169.0" onclick="window.open(this.href);return false;

It looks like i may just be having a communication error with Arduino. When i start up repetier the manual control panel says 2 command waiting. or 3 command waiting.

I think i may simply have a slightly different board. I did afterall order my kit some months ago, maybe its different from the one suggested in the manual.

The paper that came with my board says Atmega 2560 , and another box says Atmega 32u2.

Arduino has the option for Mega 2560. I think its the same thing but i cant explain the problem.

Any help is appreciated.
geneb
ULTIMATE 3D JEDI
Posts: 5367
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Weird behavior with Arduino and Repetier

Post by geneb »

What baud rate is Repetier-Host set at? What baud rate is the firmware set at?

Note that the serial port communication LEDs are orange, there's nothing odd about that.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

Hey Geneb thanks for replying right away.

On repetier its 250000


And on Arduino firmware it says this

#define BAUDRATE 76800
#define BAUDRATE 115200 <--This middle one is highlighted in black
//#define BAUDRATE 250000
geneb
ULTIMATE 3D JEDI
Posts: 5367
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Weird behavior with Arduino and Repetier

Post by geneb »

...and there's your problem. :D

If you're using a Windows system, you should set the firmware baudrate to 250000.

If you're using Linux or MacOS, set the firmware rate to 115200 and Rep-Host to match.

Note that there should be only ONE BAUDRATE #define. I'm confused as to why there appears to be two in your file...
The others can be there, but they need to be commented out using "//".

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

Ah alright


Yeah the first one actually was commented out with // i just didnt post the whole thing


I reset the baud rate on the firmware, and I am looking at my manual control panel it still says command waiting.

For Arduino to apply the firm ware i just, file, save and upload right?

Maybe it didnt get applied? Did i miss a step?
User avatar
Toyguy
Printmaster!
Posts: 121
Joined: Sat Nov 02, 2013 1:39 pm
Location: Vermont

Re: Weird behavior with Arduino and Repetier

Post by Toyguy »

Try hitting Emergency Stop in Repetier Host, then exit and restart the program. I got into a situation like that where it thought I had commands pending but I wasn't doing anything. The only other thing I can think of is that the two programs, Repetier and Arduino, can not share the USB port, so make sure one is disconnected when trying to use the other. When the firmware is uploaded, you should be able to watch the LCD and see it reboot.
geneb
ULTIMATE 3D JEDI
Posts: 5367
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Weird behavior with Arduino and Repetier

Post by geneb »

Right - if Repetier has the serial port open, the Arduino IDE won't be able to upload the new firmware.

Make sure Rep-Host is disconnected before you update the firmware on the RAMBo.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

Tried emergency stop and reset

Also made sure to completely close each program before opening the other. Tried re-uploading the sketch on arduino, same thing
, it says done uploading then i close it it and open up repetier.
When i connect repetier again, its idle for a bit then it says 7 command waiting.

I did encounter some weird anomalies when i tried this for the first time, when i opened up rep host. I got somekind of error about something
not being defined. They error never reappeared though when i tried Rep host again. I was hoping it would so i could post it here, but it didnt.

Also when i first verified my Arduino sketch as was instructed in the manual i got a message in the text box about slider not being defined. This also did not reappear.


The software was interfacing perfectly with the machine before i touched Arduino, is there some way to go back to the way
Repetier talked with my Rambo?
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

I also notice when i connect with rep host i dont see the familiar text which shows the software is interacting with the machine

I guess what i should be seeing is something like the familiar message in the manual, external reset etc etc

When i open rep host there is this text

12:26:28.756 : OpenGL version:3.0.0 - Build 8.15.10.2291
12:26:28.758 : OpenGL extensions:GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_EXT_draw_buffers2 GL_WIN_swap_hint GL_EXT_texture_sRGB GL_ARB_multisample GL_EXT_packed_float GL_EXT_texture_shared_exponent GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_NV_conditional_render GL_EXT_texture_swizzle GL_ARB_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_ARB_depth_buffer_float GL_EXT_transform_feedback GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_ARB_framebuffer_object GL_EXT_texture_array GL_EXT_texture_integer GL_ARB_map_buffer_range GL_EXT_texture_snorm GL_INTEL_performance_queries GL_ARB_vertex_array_object
12:26:28.758 : OpenGL renderer:Intel(R) HD Graphics Family
12:26:28.758 : Using fast VBOs for rendering is possible


Sorry for the wall of text, But when i press connect i dont see anything new appearing, its like somehow its being blocked by something. Does Arduino somehow still have the serial port open even when its closed. IF so how do i make sure its closed?

I tried clicking around host abit and when i press the okay button on manual control the list gets refreshed and i see these commands pop up.
Not sure what these are but i am assuming they are the commands that initialize the software?
After that it goes idle for a second then it pops back to 7 command waiting.

12:21:30.556 : N1 M110 *2
12:21:30.556 : N1 M110 *2
12:21:30.557 : N2 M115 *4
12:21:30.557 : N3 M111 S6 *68
12:21:30.558 : N4 M111 S6 *67
12:21:30.558 : N5 M80 *62
12:21:30.565 : N6 M105 *1
12:21:33.621 : N7 M105 *0
12:21:36.676 : N8 M105 *15
User avatar
Toyguy
Printmaster!
Posts: 121
Joined: Sat Nov 02, 2013 1:39 pm
Location: Vermont

Re: Weird behavior with Arduino and Repetier

Post by Toyguy »

Hmmm, odd one!

Here's what I would do:

1. Go into Device Manager and verify the Rambo COM port. If you don't see the Rambo there, something is wrong with the USB connection.
2. Make sure Repetier Host is configured to use the correct COM port, then click Connect. If you don't get the standard sign on text, there is still an issue.
3. If it's still not working, I would uninstall Repetier Host, then go through all the Windows directories, like AppData, etc. and remove any references to Repetier I could find. I'd then re-download Repetier and re-install from scratch, then try launching and connecting again. If it fails at that point, I'd be suspicious of either a bad USB port on the PC or on the Rambo.
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

Okay So i tried installed repetier on my other computer, and same issue.

Its definitely something to do with the USB, I wonder how this happened as far as i know nothing is different. I will buy a new usb wire and try that out.

I really hope nothing is wrong with my Rambo.
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

I really don't think anything is wrong with the hardware because since last week i hardly even laid a finger on the printer.
The only thing i did was to move the arm up slightly which engaged the motors while they were off. I know one shouldnt engage the motors while off
because its bad for the motors, but i dont think that could cause anything like a short, could it?

Anyway going back to Arduino, since i tried it out on a different computer with no files of repetier, i know that the problem lies somewhere with what
Arduino told the rambo.

ITs like my computer and the rambo were friends, then arduino said something dirty, now they dont want to be friends any more.
User avatar
Toyguy
Printmaster!
Posts: 121
Joined: Sat Nov 02, 2013 1:39 pm
Location: Vermont

Re: Weird behavior with Arduino and Repetier

Post by Toyguy »

Wandering through the forums, I came upon a post that was talking about a batch of Rambo boards with bad bootloaders. I think you said your kit was a somewhat older one. I wonder if this could be your problem? Have you EVER been able to load firmware into it in the past? You might do a forum search on bootloader and see what pops up.

Another thought that came to mind while looking around the Repetier web site was a function they have on the Manual Control tab. At the bottom of that tab window, there is a button labeled OK. It's not a standard Windows OK button - instead it sends a fake OK back to the host as if it came from the printer itself. I wonder what might happen if you were to send a few OKs to the host? Maybe the Waiting Command count could be driven to zero and give you back control.
taav
Printmaster!
Posts: 39
Joined: Wed Apr 03, 2013 5:59 am

Re: Weird behavior with Arduino and Repetier

Post by taav »

Hmmm thanks Toyguy.

This issue arose when i first tried loading firmware onto the Rambo, I ordered my kit back in july, that was when the motors were still the older ones the black/blue/red/green wires, so its the Rambo that comes with that kit.

I am going to do more research and get to the bottom of this.
geneb
ULTIMATE 3D JEDI
Posts: 5367
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Weird behavior with Arduino and Repetier

Post by geneb »

ahhh! There you go.

It's possible you got a board with a borked bootloader.

Open up the Arduino "blink" sketch. Upload it to the RAMBo - when it's done, you should see one of the LEDs on the rambo blinking at a steady, slow rate. If you don't see this, the upload didn't take and you need to reload the bootloader on to the board. Contact support for more details on that.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
Lochemage
Printmaster!
Posts: 116
Joined: Fri Oct 25, 2013 4:36 am
Location: Marina, CA

Re: Weird behavior with Arduino and Repetier

Post by Lochemage »

geneb wrote:...and there's your problem. :D

If you're using a Windows system, you should set the firmware baudrate to 250000.

If you're using Linux or MacOS, set the firmware rate to 115200 and Rep-Host to match.

Note that there should be only ONE BAUDRATE #define. I'm confused as to why there appears to be two in your file...
The others can be there, but they need to be commented out using "//".

g.
Hi, I'm using 250000 on my MacOS and it works fine, is there any reason why it should be 115200; Should it just not work, or will I get better performance?

For reference, I am running Mac OS X v10.6.8, 2.4 GHz Intel Core 2 Duo Processor, 2GB RAM.

Thanks,
- Lochemage

My super cool build stories: Rostock MAX, GUS Simpson

"Give a man a compliment and he'll be all, 'Yeah, I've been working out.' Teach a man to fish for a compliment and he'll be all, 'I feel SO fat.'" - Bob FM
geneb
ULTIMATE 3D JEDI
Posts: 5367
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Weird behavior with Arduino and Repetier

Post by geneb »

I've been told by other Mac users that 250000 doesn't work, but apparently that's not correct. :)

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
dpmacri
Printmaster!
Posts: 319
Joined: Sat Aug 17, 2013 1:01 am
Location: Beaverton, OR, USA

Re: Weird behavior with Arduino and Repetier

Post by dpmacri »

geneb wrote:I've been told by other Mac users that 250000 doesn't work, but apparently that's not correct. :)

g.
I also use 250000 on a Mac just fine. My machine (HW & SW) is newer than Lochemage's.
Post Reply

Return to “Repetier Host”