Modbus Data FROM Webpage HTML

Join Date
Aug 2022
Location
carlsbad, nm
Posts
6
Hey all,
I am trying to find a way to get data from a local device webpage into a modbus server for a customers SCADA.


The customer was hoping that instead of spending money on service techs to program CAN modules etc, that we could somehow get the data off these compressors without needing all the vendor's proprietary junk.



Is there any way I could pull a few tags off an HTML webpage and have them update modbus data points? Is there anyway to directly import these tags into a Studio 5000 program?


Yes, its an obscure and weird situation, i am well aware hahah
 
Never did it, but I understood this was the sort of task Node-Red was capable of. Someone will respond shortly, I'm sure...

We asked this question of Rockwell at one time when we needed a reservoir water elevation from a USACE website. Their response was "you could use the EtherNet/IP Socket Interface". Never pursued it, but there might be something you could do. Look at their Publication ENET-AT002E-EN-P.
 
>data off these compressors

What sort of compressors are you using, with what kind of Ethernet interface ?

Do you know if they implement a simple HTML sort of webpage, or if they have a more complex java applet or HTML5 visualization system ?

I would start by opening their webpage in a browser, right-clicking and selecting "View Page Source" (in Chrome, anyhow) and looking for the data you want in the source HTML file.

I agree that's something I would reach for Node-Red and a small Linux box to accomplish.

I presume your SCADA system's most generic interface is Modbus/TCP, but you also have some ControlLogix or CompactLogix in the system.
 
I would start by opening their webpage in a browser, right-clicking and selecting "View Page Source" (in Chrome, anyhow) and looking for the data you want in the source HTML file.


+1

I did some searching, and stumbled onto this: https://palewi.re/docs/first-web-scraper/

Update: the code is available on Github, and the example, to extract data from a table here, looks like this:

import csv
import requests
from bs4 import BeautifulSoup

url = 'https://report.boonecountymo.org/mrcjava/servlet/SH01_MP.I00290s?max_rows=500'
response = requests.get(url, headers={'User-Agent': 'Mozilla/5.0'})
html = response.content

soup = BeautifulSoup(html)
table = soup.find('tbody', attrs={'class': 'stripe'})

list_of_rows = []
for row in table.findAll('tr'):
list_of_cells = []
for cell in row.findAll('td')[:-1]:
text = cell.text
list_of_cells.append(text)
list_of_rows.append(list_of_cells)

outfile = open("inmates.csv", "w")
writer = csv.writer(outfile)
writer.writerow(["Last", "First", "Middle", "Suffix", "Gender", "Race", "Age", "City", "State"])
writer.writerows(list_of_rows)


 

Similar Topics

I have 9 field devices, three METSEPM5110 power meters and six ACE949-2 rs285 interface modules. I want to read this Modbus rtu data through rs485...
Replies
8
Views
317
I am using a Beckhoff PLC and trying to convert a REAL to 2 WORDS to send over Modbus. Does anyone know how to do this? Also how would I convert...
Replies
5
Views
802
I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII...
Replies
7
Views
3,585
I've got 16-bit data at address 40200 on a Schneider Scapack 350. I can grab the data over Modbus TCP using Kepware at IP 172.16.1.100. When I...
Replies
8
Views
2,499
Hi, I have been struggling for a week with FATEK FBs-24-MAR-AC PLC. My goal is to read voltage and current from a powermeter Elnet Pico 5. The...
Replies
8
Views
3,799
Back
Top Bottom