Dataguess
v0.3.3
v0.3.3
  • Welcome
  • Getting Started
    • Installation
      • Windows Installation
      • Linux Installation
    • Activation
  • REFERENCES
    • Workstation
    • Workgroup
    • Dataflow
    • Components
      • Core Concepts
        • Scheduler
        • System Ports
        • Synchronizing Ports
        • Import / Export Ports
        • Forwarding Inputs
      • Inputs
        • MQTT
        • Modbus TCP
        • Siemens S7
        • OPC UA
        • TwinCAT
        • EtherNet/IP
        • Camera
      • Outputs
        • MQTT
        • Modbus TCP
        • Siemens S7
        • CSV
        • JSON
        • InfluxDB
        • OPC UA
        • TwinCAT
        • FTP Client
        • Image Stream
        • Data Watch
      • Function
        • Math & Logic
        • Array Functions
        • Image Functions
        • Type Conversion
        • To JSON
        • From JSON
        • Array
        • Variables
      • Script
        • Python Script Editor
      • AI
        • ONNX
        • Scikit Learn
      • API
        • HTTP
      • Server
        • HTTP Server
  • Use Cases
  • FAQ
Powered by GitBook
On this page
  • Node Definitions
  • Input Ports
  • Output Ports
  • System Ports
  • Rule Editor
  • Working Example

Was this helpful?

  1. REFERENCES
  2. Components
  3. Script

Python Script Editor

Python language based Script Editor

PreviousScriptNextAI

Last updated 3 years ago

Was this helpful?

Node Definitions

Python Script Editor has no unique node definition to be configured, you can give it a name and a description:

Input Ports

Output Ports

System Ports

Rule Editor

Rule Editor has two sections. On the left-hand side you can see your Input & Output ports with their id written and a copy button.

Input ports will copy getInputValueById(that-ports-id) which you can use in your code section to get that input port's value.

Output ports will copy setOutputValueById(that-ports-id, value)which you can use in your code to set that output port's value.

In your code section in the Rule Editor you can use python libraries by importing them (e.g. from random import randint).

Working Example

You can define input ports to the Python Script Editor, and use these inputs' value in your with the function getInputValueById

Your output port values are set in your with the function setOutputValueById When you define your input and output ports, each of those will have unique IDs and will be visible in your Rule Editor page.

For more information read

This is a python script, therefore adhere to the indentation rules, otherwise script will not run as expected.

⚠️
here
Rule Editor
Rule Editor
Rule Editor ports section
Rule Editor script
Python Script Editor working example