Hello Guest it is March 29, 2024, 10:05:50 AM

Author Topic: Lost Brain  (Read 2433 times)

0 Members and 1 Guest are viewing this topic.

Offline LGF

*
  •  37 37
  • can't sit still
    • View Profile
Lost Brain
« on: August 28, 2014, 07:44:02 AM »
Yes I have lost mine.....

Do I actually need to have a brain for running Mach3 via Modbus to operate my 4 axis CNC machine?

If so, Can someone, PLEASE tell me where to begin? Do I need a pen and paper to map out what I want to do and then look at the Tut video's and endless documentation again, before I start?

I am completely lost and require utter NOOB assistance!
When I die, will someone please dress up as the Grim Reaper and attend my funeral. No need to do or say anything, just attend and stand a short distance away? PLEASE???

Offline LGF

*
  •  37 37
  • can't sit still
    • View Profile
Re: Lost Brain
« Reply #1 on: August 28, 2014, 07:46:28 AM »
PS: I have read and watched the materail I could find on this site. So please don't advise me to read the "user's Guide to Brain's" or to go watch the video's, I have done that, and I still need help?
« Last Edit: August 28, 2014, 07:48:02 AM by LGF »
When I die, will someone please dress up as the Grim Reaper and attend my funeral. No need to do or say anything, just attend and stand a short distance away? PLEASE???

Offline LGF

*
  •  37 37
  • can't sit still
    • View Profile
Re: Lost Brain
« Reply #2 on: August 29, 2014, 02:50:42 PM »
Perhaps stating the things I don't understand one at a time, would make it easier for those in the Know, to assist me.

The Modbus (not sure if all CNC's use the same version) that I have uploaded to my Arduino Mega 2560 has the following registers:

 //################ Initialize IO #################     // 0 => Output, 1 => Input, opposite of normal Arduino, but my habit from other platforms, 0 looks like an O and 1 looks like an I
  Register[IO_Config_Register]    = 0b0000000000000000;  // UNO and MEGA  PIN 00-15
  Register[IO_Config_Register+1]  = 0b0000000000000000;  // MEGA          PIN 16-31
  Register[IO_Config_Register+2]  = 0b0000000000000000;  // MEGA          PIN 32-47
  Register[IO_Config_Register+3]  = 0b0000000000000000;  // MEGA          PIN 48-64
  Register[IO_Config_Register+4]  = 0b1111111111111111;  // AN Digital    PIN A0-A16

  //################ Kill IO Register #################  // 0 => Leave, 1 => Kill
  Register[Kill_IO_Register]    = 0b1111111111111111;    // UNO and MEGA  PIN 00-15
  Register[Kill_IO_Register+1]  = 0b1111111111111111;    // MEGA          PIN 16-31
  Register[Kill_IO_Register+2]  = 0b1111111111111111;    // MEGA          PIN 32-47
  Register[Kill_IO_Register+3]  = 0b1111111111111111;    // MEGA          PIN 48-64
  Register[Kill_IO_Register+4]  = 0b1111111111111111;    // AN Digital    PIN A0-A16

  //################ PWM IO Register #################   // 0 => Normal I/O, 1 => PWM I/O
  Register[PWMIOMap_Register]   = 0b0000111001101000;    // UNO and MEGA  PWM 01-16

  //################ AN IO Register #################    // 0 => Digital, 1=> Analog
  Register[ANIOMap_Register]    = 0b1111111111111111;    // UNO and MEGA


There is no area in the code, nor in any of the library's to define the pins to be used specifically with relation to each output, which I suspect Mach will take care of, again not sure?

If so, can I select pins as follow:

X Step 22 Dir 23 all on port 1 (Modbus Slave address)
Y Step 24 Dir 25
Z Step 26 Dir 27
B Step 28 Dir 29

This arrangement is due to the fact that a LCDKeypad shield I have plugged onto the Ard Mega covers most of the other pins and only really leaves me with the header that contains pins 22-53.

Any help will be greatly appreciated!
When I die, will someone please dress up as the Grim Reaper and attend my funeral. No need to do or say anything, just attend and stand a short distance away? PLEASE???