February 26, 2019

SmartCAM Code Generator: New String function


Welcome back once again to the SmartCAMcnc blog ☺


Code Generator String expressions

Technical stuff: bring it on. I'm not going to mess about with an introduction this time: as someone who thrives on the technical I'm heading straight to the interesting technical content of this post.

The Interesting Bit

A new Code Generator String Processing function became
available in the latest release of SmartCAM, Version 2019 SP1.


Over the years we have had many interesting discussions regarding strings and string handling in the SmartCAM Code Generator ( CG ) and Customization ToolKit ( CTK ).

We want to tell you about a new Macro String Expression function - #MSE - that can now be used in CG template ( .cgt ) files.

The SmartCAM macro mechanism has a whole load of string variable functions available, any of which can be incorporated within macro logic for all manner of purposes, such as outputs and conditional-tests.

Examples of macro string functions are:


GET_CNC_PATHReturns the folder path where SmartCAM
will write NC code files
VERSIONReturns the current SmartCAM application's
'Header text'
CODFILEReturns the current CNC Code path and file name
SHPFILEReturns the current Process Model path and file name

All macro string expressions can now be used within the SmartCAM Code Generator Template file.

The syntax for accessing macro string processing functionality in a CG template file is a #MSE function embedded in a #EVAL string assignment:


#EVAL ( #my_string =#MSEmacro string expression ))

If you are experienced with the SmartCAM Code Generator tools then you'll understand that stuff. But for the general benefit of all, let's break down that statement.





User Variables can be used within the SmartCAM Code Generator Template file.

They are declared in the @DECLARE section of the code generator template file, defining which type of data they will contain - string, integer or decimal type.

Since our example will return a string expression, it follows that our user variable would be declared as being of string type:

#STR #my_string

There is a User Variables topic in Learning SmartCAM, browse to Code Generation > Variables

#EVAL
To borrow the description from Learning SmartCAM , the #EVAL command is used to "Assign numeric and string words via numeric and string expressions."

I'll sneak in here a simple example of the use of that command, again borrowed from Learning SmartCAM:

#EVAL( #diam = #radius * 2 )

using decimal variables in that case.

And so our example

#EVAL ( #my_string =#MSEmacro string expression ))

Assigns to a user string variable named #my_string the value returned by the #MSE function.






Here's a use case. A common request is to retrieve file names and paths, such as those for the current CNC code file, or the current Shape FilePM5 file ).

The last variable in our list of examples above, SHPFILE can be used to illustrate that type of case:


#EVAL ( #my_string =#MSE( SHPFILE() ))

Macro functions can be found in the SmartCAM Customization Guide, navigate to Automating SmartCAM with macros > Macro functions

Functions that begin with S= in the documentation are string functions.

We want to let you know that the function is still in a beta state, but felt it was worth including in the SP1 release. At the time of writing, our testing has found that the EL_NAME() function is the only function not working correctly.

Please go ahead and try it if you have a use case!





If you have yet to discover SmartCAM

Here's a little background information, just for you.

CAM engineers who use SmartCAM know that the Code Generator ( let's refer to that as 'The CG' ) and Customization ToolKit ( 'The CTK' ) tools excel.

Sure, they are technical, but once you have grasped the fundamentals you can achieve really good things using those tools. 

I've said it before and no doubt will say it again - because we here at SmartCAMcnc have a deep-seated belief in the statement - that the SmartCAM Code Generator and Customization tools are amongst the most open and flexible in the CAM software world. 


Complete Automation of Hydraulic Seal
manufacturing Toolpath
One of these days I'll create a blog post dedicated to the concepts of the Code Generator and the CTK.  Probably one for each of those really interesting technical topics.

But in a nutshell a SmartCAM user can apply  the particularly open CG tools to setup detail code requirements for themselves, and can use the CTK to create additional functionality that is often unique to their particular application requirements. 


CTK Projects can range from small everyday useful commands and functions through to large-scale  automation

CTK work can comprise of a short and simple macro that is 'executed' by the SmartCAM engineer, or it can be the development of a whole suite of macros and can be enabled with custom user-interface panels.

A key element in both systems is variables, system- and user-defined. This blog post highlighted a new function that enhances string variable handling in the SmartCAM Code Generator.


I hope it has been helpful and as technically interesting as it was for me.




Take care.
Have a great day / evening / weekend.

Talk CAM with us. We're at:


+1 (541) 344-4563

sales@smartcamcnc.com




The SmartCAMcnc Team

January 9, 2019

SmartCAM Reseller partner growth


We want additional Reseller Sales Partners for many regions of the world outside of the US.

If a good, ( even if they were appropriate, I'm not going to use here any of those markety-words such as powerful, affordable, market-leading -  you know the ones I mean ) proven, mid-range CAM system fits into your product portfolio and business model

and

you believe that you have the ability to successfully sell and support in a technically-demanding applications sector then let's talk.

Contact me, Terry Antrobus, for a confidential initial chat so that you and I can explore possibilities together.

We included an animated GIF image in that left-hand panel. If you received this post by email, many email clients don't automatically play GIF animation. The solution is to open our message in a browser. 


That's it: our shortest blog post to date.

Take care.
Have a great day.
Our Regards,

The SmartCAMcnc Team

Talk CAM with us. We're at:
+1 (541) 344-4563




November 5, 2018

M99



Welcome back once again to the SmartCAMcnc blog





M99?

I think I may have been too clever for my own good there.

As I sat here trying to come up with novel title for this blog post - as is my way -  it occurred to me that we kind of reached the end of another month, a 'subroutine' in our development cycle, culminating in the release of SmartCAM Version 2019.

I did consider naming it M30, but that has an entirely different connotation that we have reached the end of the program. Which we haven't.


I also thought about using G80. But the common definition of that is 'cycle cancel'. Which we haven't. We completed that cycle, we didn't cancel it. Which is what actually happens on your CNC after all. It is close. Maybe G80 would have been good.

No? Ahem. Let's move on before I dig myself even deeper into that hole and get myself into trouble with The Management.





As those that know us have come to know, we are in the habit of providing an overview of a new release on our website, which you can view here

But here is a fast run-through of What’s New:



New: Adaptive Solid Processes
The benefits of Adaptive Rouging Toolpaths are firmly established, having been added to SmartCAM in a previous release.



Those Toolpath Modeling functions were wireframe-based. Version 2019 adds Solid Model-based Adaptive Toolpath functionality: a CAD solid model can be analyzed for the regions to be Toolpathed and Adaptive Toolpaths automatically applied to those regions.

Two new Adaptive Solid Processes are available, Adaptive Solid Pocket Roughing and Adaptive Solid Planar Roughing.

We won't provide detailed information about or attempt to demo those functions here, but you can see Adaptive Solid Pocket Roughing being applied in this short video:






Adaptive Solid Roughing is the predominant toolpath technology addition for SmartCAM Version 2019, but there are a number of detailed additions and changes that we know existing users in particular are going to appreciate. And understand; some of them will be lost, we think, on anybody that does not yet know SmartCAM concepts and methodology.

Rattling through them and other changes and additions quickly, they are:



Adaptive Process Tool End Radius
All of the Adaptive Toolpath Processes now support the difference between a regular, cylindrical cutting tool and bull- or ball-mills. The result is, of course, ‘tighter’ toolpath due to that tool end radius.





Mill Roughing Compute Times
All of the Mill Roughing Processes benefit from improved performance / faster results due to identifying when identical cut patterns are generated at multiple depths of cut.






Spiral Hole Leads and Comp Codes
The Spiral Hole Toolpath Modeling Process has been enhanced to now support Line, Arc, and Line / Arc leads, and tool radius compensation can now be applied within the Process.







The User Interface: Toolbars
The User Interface had a lot of development attention and benefits from a more modern appearance and general ‘freshen up’. We really like it.

The primary enhancements have been:
-      Optionally associate text with icons on a toolbar
-     Better and easier control of Toolbar configuration
-   A new Toolbar ‘set’ capability can be used to store user-preferred toolbar arrangements
-      Each Toolbar can now be sized independently of the others. Small beer, it would seem, but we love that particular one ourselves.





Gradient Graphics Background
We didn’t appreciate just how effective that could be before now. A Gradient background can be configured or turned off according to user preference.









Zoom to Active Group
The Active Group is one of the cornerstone concepts in SmartCAM usage. We bet that if we’d asked our customers ‘would you like to be able to zoom to the extent of the Active Group?’, 99.9% or more would have said yes.

And now you can.





Code Generation. For those that don’t know us, Code Generation is the term used by the SmartCAM community for what are commonly called Post Processors in other systems. There’s a little more of the SmartCAM Difference for you right there.

The SmartCAM Code Generator Tookit is possibly the most open and flexible in the CAM world. Version 2019 delivers a small number of code generator enhancements, which will again be a little meaningless to those who do not yet know anything about our technology. But being a techie sort of guy, one who such things excite ( how sad is that? )  I’m going to run through them anyway. It’s hard to come up with an image for these things, I’ve not even bothered to try.


Solid @OP_HOLEwMILLOP
Now how techie is that, eh? This stuff is SmartCAM Code Generator-specific.

OK, so it was a little tricky to handle CNC code for a hole being toolpathed with other than a Hole Operation. A  new CGT Section more easily enables the processing of Hole Toolpaths where the current operation is a Milling rather than a Hole Making operation type.


Code Generator / Macro Parsing
This one is buried deep within the Code Generator / Custom Toolkit functionality. Our users who have ‘been there’ with various customization projects will really appreciate the fact that macro variables can be parsed from the CG to the macros.

Customization might, for example ‘do something’, call Code Generation and then ‘do something more’ after Code Generation is complete and has parsed information back to the macro system.


Code Generator 'Function' Section
This one ‘lights my fire’, I have to tell you. A new section behaviour has been added to the Code Generator mechanism which enables Code Generator creators to create their own specific ‘functions’ within their Code Generator.

The primary goal of this work has been to enhance the ‘readability’ of Code Generator Template files, but it does empower the creator with so many technical possibilities, some of which we haven’t yet imagined.

I personally have a view of the SmartCAM Code Generator and Customization Toolkit, that what can be achieved is really only limited by the imagination. So much is possible with that stuff, we have been privy to some remarkable projects by our customers.




There are a number of miscellaneous changes and additions summarized on our website, but there we have it: some of the result of the 'subroutines' we ran during development of our favorite CAM system. Now we're into the next program cycle of exciting development work for SmartCAM Version 2020.


I really must get back to my proper job. I hope I helped with a little comprehension of another great release of SmartCAM.


Take care.
Have a great day / evening / weekend. Morning, even.

Talk CAM with us. We're at:
+1 (541) 344-4563
sales@smartcamcnc.com




June 6, 2018

Deep Joy


First, I’d like to acknowledge Mr. or “Professor” Stanley Unwin as the inspiration for the thought of a title for this brief technical item.

Stanley Unwin was a remarkable British ( but South African-born ) comedian who had a long showbusiness career ( yet to call him a comedian seriously undermines his talent ).

If you’ve not experienced his unique work then do look up the video clips that are out there on the ‘net. I think you’ll be impressed and enthralled J


So, why ‘Deep Joy’?
Part of my week has been spent working on macro code for a particular SmartCAM requirement. Allow me to provide some background.


I’m an engineer, a sort of a Production / Mechanical hybrid, really. I once overheard a remark by a software professional, a proper computer scientist, as it were, of an engineer who had successfully followed a career in software development and business management. And highly talented he was, too ( both of them were, in fact, the engineer and the developer ).


The developer claimed that the engineer ‘wrote code like an engineer’. I kind of knew immediately what he might have meant by that.


Throughout my CAM career I have had the good fortune – because it is a part of this job that I like doing - to have the need and to be capable of creating bits and pieces of software for this-or-that purpose or repetitive task using various programming languages.


I consider myself to be a capable software writer. For an engineer, that is.


I always try my best to create structured, elegant code. Neat, compact and efficient code is almost a work of art and is to be admired. Or at least it is that to me, anyhow. But that’s another topic for another day. My professional development colleagues could, I’m sure, provide much interesting comment and input on how to structure program source code.


I’m not asking for that, nor am I asking for anybody to comment on my code style. I daren’t J


My Deep Joy, lightbulb moment
hit me when I wanted to include macro code to check for an arc that ran from left to right and was in a counter clockwise direction or ran from right to left and was in a clockwise direction.

April 11, 2018

My little secret


Welcome once again to our blog

Let’s get straight to the heart of the matter:
I want to let you in on a little secret.

I am a Motorhead.

There, I’ve said it, it’s now public knowledge.

Many of the hours I’m not working with SmartCAM are spent on my classic cars or other projects.

You know, I have a hunch that many of my colleagues are also Motorheads. Just that they haven’t yet admitted as much. 


What has that to do with a blog site about SmartCAM CAM software, I hear you ask. But bear with me, we will get to that.


Sunbeam Rapier Gearbox

One of my recent projects was to strip down, check and re-assemble the gearbox of my ’62 Sunbeam Rapier. It had a really noisy ‘rattle’ in first gear.

I took some photos of my work in my dark garage. They're a little fuzzy but do the job.

The Gearbox Casing

Mainshaft, 3rd and 4th, plus selector rods
and a couple of synchro rings

January 10, 2018

Another great SmartCAM release hits the streets

Welcome back once again to the SmartCAMcnc blog J

Apologies, it’s been a while.

That’s entirely down to me,
I’ve been fully occupied with release material work.

That’s a subtle way of letting you know that a new release of our CNC programming software has recently become available, SmartCAM Version 2018.

As is our custom, an overview of the release content can be found on our website here

But here is a fast run-through of What’s New:


New: Adaptive Roughing Toolpaths

The benefits of Adaptive Rouging toolpaths are based upon impeccably robust logic:

Always-tangential toolpath and a Consistent Cut Volume mean that there are no shock loads due to corners or burying the cutter deep into stock.

User control over maximum widths of cut / the use of small widths of cut mean that small chips are produced, which are more easily and quickly removed from the cutter taking heat away with them.

Tool life is increased.

No shock loading and small widths of cut / chips mean that you can ramp up High Speed Milling speeds and feeds and can use deeper depths of cut, often using the maximum cutter flute length. Faster material removal results in reduced cycle times.





August 30, 2017

Could you tell me the time?



Hi! Welcome once again to our blog  J

Here’s an observation that I hope you will find interesting.

CAM Software CNC program estimated cycle times.

My use of an image of a mechanical stopwatch is no accident. Back in the day, when I started out as a CNC programmer - which is more years ago now than I care to mention and before the digital timer age - I felt really important but a little intimidated and embarrassed to go down to the machine shop with the stopwatch ( it belonged, of course, to the department ) to time the cycle on first prove-out of one of my well-crafted programs.

We had no means of accurately estimating the cycle time, and had to go and time it so that the job could be accurately booked.

I reckon that little has changed in all these years.