Diferència entre revisions de la pàgina «ModBUS RTU a l'IoT-Vertebrae»
Salta a la navegació
Salta a la cerca
m |
m |
||
Línia 1: | Línia 1: | ||
El ModBUS RTU a l'IoT-Vertebrae és integrat al [[Cap (Head v2.0) - IoT-Vertebrae| cap v2.1]]. A versions prèvies de cap cal fer servir un convertidor USB a ModBUS RTU | El ModBUS RTU a l'IoT-Vertebrae és integrat al [[Cap (Head v2.0) - IoT-Vertebrae| cap v2.1]]. A versions prèvies de cap cal fer servir un convertidor USB a ModBUS RTU | ||
+ | = ModBUS RTU integrat al cap = | ||
[[Image:Head_v2.0.png|center|thumb|HEAD v2.0]] | [[Image:Head_v2.0.png|center|thumb|HEAD v2.0]] | ||
+ | pi@raspberrypi:~/codis/modbus $ python ''''mb_IoT_01.py /dev/serial0''' 4800 | ||
+ | s: Relay SET, r: Relay RESET, i: Read inputs, t: temperature, h: relative humidity, p: pressure, a: | ||
+ | altitude, v: VOC and q: quit | ||
+ | Baudrate: 4800 at /dev/serial0 | ||
+ | { | ||
+ | Sending: Relay SET | ||
+ | 07050004FF00CD9D | ||
+ | He rebut 8 bytes | ||
+ | 07050004FF00CDFF | ||
+ | Received: '''Relay SET''' | ||
+ | } ---- | ||
+ | { | ||
+ | Sending: Relay RESET | ||
+ | 0705000400008C6D | ||
+ | He rebut 8 bytes | ||
+ | 0705000400008CFF | ||
+ | Received: '''Relay RESET''' | ||
+ | } ---- | ||
+ | { | ||
+ | Sending: Reading temperature | ||
+ | 070300000001846C | ||
+ | He rebut 7 bytes | ||
+ | 0703020AB37751 | ||
+ | '''T: 27.39 ºC''' | ||
+ | } ---- | ||
+ | { | ||
+ | Sending: Reading relative humidity | ||
+ | 070300010001D5AC | ||
+ | He rebut 7 bytes | ||
+ | 07030214F03F00 | ||
+ | '''RH: 53.60 %''' | ||
+ | } ---- | ||
+ | = ModBUS RTU emprant un convertidor USB a RS485 = | ||
[[Image:usbModbusRtu00.jpg|center|thumb|Convertidor USB a ModBUS RTU]] | [[Image:usbModbusRtu00.jpg|center|thumb|Convertidor USB a ModBUS RTU]] |
Revisió del 11:01, 26 ago 2024
El ModBUS RTU a l'IoT-Vertebrae és integrat al cap v2.1. A versions prèvies de cap cal fer servir un convertidor USB a ModBUS RTU
ModBUS RTU integrat al cap
pi@raspberrypi:~/codis/modbus $ python 'mb_IoT_01.py /dev/serial0 4800 s: Relay SET, r: Relay RESET, i: Read inputs, t: temperature, h: relative humidity, p: pressure, a: altitude, v: VOC and q: quit Baudrate: 4800 at /dev/serial0 { Sending: Relay SET 07050004FF00CD9D He rebut 8 bytes 07050004FF00CDFF Received: Relay SET } ---- { Sending: Relay RESET 0705000400008C6D He rebut 8 bytes 0705000400008CFF Received: Relay RESET } ---- { Sending: Reading temperature 070300000001846C He rebut 7 bytes 0703020AB37751 T: 27.39 ºC } ---- { Sending: Reading relative humidity 070300010001D5AC He rebut 7 bytes 07030214F03F00 RH: 53.60 % } ----