Python Examples

Python Examples#

A matching set of examples is supplied on the device under ~/Desktop/synergy_python/examples/.

Stop the PLC first

Every example in this section assumes the PLC or the OpenPLC Runtime is stopped. See Sharing the Hardware.

Example

Modules used

Blink a discrete output

Any discrete output module

Read every channel on a module

SLM-AI-8-V

Bar-graph level indicator

SLM-AI-8-V, SLM-DCO-15P

Thermocouple logging

SLM-THM-4

Broken thermocouple detection

SLM-THM-4

Hardware watchdog

Any

Reading the toggle switch

Any discrete output module

Publishing to an HMI over Modbus

SLM-AI-8-V, SLM-AO-8-V