Main Page: Difference between revisions

From pymate.io wiki
Jump to navigation Jump to search
 
(89 intermediate revisions by the same user not shown)
Line 1: Line 1:


== About Pymate.io ==
== About PymateIO ==
{| border="0"
{| border="0"
|-
|-
| align="left" width="360px" | [[File:pymate-powered-by-micropython.png|320px]]
| align="left" width="480px" | [[File:pymate-powered-by-micropython.png|450px]]
| align="Left" width="450px" valign="top" style="padding:10px" |  
| align="Left" width="450px" valign="top" style="padding:10px" |  
<p style="text-align: center; padding: 15px 0px; border-radius: 10px 10px 10px 10px; border: 1px solid #cccccc;"> '''Pymate.IO''' is an affordable Industrial Controler (PLC) Powered with MicroPython.<br />'''Pymate.IO''' is ready for Industry, Reliable, Developer-Friendly and Easy to Install.<br /><br />
<p style="text-align: center; margin-top: 45px; padding: 35px 10px 35px 10px; border-radius: 10px 10px 10px 10px; border: 1px solid #cccccc; background-color: #f89750;">'''PymateIO''' is an affordable Industrial Controler (PLC) Powered with MicroPython.<br />'''PymateIO''' is ready for Industry, Reliable, Developer-Friendly and Easy to Install.<br /><br />
'''Micro Python''' is an optimized version of Python&nbsp;3 dedicated to embedded systems like microcontollers.<br />Python scripts are stored on the device and running on z bare metal Python Virtual Machine (like computer does).</p>
'''Micro Python''' is an optimized version of Python&nbsp;3 dedicated to embedded systems like microcontollers.<br />Python scripts are stored on the device and running on z bare metal Python Virtual Machine (like computer does).</p>
|}
|}


== Pymate.IO boards ==
== PymateIO EcoSystem ==


=== Key Facts ===
PymateIO is expandable by design starting with few board, new arrivals should come with time.
 
 
=== Key products ===
{{asm-begin}}
{{asm-begin}}


{{asm-row|img=pymate-core-angle-small.png}}
{{asm-row|img=pymate-core-angle-small.png}}
{{asm-text}} blabla
{{asm-text}} '''PymateIO Core Core8ADI8DOSC'''
* DIN rail mounting
* Spring cage connector
* 8-28V power supply
* 8 digital inputs 12/24V tolerant
* up 8 configurable analog inputs (10V max)
* 8 digital outputs (PNP, 250mA, High Side control)
* 1 user button, 2 user LEDs
* Native Modbus via RS485
* Dedicated status LEDs for each Inputs/Outputs
* Expandable by design with LTE-M, WiFi, Ethernet, relays, analog I/Os, PT100, Zigbee, and more,..
* Native USB support
* MicroPython support with libraries
* Developper friendly
* [[Pymate-Core-Tour|Core8ADI8DOSC product tour]]
 
[https://www.pymate.io TODO:Link to shop]


{{asm-row|img=pymate-16adi16do-angle-small.png}}
{{asm-row|img=pymate-16adi16do-angle-small.png}}
{{asm-text}} blabla
{{asm-text}} '''PymateIO 16ADI16DO''' expansion
* DIN rail mounting
* Plug-and-play (ready to use)
* Daisy chain by design (up to 120 boards)
* Spring cage connector
* 8-28V power supply
* '''16 digital inputs''' 12/24V tolerant
* '''up 16 configurable analog inputs''' (10V max)
* '''16 digital outputs''' (PNP, 250mA, High Side control)
* 1 user button, 2 user LEDs
* [[Pymate-16ADI16DO-Tour|16ADI16DO expansion tour]]
 
[https://www.pymate.io TODO:Link to shop]
 
{{asm-row|img=pymate-hmi-angle-small.png}}
{{asm-text}} '''CommandHMI''' [COMING SOON]
* 8-28V power supply
* 16:9 TFT 4.3" (96x53mm)
* 480 x 272px
* Serial: RS232 + RS485
* Protocols: Modbus, ASCII, ...
* USB-A: Master modbus, data export (to USB key)
* USB-C: programming port
* Variant: 7.0", 10.2", 15.6", 4.3" Ethernet
* [https://www.pymate.io/commandhmifrom-4-3-to-15-6/ Read more]
 
[https://www.pymate.io TODO:Link to shop]


{{asm-end}}
{{asm-end}}


=== Product Nomenclature ===
=== Product Nomenclature ===
{| class="wikitable"
|+
!Letter
!Feature
|-
|DI
|Digital Input. It is prefixed with the number of input (ex : '''8DI''' or '''8'''A'''DI''').
May be in combination with A.
|-
|A
|Analog Input. It is prefixed with the number of analog input (ex : '''8A''' or '''8A'''DI).
May be in combination with DI.
|-
|DO
|Digital Output.  It is prefixed with the number of analog output.
|-
|S
|Serial (RS485, MODBUS RTU)
|-
|C
|CAN bus
|-
|P
|SPI bus
|-
|I
|I2C bus
|-
|U
|UART
|-
|T
|Modbus TCP
|}


=== Products tour ===
=== Products tour ===
Line 29: Line 109:


{{ttuto
{{ttuto
   |label=Pymate Core
   |label=Core board
   |descr=Tour of the <strong>Pymate Core</strong> board.
   |descr=Tour of the <strong>PymateIO Core</strong> board.
   |img=tlogo-core.jpg
   |img=tlogo-core.jpg
   |link=Pymate-Core-Tour
   |link=Pymate-Core-Tour
Line 37: Line 117:
{{ttuto
{{ttuto
   |label=16ADI16DO board
   |label=16ADI16DO board
   |descr=Tour of the 16 Analog-DataIn and 16 DataOut board.
   |descr=Tour of the PymateIO 16 Analog-DataIn and 16 DataOut board.
   |img=tlogo-16adi16do.jpg
   |img=tlogo-16adi16do.jpg
   |link=Pymate-16ADI16DO-Tour
   |link=Pymate-16ADI16DO-Tour
Line 45: Line 125:


== Programming HowTo ==
== Programming HowTo ==
{{traduction}}
{{ttuto-begin}}
* About MicroPython
 
* IDE and tools
{{ttuto
* Connecting your board
  |label=MicroPython
* REPL: the command line
  |descr=What is MicroPython?
* main.py and boot.py
  |img=tlogo-about-MicroPython.jpg
  |link=About-Micropython
}}
 
{{ttuto
  |label=Thonny IDE
  |descr=Prepare your MicroPython IDE environment.
  |img=tlogo-thonny.jpg
  |link=Micropython-IDE-and-Tools
}}
 
{{ttuto
  |label=Connect Pymate
  |descr=Connecting the board
  |img=tlogo-connect.jpg
  |link=Micropython-IDE-and-Tools#Connect_your_PymateIO
}}
 
{{ttuto
  |label=REPL
  |descr=The MicroPython command line
  |img=tlogo-repl.jpg
  |link=micropython-repl
}}
 
{{ttuto
  |label=Startup scripts
  |descr=What are main.py and boot.py
  |img=tlogo-micropython-main.jpg
  |link=micropython-main-boot
}}
 
{{ttuto-end}}


== Programming First-step ==
== Programming First-step ==
{{traduction}}
{{ttuto-begin}}
* PymateIO methods
 
* Digitial Input/Output
{{ttuto
* Analog Input
  |label=PymateIO
* User button
  |descr=Access Input and outputs with PymateIO
* User LEDs
  |img=tlogo-pymateio.jpg
* Real-Time clock
  |link=PymateIO
* Cycle timing
}}
* PymateIO and 16ADI16DO
 
{{ttuto
  |label=Input/Output
  |descr=Wiring and using DI and DO
  |img=tlogo-input-output.jpg
  |link=Pymate-Input-Output
}}
 
{{ttuto
  |label=Analog
  |descr=Wiring and using Analog Input
  |img=tlogo-analog.jpg
  |link=Pymate-Analog
}}
 
{{ttuto
  |label=User button
  |descr=Managing user button in code
  |img=tlogo-user-button.png
  |link=Pymate-User-Button
}}
 
{{ttuto
  |label=User LEDs
  |descr=Managing user LEDs with code
  |img=tlogo-user-leds.png
  |link=Pymate-User-LEDs
}}
 
{{ttuto
  |label=RealTime Clock
  |descr=Geting an accurate date and time
  |img=tlogo-rtc.png
  |link=Pymate-RealTime-Clock
}}
 
{{ttuto
  |label=Cycle timing
  |descr=Measuring mainloop execution time
  |img=tlogo-cycle-timing.png
  |link=Pymate-cycle-timing
}}
 
{{ttuto
  |label=16ADI16DO Tour
  |descr=Tour of the PymateIO 16 Analog-DataIn and 16 DataOut board.
  |img=tlogo-16adi16do.jpg
  |link=Pymate-16ADI16DO-Tour
}}
 
{{ttuto
  |label=16ADI16DO Usage
  |descr=Using the 16ADI16DO expansion with PymateIO
  |img=tlogo-16adi16do.jpg
  |link=Pymate-16ADI16DO-introduction
}}
 
{{ttuto
  |label=RS485 Basics
  |descr=Accessing directly the RS485 bus to read/write sensors
  |img=tlogo-RS485.png
  |link=Pymate-RS485-basic
}}
 
{{ttuto
  |label=Modbus
  |descr=Using Modbus RTU over RS485. Use PymateIO as Modbus Master. Example with Wind Dir., Power Meter, Temp/Humidity/Lux meter.
  |img=tlogo-modbus.png
  |link=Pymate-Modbus-basic
}}
 
{{ttuto-end}}


== Common use-cases ==
== Common use-cases ==
{{traduction}}
 
* Remote Control (Télérupteur)
{{ttuto-begin}}
* Time relay (relais temporisé)
 
* Hystersis management
{{ttuto
* Value mapping
  |label=Remote Control
* PID control
  |descr=Click once to power it on. Click again to power it off.
* Fine LED control
  |img=tlogo-usecases.png
* Emergency Stop (using IRQ)
  |link=PymateIO-remote-control
* Watchdog
}}
* Data-Logging
 
{{ttuto
  |label=Time Relay
  |descr=Click to power/light-up for a given amount of time.
  |img=tlogo-usecases.png
  |link=PymateIO-time-relay
}}
 
{{ttuto
  |label=Delaying in code
  |descr=Learn how to implement a '''no blocking delay''' within your loop. Using DS18B20 with '''OneWire''' protocol to demonstrate the behavior.
  |img=tlogo-usecases.png
  |link=PymateIO-Delaying
}}
 
{{ttuto
  |label=Hysteresis
  |descr=Hysteresis management in running process. Discover the HeaterHis and CoolerHis controller class.
  |img=tlogo-usecases.png
  |link=PymateIO-hysteresis
}}
 
{{ttuto
  |label=Value Mapping
  |descr=Great Trick to save time and coding
  |img=tlogo-usecases.png
  |link=PymateIO-mapping
}}
 
{{ttuto
  |label=PID Regulation
  |descr=Running the software PID controller included within Pymate
  |img=tlogo-usecases.png
  |link=PymateIO-PID-controler
}}
 
{{ttuto
  |label=LED Tuning
  |descr=LED can do so much more than being on or off.<br />HeartBeat, Pulsing, ErrorCode and more can be so useful.
  |img=tlogo-usecases.png
  |link=PymateIO-LED-Tuning
  |traduction=1
}}
 
{{ttuto
  |label=Interrupt Request
  |descr=Being quickly warned of an event!
  |img=tlogo-usecases.png
  |link=PymateIO-IRQ
  |traduction=1
}}
 
{{ttuto
  |label=Watchdog
  |descr=Re-inforce Cycle Time with WatchDog
  |img=tlogo-usecases.png
  |link=PymateIO-watchdog
  |traduction=1
}}
 
{{ttuto
  |label=Data Logging
  |descr=Permanent storage of history, sensor data, etc
  |img=tlogo-usecases.png
  |link=PymateIO-data-logging
  |traduction=1
}}
 
 
{{ttuto
  |label=HMI Display
  |descr=Setup the HMI display and create the Pymate script accordingly.
  |img=tlogo-hmi-display.png
  |link=PymateIO-HMI
}}
 
{{ttuto
  |label=HMI Display
  |descr=A second example with numeric input on the HMI display
  |img=tlogo-hmi-display.png
  |link=PymateIO-HMI-numeric-input
}}
 
{{ttuto-end}}


== Mini projects ==
== Mini projects ==
Line 79: Line 345:
* Tank refill
* Tank refill


== Expansion programming ==
== Pymate Expansion programming ==
{{traduction}}
{{ttuto-begin}}
* About board_id
 
* CAN bus scanning
{{ttuto
* 16ADI16DO Programming
  |label=Board_ID
* Setting board_id
  |descr=Identification of expansion board
* Digital Input/Output
  |img=tlogo-board-id.png
* Analog Input
  |link=PymateIO-about-board_id
}}
 
{{ttuto
  |label=CAN Scan
  |descr=Scanning the CAN bus for boards and check for CAN error.
  |img=tlogo-can-scan.png
  |link=PymateIO-CAN-Scan
}}
 
{{ttuto
  |label=Programming
  |descr=How to control your 16ADI/16DO expansion. Input/Output/Analog/etc.
  |img=tlogo-can-scan.png
  |link=PymateIO-16ADI16DO programming
  |traduction=1
}}
 
{{ttuto
  |label=Change Board_ID
  |descr=How to change the 16ADI16DO board identification on the CAN bus.
  |img=tlogo-board-id.png
  |link=Pymate-16ADI16DO-Tour#Configuration_procedure
}}
 
{{ttuto-end}}
 
== PymateIO Expansion Bus ==
 
{{ttuto-begin}}
 
{{ttuto
  |label=Connector
  |descr=Pymate.IO Expansion connector in details
  |img=tlogo-pymate-expansion-connector.png
  |link=PymateIO-Expansion-Connector
}}
 
{{ttuto
  |label=I2C Bus
  |descr=Accessing I2C bus
  |img=tlogo-pymate-i2c.png
  |link=PymateIO-I2C-Bus
}}
 
{{ttuto
  |label=SPI Bus
  |descr=Identification of expansion board
  |img=tlogo-pymate-spi.png
  |link=PymateIO-SPI-Bus
  |traduction=1
}}
 
{{ttuto
  |label=CAN Bus
  |descr=Accessing CAN
  |img=tlogo-pymate-can.png
  |link=PymateIO-CAN-bus
  |traduction=11
}}
 
{{ttuto
  |label=OneWire
  |descr=Using OneWire protocol on the Pymate Expansion (part of another turotial).
  |img=tlogo-one-wire.png
  |link=PymateIO-Delaying#Wiring_DS18B20
}}
 
{{ttuto-end}}


== Advanced programming ==
== Advanced programming ==
Line 93: Line 427:
* Creating tasks
* Creating tasks
* Scheduling tasks
* Scheduling tasks
== Pymate Expansion Bus ==
{{traduction}}
* The connector
* Accessing I2C bus
* Accessing SPI bus
* About CAN bus


== References ==
== References ==
{{traduction}}
{{traduction}}
* Pymate library
* PymateIO library
* Helper libraries
* Helper libraries

Latest revision as of 00:41, 12 September 2026

About PymateIO

Pymate-powered-by-micropython.png

PymateIO is an affordable Industrial Controler (PLC) Powered with MicroPython.
PymateIO is ready for Industry, Reliable, Developer-Friendly and Easy to Install.

Micro Python is an optimized version of Python 3 dedicated to embedded systems like microcontollers.
Python scripts are stored on the device and running on z bare metal Python Virtual Machine (like computer does).

PymateIO EcoSystem

PymateIO is expandable by design starting with few board, new arrivals should come with time.


Key products

Pymate-core-angle-small.png PymateIO Core Core8ADI8DOSC
  • DIN rail mounting
  • Spring cage connector
  • 8-28V power supply
  • 8 digital inputs 12/24V tolerant
  • up 8 configurable analog inputs (10V max)
  • 8 digital outputs (PNP, 250mA, High Side control)
  • 1 user button, 2 user LEDs
  • Native Modbus via RS485
  • Dedicated status LEDs for each Inputs/Outputs
  • Expandable by design with LTE-M, WiFi, Ethernet, relays, analog I/Os, PT100, Zigbee, and more,..
  • Native USB support
  • MicroPython support with libraries
  • Developper friendly
  • Core8ADI8DOSC product tour

TODO:Link to shop

Pymate-16adi16do-angle-small.png PymateIO 16ADI16DO expansion
  • DIN rail mounting
  • Plug-and-play (ready to use)
  • Daisy chain by design (up to 120 boards)
  • Spring cage connector
  • 8-28V power supply
  • 16 digital inputs 12/24V tolerant
  • up 16 configurable analog inputs (10V max)
  • 16 digital outputs (PNP, 250mA, High Side control)
  • 1 user button, 2 user LEDs
  • 16ADI16DO expansion tour

TODO:Link to shop

Pymate-hmi-angle-small.png CommandHMI [COMING SOON]
  • 8-28V power supply
  • 16:9 TFT 4.3" (96x53mm)
  • 480 x 272px
  • Serial: RS232 + RS485
  • Protocols: Modbus, ASCII, ...
  • USB-A: Master modbus, data export (to USB key)
  • USB-C: programming port
  • Variant: 7.0", 10.2", 15.6", 4.3" Ethernet
  • Read more

TODO:Link to shop

Product Nomenclature

Letter Feature
DI Digital Input. It is prefixed with the number of input (ex : 8DI or 8ADI).

May be in combination with A.

A Analog Input. It is prefixed with the number of analog input (ex : 8A or 8ADI).

May be in combination with DI.

DO Digital Output. It is prefixed with the number of analog output.
S Serial (RS485, MODBUS RTU)
C CAN bus
P SPI bus
I I2C bus
U UART
T Modbus TCP

Products tour

Core board

Tlogo-core.jpg

Tour of the PymateIO Core board.

16ADI16DO board

Tlogo-16adi16do.jpg

Tour of the PymateIO 16 Analog-DataIn and 16 DataOut board.

 

Programming HowTo

MicroPython

Tlogo-about-MicroPython.jpg

What is MicroPython?

Thonny IDE

Tlogo-thonny.jpg

Prepare your MicroPython IDE environment.

Connect Pymate

Tlogo-connect.jpg

Connecting the board

REPL

Tlogo-repl.jpg

The MicroPython command line

Startup scripts

Tlogo-micropython-main.jpg

What are main.py and boot.py

 

Programming First-step

PymateIO

Tlogo-pymateio.jpg

Access Input and outputs with PymateIO

Input/Output

Tlogo-input-output.jpg

Wiring and using DI and DO

Analog

Tlogo-analog.jpg

Wiring and using Analog Input

User button

Tlogo-user-button.png

Managing user button in code

User LEDs

Tlogo-user-leds.png

Managing user LEDs with code

RealTime Clock

Tlogo-rtc.png

Geting an accurate date and time

Cycle timing

Tlogo-cycle-timing.png

Measuring mainloop execution time

16ADI16DO Tour

Tlogo-16adi16do.jpg

Tour of the PymateIO 16 Analog-DataIn and 16 DataOut board.

16ADI16DO Usage

Tlogo-16adi16do.jpg

Using the 16ADI16DO expansion with PymateIO

RS485 Basics

Tlogo-RS485.png

Accessing directly the RS485 bus to read/write sensors

Modbus

Tlogo-modbus.png

Using Modbus RTU over RS485. Use PymateIO as Modbus Master. Example with Wind Dir., Power Meter, Temp/Humidity/Lux meter.

 

Common use-cases

Remote Control

Tlogo-usecases.png

Click once to power it on. Click again to power it off.

Time Relay

Tlogo-usecases.png

Click to power/light-up for a given amount of time.

Delaying in code

Tlogo-usecases.png

Learn how to implement a no blocking delay within your loop. Using DS18B20 with OneWire protocol to demonstrate the behavior.

Hysteresis

Tlogo-usecases.png

Hysteresis management in running process. Discover the HeaterHis and CoolerHis controller class.

Value Mapping

Tlogo-usecases.png

Great Trick to save time and coding

PID Regulation

Tlogo-usecases.png

Running the software PID controller included within Pymate

LED Tuning

Tlogo-under-construction.jpg

TRAVAUX EN COURS. LED can do so much more than being on or off.
HeartBeat, Pulsing, ErrorCode and more can be so useful.

Interrupt Request

Tlogo-under-construction.jpg

TRAVAUX EN COURS. Being quickly warned of an event!

Watchdog

Tlogo-under-construction.jpg

TRAVAUX EN COURS. Re-inforce Cycle Time with WatchDog

Data Logging

Tlogo-under-construction.jpg

TRAVAUX EN COURS. Permanent storage of history, sensor data, etc


HMI Display

Tlogo-hmi-display.png

Setup the HMI display and create the Pymate script accordingly.

HMI Display

Tlogo-hmi-display.png

A second example with numeric input on the HMI display

 

Mini projects

Page-under-construction.pngPage(s) under construction.
  • Tank refill

Pymate Expansion programming

Board_ID

Tlogo-board-id.png

Identification of expansion board

CAN Scan

Tlogo-can-scan.png

Scanning the CAN bus for boards and check for CAN error.

Programming

Tlogo-under-construction.jpg

TRAVAUX EN COURS. How to control your 16ADI/16DO expansion. Input/Output/Analog/etc.

Change Board_ID

Tlogo-board-id.png

How to change the 16ADI16DO board identification on the CAN bus.

 

PymateIO Expansion Bus

Connector

Tlogo-pymate-expansion-connector.png

Pymate.IO Expansion connector in details

I2C Bus

Tlogo-pymate-i2c.png

Accessing I2C bus

SPI Bus

Tlogo-under-construction.jpg

TRAVAUX EN COURS. Identification of expansion board

CAN Bus

Tlogo-under-construction.jpg

TRAVAUX EN COURS. Accessing CAN

OneWire

Tlogo-one-wire.png

Using OneWire protocol on the Pymate Expansion (part of another turotial).

 

Advanced programming

Page-under-construction.pngPage(s) under construction.
  • About asyncio
  • Creating tasks
  • Scheduling tasks

References

Page-under-construction.pngPage(s) under construction.
  • PymateIO library
  • Helper libraries