Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 28, 2012, 10:20:13 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Brains Development
Mach3, Arduino, Modbus and MPG
Pages:
1
Go Down
« previous
next »
Author
Topic: Mach3, Arduino, Modbus and MPG (Read 786 times)
0 Members and 2 Guests are viewing this topic.
zafarsalam
Active Member
Offline
Posts: 145
Mach3, Arduino, Modbus and MPG
«
on:
December 05, 2011, 11:18:05 PM »
Hi,
I've been successful in communicating with an Arduino Uno though modbus. Analog input, output, LED's, buttons and all. Why Arduino? Instead of Pokeys, ModIO or Cubloc? Because it's easily available where I am.
Today I tried MPG with Arduino and found it smoother than Pokeys. I am using ModIOMPG brain for the MPG. The only problem is that the axis keeps on rolling for almost half a second when I stop rotating the MPG. I am not using MPG tick count in the brain. Not sure how to calculate it in my Arduino. Is this the reason for this behaviour of MPG or do I need to tweak some other settings in Mach. I've tried different baud rates but they don't make any difference.
Another thing I've noticed is that when I switch to single or multi-step mode from velocity mode and then back to the velocity then the axis jog speed slows down to one fourth of the previous one. When I restart Mach, I can jog at full speed once again. I am running it on Mach V3.042.020.
Zafar
«
Last Edit: December 05, 2011, 11:26:37 PM by zafarsalam
»
Logged
Chaoticone
South Carolina, US
Administrator
Offline
Posts: 3,598
Precision Chaos
Re: Mach3, Arduino, Modbus and MPG
«
Reply #1 on:
December 06, 2011, 12:20:21 AM »
Depending on the MPG mode, step size and how fast you crank the wheel you can over run with a MPG wired straight to a Parallel port too. You can request steps faster than your machine can travel if you aren't careful. I'm not sure if this is whats going on in your case but I have seen this. You may want to wire the mpg straight to some inputs and by pass the arduino and Brain for testing.
Brett
Logged
If you could see the things I have in my head, you would be laughing too.
www.precisionchaos1.com
My guard dog is not what you need to worry about!
zafarsalam
Active Member
Offline
Posts: 145
Re: Mach3, Arduino, Modbus and MPG
«
Reply #2 on:
December 06, 2011, 12:39:10 AM »
Quote from: Chaoticone on December 06, 2011, 12:20:21 AM
You can request steps faster than your machine can travel if you aren't careful. I'm not sure if this is whats going on in your case but I have seen this.
Brett,
This situation you described happens in multiple steps mode when feed rate is set too low. This happens on PP too. In my case the overrun is with the velocity mode. The step mode is behaving similar to a PP and I have no problem with that.
Zafar
Logged
zafarsalam
Active Member
Offline
Posts: 145
Re: Mach3, Arduino, Modbus and MPG
«
Reply #3 on:
December 06, 2011, 06:12:28 AM »
I tried the same mpg on PP and it works perfectly. With brains and modbus running, the MPG1 Velocity DRO on the settings page shows lag with the MPG movement. I suspect that's the culprit. Is there a fix for that
Zafar
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Mach3, Arduino, Modbus and MPG
«
Reply #4 on:
December 12, 2011, 07:30:24 AM »
Hey Zafar,
For Velocity MPG stuff, you need the "MPG Tick" in brains, basically your device will need to send some kind of Clock or Tick signal. Mach then uses that tick
to see how "fast" vs. time your turning the MPG per scan.
Lag: You are going to have a LAG in MPG across the modbus, simple fact is, the modbus is only serviced once per 1/10th of a second. So if your turning quickly the MPG, and then stop, you still have some "build up" in the count register that is late data, and Mach will have to service that buffer when it comes around again.
TCP Modbus is somewhat faster, since it does not have the slow max speed of serial, I can turn a MPG pretty fast with TCP, but still in the end, it is still in Machs update loop. Nothing will be as fast as machs native engine.
scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...