News:

  • October 16, 2026, 09:53:02 AM

Login with username, password and session length

Author Topic: Input Wanted! BRX HTTP features...  (Read 36556 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Input Wanted! BRX HTTP features...
« on: October 04, 2018, 05:50:22 AM »
We are digging into what we might want to add to BRX through a web interface and would love to have input from our users!

Some ideas we are kicking around now are:
1. Web pages for:
   a) Basic system status...pretty much anything currently available from the SysInfo dialog pages in DmD.
   b) File system access...minimally file listing and file read access to the ram and sdcard disks. I have mixed emotions about writing or deleting.
   c) Basic image register data display. This is somewhat redundant to 2C below, one being browse-able the other more programmable. May not need both.
   d) ??
2. REST API for:
   a) Running program blocks. Something like /run/PgmBlockName?parameter_fed_into_string_containing_whatever_you_want
   b) Reading image register locations and returning as JSON object records. Something like /data/json?FieldJuan=V0&FieldToo=T0.Acc&Field3=D[V1]:3
   c) Reading image register locations and returning as live web page table. Similar to json, like /data/page?FieldJuan=V0&FieldToo=T0.Acc&Field3=D[V1]:3
   d) ??

We're listening!
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #1 on: October 04, 2018, 12:14:23 PM »
And for those who have no clue what a REST API is, basically it is a means of using HTTP URLs as function calls. So rather than reading documents, you are issuing commands or requests for services.

Here's an example that happens to already be running on the DMSim.  ;) In this example, I am issuing a command to the PLC via a web browser, asking it to send me the current value of some element references formatted as a JSON record. Note the request at the top of the browser, and the response in the browser window. Just getting started, but this will give you an idea of what is possible.

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Input Wanted! BRX HTTP features...
« Reply #2 on: October 04, 2018, 04:57:55 PM »
On the HTML access, I have seen other equipment and web page interfaces use brackets in the format  [variable] for simple display of of data in HTML, since html ignores the brackets.  As long as you could handle the nesting of brackets for array access. I would like to see something like that where I could use a simple HTML editor and insert data into the page. 

Any chance for adding an  FTP server for files on the memory card?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #3 on: October 04, 2018, 06:19:20 PM »
On the HTML access, I have seen other equipment and web page interfaces use brackets in the format  [variable] for simple display of of data in HTML, since html ignores the brackets.  As long as you could handle the nesting of brackets for array access. I would like to see something like that where I could use a simple HTML editor and insert data into the page. 

Any chance for adding an  FTP server for files on the memory card?

For an initial feature, I don't envision user definable pages via direct HTML generation. We will likely do an instruction that will allow you to define a small number of pages from PLC code (which will generate HTML) and those will definitely allow embedding data.

FTP is not a priority right now, but HTTP will give you rudimentary access.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Input Wanted! BRX HTTP features...
« Reply #4 on: October 04, 2018, 06:35:04 PM »
I would like to see simple HTML user defined pages with embedded data. Using them on another controller. Techs love them. Great diagnostic tool where there is no HMI.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #5 on: October 05, 2018, 02:43:54 AM »
I would like to see simple HTML user defined pages with embedded data. Using them on another controller. Techs love them. Great diagnostic tool where there is no HMI.

The instruction I'm proposing will allow you to create tables of live fields with descriptions. Does that not accomplish the same thing without the complexity?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Input Wanted! BRX HTTP features...
« Reply #6 on: October 05, 2018, 09:51:44 AM »
Sure. Would it be one instruction/html page or one page encompassing all tables?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #7 on: October 05, 2018, 10:04:49 AM »
An instruction would configure a page, and the system would support some arbitrary number of simultaneous pages. Since it is code, the pages could be reconfigured at will.

I'm thinking each page could be configured with 30+ lines. Still chewing on line content, but some combination of descriptive text and tag data, read for certain, and maybe write. We're not looking to replace an HMI (which we hope to build some day) but to provide exactly the kind of diagnostics access you are describing.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Input Wanted! BRX HTTP features...
« Reply #8 on: October 05, 2018, 01:23:43 PM »
This sounds a lot like the HMI IN YOUR POCKET I proposed a while back to provide access for setpoints on a PLC where you don?t really need an HMI. Except it looks like you wouldn?t need an app?

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Input Wanted! BRX HTTP features...
« Reply #9 on: October 05, 2018, 01:28:09 PM »
Also, It would be nice down the road to have a dedicated memory structure with defined arrays of DINTS , REALS and STRINGS to edit configuration data via a web page. Nothing big, maybe 5-10 each? Anything more, you need an HMI. Nothing too fancy. Enough for the end user to setup IP addresses and limited configuration data.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Input Wanted! BRX HTTP features...
« Reply #10 on: October 09, 2018, 04:22:07 PM »
I have built a fairly extensive webpage that is hosted on a local server.  I access all the data from the BRX via php commands to get the modbus data into arrays, and then build my web pages with those arrays.  It's a little bit of work to set up, but once working, it's rock solid.  Using it, I can read I/O and register values, control coils and set register values, etc.  I also post allot of data to an SQL server, which can then run historical charts, tables, etc.  At this point, I'm trying to build everything into web pages, and not need any HMI's.  With a php page obviously the data is not current after page load, but I think I could accomplish that with some java modbus libraries.

I would happily welcome any web capabilities.  Having API capabilities would help a bunch in polling data from various registers, vs putting them all into modbus, and having to slice and dice all the data into the necessary formats on my web pages.  I would like to see allot more than 30 lines be populated into an array though.

Having more capabilities into the BRX would really streamline things greatly.  Ideally I would like to see the web server be run entirely on the BRX, greatly cutting back on the hardware and supporting devices needed in a new setup.  There may or may or may not be a patent on that?

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Input Wanted! BRX HTTP features...
« Reply #11 on: August 08, 2020, 12:36:37 PM »
And for those who have no clue what a REST API is, basically it is a means of using HTTP URLs as function calls. So rather than reading documents, you are issuing commands or requests for services.

Here's an example that happens to already be running on the DMSim.  ;) In this example, I am issuing a command to the PLC via a web browser, asking it to send me the current value of some element references formatted as a JSON record. Note the request at the top of the browser, and the response in the browser window. Just getting started, but this will give you an idea of what is possible.
Is this REST API available yet?  Retrieving current values from PLC and returning in JSON format?  If so, is there any example code?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #12 on: August 08, 2020, 01:27:40 PM »
Is this REST API available yet?  Retrieving current values from PLC and returning in JSON format?  If so, is there any example code?

We are launching new products this Fall, and API will be in the associated release.

No example code necessary. It's just an HTTP GET.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Input Wanted! BRX HTTP features...
« Reply #13 on: August 09, 2020, 08:35:41 PM »
Can you speak to what these new products are?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Input Wanted! BRX HTTP features...
« Reply #14 on: August 09, 2020, 08:56:35 PM »
Can you speak to what these new products are?

With the caveat that unreleased products are subject to change...and from memory...
1. Several new discrete modules, including some TTL versions
2. BX-HSIO4 - line driver version of HSIO that operates at 2MHz in and out.
3. A new POM that implements a second full Ethernet port. Supports everything the built in port does.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO