Hello Guest it is April 19, 2024, 10:58:10 AM

Author Topic: Screen Set Ideas  (Read 184774 times)

0 Members and 1 Guest are viewing this topic.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #210 on: December 05, 2014, 05:47:10 PM »
this is what I have got working so far a on off switch for turning my centring laser on and off with a mouse click I really like have the ability to change colours on buttons for different states

I have got the laser zeroing working sort of it will do the move turn laser off, it just wont zero if I push laser zero button again it will zero the dro`s its a timing problem I just need to work out how to make it into a macro
« Last Edit: December 05, 2014, 06:00:43 PM by daniellyall »
Re: Screen Set Ideas
« Reply #211 on: December 05, 2014, 08:07:03 PM »
Added some buttons so I can set the dros to either inch or metric equivalent.
Provided the screen set so you can learn a little and play.
You will have to create the Registers if you want, as those are stored in the machine.ini file on closing.

Take note, this was setup as Inch as the default so if you use metric its up to you to understand the issues and change the formulas to suit.


Update: Played around with some new buttons for scaling and orienting the toolpaths view
sets the toolpath for each tab based on knowing what tab is current

I replaced the screen.set with an updated one showing how its done.
« Last Edit: December 07, 2014, 11:20:10 PM by Ya-Nvr-No »
Re: Screen Set Ideas
« Reply #212 on: December 08, 2014, 09:58:33 AM »
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.  ???

Is fast at jumping to the line I set and then moving from the last gcode line location after a Cycle Start
Re: Screen Set Ideas
« Reply #213 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;
Andrew
MachMotion
Re: Screen Set Ideas
« Reply #214 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?
Andrew
MachMotion

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #215 on: December 09, 2014, 01:52:27 AM »
Andrew,

    I may be misunderstanding your statement on no API for spindle functions but, here is a list of spindle functions from the McLua users manual. There is quite a bit of data you can get or set, if the below is not
what your talking about, please clarify.

mc.mcCntlGetPoundVar(inst, mc.FEEDRATE);
mc.mcCntlSetPoundVar(inst, mc.FEEDRATE, val );

Mach4 Spindle:
Spindle Set:
rc = mc.mcSpindleCalcCSSToRPM(number mInst, number DiaOfCut, Bool Inch)
--For doing CSS in Lathe, DiaOfCut is a double, Bool Inch is: 1=inch, 0=mm
rc = mc.mcSpindleSetAccelTime(number mInst, number Range, number Sec)
   --Range is pulley range 0-19, Sec is time in seconds
rc = mc.mcSpindleSetCommandRPM(number mInst, number RPM)
   --Sets the commanded RPM, (like from running Gcode, or MDI)
rc = mc.mcSpindleSetDecelTime(number mInst, number Range, number Sec)
   --Range is pulley range 0-19, Sec is time in seconds
rc = mc.mcSpindleSetDirection(number mInst, number dir)
--dir is:  -1ccw, 1cw, 0 stop
rc = mc.mcSpindleSetFeedbackRatio(number mInst, number Range, number Ratio)
--Range is pulleys 0-19, Ratio is a percentage as double
rc = mc.mcSpindleSetMaxRPM(number mInst, number Range, number RPM)
   --RPM is the Max for that pulley range 0-19
rc = mc.mcSpindleSetMinRPM(number mInst, number Range, number RPM)
   --RPM is the Min for that pulley range 0-19

rc = mc.mcSpindleSetMotorAccel(number mInst, number Range, number Accel)
   --Spindle motor Accel is in seconds for the pulley range 0-19
rc = mc.mcSpindleSetMotorMaxRPM(number mInst, number RPM)
   --The Max RPM for the spindle motor itself
rc = mc.mcSpindleSetMotorRatio(number mInst, number Range, number Ratio)
--Sets the gear/ratio as a percentage as double for that pulley Range 0-19
rc = mc.mcSpindleSetOverride(number mInst, number percent)
   --this is SSOVR percent as a double
rc = mc.mcSpindleSetRange(number mInst, number Range)
   --Sets the Pulley range you want to use, 0-19
rc = mc.mcSpindleSetReverse(number mInst, number Range, Bool Reversed)
--Due to gearing pulley Range 0-19 has to be reversed for correct rotation, 1=is reversed, 0=not reversed
rc = mc.mcSpindleSetTrueRPM(number mInst, number RPM)
--RPM is a double, that is coming in from an outside source
Spindle Get:
 Sec, rc    = mc.mcSpindleGetAccelTime(number mInst, number Range)
                  --Gets Accel time in sec, for pulley range 0-19
 mRPM, rc = mc.mcSpindleGetCommandMotorRPM(number mInst)
                  --gets the commanded spindle motors’ RPM
 cRPM, rc = mc.mcSpindleGetCommandRPM(number mInst)
                  --gets the commanded spindle Gcode/MDI RPM
 Range, rc             = mc.mcSpindleGetCurrentRange(number mInst)
                  --What Pulley range is currently active 0-19
 Sec, rc                = mc.mcSpindleGetDecelTime(number mInst, number Range)
                  --Gets Decel time in sec, for pulley range 0-19
 dir, rc                = mc.mcSpindleGetDirection(number mInst)
                  --what direction is spindle turning, cw=1, ccw=-1
 
Ratio, rc             = mc.mcSpindleGetFeedbackRatio(number mInst, number Range)
                  --what is the gearing ratio as a percentage for that pulley range 0-19
 MaxRPM, rc             = mc.mcSpindleGetMaxRPM(number mInst, number Range)
                  --returns the MAX RPM for that pulley range 0-19
 MinRPM, rc             = mc.mcSpindleGetMinRPM(number mInst, number Range)
                  --returns the MIN RPM for that pulley range 0-19
 RPM, rc             = mc.mcSpindleGetMotorMaxRPM(number mInst)
                  --returns the max RPM for the spindle motor
 Ratio, rc             = mc.mcSpindleGetMotorRatio(number mInst, number Range)
                  --returns the gear/pulley ratio for that range 0-19 as a double
 mRPM, rc             = mc.mcSpindleGetMotorRPM(number mInst)
                  --What is the spindle motor’s current RPM
 percent, rc             = mc.mcSpindleGetOverride(number mInst)
                  --What is the current SSOVR percent
 bool Reversed, rc          = mc.mcSpindleGetReverse(number mInst, number Range)
                             --Is spindle motor rotation reversed for pulley range 0-19, 1 = yes, 0=no
 RPM, rc             = mc.mcSpindleGetSensorRPM(number mInst)
                  --gets what the sensor says the spindle is turning at the sensors location
 RPM, rc             = mc.mcSpindleGetTrueRPM(number mInst)
                  --Returns what the actual RPM is at the spindle nose

Scott
fun times
Re: Screen Set Ideas
« Reply #216 on: December 09, 2014, 08:01:59 AM »
What did you want to do different in the "Dry Run" from the "Run From Here" feature that already exists?

You had made a Comment that the "Dry Run" was a Replacement for "Run from Here"

http://www.machsupport.com/forum/index.php/topic,28572.msg200712.html#msg200712
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.

Now it looks like a Plugin would be functionally needed to do some of these features, guess as Scott I'm a little confused too. I can do all the same from my screen set but I'm still testing as to if "Dry Run" or Run from Here" knows what is currently active (spindle, coolant, current tool and the tool length set, other set outputs, Cutter comp, etc...) And not having that reference manual to refer too, we as end users are just kicking tires and playing pocket pool.  :)

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #217 on: December 09, 2014, 08:41:17 AM »
This reference manual, it was put up on the "Tool Box" a while back now.

http://www.machsupport.com/forum/index.php/topic,27141.0.html

As a side note there are mcLua calls to get/set coolant types, and get/set tool table data.... and many, many other calls...

Scott
« Last Edit: December 09, 2014, 08:44:40 AM by poppabear »
fun times
Re: Screen Set Ideas
« Reply #218 on: December 09, 2014, 08:50:56 AM »
I meant a user manual that referred to these two buttons features, not a programmers reference document.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #219 on: December 09, 2014, 09:09:23 AM »
Craig, nice work on the button views!

Here is an older screen (link) that shows how to show multiple view screens,
i.e. 1, 2, 3 or 4 screen views, for those who want to learn ways to manipulate tool
path displays.

http://www.machsupport.com/forum/index.php/topic,27117.msg191267.html#msg191267

User's Manual: Oh, ok, it is my understanding that there is a vendor that is
making/building a User's Manual for M4, and it is rumored to be good work,
and should be out soon.  (as of last rumblings/rumors, on the Yahoo group).

Scott
fun times