disable auto-reset by serial connection

so this code will work with the usb diecimila? i have problem where the arduino is being powered via battery and when i plug in the usb to collect data from the sram the board resets and i loose all my data :frowning:

if not will removing those r2 and r3 on the board work. I would like to avoid this....
thanks

Yes it is the USB Diecimila. I have only been using it USB powered though. The code works for connecting several timed to the Diecimila over USB/Serial from the same or different PC program, without causing a board reset. I don't know if it would be a problem to power from battery and connect/disconnect USB cable like you say.