HelpWizard Pages Linking Technologies3/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 19: Zeile 19:
This can now be connected to the sequence:
This can now be connected to the sequence:


[[Datei:C HelloWorld Action2.png|300px]]
[[Datei:C HelloWorld Action2.png|250px]]


[[Category: HelpWizard/en]]
[[Category: HelpWizard/en]]

Version vom 17. März 2022, 17:58 Uhr

Linking Technologies: Python Actions

back forward

Lets assume, that the input to the C-function should come from a Python function (assume that you have imported a module, which reads a value from a measurement device or your device under test).

Create a new Python-action with input and output pins and type:

# import <your actual modules here>

# dummy - in reality you'd call into your module...
def readFromDevice(portNr):
    return "1.23456"

def execute():
    port = inPin.value()
    outPin.value( readFromDevice(port) )

This can now be connected to the sequence:

C HelloWorld Action2.png



Copyright © 2014-2024 eXept Software AG