SD card wont show my uploaded gcode unless I unplug board and plug back in

I have a K40 with the Cohesion3d laserboard running smoothieware and the Cohesion3d lcd screen. If I pull out the SD card to upload gcode on it and plug it back into the laserboard, the SD file directory is blank. I have to cut power to the board completely and re-power for the SD card to be read. Is there any firmware changes I can make to add a SD refresh option on the lcd screen to be able to read the SD card without having to reboot? Marlin firmware on all my 3D printers has this option. It is a real PITA to have to stop what I’m doing to power off the system and reboot everything just to get the laserboard to read the SD card.

Is there a way to add a feature ourselves? I would like to add an option to refresh the SD card so all new content shows when removing and installing card without having to shut power and restart.

I have an idea that you can test out.

  1. In addition to the firmware and config files, have files such as file1.gcode and file2.gcode already on the memory card.
  2. Power up the board with the card already in.
  3. Observe that file1 and file2 list on the GLCD.
  4. Have the board hooked up to a computer using USB. Using the console in LightBurn, send command M20 and check that the list it returns also has file1 and file2.
    5.Pull the memory card, put it into the computer, add a file3.gcode to it.
  5. Put it back into the board.
  6. Again from console, send an M20 command. Observe if any files are returned this time, and if they are, observe if file3 is also present. You can also check the GLCD Screen menu at this time, after the command. Please report

And by the way, you don’t actually have to physically remove the power cable from the board. A simple reset will suffice. The reset push button on the side of the board will do the same thing and there is a header behind it so you can wire an external button. Combined with automating the homing sequence when the board boots, this is a viable way to run headless and in absolute coordinates, which you should be doing anyways if there is no computer attached.

But please let me know the results of the above test so that we can continue down that path.

Will do. Also after studying the board pin outs I see it has an ethernet connection. Can I control the laser through this connection like I do USB? I have an issue with when someone turns on or off the kitchen light in my house it will reset the board. If I unplug the USB this doesn’t happen. I sometimes have to yell out to my wife “I’m about to laser something real quick so don’t turn on the kitchen light!”. Crazy I know but this is why I have started running my long jobs from the SD card directly after unplugging the USB. Maybe a torroid coil or something would work for the cable…

Okay I followed the steps exactly. On step 6, I did the M20 command and it did not show any files. No files on checking the GLCD either. I did the M20 command a second time and file2 showed up. Did a reset and checked with M20 and all 3 files show up. So basically only a reset will show all files. No reset only shows partial files after a second M20 command.

So are you telling me that if you send M20 and then M20 again, you get the files including the new one in the list and in the GLCD play menu?

I can work with that.

Try sending this as a single line and see if it produces the same result.

M20 G4P500 M20

The G4 is a dwell (wait while doing nothing) command for P microseconds, for which I would expect a value of 250 to 1000 to work.

Please report back.

No, after the second M20 command only some of the files show, not all. Only after a board reset will all the files show. I tried the dwell command with the same results. Only partial files show.

Ah, I see. In that case it sounds like you will have to reset the board for the new files on the card to be recognized.

A few thoughts on this:

  • The reset push button on the side of the board will do a reset and there is a header behind it so you can wire an external button to also handle reset.
  • I can direct you to the instructions to set up so the board itself homes on boot (after reset).
  • When you reset, this shows the splash screen for around 3 seconds, but you can click the encoder button and this gets you to the main screen/ menus - so effectively you’re looking at a pretty short reset period and a few extra clicks.
  • You should already be using Absolute coordinates in LB for headless operation like this…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.