54 lines
4.9 KiB
Plaintext
54 lines
4.9 KiB
Plaintext
Automation1 .NET API
|
|
========================================
|
|
|
|
The Automation1 .NET API comes in both .NET Framework and .NET Standard distributions. These are found under the "net462" and "netstandard2.1" folders, respectively.
|
|
If your application targets .NET Framework, use "net462". If your application targets .NET Core or .NET 5+, use "netstandard2.1".
|
|
Each folder contains all the dlls and libraries you need to build and run an application using the Automation1 .NET API.
|
|
Example projects are installed in the Examples/DotNet folder.
|
|
|
|
The IntelliSense information on the Controller class, its properties, and its methods document much of the API and how to use it.
|
|
Make sure you have Aerotech.Automation1.DotNet.xml to make full use of the self-documenting IntelliSense information.
|
|
|
|
To use the Automation1 .NET API for .NET Framework:
|
|
-------------------------------------------------------------
|
|
The .NET API for .NET Framework requires .NET Framework 4.6.2 or newer. It supports 32-bit and 64-bit .NET Framework applications.
|
|
|
|
1. Create a new Visual Studio .NET project (C#, Visual Basic.NET, F#, etc.).
|
|
2. Add references to the "Aerotech.Automation1.DotNet.dll" and "Aerotech.Automation1.Communication.dll" assemblies.
|
|
3. Copy "Automation1Compiler.dll" and "Automation1Compiler64.dll" to your output directory.
|
|
* These are not .NET assemblies but unmanaged dlls. They cannot be added as references but they must be next to your application to run.
|
|
4. Add a using statement for the "Aerotech.Automation1.DotNet" namespace.
|
|
5. Connect to the controller using one of the static Controller.Connect(...) methods.
|
|
* The IntelliSense information on the Controller class, its properties, and its methods document much of the API and how to use it.
|
|
* If access control is enabled, choose one of the Controller.Connect() methods that accepts a user name and password.
|
|
* If the controller is installed on a different computer, choose one of the Controller.Connect() methods that accepts the host name.
|
|
* Connecting to the controller does not automatically start the controller. To start the controller use Controller.Start().
|
|
* You can connect to the same Automation1 controller multiple times (from the same process, different processes, or different PCs).
|
|
6. Use Controller.Configuration to set parameters, change calibration, setup HyperWire, etc.
|
|
* Changes to configuration only take effect on controller reset.
|
|
7. Use Controller.Runtime (once the controller is running) to collect data, retrieve status, execute commands, etc.
|
|
* You can only access the Runtime API if the controller is running (via Controller.Start()).
|
|
|
|
To use the Automation1 .NET API for .NET Core or .NET 5+:
|
|
-------------------------------------------------------------
|
|
The .NET API for .NET Core is compatible with Windows and Debian 10.x. On Windows, it supports 32-bit and 64-bit .NET Core applications.
|
|
On Linux, it only supports 64-bit .NET Core applications. Any Linux distribution that has GLIBC 2.28 and GLIBCXX 3.4.25, or newer versions, may work.
|
|
If you do not use the Compiler API, the Commands API, Tasks.Program.Run, or Tasks.Program.Load, then you can run the .NET API on any .NET Core compatible operating system.
|
|
|
|
1. Create a new Visual Studio .NET project (C#, Visual Basic.NET, F#, etc.).
|
|
2. Add references to the "Aerotech.Automation1.DotNet.dll" and "Aerotech.Automation1.Communication.dll" assemblies.
|
|
3. Copy "libautomation1compiler.so" to your output directory.
|
|
* This is not a .NET assembly but an unmanaged shared object. It cannot be added as a reference but it must be next to your application to run.
|
|
* You may need to update LD_LIBRARY_PATH for the location of this shared object.
|
|
4. Add a using statement for the "Aerotech.Automation1.DotNet" namespace.
|
|
5. Connect to the controller using one of the static Controller.Connect(...) methods.
|
|
* The IntelliSense information on the Controller class, its properties, and its methods document much of the API and how to use it.
|
|
* If access control is enabled, choose one of the Controller.Connect() methods that accepts a user name and password.
|
|
* If the controller is installed on a different computer, choose one of the Controller.Connect() methods that accepts the host name.
|
|
* Connecting to the controller does not automatically start the controller. To start the controller use Controller.Start().
|
|
* You can connect to the same Automation1 controller multiple times (from the same process, different processes, or different PCs).
|
|
6. Use Controller.Configuration to set parameters, change calibration, setup HyperWire, etc.
|
|
* Changes to configuration only take effect on controller reset.
|
|
7. Use Controller.Runtime (once the controller is running) to collect data, retrieve status, execute commands, etc.
|
|
* You can only access the Runtime API if the controller is running (via Controller.Start()).
|