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, 01:58:11 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
Mach SDK plugin questions and answers.
Step increase in feedrate.
Pages:
1
Go Down
« previous
next »
Author
Topic: Step increase in feedrate. (Read 475 times)
0 Members and 2 Guests are viewing this topic.
Georg_Kai
Active Member
Offline
Posts: 3
Step increase in feedrate.
«
on:
July 19, 2011, 04:31:15 AM »
I apologize for my English. I am writing my first plugin and ran into a problem: I have appointed for your joystick buttons to actions: increase or decrease the feed rate (DoOEMButton 109, 108). But when you press the increase (decrease) occurs in 10% of the feedrate. Ie if the feed rate is set when you press 800 is increased to 880. How to change the step increase (decrease) in let's say 5% or 2.5%. Where is this variable? in which structure?
Logged
newmacher
Active Member
Offline
Posts: 8
Re: Step increase in feedrate.
«
Reply #1 on:
August 04, 2011, 12:37:25 PM »
I have this same problem. I put the feed rate override functionality into my Griffin Powermate plugin, but can't figure out how to make it move more than 10% at a time using the DoButton method.
I tried TrajectoryControl.FeedInc just to see if that was it, but it didn't work. Maybe you just have to change the TrajectoryControl.FeedRate directly instead of using the buttons. Hopefully someone with chime in with the answer.
I also found another weird problem. When I issue the DoButton(1014) for the feed rate override reset button, it resets to 80% instead of 100%. Do you also have this problem?
Logged
Georg_Kai
Active Member
Offline
Posts: 3
Re: Step increase in feedrate.
«
Reply #2 on:
August 09, 2011, 02:29:47 AM »
Below I have piece of software that I have to control the Feedoverride:
extern CMyScriptObject co;
extern double GetOEMDRO(short);
extern void SetOEMDRO(short,double);
const int FeedRateOverRide = 821;
double FRO;
......
if( code == 108 ) {
FRO = co.GetOEMDRO(FeedRateOverRide);
FRO += 1;
co.SetOEMDRO(FeedRateOverRide, FRO);
return;
}
if( code == 109 ) {
FRO = co.GetOEMDRO(FeedRateOverRide);
FRO -= 1;
co.SetOEMDRO(FeedRateOverRide,FRO);
return;
}
.......
I had a bug in a row that I noted a sign "-------->", Mach3 program installation is not prescribed in the registry value "Mach4.Document". Therefore, the functions SetOEMDRO (), GetOEMDRO () did not work.
VOID Mach3ObjectModelStartup(VOID)
{
static const IID IID_IMyScriptObject = { 0xf1d3ee6c, 0xab32, 0x4996,
{ 0xb2, 0x70, 0xf4, 0x15, 0x61, 0x3f, 0x5b, 0xa3 } };
CLSID clsid;
HRESULT res;
res = CoInitialize(NULL);
LPUNKNOWN lpUnk = NULL;
LPDISPATCH lpDispatch = NULL;
try {
----------> res = CLSIDFromProgID(OLESTR("Mach4.Document"),&clsid);
if (res == NOERROR) {
if (res = GetActiveObject(clsid,NULL,&lpUnk) == NOERROR) {
HRESULT hr = lpUnk->QueryInterface(IID_IDispatch,
(LPVOID*)&lpDispatch);
lpUnk->Release();
if (hr == NOERROR) {
mach4.AttachDispatch(lpDispatch, TRUE);
lpDispatch = mach4.GetScriptDispatch();
co.AttachDispatch(lpDispatch, TRUE);
connected = TRUE;
}
}
}
}
catch(_com_error &e) {
// com_error_msg(e);
}
}
Logged
newmacher
Active Member
Offline
Posts: 8
Re: Step increase in feedrate.
«
Reply #3 on:
August 09, 2011, 03:31:16 PM »
Mine is simpler. I am using the Mach includes from the Plugin Wizard. This code gets called in a timer that I setup to run every 5ms. MG::usbDeviceAction is a static class where I decode what action was performed on my Griffin powermate
int rotated = MG::usbDeviceAction->rotated(MG::usbCommData->inputBuffer);
if(rotated > 0){
DoButton(108);
}else{
DoButton(109);
}
If I rotate the grffin powermate clockwise, it returns a positive number, otherwise it is negative, and based on direction I call the Mach 3 DoButton method.
Just like you, it only changes in increments of 10% unless it is under 10% since it mimicks the operation of the clickable buttons on the Mach 3 screen.
Did you get your code to change it only 1% at a time? It looks like your code should work.
Logged
Georg_Kai
Active Member
Offline
Posts: 3
Re: Step increase in feedrate.
«
Reply #4 on:
August 09, 2011, 08:06:46 PM »
Yes, I value changes by 1%. Function GetOEMDRO () returns a value from 0 to 250 "%". This code works for me.
Logged
newmacher
Active Member
Offline
Posts: 8
Re: Step increase in feedrate.
«
Reply #5 on:
August 10, 2011, 10:42:28 AM »
That's great, Thanks George, I changed the code to the following, and it definitely changes the value by one. This evening, I'll install the plugin on my mill PC, and try it for real on the mill.
int rotated = MG::usbDeviceAction->rotated(MG::usbCommData->inputBuffer);
//821 is the feed rate override DRO
int val = GetDRO(821);
if(rotated > 0)
val++;
else
val--;
SetDRO(821,val);
Logged
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...