Author Topic: Arduino Modbus, Complete, Documented and free  (Read 146295 times)

0 Members and 1 Guest are viewing this topic.

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #40 on: September 07, 2014, 06:52:40 PM »
So ive been messing with all day .
Im not understanding something or....
I went though the manual . I got the system working . Last step hook up pin 13 to a led. Turn spindle on see led blink on 13. That works, cool.
If I go into modbus switch to any other pin but 12 or 13 the led wont flash.
I take that this happening isnt good. Any ideas?

Offline dude1

  • Active Member
  • Posts: 1,251
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #41 on: September 07, 2014, 07:01:57 PM »
it will be a setting you have wrong I had the same thing it in the instructions just start again I found what I did wrong in the end but it just a setting what hopefully will be out

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #42 on: September 07, 2014, 09:17:27 PM »
it will be a setting you have wrong I had the same thing it in the instructions just start again I found what I did wrong in the end but it just a setting what hopefully will be out
Your right it was a setting in the sketch.
 Im trying to wrap my mind around the whole Analog inputs  being either 1 or 0 or changing them to digital I/O by setting them to 1 or 0 .
I need a GUI with drop downs. If I could write could I so would.
Im getting it though. Now I have to understand how to write the brains properly then I could throw it all out the window because Mach4 will be out. : )

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #43 on: September 07, 2014, 09:31:05 PM »
O BTW heres the original posters web site if any one is looking for him.
http://replicantfx.com/

Offline dude1

  • Active Member
  • Posts: 1,251
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #44 on: September 07, 2014, 10:18:10 PM »
that's why I stopped playing with modbus I did not think it was a good idea to learn how to use it twice

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #45 on: September 08, 2014, 02:26:50 PM »
Does any one have examples of brains and modbus using shillings system ?
I keep reading this manual and cant understand what bit goes where why and when. I understand the very basics . I can make a led bink off the of the spindle any where on the board.
Ive been trying to get my spindle rpm to increase using a 10k pot. Not happening. Im not sure why.

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #46 on: September 08, 2014, 03:14:16 PM »
If some one could explain the PDF regarding the operations on pages 21-23 in detail I would really appreciate it.
I would like to know what each bit corresponds with and each function so I know why to select those things. Im so confused.

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #47 on: September 08, 2014, 05:40:52 PM »
If some one could explain the PDF regarding the operations on pages 21-23 in detail I would really appreciate it.
I would like to know what each bit corresponds with and each function so I know why to select those things. Im so confused.

I happend to find some one who fixed the simple problems betwen arduino software 1.0 and 1.1 . Along with that its says they implemented RS-485......
https://github.com/devlware/ModBusSlave

Offline mrich0908

  • Active Member
  • Posts: 68
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #48 on: September 10, 2014, 01:27:41 PM »
So after sitting here for days playing with this .
Ive learned allot.
This system works 100% as is.
To get pin 10 analog input off lets say A0 . Your port address (1024)  would be a variable as described in the manual. Modbus address would be 30. That refers to pin 10 . If you wanted a different pin ,looking the register map on PG16 45 would be input analog pin a15 and so on .
When configured in Mach 3 the cfg must match what line being used . Input for an input there's no corresponding bit to match.  If you had of chosen bit 1 it would have flash high low high low so on .
The first example given in the manual was spindle flash. If you want to change pins on your ardunio.  You would choose the proper register where the pin was in the port adress section 0 (0-15) , 1 (16-31) ,2 (32-45), 3 (46-63)or 4 (A0-A15) NOW THESE ARE DIGITAL I/O only. Under Modbus address choose your pin. So if I wanted pin 33 that was digital I would choose register two  in port address and pin 33 under modbuss address .
All this has to correspond with the sketch uploaded to your arduino. make sure you turn your inputs on and off as described in the manual.
I use the Arduino Mega and noticed a few things that had to be changed in the sketch. There what level of importance is im unsure of. The first set of input output registries says 01233 , it should say 01234. Pin total says 14 for a uno mine should say 63. Match your Baud to your pc to mach . Besides that your good to go.
Ive looked over a few Modbus sketches and really like this one.

Offline ahmed01280

  • Active Member
  • Posts: 4
    • View Profile
Re: Arduino Modbus, Complete, Documented and free
« Reply #49 on: March 07, 2015, 12:04:09 PM »
how can i program step pin and dir pin in brain editor and arduino