mcjGRBL2 ( ok Marlin )

________________________________________________________________________

Introduction

________________________________________________________________________

Also See mcjTTY for a version without GRBL addons

the first version https://sites.google.com/site/mcasualsdazscripts9/mcjgrbl worked OK with GRBL

If you have a 3D printer or CNC or Laser Engraver based or Marlin or possibly GRBL

then using this kit of software, you can communicate with your device from Daz Studio

This is for Windows PCs only ... unless someone can come up with a simple Terminal for Macs

________________________________________________________________________

Installation

________________________________________________________________________

The installation zip packages can be found at the bottom of this web page in the attachments section

The 2 important parts:

  • mcjCommtty.exe A PC/DOS program kown as a "terminal" It is the communication bridge between the Arduino and DazStudio
  • mcjGRBL2.dsa A Daz Studio script which sends, receives and displays data to/from the arduino through mcjCommTty with some GRBL-specific features

mcjGRBL2.zip contains mcjGRBL2.dsa

Typically it means:

c:\program files\daz\studio\contents

or

C:\Program Files (x86)\DAZ\Studio\content

or

C:\Users\YOURUSERNAME\Documents\DAZ 3D\Studio\My Library\

if installed properly, mcjGRBL2.dsa will be accessible in Daz Studio in the contents tab as

studio/scripts/mcasual/

or

My Library/scripts/mCasual

mcjComtty.zip contains mcjCommtty.exe and mcjCommtty.cpp the source code

the easiest is to unzip this in YourDazContentLibrary/scripts/mCasual

because by default that's where mcjGRBL will expect to find it

but you can place it where you please!

________________________________________________________________________

How i made my 500mw laser TTL control pin

work with Arduino Mega + Ramps 1.4 + Marlin

________________________________________________________________________

i connected the TTL control pin of the Laser Driver

to the D44 pin of the Aux-2 header of the Ramps Board

The Laser Driver's 12V power comed directly from a 12V power supply

Simce my laser is only 500mw it probably takes less than 2 amps

then i modified the pins_RAMPS.h file to make Marlin activate pin D44 ( 0/5V) of the Ramps board

instead of the D9 pin ( which is a 0/12V mosfet driven pin )

after uploading the firmware to the Arduino Mega, i can now turn the laser on using the M106 G-Code

and turn it off using the M107 G-Code

Connecting the Laser Driver Board to the Ramps 1.4 Shield ( Arduino Mega ) the 3D Printer

________________________________________________________________________

Version History

________________________________________________________________________

May 18th 2018 12:36 AM - New version reacts correctly to Marlin's "Busy" messages

by ignoring them and waiting for the OK from the previous command before sending a new one

May 15th 2018 9:30PM Release

________________________________________________________________________

Requirements

________________________________________________________________________

- PC running Windows

- An arduino or in fact anything that can send data to your PC through one of the COM ports

________________________________________________________________________

Instructions

________________________________________________________________________

The script does not detect the COM port your device uses

so get the COM portnumber from, for example the Arduino IDE

launch mcjGRBL2

set the com port and baud rate

if it's not already done, press the "Select Server" button and specify the location of mcjComtty.exe

press the "Start Server" button

You can use the "Type Here" field to send commands

There's also a "Send File" option

compared to mcjTTY, i added some flow control/pacing, the script waits for an "ok" before sending the next line

I still get some "Busy" complaints from Marlin but it seems to work

________________________________________________________________________

License and credits for mcjCommtty.exe

________________________________________________________________________

copyright 2018 mCasualJacques

permission to use in other programs is granted.

this is an almost unmodified version of commtty.c

by Robert Mashlan

copyright 1996 Robert Mashlan rmashlan@r2m.com

permission to use in other programs is granted.

http://nersp.nerdc.ufl.edu/~esi4161/files/commtty.c

________________________________________________________________________

// License and credits for mcjGRBL2.dsa

________________________________________________________________________

// mcjGRBL2.dsa by mCasual/Jacques c2018

// You can use this script freely for personal or commercial use.

// You may not sell, resell, sub-license or rent this script in any way.

// you may credit this script to mCasual/Jacques

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES

// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND

// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT

// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR

// OTHER DEALINGS IN THE SOFTWARE.

__________________________________________