updated flowmeter for roll over

This commit is contained in:
Nico Melone
2025-07-09 09:47:17 -05:00
parent 9c17f11768
commit f7c186bab7
9 changed files with 10564 additions and 54 deletions

View File

@@ -7,17 +7,20 @@
"outputs": [],
"source": [
"from pycomm3 import LogixDriver\n",
"import json, pprint"
"import json, pprint\n",
"from datetime import datetime as dt"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"ip_address = \"63.46.83.193\" # \"ngrok.iot.inhandnetworks.com:3021\"\n",
"path = '/Users/nico/Documents/GitHub/HP_InHand_IG502/Pub_Sub/fk_plcpond_gateway/thingsboard/overflow_tag_dump_30_May.json' # code snippets/tag_dump.json'"
"ip_address = \"63.46.36.52\"# \"ngrok.iot.inhandnetworks.com:3054\" # \"166.141.90.208\"\n",
"device_type = \"rr_pipeline\"\n",
"today = dt.now().strftime(\"%Y_%B_%d\") \n",
"path = f'/Users/nico/Documents/GitHub/HP_InHand_IG502/Pub_Sub/{device_type}/thingsboard/tag_dump_{today}.json' # code snippets/tag_dump.json'"
]
},
{
@@ -54,17 +57,9 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Pond_1_Lev, 21055.0, REAL, None\n"
]
}
],
"outputs": [],
"source": [
"with LogixDriver(ip_address) as plc:\n",
" print(plc.read(\"Pond_1_Lev\"))"
@@ -110,12 +105,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CMD_TP1_PID_Auto, 0, BOOL, None\n"
]
}
],
"source": [
"with LogixDriver('107.84.254.147') as plc:\n",
" print(plc.write(\"Lifetime_Flow_Meter_Gal\", 0))"
"with LogixDriver(ip_address) as plc:\n",
" print(plc.write(\"CMD_TP1_PID_Auto\", 0))"
]
},
{