MTConnect.NET-AgentProcessor-Python
6.4.7
See the version list below for details.
dotnet add package MTConnect.NET-AgentProcessor-Python --version 6.4.7
NuGet\Install-Package MTConnect.NET-AgentProcessor-Python -Version 6.4.7
<PackageReference Include="MTConnect.NET-AgentProcessor-Python" Version="6.4.7" />
paket add MTConnect.NET-AgentProcessor-Python --version 6.4.7
#r "nuget: MTConnect.NET-AgentProcessor-Python, 6.4.7"
// Install MTConnect.NET-AgentProcessor-Python as a Cake Addin #addin nuget:?package=MTConnect.NET-AgentProcessor-Python&version=6.4.7 // Install MTConnect.NET-AgentProcessor-Python as a Cake Tool #tool nuget:?package=MTConnect.NET-AgentProcessor-Python&version=6.4.7
MTConnect Python Agent Processor
This Agent Processor uses individual Python script files to transform input data
Configuration
processors:
- 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 was computed. 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 was computed. |
.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. |
-
.NETFramework 4.6.1
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETFramework 4.6.2
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETFramework 4.7
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETFramework 4.7.1
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETFramework 4.7.2
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETFramework 4.8
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
.NETStandard 2.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
net6.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
net7.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- NLog (>= 5.2.7)
-
net8.0
- IronPython (>= 3.4.1)
- MTConnect.NET-Common (>= 6.4.7)
- 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.0 | 105 | 10/21/2024 |
6.4.7 | 176 | 8/21/2024 |
6.4.6 | 143 | 8/7/2024 |
6.4.5 | 113 | 8/2/2024 |
6.4.4 | 130 | 7/16/2024 |
6.4.3 | 165 | 6/14/2024 |
6.4.2 | 145 | 6/12/2024 |
6.4.1 | 158 | 5/17/2024 |
6.4.0 | 147 | 5/14/2024 |
6.3.2-beta | 128 | 5/2/2024 |
6.3.1-beta | 263 | 4/24/2024 |
6.3.0-beta | 135 | 4/17/2024 |
6.2.2-beta | 136 | 4/5/2024 |
6.2.1-beta | 131 | 4/3/2024 |
6.2.0-beta | 131 | 3/27/2024 |
6.1.3-beta | 137 | 3/15/2024 |
6.1.2-beta | 135 | 3/15/2024 |
6.0.11-beta | 159 | 2/2/2024 |
6.0.10-beta | 140 | 1/26/2024 |
6.0.9-beta | 178 | 12/28/2023 |
6.0.8-beta | 136 | 12/27/2023 |
6.0.7-beta | 159 | 12/19/2023 |
6.0.5-beta | 163 | 12/14/2023 |
6.0.3-beta | 152 | 12/12/2023 |
6.0.1-beta | 188 | 12/7/2023 |