PDA

View Full Version : NcPlot feature request



patcareyis
09-25-2009, 07:34 PM
Requested feature is there a way that you could make a script command from your
Run time Estimation \ program extents so as to insert xy size into program as note if so with the ability to round up to a fraction.

I’ve been playing around with scripts to reformat current files to a new machine and Ncplot’s ability to use scripts is a God send.
Also in Run time Estimation \ estimated run time \ average feed rate, allow feed rate to be edited here instead of in file only.

I also noticed that the {alt}-{F}-{X} shortcut is listed as Export DXF and as Exit

And one more request this one my be a stretch but is it possible through a new feature or through a script function to select multiple lines of txt and replace one line of txt with selected txt in active file through NcPlot. I’ve been copy and pasting to do this and would like to do this with a script

I have code written that uses sub programs and my new/used laser cutter does not call sub programs from in the active file like my other 4 machines so I copy and paste the same sub code multiple times to convert code.

I’m new to vbscript so not sure if there is script code to do this in an active program like NcPlot

I'll post some of my scripts if anyone is interested, might inspire someone in there work

Thanks

PS I’m using version 2.07

MetLHead
09-26-2009, 11:19 AM
Hi,

One of the items on my list is to expand the scripting functionality, so any suggestions for new/improved functions are welcome.

The average feed rate on the run time estimation page is of course calculated from the program code. I'm going to be adding feed rate/rapid rate override controls to the run time estimation so that you can see the effects of feed rate changes without editing the program.

Thanks for spotting the duplicate shortcut keys, I need to go through all the menus and re-look at all the shortcuts.

As a suggestion for converting your programs with subs, have a look at the macro translator. Besides converting macro programs it will also expand sub programs, leaving you with a longhand program without any sub calls.

Thanks,
Scott

patcareyis
09-26-2009, 12:50 PM
Thanks Scott,
For the speedy response one question about macros (I’ve never messed with them) do I need to write one to expanded sub call programs to longhand or is this a built in function? I’ve looked at the help file and I’m not sure where to start. Are there any other examples you could give me. I’ll Google (CNC macros) as well.

PS here is an example of what I’m trying to do.

MetLHead
09-26-2009, 01:28 PM
No, you can run any program through the macro translator. Without a program loaded into the editor go to 'Tools / Macro Translator' and click the 'Browse for Macro Folder' button. Select the folder where your program is located and then change the file filter box from 'Macro Files (*.mac)' to 'All Files (*.*)'. Select your program and then click the 'Execute' button.

You will get a file that has every command that was executed in the order it was executed, so subprograms get copied every time they are called. You will need to remove the actual 'M98' commands from the resulting code. I thought these were removed automatically, I'll have to check and see why they aren't.

Thanks,
Scott

patcareyis
09-26-2009, 03:16 PM
Thanks Scott,
That’s exactly what I was looking for.
And to all of you thinking NcPlots price is high (as I’ve read in a few posts) $300.00 is cheap for all it does before finding NcPlot I had no way of view/testing my file and this is with 3 different programs to nest parts and write code. This macro feature alone will pay for itself in one or two days in saved time. If you’re thinking of buying NcPlot , Buy it!

patcareyis
09-28-2009, 06:19 PM
Scott one more scripting request
How about the ability to insert header and footer so maybe something like
ncplot.header = (string name)
(Which inserts a string at home position of txt in edit window)
Header string example:
Dim header
Header = _
“G20” &Vbcrlf& _
“G54” &Vbcrlf& _
“G90”

and
ncplot.footer (which inserts a string at end position of txt in edit window)
That way header , footer, and notes can be inserted through use of one script.

patcareyis
09-28-2009, 06:51 PM
Here are some of my scripts please forgive any unnecessary steps these are my first attempt to write script files so Google was all I had to go on .
To all feel free to hack these to fit your needs

MetLHead
09-29-2009, 02:08 PM
You can add header and footer text using the existing script methods, like so:


--------------------------
dim header
dim footer
dim ptr

header = "Header Text"
footer = "Footer Text"

ncplot.ncpsetselection 0,0
ncplot.ncpinserttext header & vbcrlf

ptr = ncplot.ncpgetlineindex(ncplot.ncpgetnumlines - 1)
ncplot.ncpsetselection ptr,0
ncplot.ncpinserttext footer & vbcrlf

--------------------------

Hope this helps,

Scott

patcareyis
09-29-2009, 06:22 PM
thanks that does help. As i posted earlier i have justed started to learn vbscript

patcareyis
10-05-2009, 03:09 PM
Scott,
Got one more question is there a way while running a script to pause the script and return to NcPlot to get a value and return it to the script. Like the ability through the mouse to click on the plot screen and return the curser coordinate to the script.
What I’d like to do is to make a script that I can load one of many filler parts to my cut layout and use your NCPlot.NCPAddressAdjust and NCPlot.NCPRotate in a script to insert the code in one step if it’s possible to do this it would save some time if not I’ll continue to use them from the pull down menu
Thanks

MetLHead
10-05-2009, 04:45 PM
No, there's nothing like that in there now but I can see how that could be useful. I'll add this to my list.

Thanks,
Scott

patcareyis
02-09-2010, 08:09 AM
Scott I Don't want to be a pest but can you add a scripting comand like the one for controling preferances in v2.20b5
(NCPGetPrefSetting(strSetting), and NCPSetPrefSetting strSetting, newValue)
but to change subprogam handling
[SUBPROGRAMS]
Default Path =
Ignore M98 = 1 (change this to 3)
Ignore G65 = 1 (ect.)
this would save a click or two after converting format
thanks

MetLHead
02-09-2010, 04:52 PM
Yep, I have this on my list already. The goal is to be able to access all of the non machine configuration related settings.

Thanks,
Scott

InDaBarn
02-14-2010, 08:53 AM
Scott,

I would like the ability to store machine specific script files is their own folder within the scripts folder and be able to select that folder to be the default when changing machines. I have a lot of scripts that I have written that are specific to a certain machine and it gets cluttered when I hit the script button a 20 script files that I could not use for the machine come up. Possibly the ability to specify 2 folders so you could have universal scripts in one folder and all machine specific scripts in their own folder.

Thanks

MetLHead
02-14-2010, 10:02 AM
I actually have this on my list already, you should see it for the release of v2.20.

Thanks,
Scott

InDaBarn
02-14-2010, 11:24 AM
Scott,

Is there a way to get and set the current cursor position? When I use the NCPAllCaps function it puts the cursor back to the top of the program. I would like to reposition the cursor back to the spot that it was before.

Thanks

MetLHead
02-14-2010, 01:13 PM
You can set the cursor position with NCPSetSelection but there's no way to get the current cursor position. I'll add this though, simple enough to do.

Thanks,
Scott

CNCRim
02-14-2010, 06:18 PM
Scott,

In turning mode, keep getting error message if the program radius smaller than .017 and somehow the graph is look funny if try graph part of the circle, full circle is fine.

MetLHead
02-14-2010, 06:45 PM
Can you post an example? This sounds like you may need to switch between radius/diameter mode for the X axis.

Scott

CNCRim
02-15-2010, 12:39 AM
Can you post an example? This sounds like you may need to switch between radius/diameter mode for the X axis.

Scott

Thanks Scott,
I tried diameter and everything is working fine now.

TURNER
03-18-2010, 06:35 AM
Hi Scott,
See if you think this is possible for a fixed/ optional feature. In the plot window when stepping the current position in plot shows X,Y & Z positions in graphics, could you maybe add T,S & F would make easy to check for rogue speeds etc. Please see attatched image.
Thanks...ncplot has saved my bacon more than once...lol:cheers:
Keith.

CNCRim
03-18-2010, 05:04 PM
Scott,

can you fix instant backplott check? let's said if I type in codes and the graph will not show untill I save it and reload program again.

MetLHead
03-18-2010, 08:31 PM
Scott,

can you fix instant backplott check? let's said if I type in codes and the graph will not show untill I save it and reload program again.

There are a few ways to update the graphics display, you can click the refresh button on the plot toolbar, you can press the 'F9' key which is a shortcut to the menu 'Draw / Refresh Plot'. You can also check the menu 'Draw / Auto refresh viewport' which automatically updates the graphics after edits are made.

Thanks,
Scott

MetLHead
03-18-2010, 08:34 PM
Hi Scott,
See if you think this is possible for a fixed/ optional feature. In the plot window when stepping the current position in plot shows X,Y & Z positions in graphics, could you maybe add T,S & F would make easy to check for rogue speeds etc. Please see attatched image.
Thanks...ncplot has saved my bacon more than once...lol:cheers:
Keith.

I'm still working on this one... I'm trying to find a way to store all of the modal information for each block of the program. Once I do that I'll probably add a dockable 'modal information' window like the entity info window.

Thanks,
Scott

tobyaxis
05-29-2010, 01:37 PM
Not to twist your brain too much Scott, but a Turn-Mill back plot would be great.

There are a lot of shops buying Turn_Mill Lathes and the programming gets involved when you have a full Y-Axis and C-Axis.

For right now I am using a combination of the Lathe and Mill Machine Configurations.

To give you an idea, see pic.