SlideShare a Scribd company logo
1 of 56
Download to read offline
Join the conversation #AU2017
Join the conversation #AU2017
Advanced Post Processing with HSM
René Fonseca
Software Architect
My name is René Fonseca (rene.fonseca@autodesk.com)
Software Architect on the HSM team
Been doing CAM since 2003
Based in Copenhagen, Denmark
I’m not a machinist
I’m a software engineer
A little about me
CAM kernel
Simulation
Multi CPU/core support
Post processor
Some areas I’m working on
Which products use the HSM post processor
Fusion 360
Inventor HSM / Inventor HSM Express
HSMWorks / HSMXpress
Mac and Windows
The relevant products
Outcome
Help you make better decisions when developing a post
by giving some insights on the Why’s
by giving some deeper understanding of internals
by sharing what features are in the pipeline
by showing some select features
•Have you used CAM

•Have you generated an NC program

•Have you used a customized post

•Have you made your own post

•Have you crashed a machine due to misunderstanding

•Have you crashed a machine due to operator error

•Have you crashed a machine due to a bug in a post
Survey
The primary task
But it is also
and anything else…

It’s all conversion of the same thing (our data) to something different (we don’t know)
•Post processing is the final step

•Requires a high degree of reliability

•Posts are just painful

•Few standards and ignored

•CNC documentation can leave out relevant info

•Posts are a lot of work

•Requires significant testing

•Lots of communication between user and developer
Statements for clarity
Since 2003, before HSMWorks was a product.

I started looking at the post processing problem a couple of years later.

I have done some reverse post processing.

I read all the CNC programming manuals for old and new CNCs.

A little background on the post processor
How much NC specific state is the post engine going to maintain?

How much NC logic is built into the engine versus the post?

User interface cannot drive all requirements without itself becoming convoluted

Define a language specific for NC output or use a well-known programming language?

Custom language would allow for compact syntax where a generic language will be
more verbose.

The answers to these have direct impact on how we have to manage/maintain posts
Fundamental philosophy
+ Flexibility in post through programming language

+ Flexibility in post through API - behavior is controlled in post

+ No need to make a new release to add new features in the post

- Using a full-blown programming puts higher requirements on the post developer

- More maintenance work for each post

+ Fewer posts
Settling on a solution
•JavaScript as programming language

•Small post engine with much code implemented in JavaScript

•JavaScript core API - e.g. Math

•Extensive post processor specific API

•Main decisions are done in the posts themselves

•We need strict coding conventions to allow for easy maintenance of posts

•Make the posts as similar as possible - reuse code
The HSM solution
We do not need to make new releases of the engine

Existing users are not forced to update to get a feature

We simply extend API to support new features

Existing posts don’t get all new features without being updated
Less obvious advantages
• Don’t copy a post if not required

• Start from our closest matching factory post

• Use the latest version of a post

• Make the minimum change

• Keep in mind you have to sync posts at some point

• Keep the same style conventions
Do’s and don’ts
Always up to date

Both generic posts and machine specific posts

Available at https://cam.autodesk.com/posts

We are moving away from including posts
Online post library
You need to think like a developer - because you are one

• Sample code snippets

• Our factory posts cover this

• We also have some example posts

• Post reference manual

• Look up the specific API to get the exact info

• Only once you know what to look for

• Google

• Useful for JavaScript and core API

• Ignore the documentation relating to web browser development
Developer perspective
It’s not learning a programming language

It’s not learning an API

It is handling the special cases - it’s correctness

Make small self-contained blocks of code

Don’t write convoluted code
The hardest challenge for a developer
Data Model
The entry functions you see when using dump.cps match the internal data model but with additional entry functions for often
used state changes.

onOpen()
Header

onSection()
Tool change and initial positioning

onLinear(), onCircular(), onCycle(), onSpindleSpeed(), …

The actual motion

onPower(), onMovement(), onRadiusCompensation(), …

Often used state changes

onSectionEnd()
Restore state before next section

onClose()
Footer
Main entry functions
You can access the NC data at any time

Tools

Sections

Mostly for look ahead or look back
Accessing data
Handling Compatibility
Try to make the post handle features appropriately when not available
Options
typeof keyword
revision – look at API reference
compatibility
Remember to check reference manual for since version
Support both old and new releases of the HSM solutions with a single post
Compatibility across products and versions
What if a feature is not available?
Options
Map to equivalent or similar code
Skip silently (if the feature is optional)
Output a warning (easy to overlook)
Output an error (hard failure)
Compatibility across products and versions
Testing and debugging
Command line support for post processing
Intermediate file is generated when post processing
Run post using scripts with standard toolpath to catch problems
post mypost.cps intermediate.cnc
Running from command line
•Use dump.cps to see if the NC data is as expected
•setWriteInvocations(true)
•setWriteStack(true)
•Simplify post until it works
Prevent problems before shipping the post by using automatic analysis
We use ESLint to enforce strict conventions
Analysis a problem
Use Notepad++ for now
JavaScript support
Post team add-in
Editing posts
Properties
Key feature to avoid copying posts
Allow user to make decisions without changing the post
The engine cannot know anything about properties
Requires some code in all cases to handle these properties
Properties are names with values
Properties can be used to change all behavior
User defined properties
Definitions are a new feature
Makes user defined properties user friendly
Defines type and range constraints
Provides detailed descriptions of properties
Always add a property definition
Problems can be caught before running the post processor
User defined property definitions
Select Features
Key feature to avoid copying posts
Metric and imperial support in a single post
Extra logic in post but generally that much
E.g. G-codes/M-codes might be different
It is more import to avoid forking posts MOVE UP
Units
A parameter is a name with a value
Post engine doesn’t care about parameters in general
Parameters can be different between products
The core parameters are the same
Global (outside a section) vs local (inside a section)
API for product specific parameters
hasParameter(), getParameter()
hasGlobalParameter(), getGlobalParameter()
Section.hasParameter(), Section.getParameter()
Parameters
include(“mypost.cps”);
Avoid maintaining redundant code in your codes
But you get multiple files to ship
Only put in the root - not in functions
include() API
built-in.cps:
description = “”;
main.cps:
description = “My main post”;
include(“other.cps”);
description = “Lets set the description”;
other.cps:
description = “My other post”;
include() execution order
Merge all dependent posts into a single post
Make it easier for the user
You should only change the source posts - not the merged post
post —merge input.cps output.cps
Merge posts
Revision - keep the same format
Date - keep the same format
FORKID - do not change this
You can add your own information
API: getHeader(), getHeaderCommit(), getHeaderDate*(),
getHeaderSnippet(), getHeaderVersion()
Headers
Recent Additions
Use Notepad++ for now
JavaScript support
Post team add-in
Windows only
It’s not great but it works
Editing posts
Header API for meta information access by convention
Base64 class for encoding/decoding binary data
BinaryFile class for simple binary file IO
XMLHTTPRequest class for interacting with a web server
Curve class for getting shape of tool
New API
Read from Windows Registry
Read environment variable
Use these APIs as a last resort!
Boolean hasRegistryValue(String path, String name)
Integer getRegistryOrdinal(String path, String name)
String getRegistryString(String path, String name)
String getEnvironmentVariable(String name)
Hidden API
Can be controlled by user in the machine configuration
It is enabled by default
MachineConfiguration.setSingularity(adjust, method, cone, angle,
tolerance, linearizationTolerance)
Multi-axis singularity handling
Extract primary information about a post
Interrogation can be used if many posts need to be checked
Don’t try to interpret the posts yourself
Same interface as the user interface uses to present information
The result is easy to read JSON
post —interrogate mypost.cps
Interrogating a post
Future
Development environment
Cascading post
Online editor
Machine configuration in user interface
Packaging (ZIP)
Security enforcement
Moving multi-axis decisions from post to user interface
What we are working on
Faster development by
Making it easy to check implementation against conventions
Making it easy to test and view the result of a post
Making it easy to find the code for given output
Proving API auto-completion
How
Based on Visual Studio Code - Windows and Mac
An open collaboration project
Development environment
Take the output from one post and pass it as the input to another post
Use case would be for interfacing to third party solutions like
Vericut and NC-SIMUL
Why
We do not want to customize posts to add such capabilities
How
It’s a normal post
New API to get the output file from the previous post
Cascading post
Allow users to make new posts without having to
•Much easier
•Less flexibility
•No code required
•Still using the same underlaying engine
Meet Xander in the Answer Bar for demonstration
Online post editor
•Restricted file and network access
•Restricted interaction
•Execution of other applications
Why
We are embracing on demand post processing
API security
Why
Users should only manage a single file
Users should not manage multiple files and their dependencies
On demand post processing
How
ZIP archive
Transparent to the user
Only files within the package can be accessed
include() API still works
File IO still works for data files
Packaging
Reference manual
https://cam.autodesk.com/posts/reference
Online post library
https://cam.autodesk.com/posts
Ask on our post forum
https://forums.autodesk.com/t5/hsm/ct-p/213
Main resources
Subscribe to RSS feeds for
•Entire post library
•Specific vendor
•Specific post
And look at the Recent changes
Keeping up to date
Very dedicated and active on our post forum
https://forums.autodesk.com/t5/hsm/ct-p/213
Achim
Bob
George
Xander
Ask them how to implement a feature if we don't already have sample code for it
Our post team
Questions and Answers
Autodesk and the Autodesk logo are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves
the right to alter product and services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document.
© 2017 Autodesk. All rights reserved.

More Related Content

What's hot

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
php app development 1
php app development 1php app development 1
php app development 1barryavery
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHPDeo Shao
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With XtextSven Efftinge
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platformJulie Lerman
 
Week 8 intro to python
Week 8   intro to pythonWeek 8   intro to python
Week 8 intro to pythonbrianjihoonlee
 
06 integrating extra features and looking forward
06   integrating extra features and looking forward06   integrating extra features and looking forward
06 integrating extra features and looking forwardМарина Босова
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLiteJEAN-GUILLAUME DUJARDIN
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Thinkful
 
Json Rpc Proxy Generation With Php
Json Rpc Proxy Generation With PhpJson Rpc Proxy Generation With Php
Json Rpc Proxy Generation With Phpthinkphp
 
php basic part one
php basic part onephp basic part one
php basic part onejeweltutin
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
NLP using JavaScript Natural Library
NLP using JavaScript Natural LibraryNLP using JavaScript Natural Library
NLP using JavaScript Natural LibraryAniruddha Chakrabarti
 
Dotnet Conf 2021 - F# and Safe Stack
Dotnet Conf 2021 - F# and Safe StackDotnet Conf 2021 - F# and Safe Stack
Dotnet Conf 2021 - F# and Safe StackChieh Kai Yang
 
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)Build a game with javascript (april 2017)
Build a game with javascript (april 2017)Thinkful
 

What's hot (19)

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
php app development 1
php app development 1php app development 1
php app development 1
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHP
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platform
 
Week 8 intro to python
Week 8   intro to pythonWeek 8   intro to python
Week 8 intro to python
 
06 integrating extra features and looking forward
06   integrating extra features and looking forward06   integrating extra features and looking forward
06 integrating extra features and looking forward
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
 
Json Rpc Proxy Generation With Php
Json Rpc Proxy Generation With PhpJson Rpc Proxy Generation With Php
Json Rpc Proxy Generation With Php
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
 
php basic part one
php basic part onephp basic part one
php basic part one
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
NLP using JavaScript Natural Library
NLP using JavaScript Natural LibraryNLP using JavaScript Natural Library
NLP using JavaScript Natural Library
 
Dotnet Conf 2021 - F# and Safe Stack
Dotnet Conf 2021 - F# and Safe StackDotnet Conf 2021 - F# and Safe Stack
Dotnet Conf 2021 - F# and Safe Stack
 
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)Build a game with javascript (april 2017)
Build a game with javascript (april 2017)
 

Similar to 5 hs mpostcustomizationrenefonseca

Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...PostgresOpen
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesInductive Automation
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesInductive Automation
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep JoshiSpiffy
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxAlon Fliess
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptxStefan Oprea
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copyBurlacu Sergiu
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NETdanhermes
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)David McCarter
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Updating Legacy SharePoint Customizations to the Add-in Model
Updating Legacy SharePoint Customizations to the Add-in ModelUpdating Legacy SharePoint Customizations to the Add-in Model
Updating Legacy SharePoint Customizations to the Add-in ModelDanny Jessee
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)David McCarter
 

Similar to 5 hs mpostcustomizationrenefonseca (20)

Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptx
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NET
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Updating Legacy SharePoint Customizations to the Add-in Model
Updating Legacy SharePoint Customizations to the Add-in ModelUpdating Legacy SharePoint Customizations to the Add-in Model
Updating Legacy SharePoint Customizations to the Add-in Model
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 

Recently uploaded

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

5 hs mpostcustomizationrenefonseca

  • 1. Join the conversation #AU2017 Join the conversation #AU2017 Advanced Post Processing with HSM René Fonseca Software Architect
  • 2. My name is René Fonseca (rene.fonseca@autodesk.com) Software Architect on the HSM team Been doing CAM since 2003 Based in Copenhagen, Denmark I’m not a machinist I’m a software engineer A little about me
  • 3. CAM kernel Simulation Multi CPU/core support Post processor Some areas I’m working on
  • 4. Which products use the HSM post processor Fusion 360 Inventor HSM / Inventor HSM Express HSMWorks / HSMXpress Mac and Windows The relevant products
  • 5. Outcome Help you make better decisions when developing a post by giving some insights on the Why’s by giving some deeper understanding of internals by sharing what features are in the pipeline by showing some select features
  • 6. •Have you used CAM •Have you generated an NC program •Have you used a customized post •Have you made your own post •Have you crashed a machine due to misunderstanding •Have you crashed a machine due to operator error •Have you crashed a machine due to a bug in a post Survey
  • 8. But it is also and anything else… It’s all conversion of the same thing (our data) to something different (we don’t know)
  • 9. •Post processing is the final step •Requires a high degree of reliability •Posts are just painful •Few standards and ignored •CNC documentation can leave out relevant info •Posts are a lot of work •Requires significant testing •Lots of communication between user and developer Statements for clarity
  • 10. Since 2003, before HSMWorks was a product. I started looking at the post processing problem a couple of years later. I have done some reverse post processing. I read all the CNC programming manuals for old and new CNCs. A little background on the post processor
  • 11. How much NC specific state is the post engine going to maintain? How much NC logic is built into the engine versus the post? User interface cannot drive all requirements without itself becoming convoluted Define a language specific for NC output or use a well-known programming language? Custom language would allow for compact syntax where a generic language will be more verbose. The answers to these have direct impact on how we have to manage/maintain posts Fundamental philosophy
  • 12. + Flexibility in post through programming language + Flexibility in post through API - behavior is controlled in post + No need to make a new release to add new features in the post - Using a full-blown programming puts higher requirements on the post developer - More maintenance work for each post + Fewer posts Settling on a solution
  • 13. •JavaScript as programming language •Small post engine with much code implemented in JavaScript •JavaScript core API - e.g. Math •Extensive post processor specific API •Main decisions are done in the posts themselves •We need strict coding conventions to allow for easy maintenance of posts •Make the posts as similar as possible - reuse code The HSM solution
  • 14. We do not need to make new releases of the engine Existing users are not forced to update to get a feature We simply extend API to support new features Existing posts don’t get all new features without being updated Less obvious advantages
  • 15. • Don’t copy a post if not required • Start from our closest matching factory post • Use the latest version of a post • Make the minimum change • Keep in mind you have to sync posts at some point • Keep the same style conventions Do’s and don’ts
  • 16. Always up to date Both generic posts and machine specific posts Available at https://cam.autodesk.com/posts We are moving away from including posts Online post library
  • 17. You need to think like a developer - because you are one • Sample code snippets • Our factory posts cover this • We also have some example posts • Post reference manual • Look up the specific API to get the exact info • Only once you know what to look for • Google • Useful for JavaScript and core API • Ignore the documentation relating to web browser development Developer perspective
  • 18. It’s not learning a programming language It’s not learning an API It is handling the special cases - it’s correctness Make small self-contained blocks of code Don’t write convoluted code The hardest challenge for a developer
  • 20. The entry functions you see when using dump.cps match the internal data model but with additional entry functions for often used state changes. onOpen() Header onSection() Tool change and initial positioning onLinear(), onCircular(), onCycle(), onSpindleSpeed(), … The actual motion onPower(), onMovement(), onRadiusCompensation(), … Often used state changes onSectionEnd() Restore state before next section onClose() Footer Main entry functions
  • 21. You can access the NC data at any time Tools Sections Mostly for look ahead or look back Accessing data
  • 23. Try to make the post handle features appropriately when not available Options typeof keyword revision – look at API reference compatibility Remember to check reference manual for since version Support both old and new releases of the HSM solutions with a single post Compatibility across products and versions
  • 24. What if a feature is not available? Options Map to equivalent or similar code Skip silently (if the feature is optional) Output a warning (easy to overlook) Output an error (hard failure) Compatibility across products and versions
  • 26. Command line support for post processing Intermediate file is generated when post processing Run post using scripts with standard toolpath to catch problems post mypost.cps intermediate.cnc Running from command line
  • 27. •Use dump.cps to see if the NC data is as expected •setWriteInvocations(true) •setWriteStack(true) •Simplify post until it works Prevent problems before shipping the post by using automatic analysis We use ESLint to enforce strict conventions Analysis a problem
  • 28. Use Notepad++ for now JavaScript support Post team add-in Editing posts
  • 30. Key feature to avoid copying posts Allow user to make decisions without changing the post The engine cannot know anything about properties Requires some code in all cases to handle these properties Properties are names with values Properties can be used to change all behavior User defined properties
  • 31. Definitions are a new feature Makes user defined properties user friendly Defines type and range constraints Provides detailed descriptions of properties Always add a property definition Problems can be caught before running the post processor User defined property definitions
  • 33. Key feature to avoid copying posts Metric and imperial support in a single post Extra logic in post but generally that much E.g. G-codes/M-codes might be different It is more import to avoid forking posts MOVE UP Units
  • 34. A parameter is a name with a value Post engine doesn’t care about parameters in general Parameters can be different between products The core parameters are the same Global (outside a section) vs local (inside a section) API for product specific parameters hasParameter(), getParameter() hasGlobalParameter(), getGlobalParameter() Section.hasParameter(), Section.getParameter() Parameters
  • 35. include(“mypost.cps”); Avoid maintaining redundant code in your codes But you get multiple files to ship Only put in the root - not in functions include() API
  • 36. built-in.cps: description = “”; main.cps: description = “My main post”; include(“other.cps”); description = “Lets set the description”; other.cps: description = “My other post”; include() execution order
  • 37. Merge all dependent posts into a single post Make it easier for the user You should only change the source posts - not the merged post post —merge input.cps output.cps Merge posts
  • 38. Revision - keep the same format Date - keep the same format FORKID - do not change this You can add your own information API: getHeader(), getHeaderCommit(), getHeaderDate*(), getHeaderSnippet(), getHeaderVersion() Headers
  • 40. Use Notepad++ for now JavaScript support Post team add-in Windows only It’s not great but it works Editing posts
  • 41. Header API for meta information access by convention Base64 class for encoding/decoding binary data BinaryFile class for simple binary file IO XMLHTTPRequest class for interacting with a web server Curve class for getting shape of tool New API
  • 42. Read from Windows Registry Read environment variable Use these APIs as a last resort! Boolean hasRegistryValue(String path, String name) Integer getRegistryOrdinal(String path, String name) String getRegistryString(String path, String name) String getEnvironmentVariable(String name) Hidden API
  • 43. Can be controlled by user in the machine configuration It is enabled by default MachineConfiguration.setSingularity(adjust, method, cone, angle, tolerance, linearizationTolerance) Multi-axis singularity handling
  • 44. Extract primary information about a post Interrogation can be used if many posts need to be checked Don’t try to interpret the posts yourself Same interface as the user interface uses to present information The result is easy to read JSON post —interrogate mypost.cps Interrogating a post
  • 46. Development environment Cascading post Online editor Machine configuration in user interface Packaging (ZIP) Security enforcement Moving multi-axis decisions from post to user interface What we are working on
  • 47. Faster development by Making it easy to check implementation against conventions Making it easy to test and view the result of a post Making it easy to find the code for given output Proving API auto-completion How Based on Visual Studio Code - Windows and Mac An open collaboration project Development environment
  • 48. Take the output from one post and pass it as the input to another post Use case would be for interfacing to third party solutions like Vericut and NC-SIMUL Why We do not want to customize posts to add such capabilities How It’s a normal post New API to get the output file from the previous post Cascading post
  • 49. Allow users to make new posts without having to •Much easier •Less flexibility •No code required •Still using the same underlaying engine Meet Xander in the Answer Bar for demonstration Online post editor
  • 50. •Restricted file and network access •Restricted interaction •Execution of other applications Why We are embracing on demand post processing API security
  • 51. Why Users should only manage a single file Users should not manage multiple files and their dependencies On demand post processing How ZIP archive Transparent to the user Only files within the package can be accessed include() API still works File IO still works for data files Packaging
  • 52. Reference manual https://cam.autodesk.com/posts/reference Online post library https://cam.autodesk.com/posts Ask on our post forum https://forums.autodesk.com/t5/hsm/ct-p/213 Main resources
  • 53. Subscribe to RSS feeds for •Entire post library •Specific vendor •Specific post And look at the Recent changes Keeping up to date
  • 54. Very dedicated and active on our post forum https://forums.autodesk.com/t5/hsm/ct-p/213 Achim Bob George Xander Ask them how to implement a feature if we don't already have sample code for it Our post team
  • 56. Autodesk and the Autodesk logo are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product and services offerings, and specifications and pricing at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document. © 2017 Autodesk. All rights reserved.