Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (C) 2020 Autodesk Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Autodesk Inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# AutodeskMachineControlFramework
Middleware framework to integrate CAD/CAM software with machine hardware systems into a production-ready, complete and cohesive closed loop system.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
theme: jekyll-theme-slate
theme: jekyll-theme-cayman
title: Autodesk Machine Control Framework
description: 'Middleware framework to integrate CAD/CAM software with machine hardware systems into a production-ready, complete and cohesive closed loop system.'
55 changes: 55 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">

{% seo %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
</head>
<body>
<section class="page-header">
<h1 class="project-name">{{ site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
{% endif %}
</section>

<nav>
<ul>
<li><a href="/AutodeskMachineControlFramework/">Home</a></li>
<li><a href="/AutodeskMachineControlFramework/overview.html">Overview</a></li>
<li><a href="/AutodeskMachineControlFramework/solutions.html">Solutions</a></li>
<li><a href="/AutodeskMachineControlFramework/whatsnew.html">What's New</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/">Getting Started</a>
<ul>
<li><a href="/AutodeskMachineControlFramework/getting_started/part01.html">Part 1: How to clone, build and run AMCF</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/part02.html">Part 2: How to use existing plugins</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/part03.html">Part 3: Existing plugin UserInterface</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/part04.html">Part 4: Existing plugin Main</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/part05.html">Part 5: Existing plugin PrinterConnection</a></li>
<li><a href="/AutodeskMachineControlFramework/getting_started/part06.html">Part 6: How to add a new plugin to AMCF</a></li>
</ul>
</li>
</ul>
</nav>

<section class="main-content">
{{ content }}

<footer class="site-footer">
{% if site.github.is_project_page %}
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
{% endif %}
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</section>

</body>
</html>
59 changes: 59 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
---

@import "{{ site.theme }}";

nav ul {
margin: 0;
list-style: none;
text-align: center;
padding: 8px 0 5px 0;
background-color: #9295a3;
}

nav ul li {
display: inline-block;
padding: 0 24px 0 23px;
position: relative;
}

nav ul li a {
text-align: center;
text-decoration: none;
font-size: 18px;
color: #f2f2f2;
}

nav ul li a:hover {
color: #f2ff00;
}

nav ul li ul {
margin: 0;
list-style: none;
text-align: left;
background-color: #9295a3;
position: absolute;
display: none;
}

nav ul li:hover ul {
display: block;
}

nav ul li ul li {
display: block;
padding: 7px 7px 7px 14px;
width: 400px;
}

nav ul li ul li a {
text-align: left;
text-decoration: none;
font-size: 18px;
color: #f2f2f2;
}

nav ul li ul li a:hover {
color: #f2ff00;
}
Binary file added doc/images/AmcfBlockDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfBuildList.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfCollaborationScanlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfCommandLineOutput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfConcept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfConfigMain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfConfigUiSignal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfDriver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfDriverParameterGroup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfDriverSourceAccess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfDriverSourceConstructor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfDriverSourceInit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfEventConnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfLayerView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfManualControlsConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfManualControlsUi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfMarlinExtendedReply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfMarlinFirmware.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfMarlinFirmwareM114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfMenuConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfMenuUi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfOpenSource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfParameterListConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfParameterListUi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfPrintingImages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/AmcfSignalConnect.png
Binary file added doc/images/AmcfSourceMainStateIdle.png
Binary file added doc/images/AmcfSourceMainStateInit.png
Binary file added doc/images/AmcfSourceMainStateRegister.png
Binary file added doc/images/AmcfSourceUiSignal.png
Binary file added doc/images/AmcfToolbarConfig.png
Binary file added doc/images/AmcfToolbarUi.png
Binary file added doc/images/AmcfUiConfig.png
Binary file added doc/images/AmcfUiEventConfig.png
Binary file added doc/images/AmcfUploadControl.png
Binary file added doc/images/AmcfUsageMqttConnection.png
17 changes: 17 additions & 0 deletions getting_started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
| Prev | Getting Started -- Table of Contents | [Next](part01.html) |
# Getting Started

Step-by-Step Guide of Autodesk Machine Control Framework

## Table of Contents

- [Part 1: How to clone, build and run AMCF](part01.html)
- [Part 2: How to use existing plugins](part02.html)
- [Part 3: Existing plugin UserInterface](part03.html)
- [Part 4: Existing plugin Main](part04.html)
- [Part 5: Existing plugin PrinterConnection](part05.html)
- [Part 6: How to add a new plugin to AMCF](part06.html)




34 changes: 34 additions & 0 deletions getting_started/part01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
| [Prev](index.html) | [Getting Started -- Table of Contents](index.html) | [Next](part02.html) |
# Part 1: How to clone, build and run AMCF

To get AMC built and running follow the steps of readme on the Github repository (see "View on GitHub").

The steps below describe the process to create a plugin on a Windows installation.

## Dependencies / Prerequisites (Windows)
- Visual Studio C/C++
- GoLang - [GoLang](https://golang.org/doc/install)
- 64-MinGW Compiler - e.g [TDM-GCC](https://jmeubank.github.io/tdm-gcc/)
- cmake - [cmake](https://cmake.org/download/)
- nodejs - [nodejs](https://nodejs.org/en/download/)

## Building & Running AMCF
- Clone the AMCF GitHub to your local drive
- Checkout wanted branch, FFF for example
- Run the build_clean_win64 or build_clean_linux64 script
- Navigate to build/Output and run amc_server (you may have to change the file extension to .exe)
- Open a web browser and go to 127.0.0.1:8869

## Editing with Visual Studio
- Clone the AMCF GitHub to your local drive
- Checkout wanted branch, FFF for example
- Run the build_clean_win64 or build_clean_linux64 script
- Navigate to AutodeskMachineControlFramework/build
- Open LibMc.sln in Visual Studio
- If you want to edit, compile and debug the plugin “Printer Connection”, then right click on the for example 'libmcplugin_printerconnection' project.
- Set as Startup Project
- Build the solution
- Run the Local Windows Debugger
- Open a web browser and go to 127.0.0.1:8869 to have a look around. If you want define another IP address and/or port, change the corresponding entries in the file “amc_server.xml” located in the Output subfolder.


5 changes: 5 additions & 0 deletions getting_started/part02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
| [Prev](part01.html) | [Getting Started -- Table of Contents](index.html) | [Next](part03.html) |
# Part 2: How to use existing plugins

The core of Autodesk Machine Control is the modern client server architecture, where different external applications can be connected as clients, for example: web-based HMI client, API access, Fusion 360, Forge data platform. Main server is running on the machine and connects clients to the AMC Core system. It provides process control, build file management, authentication, error handling and subsystem synchronisation. It also consists of number of state machines that can accommodate and run any plugins and any drivers for any machines: additive machines, subtractive machines, robots, laser cutters, and any other industrial machine.
Following listed topics show already existing plugins and their functionality.
130 changes: 130 additions & 0 deletions getting_started/part03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
| [Prev](part02.html) | [Getting Started -- Table of Contents](index.html) | [Next](part04.html) |
# Part 3: Existing plugin UserInterface

## UserInterface (UI)
With the UI plugin you’re able to configure the UI of AMCs webpage and you’re able to add functionality. There’re two parts to control the UI.
Part 1 configures the controls to be displayed on the webpage and part 2 defines events and the actions to be performed.
The UI of AMCF is built around state machines which can communicate via signals and changing parameter values. Using these signals, the UI can call actions defined in the state machine of the existing plugins.

### UI Part 1
The schema for the UI is located in the config.xml file, found in AutodeskMachineControlFramework_???/Plugins. A prefix (githash) will be added to the name of the xml file and this file (“run time version”) of the config file will be copied to folder “build\Output” by the build process of the solution. Running the amc_server.exe uses the “runtime version” of the config file.
Among other things, the file contains several sections to define installed drivers and all state machines.
The samples below are all referencing the FFF branch of AMC.

The section <userinterface> is used to define the layout of the UI. The UI is split into pages containing content. Each page added will show as a unique tab on the navigation pane of the AMCF UI.

An example construction is shown below:

![AMCF UI Config](./../doc/images/AmcfUiConfig.png "Unserinterface sample")

The supported attributes of section userinterface are listed below.
appname: Name of application.
copyright: Copyright text.
mainpage: Page displayed on startup (Home page).
library: Library to handle events defined on webpage.


#### Supported UI Sections/Tags
Currently supported UI Sections/Tags are:

**page:**
Defines a page and its name.

**content:**
Defines the content of a page. Its name, the title and subtitle.

**paragraph:**
Paragraphs display text to the user, specified by the text parameter.

**upload:**
Upload adds a button with a paper clip image to the page and pressing the button allows a user to upload a file to AMCF. Class specifies the functionality called, caption specifies the text alongside the upload and successpage specifies the page to load after upload is completed.

![AMCF Upload Control](./../doc/images/AmcfUploadControl.png "Upload Control")

**buildlist:**
Defines the list displayed on the page, containing the already loaded jobs. Loadingtext shows some text. Entriesperpage defines the number of already loaded jobs to be displayed in the list and detailpage specifies the page to load after a job is selected for build.

![AMCF Build List](./../doc/images/AmcfBuildList.png "Build List")

**layerview:**
Shows a graphics area to display the selected toolpath layer by layer and two slider to control the visualisation. The upper slider (layer index) is to control the layer to be displayed and the lower slider (scaling) controls the scaling.

![AMCF Layer View](./../doc/images/AmcfLayerView.png "Layer View")

**image:**
Displays an image, specified by attribute resource, on the webpage. The aspect ratio and the max height/width can be set.

**buttongroup:**
Defines a group of buttons. Must be followed by at least on tag of type \<button\> (see below).

**button:**
Defines a button to be displayed on the webpage. Caption defines the text shown on the button, targetpage defines the page to display after button was pressed and event defines the event to be fired. The event will be handled in part 2 respectively the UI plugin (mc_userinterface.cpp).

![AMCF Manual Control Config](./../doc/images/AmcfManualControlsConfig.png "Config: Manual Controls")


![AMCF Manual Control UI](./../doc/images/AmcfManualControlsUi.png "UI: Manual Controls")

**menu:**
Defines the menu displayed on the left side of the page and must be followed by at least on tag of type <item> (see below)

**item:**
Defines a menu item to be displayed on the webpage. Caption defines the text shown as menu item, targetpage defines the page to display after menu item was pressed, icon shows the image displayed to the left of the menu text and id defines the internal group the menu items belongs to.

![AMCF Menu Config](./../doc/images/AmcfMenuConfig.png "Config: Menu")


![AMCF Menu UI](./../doc/images/AmcfMenuUi.png "UI: Menu")

**parameterlist:**
Plugins can define a set of parameters. These parameters can be used to transfer data within and between plugins. They also can be displayed on AMCs webpage. Attribute loadingtext shows some text displayed above the list. Parameterlist must be followed by at least on tag of type <entry> (see below).

![AMCF Parameterlist Config](./../doc/images/AmcfParameterListConfig.png "Config: Parameterlist")

**entry:**
Defines the parametergroup to be displayed on the webpage. Statemachine defines the state machine respectively the plugin the parameter are defined in and group defines the subset of parameters in each state machine.

![AMCF Parameterlist UI](./../doc/images/AmcfParameterListUi.png "UI: Parameterlist")

**toolbar:**
Defines the toolbar displayed on the upper right of the page and must be followed by at least on tag of type <item> (see below)

**item:**
Defines a menu item to be displayed on the webpage. Caption defines the text shown as menu item, targetpage defines the page to display after menu item was pressed, icon shows the image displayed to the left of the menu text and id defines the internal group the menu items belongs to.

![AMCF Toolbar Config](./../doc/images/AmcfToolbarConfig.png "Config: Toolbar")


![AMCF Toolbar UI](./../doc/images/AmcfToolbarUi.png "UI: Toolbar")



### UI Part 2
Attribute library of tag <userinterface> defines the plugin respectively library to handle the events defined on webpage.
Folder .\Plugins\UI contains the file “mc_userinterface.cpp” and this file contains the source code to handle the events defined in Part 1 (config.xml).
For every event, defined in config.xml, a corresponding class exists in mc_userinterface.cpp.

![AMCF UI Event Config](./../doc/images/AmcfUiEventConfig.png "Config: UI Event")


![AMCF UI Event Source](./../doc/images/AmcfSourceUiSignal.png "Source: Signal definition")

The function “getEventName” must return the same name as defined in config.xml and the method “handle” contains the code to run after the event is fired on the webpage.

First, “Handle” checks if the parameter is valid. If not, an exception is thrown.
Second, “Handle” prepares a signal, triggers it and waits (WaitForHandling(10000): argument ≙ time to wait in ms) until the signal is handled by the called function.
Signals are used to communicate between plugins. To do this the signal must be defined in the plugin that should receive the signal. In this case it’s the plugin “PrinterConnection”.
In section \<statemachine name="printerconnection" … \> of the config.xml the needed signal is defined like this:

![AMCF UI Event Result Config](./../doc/images/AmcfConfigUiSignal.png "Config: Signal result definition")

All events must be registered to the system by calling createEventInstanceByName in the function CreateEvent.

![AMCF UI Event CreateSource](./../doc/images/AmcfEventConnect.png "Source: Create event Connect")

In the plugin “printerconnection” (mcplugin_printerconnection.cpp) the code to handle the signal must be added:

![AMCF UI Signal Connect Source](./../doc/images/AmcfSignalConnect.png "Source: Handling of signal Connect")

The code above waits for the signal “Signal_connect”. If it occurs, it checks if the printer is connected, sets the “BoolResult” accordingly, sends the result as feedback by calling “SignalHandled”.

Loading