View Full Version : Need Help! Modifying HSMWorks supplied posts in javascript.....

01-17-2017, 11:09 AM
I have a few older machines which I would like to use with HSMWorks.

One is a Bostomatic 300 series 3 & 4 axis milling machine which has
been retrofitted with a controller running OpenCNC.

I have been attempting to modify the included "bostomatic.cps" post
processor configuration file, but am not too familiar with Javascript.

Here is an example of my target code (opening) :

G01 F1500. G90 G40 H00 D00
G01 F1500. X0. Y0. Z50.8
G92 X0. Y0. Z50.8
G01 F400. X0 Y0 Z50.8
( 01 BALL .025 (.635 MM) )
G90 G40 G00
G01 F400. H01 D01
S25000 M03
G01 F1500. X-10.661 Y-6.914 Z2. M09
G04 F3.
G01 F1000. Z0.57
X-10.661 Y-6.914 Z0.47 F300.
X-10.326 Y-7.043 Z0.47 F600.
X-9.672 Y-7.292 Z0.47
X-9.428 Y-7.386 Z0.47
X-8.499 Y-7.742 Z0.47
X-8.251 Y-7.836 Z0.47

...and what HSMWorks is giving me with the supplied "bostomatic.cps" (opening) :

(T4 D=1 CR=0.5 - ZMIN=-3 - ball end mill)
N10 G90 G17
N11 M9
N12 T4 M6
N13 G141 S10500 M3
N14 M8
N15 G48 R
N17 G0 X-10.639 Y-0.899
N18 Z6
N19 Z0.883
N20 G1 Z0.1 F314
N21 X-10.646 Y-0.9 Z0.062
N22 X-10.668 Y-0.902 Z0.029
N23 X-10.7 Y-0.904 Z0.008
N24 X-10.738 Y-0.908 Z0
N25 G3 X-10.83 Y-1.016 I-10.73 J-1.007
N26 G1 X-10.825 Y-1.068 F628
N27 X-10.82 Y-1.135
N28 X-10.769 Y-1.536 Z-0.001
N29 X-10.763 Y-1.585
N30 X-10.692 Y-2.004

I would like to similarly modify the closing sections of the posts, as well.

Is there a way to easily remove undesired output from "bostomatic.cps",
without losing the full functionality of the HSMWorks?

Also, how would I write the commands to add the initial and closing lines in the final post
which I always want to be there, without them ever changing?

I'm looking for a "crash course" where I can modify a few of the supplied HSMWorks posts
without having to learn a lot of non-essential Javascript code, and perhaps some suggestions
as to what I could and should be leaving intact or adding to the "user defined properties."

HSMWorks looks like a great package which integrates well within SolidWorks, and I'm
sure many others here would like to hear from the experts on this topic without having to wait
on the phone and being dependent on re-sellers or the folks at HSMWorks....

Much thanks....

01-17-2017, 12:37 PM
For anyone in pursuit of the same answers and information as I am, as posted above,
HERE (https://forums.autodesk.com/t5/hsm-post-processor-forum/getting-started-modify-posts/td-p/6371381) is a link to some related videos and discussion.....