Besuchen Sie unsere GitHub-Seite für ein Beispiel-Python-Skript, das Ihr Pycon IoT-Gerät mit Ihrem SIGNL4-Team verbindet.
Visit our GitHub page for an example Python script that will connect your Pycon IoT device with your SIGNL4 team.
Die meisten Skriptsprachen ermöglichen das Ausführen von externen Programmen und Befehlen. Dazu wird meist die Funktion exec() verwendet. Auf diese Weise kann dcop > relativ einfach aufgerufen werden. Hier ein Beispiel in Python
Most scripting languages allow to execute external programs, with a function like exec(). This way the "dcop" utility can be invoked easily. Here is a simple Python example
In dem nachfolgenden Python-Beispiel werden nur digitale Ein- und Ausgänge verwendet.
Python Beispiel, um die Regionsdaten von einem Grid Service zu erhalten
Python example to gain the region data from a grid service
Das folgende Python Beispiel tut exakt dies und es sollte einfach zu verstehen und auf andere Programmiersprachen übertragbar sein.
The following Python example does exactly that and it should be easy to understand and translate in other languages.
Im nachfolgenden Python-Beispiel werden die digitalen Ein- und Ausgänge einer DIO-Baugruppe mit der Grafcet-Engine verbunden.
In the following Python example, the digital inputs and outputs of a DIO module are published to the Grafcet engine.
Implizite Iteratoren manifestieren sich oft durch den foreach Befehl oder seine Äquivalente, wie unten stehendes Python Beispiel zeigt
Implicit iterators are often manifested by a "foreach" statement (or equivalent), such as in the following Python example
Contenu potentiellement sensible ou inapproprié
Les exemples vous aident à traduire le mot ou l’expression cherchés dans des contextes variés. Ils ne sont ni sélectionnés ni validés par nous et peuvent contenir des mots ou des idées inappropriés. Signalez des exemples à modifier ou à retirer. Les traductions potentiellement sensibles, inappropriées ou familières sont généralement marquées de rouge ou d’orange.