MTConnect.NET-AgentProcessor-Python
6.0.11-beta
See the version list below for details.
dotnet add package MTConnect.NET-AgentProcessor-Python --version 6.0.11-beta
NuGet\Install-Package MTConnect.NET-AgentProcessor-Python -Version 6.0.11-beta
<PackageReference Include="MTConnect.NET-AgentProcessor-Python" Version="6.0.11-beta" />
paket add MTConnect.NET-AgentProcessor-Python --version 6.0.11-beta
#r "nuget: MTConnect.NET-AgentProcessor-Python, 6.0.11-beta"
// Install MTConnect.NET-AgentProcessor-Python as a Cake Addin #addin nuget:?package=MTConnect.NET-AgentProcessor-Python&version=6.0.11-beta&prerelease // Install MTConnect.NET-AgentProcessor-Python as a Cake Tool #tool nuget:?package=MTConnect.NET-AgentProcessor-Python&version=6.0.11-beta&prerelease
MTConnect Python Agent Processor
This Agent Processor uses individual Python script files to transform input data
Configuration
- python:
directory: processors
directory
- The directory to load and monitor for ".py" script files.
Scripts
Scripts are implemented using IronPython and supports Python v3. Both the MTConnect Entity to process and the MTConnect Agent are both accessible from the script.
Example 1
Change the Result for a DataItem with a Type = "EMERGENCY_STOP"
def process(observation):
if observation.DataItem.Type == 'EMERGENCY_STOP':
result = observation.GetValue('Result')
if result.lower() == 'TRUE'.lower():
observation.AddValue('Result', 'ARMED')
else:
observation.AddValue('Result', 'TRIGGERED')
return observation
Example 2
Change the Result for a DataItem with a Type = "PATH_FEEDRATE_OVERRIDE" from a Percentage to an Integer by multiplying by 100
def process(observation):
if observation.DataItem.Type == 'PATH_FEEDRATE_OVERRIDE':
result = float(observation.GetValue('Result'))
observation.AddValue('Result', result * 100)
return observation
Example 3
Add a new TimeSeries observation for any time a DataItem with an ID = "L2p1Fact" changes
import clr
clr.AddReference("MTConnect.NET-Common")
import MTConnect.Input
def process(observation):
if observation.DataItem.Id == "L2p1Fact":
timeseries = MTConnect.Input.TimeSeriesObservationInput()
timeseries.DataItemKey = 'L2p1Sensor'
timeseries.SampleRate = 100
n = 15
samples = [0] * n
for x in range(n):
samples[x] = float(x)
timeseries.Samples = samples
observation.Agent.AddObservation(observation.DataItem.Device.Uuid, timeseries)
return observation
Contribution / Feedback
- Please use the Issues tab to create issues for specific problems that you may encounter
- Please feel free to use the Pull Requests tab for any suggested improvements to the source code
- For any other questions or feedback, please contact TrakHound directly at info@trakhound.com.
License
This application and it's source code is licensed under the MIT License and is free to use.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.6.1
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.6.2
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.7
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.7.1
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.7.2
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETFramework 4.8
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
.NETStandard 2.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
net5.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
net6.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
net7.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
-
net8.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.0.11-beta)
- NLog (>= 5.2.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MTConnect.NET-AgentProcessor-Python:
Package | Downloads |
---|---|
MTConnect.NET-Applications-Agents
MTConnect.NET-Applications-Agents contains classes to fully implement an MTConnect Agent application. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.5.1 | 102 | 12/3/2024 |
6.5.0 | 154 | 10/21/2024 |
6.4.7 | 180 | 8/21/2024 |
6.4.6 | 149 | 8/7/2024 |
6.4.5 | 117 | 8/2/2024 |
6.4.4 | 136 | 7/16/2024 |
6.4.3 | 169 | 6/14/2024 |
6.4.2 | 151 | 6/12/2024 |
6.4.1 | 164 | 5/17/2024 |
6.4.0 | 151 | 5/14/2024 |
6.3.2-beta | 130 | 5/2/2024 |
6.3.1-beta | 302 | 4/24/2024 |
6.3.0-beta | 139 | 4/17/2024 |
6.2.2-beta | 138 | 4/5/2024 |
6.2.1-beta | 133 | 4/3/2024 |
6.2.0-beta | 133 | 3/27/2024 |
6.1.3-beta | 139 | 3/15/2024 |
6.1.2-beta | 137 | 3/15/2024 |
6.0.11-beta | 161 | 2/2/2024 |
6.0.10-beta | 142 | 1/26/2024 |
6.0.9-beta | 182 | 12/28/2023 |
6.0.8-beta | 138 | 12/27/2023 |
6.0.7-beta | 161 | 12/19/2023 |
6.0.5-beta | 165 | 12/14/2023 |
6.0.3-beta | 154 | 12/12/2023 |
6.0.1-beta | 190 | 12/7/2023 |