Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: REXYGEN Installation
- Kauj Ruam 2: Thawj Qhov Haujlwm - Raspberry Pi Raws Li Qhov Kub Kub Yooj Yim
- Kauj Ruam 3: Xaus
Video: Taw qhia rau Programming Raspberry Pi Tsis Siv Coding: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nyob zoo, cov lus qhia no yuav qhia koj yuav ua li cas tig koj lub Raspberry Pi mus rau hauv lub cuab yeej siv lub tshuab ua haujlwm tau zoo tshaj nrog cov lus qhia ua lub ntsej muag rau PLCs hu ua Function Block Diagram (ib feem ntawm IEC 61131-3 tus qauv). Qhov no tuaj yeem ua tiav los ntawm kev teeb tsa REXYGEN. REXYGEN cov cuab yeej software tau siv dav hauv ntau yam kev siv tshuab, kev tswj cov txheej txheem thiab cov neeg hlau.
Lub hom phiaj ntawm qhov kev taw qhia no yog los pab Raspberry Pi cov neeg siv kom kov yeej kev hloov pauv ntawm tes coding (nab nab,…) mus rau cov phiaj xwm duab siv lub npe hu ua block thiab ua kom pib siv REXYGEN software cuab yeej.
Kev qhia yuav qhia koj txog REXYGEN kev teeb tsa (ob qho cuab yeej txhim kho thiab lub sijhawm ua haujlwm tseem ceeb rau Raspberry Pi) thiab piv txwv yooj yim heev ntawm kev koom ua ke DS18B20 ua qhov ntsuas cua sov yooj yim yam tsis muaj txhais tes.
Khoom siv
- Raspberry Pi (B+/2/3/3B+/Zero W)
- SD daim npav nrog Raspbian kawg raws li koj xaiv (https://www.raspberrypi.org/downloads/raspbian/)
Kauj ruam 1: REXYGEN Installation
Kev Txhim Kho Cov Cuab Yeej Txhim Kho ntawm Windows 7/8/10:
- Rub tus installer los ntawm:
- Khiav cov ntawv.exe thiab ua raws li phau ntawv qhia kev teeb tsa. Qhov kev xaiv nruab tag nrho tau pom zoo.
Runtime Installation ntawm Raspberry Pi:
Koj Raspberry Pi tab tom khiav tshiab & tshiab Raspbian raws li koj xaiv - yog tias tsis pom https://www.raspberrypi.org/downloads/raspbian/ rau duab rub tawm thiab Raspbian Installation qhia.
Ntawm koj tus Raspberry Pi, hloov kho APT kev teeb tsa pob ntim cia:
sudo apt hloov tshiab
Tom qab ntawd teeb tsa GIT:
sudo apt nruab git
Mus rau koj phau ntawv teev npe hauv tsev:
ua cd
Rub tawm qhov hloov kho tshiab kawg ntawm kev teeb tsa kab ntawv:
git clone https://github.com/rexcontrols/rex-install-rpi.git --branch v2.50
Hloov cov npe ua haujlwm:
cd rex-install-rpi
Khiav cov ntawv teeb tsa rau Raspberry Pi:
sudo bash nruab-rex.sh
Zoo kawg! REXYGEN twb tau ua haujlwm ntawm koj li Raspberry Pi. Tias koj tsis pom nws? Tsis txhob txhawj!
Txoj cai tom qab kev teeb tsa RexCore runtime module tau pib txiav hauv keeb kwm yav dhau los raws li daemon. RexCore kuj tseem pib ua haujlwm thaum pib (rov) pib.
DEMO dawb version txwv rau 2 teev runtime. Tom qab txhua qhov rov pib dua, koj muaj sijhawm ntxiv 2 teev rau koj qhov kev sim. Koj tuaj yeem yuav daim ntawv tso cai tas mus li pib ntawm 45 € rau ib lub cuab yeej.
Kauj Ruam 2: Thawj Qhov Haujlwm - Raspberry Pi Raws Li Qhov Kub Kub Yooj Yim
Cia peb tsim lub ntsuas sov
Hauv qhov piv txwv no Raspberry Pi tau teeb tsa los ua qhov ntsuas sov yooj yim. Qhov ntsuas kub yog ntsuas los ntawm 1-Wire DS18B20 lub ntsuas pa thiab GPIO tus pin 17 hloov tus xa tawm thiab tawm nrog hysteresis ntawm 0.5 ° C.
Nco ntsoov txuas DS18B20 qhov ntsuas kub thiab 5V xa tawm raws li daim duab kab thaiv. Tsis txhob hnov qab siv 4k7 resistor ntawm DATA thiab VCC pins ntawm DS18B20.
Thaum cov hlua tau npaj tiav khiav REXYGEN Studio program. Xaiv Pib los ntawm Qhov Piv Txwv Qhov project thiab xaiv 0120-22 piv txwv Thermostat Yooj Yim. Xaiv ib daim nplaub tshev los khaws cov phiaj xwm phiaj xwm hauv (piv txwv li D: / FirstProject).
Txhua txoj haujlwm thaiv tuaj yeem teeb tsa los ntawm ob-nias rau nws. Tsis paub dab tsi tshwj xeeb muaj nuj nqi thaiv ua? Xaiv nws thiab ntaus F1 rau cov ntaub ntawv tam sim.
Tsuas muaj ib yam uas yuav tsum tau teeb tsa - DS18B20 64 -ntsis ROM ID txhawm rau txhawm rau nyeem qhov ntsuas kub.
Sau cov khoom kuaj pom 1-Hlau los ntawm cov lus txib owdir. Cov zis yuav tsum zoo li no:
/28.551DDF30000
/bus.1 /bus.0 /uncached /settings /system /statistics /structure /simultaneous /alarm
Thawj kab yog DS18B20 tus lej ntaus cim - luam nws.
Muaj nuj nqi thaiv OWS yog teeb tsa thiab sijhawm ntawm 1-Hlau kev sib txuas lus. Ob npaug nias rau qhov ua haujlwm thaiv OWS thiab nyem rau ntawm Configure khawm.
1-Wire Driver configuration dialog yuav tshwm sim. Nrhiav thiab hloov DS18B20 tus lej ID nrog ib qho ntawm koj li DS18B20. Kaw cov lus sib tham los ntawm OK khawm.
Tsis teb los tau: Koj kuj tseem tuaj yeem hloov pauv qhov ntsuas kub los ntawm kev kho CNR_temperature_sp ua haujlwm thaiv qhov twg koj tuaj yeem qhia qhov ntsuas kub xav tau. Los yog hloov hysteresis los ntawm kev kho qhov ntsuas ntawm CMP_THERMOSTAT muaj nuj nqi thaiv.
Txoj haujlwm tau npaj tam sim no. Wb Sau nws thiab rub mus rau Raspberry Pi. Xaiv Project -> Sau thiab rub tawm (lossis ntaus F6) thiab lees paub kev txuag ua ntej muab tso ua ke.
Thaum txoj haujlwm tau muab tso ua ke rub tawm cov lus sib tham yuav tshwm sim. Nco ntsoov qhia tus IP chaw nyob ntawm koj tus Raspberry Pi hauv kab phiaj thiab ntaus khawm. Thawj thawj zaug koj yuav raug thov daim ntawv tso cai rau koj li Raspberry Pi. Yog tias koj xav sim 2 teev DEMO tsuas yog xaiv Thov DEMO LICENSE dawb. Txwv tsis pub koj tuaj yeem yuav daim ntawv tso cai ruaj khov ntawm
Sai li qhov rub tawm tiav nws tuaj yeem hloov REXYGEN Studio mus rau qhov hu ua Saib hom thiab saib cov txheej txheem kev tswj hwm hauv lub sijhawm tiag tiag-nyem Saib.
Hauv Saib hom, keeb kwm yav dhau ntawm txhua cov ntaub ntawv mus rau grey thiab koj tsis tuaj yeem txav lossis tshem tawm ib qho thaiv lossis txuas. Txoj cai-nias rau ntawm OWS_temperature chij thiab xaiv Saib xaiv hauv cov ntawv qhia zaub mov kom saib cov khoom online. Koj yuav tsum pom qhov ntsuas kub tam sim no ntawm DS18B20.
Xav paub ntau ntxiv txog qhov kub thiab txias? Tsis muaj teeb meem! Tsuas yog ob npaug nias ib qho ntawm TRND_* ua haujlwm thaiv thaum tseem nyob hauv Saib hom thiab pom cov ntaub ntawv keeb kwm ntawm lub sijhawm.
Kauj Ruam 3: Xaus
Piv txwv Thermostat tsuas yog qhov pib rau REXYGEN lub peev xwm. Kuv yuav hais txog ob peb yam uas kuv xav tias yog qhov tseem ceeb:
- ua hauv HMI - ib hom tsis siv neeg tsim tawm (WebWatch), ib hom Yooj Yim Yooj Yim thiab Qhia Tawm (WebBuDi) thiab hloov kho kawg nrog REXYGEN HMI Designer
- REST API - txhua qhov haujlwm tsis tu ncua, hloov pauv thiab cov cim tuaj yeem nyeem/sau siv REST API
- muaj ntau yam kev sib txuas lus muaj - 1 -Wire, GPIO, Modbus TCP/RTU, MQTT, Database, Siemens S7,…
- piv txwv dav dav database
- cov ntaub ntawv muaj-saib
Tsis paub yuav pib qhov twg? Lub taub hau mus rau lub tsev qiv ntawv piv txwv thiab saib ib puag ncig lossis tsuas yog sim ua qhov piv txwv no ntawm koj tus kheej los ntawm kos:)
Pom zoo:
LED Qhov Taw Qhia Qhov Taw Qhia Tus Menyuam: 5 Kauj Ruam (nrog Duab)
LED Qhov Taw Qhia Qhov Taw Qhia Tus dev: Kuv ib txwm coj kuv tus dev Rusio mus taug kev thaum lub hnub poob qis kom nws tuaj yeem ua si yam tsis tau kub heev. Qhov teeb meem yog tias thaum nws tawm ntawm txoj hlua qee zaum nws tau zoo siab heev thiab ua haujlwm ntau dua li nws yuav tsum thiab nrog lub teeb qis thiab lwm tus dev
Yuav Ua Li Cas Thiaj Li Taw Qhia Qhov Taw Qhia: 6 Kauj Ruam
Yuav Ua Li Cas Thiaj Li Qhia Tus Kheej: Lub hom phiaj tseem ceeb ntawm daim ntawv thov no yog txhawm rau ntsuas qhov hnyav ntawm ib yam khoom tom qab ntawd qhia nrog lub tswb nrov thaum muaj qhov hnyav dhau. Cov tswv yim ntawm lub kaw lus los ntawm lub xov tooj ntawm tes. Kev tawm tswv yim yog lub teeb liab sib piv uas tau nthuav dav los ntawm qhov sib txawv
Kev Taw Taw Taw Tswj 5 Gallon Dej Dispenser: 3 Kauj Ruam
Tus Kheej Tus Kheej Tus Kheej 5 Gallon Dej Tso Dej: Hauv qee lub tebchaws zoo li qhov kuv nyob (Qaib ntxhw), peb muaj teeb meem nrog lub twj tso kua mis kom xa dej tawm ntawm lub ntim. Qee lub twj tso kua mis yog qhov nyuaj thiab cov menyuam yaus muaj teeb meem nrog kev muab lub zog xav tau. Yog li kuv xav txog kev siv ko taw
Taw qhia rau 8051 Programming Nrog AT89C2051 (Qhua Qhua: Arduino): 7 Kauj Ruam (nrog Duab)
Taw qhia rau 8051 Programming Nrog AT89C2051 (Qhua Qhua: Arduino): 8051 (tseem hu ua MCS-51) yog MCU tsim los ntawm 80's uas tseem nyiam niaj hnub no. Niaj hnub nimno 8051-sib xws microcontrollers muaj los ntawm ntau tus neeg muag khoom, hauv txhua daim duab thiab qhov ntau thiab tsawg, thiab nrog ntau yam khoom siv ib puag ncig. Hauv phau ntawv qhia no
Txaus Siab Rau Koj Tus Kheej Tsuas Yog Siv 12V-rau-AC-kab Inverter rau LED Lub Teeb Hluav Taws Xob Tsis txhob Rov Ua Rau Lawv rau 12V.: 3 Cov Kauj Ruam
Txaus Siab Rau Koj Tus Kheej Tsuas Yog Siv 12V-rau-AC-kab Inverter rau LED Lub Teeb Hluav Taws Xob Tsis txhob Rewiring Lawv rau 12V: Kuv txoj kev npaj tau yooj yim. Kuv xav txiav cov phab ntsa uas siv hluav taws xob LED teeb ua ib daim ces rov txuas nws kom khiav tawm 12 volts. Lwm txoj hauv kev yog siv lub zog hloov pauv, tab sis peb txhua tus paub tias lawv tsis muaj txiaj ntsig zoo, puas yog? Txoj cai? Los yog lawv?