Hello Guest it is March 29, 2024, 04:42:47 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MachMotion Development Team

Pages: « 1 2 3 4 5 6 »
21
Hi,

MACHINE_DEFAULT_UNITS = mc.mcCntlGetUnitsDefault(inst)
MACHINE_CURRENT_UNITS = mc.mcCntlGetUnitsCurrent(inst)

22
Mach4 General Discussion / Needing help with Wizards
« on: March 01, 2015, 09:38:07 AM »
Hi simpson36,

I would use wxFormBuilder to create the dialog, don't forget to add the code to show the dialog after you create it. Example: MyDialog:Show() or MyDialog:ShowModal().  I would save all your setting to the ini file in mach using the ini API calls that are built in.  I like saving and reading everything to the ini as a string and then converting it to a number after you read it (use "tostring()" or "tonumber()").  I don't know what your going to do with this project, but if you need mach to write these settings to modbus every time mach starts up you should make a 2 functions, one that reads the settings from the dialog and saves them to the ini, and a second function to read from the ini and write them to the modbus registers.

Good Luck,
Andrew with MachMotion

23
Mach4 General Discussion / Re: Screen Set Ideas
« on: December 09, 2014, 10:17:29 AM »
This feature is open to anyone that wants to mess with it...  We did make our own Run From Here that is setup for our interface.

Thanks Andrew,

Can we assume that these checks/API functions will be added to Mach4 or is the a MachMotion feature exclusive?

24
Mach4 General Discussion / Re: Screen Set Ideas
« on: December 09, 2014, 09:40:14 AM »
I was trying to answer this question about doing a dry run and getting the real time status on spindle, coolant or read the tool that should be active on that line of code.

Obviously I know there are API calls for spindle and coolant control, but there is only one way to know if they should be on or off on a certain line of Gcode.  And the API to read the status is returned in a structure that only a plugin can read.

For clarification “Run From Here” is calling “Dry Run” and then pulling the positions from the interpreter to know where to move the axes to for that line of code. The user can jog or use the dialog to move into position.  The API to read the current state for the auxiliaries is more geared for a developer because it takes a lot of work to implement, and almost everyone will want to implement it a little differently.

Was playing around with the Dry run function and noticed that it does not start the spindle, coolant, or pick up the tool changes for my testing.  ???

The only way to get the spindle data is through a plugin. There isn't a scripting API for it.

Code: [Select]
mcCntlGcodeInterpGetData(MINSTANCE mInst, interperter_t *data);

struct Interperter_info {
double ModalGroups[MC_MAX_GROUPS];
double FeedRate;
double SpindleSpeed;
int SpindleDirection;
bool Mist;
bool Flood;
int ToolNumber;
int HeightRegister;
int DiaRegister;
};

typedef struct Interperter_info interperter_t;

25
Mach4 General Discussion / Re: Screen Set Ideas
« on: December 08, 2014, 08:00:46 PM »
Also one other thing, there is a drop down in the actions for RunFromHere.  What did you want to do different in the "Dry Run" from the "Run From Here" feature that already exists?

26
Mach4 General Discussion / Re: Screen Set Ideas
« on: December 08, 2014, 07:56:30 PM »
The only way to get the spindle data is through a plugin. There isn't a scripting API for it.

Code: [Select]
mcCntlGcodeInterpGetData(MINSTANCE mInst, interperter_t *data);

struct Interperter_info {
double ModalGroups[MC_MAX_GROUPS];
double FeedRate;
double SpindleSpeed;
int SpindleDirection;
bool Mist;
bool Flood;
int ToolNumber;
int HeightRegister;
int DiaRegister;
};

typedef struct Interperter_info interperter_t;

27
Mach4 General Discussion / Re: Trying to get the current Gcode line #
« on: December 07, 2014, 10:26:51 PM »
Dry Run is working well. It is the replacement for RunFromHere is you want more control.  Other wise you can use the one from the Actions drop down in the screen editor.

28
Mach4 General Discussion / Re: Mcodes ??
« on: December 02, 2014, 08:48:24 AM »
I'm glad you guys worked it out... I found out why my example didn't work!!  When you copy code into this forum the text formatting drops the brackets around my array identifier.

This is how the forum modified my code:
rc = mc.mcCntlGetLocalVar(inst, hVars, ParameterNumberArray)

This is how it should have looked (I had to add spaces around the "i" to make it display):
rc = mc.mcCntlGetLocalVar(inst, hVars, ParameterNumberArray[ i ])

Do any of you know if there is a way to disable the formatting on a post?

29
Mach4 General Discussion / Re: Mcodes ??
« on: December 01, 2014, 11:18:17 AM »
I don't know what to say..

It works fine for me, but I'm running build 2129.   What build are you running?

I think any build 2114 or newer should work fine.

30
Mach4 General Discussion / Re: Mcodes ??
« on: December 01, 2014, 11:02:46 AM »
This is what you should see in the test.  All the rest of the Vars are nil and thats why they display the odd number.  If you want to see if a var is nil compare it to: local nilPoundVar = mc.mcCntlGetPoundVar(inst,0).  If its nil it will = nilPoundVar.

Pages: « 1 2 3 4 5 6 »