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, 11:52:53 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
General Mach Discussion
Unstable analog inputs
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Unstable analog inputs (Read 255 times)
0 Members and 1 Guest are viewing this topic.
Tony Bullard
Active Member
Offline
Posts: 83
Unstable analog inputs
«
on:
January 31, 2012, 04:03:39 PM »
I’m using two 10K pots for analog inputs through a ModIO for FRO and Speed % DROs The DROs float around about + and – 2% from set point. Is there a way to buffer or smooth out the inputs. I could write a macro with 100 “deadspots” but that doesn’t seem to be the way to go. Any help would be appreciated.
Thanks,
Tony
Logged
Peter Homann
ModIO Adviser
Active Member
Offline
Posts: 354
Re: Unstable analog inputs
«
Reply #1 on:
January 31, 2012, 04:23:52 PM »
Hi,
It is most likely from ripple in the power supply. The best way to deal with it is to filter it in software as you suggest.
Also think about putting in a +/- 5% dead band at the 100% point
Cheers,
Peter
Logged
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com/store
email: peter at homanndesigns.com
Tony Bullard
Active Member
Offline
Posts: 83
Re: Unstable analog inputs
«
Reply #2 on:
January 31, 2012, 04:36:09 PM »
Thanks Peter,
I'm using the +5V from the ModIo. Could I use an external power supply say from the PC and have less ripply? How about a good stand alone power supply?
Thanks,
Tony
Logged
Tony Bullard
Active Member
Offline
Posts: 83
Re: Unstable analog inputs
«
Reply #3 on:
January 31, 2012, 04:41:36 PM »
Will the floating feed rate overwork Mach while running a program?
Thanks,
Tony
Logged
Peter Homann
ModIO Adviser
Active Member
Offline
Posts: 354
Re: Unstable analog inputs
«
Reply #4 on:
February 01, 2012, 03:33:37 PM »
Hi Tony,
No it won't be an issue as mach processes it regardless of whether it changes or not. Most put a deadband in though. It just means that you don't have to be so spot on with the positioning of the knob.
Cheers,
Peter.
Logged
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com/store
email: peter at homanndesigns.com
Tony Bullard
Active Member
Offline
Posts: 83
Re: Unstable analog inputs
«
Reply #5 on:
February 02, 2012, 08:28:14 AM »
Hi Peter,
I was concerned that during a machining operation Mach might not keep up with calculating the vector velocity components of a multi axis feed twenty times a second.
Here’s the code I used in a macropump to buffer it a little. It is pretty jittery so I had to use wide deadbands.
Sub FRO()
a = getinput(64)
b= Fix(a/6.8267) ‘150%
If b < (GetVar(607)-2.5) Or b > (GetVar(607)+2.5) Then
SetVar(607,b)
If GetVar(607) < 103 And GetVar(607) > 98 Then
SetDro(21,100)
DoOemButton(1014) 'reset overide
Exit Sub
End If
SetDro(21,GetVar(607))
End If
End Sub
Thanks for all your help.
Tony
Logged
stirling
Global Moderator
Offline
Posts: 1,190
UK
Re: Unstable analog inputs
«
Reply #6 on:
February 02, 2012, 09:51:46 AM »
Hi Tony - if I've understood your requirement properly you want to "band" your input?
x = int(y / z) * z
x will be y banded into divisions of z with an automatic dead zone at the top. Season to taste.
Ian
«
Last Edit: February 02, 2012, 10:03:21 AM by stirling
»
Logged
Tony Bullard
Active Member
Offline
Posts: 83
Re: Unstable analog inputs
«
Reply #7 on:
February 02, 2012, 10:49:46 AM »
Thanks Ian,
One problem is, as I see it, with distinctive bands is that if the set point is near the edge of the band the output will be hunting between the two bands.
With “If b < (GetVar(609)-2.5) Or b > (GetVar(609)+2.5) Then
SetVar(609,b)” I was trying to get a fixed width band with variable location. This keeps sampling and keeping the output in the center of the band. I realize the “2.5” doesn’t do much good with the integers. Oops.
I probably misunderstood your formula. Relating to mine would it be:
b = INT (a/6.8267)* ?? EDIT: now that I look at it again doesn't (Y/Z)*Z = Y?
What I’m trying to avoid is the feed rate hunting while machining in FRO
I do like your way of thinking.
Tony
«
Last Edit: February 02, 2012, 10:56:58 AM by Tony Bullard
»
Logged
stirling
Global Moderator
Offline
Posts: 1,190
UK
Re: Unstable analog inputs
«
Reply #8 on:
February 02, 2012, 01:16:00 PM »
I see what your saying - I'll have a think...
But meanwhile...
Quote from: Tony Bullard on February 02, 2012, 10:49:46 AM
now that I look at it again doesn't (Y/Z)*Z = Y?
Yes indeed it does BUT...
INT
(Y/Z)*Z does not ALLWAYS = Y and that's why it bands
Ian
Logged
Tony Bullard
Active Member
Offline
Posts: 83
Re: Unstable analog inputs
«
Reply #9 on:
February 02, 2012, 02:07:14 PM »
Yeah but if Y = analog input then it is always an integer, Right?
Then (Y/Z)*Z = Y = INT(Y/Z)*Z
Only when Y is not an integer will (Y/Z)*Z not = INT(Y/Z)*Z
Just gives me something else to think about.
Thanks,
Tony
Logged
Pages:
1
2
»
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...