Interaction During Post Processing

No136 image-0001
An example of a simple user interface for a Fanuc style post processor.

Sometimes it is desired to force the user to make specific decisions every time toolpath is post processed. This could be to make sure that the control operates in the correct mode appropriate for the given toolpath. The HSMWorks post processor has built-in functions to allow simple interaction like asking simple questions in sequential order. However, if many questions/settings must be considered then a conventional user interface approach is preferred.

The post processor doesn't directly support customization of user interfaces. However, it does allow third-party applications to be run which would then in turn can present the user interface and return the settings to the post processor. It is fully up to the post developer to choose his preferred development platform to fit the requirements (commonly known platforms would be C++/MFC, C#, Java, and Python).

However, there is an good alternative to the above platforms called HTML applications (HTA) supported through Internet Explorer. An HTA style application is almost identical to a normal HTML web page with minor changes in the accessible API. The user interface possible for HTA is the same as for normal web pages ensuring a great flexibility in user interface design and dynamic content. When relevant we recommend that you develop user interfaces in HTA and use JScript (similar to JaveScript) for consistency with the post processor. An HTA application is just a normal HTML file with a special HTA tag and which uses the extension "hta". You can use the "interactive.hta" file as a template for your own post customization. Furthermore, you can find all the information required for developing user interfaces based on HTML on the Internet.

The new interactive.cps (Interactive Fanuc) post included with the HSMWorks installation demonstrates how the start an HTA application and read back the settings from the user interface using some simple file I/O.

The example shows how you can use the common controls like text boxes, radio buttons, check boxes, drop-down controls, and buttons. Note that the error shown in red in the above picture is dynamically shown when the user clicks the "Accept" button since the tolerance was set to an invalid value.

Since the post processor runs in the background any executed application during posting will not block the main HSMWorks user interface. The user can see in the task manager that the post is in fact waiting for an application to complete. In this particular example; that is until the user clicks either "Cancel" or "Accept". You can always abort the post processing immediately from the HSMWorks task manager in case the third-party application should get stuck.

No136 image-0002

Post processor waiting for application to complete.

All in all the HTA approach will simplify user interface customization and allow you to easily maintain it just like the remaining post customization. In most cases a single HTA text file will be sufficientfor your user interface requirements.

  • Tags: HSMWorks Customization, Post Processing

Categories: HSM Tips and Tricks

Leave a comment

You are commenting as guest.