Jump to content

Turn your front panel into an interactive HTML5 site


Recommended Posts

Pretty neat.  I couldn't actually get it to display live data for some reason.  I tried in the source, and the EXE and when running both only 8080 gave me a static image of the FP, and 8001 was page not available.  That being said I was able to follow the code and understand it, and see where you can add methods for other control types.

 

This isn't any thing new really, but no one has released a free version that worked well, and is fully open, as far as I know.  Don't get me wrong I, think the toolkits others are making are awesome and hope they make lots of money off of them.  But in many cases the bosses just believe "software is free" and are often leery about buying 3rd party toolkits.  Wezarp is another one you've probably seen doing some self promotion.  Even NI has been dabbling in it at some level according to their keynote this year.

 

Until recently my development world was in a place where I would never really have a need for this type of software.  But now I could see some places where this could be very handy.  Especially with my somewhat limited experience with web design.

 

EDIT: Oh and VIRemote is another.

Link to comment

I'm aware of "the competition" and they all charge a lot. I've looked at

  • LabSocket
  • WebPager (after handing over $2k for the software they charge an additional $100 per hour for tech support. WTF?)
  • WebPanel (similar but dead?)
  • Wezarp (uses VNC)
  • NI's own Web UI Builder (dead, mainly thanks to Silverlight requirement I heard). Is that what you meant, hooovahh?

VIremote sounds like it's using different technology, since it seems to be limited to apple devices. I hadn't seem that one before.

 

What I wanted to do is to provide an open-source, low-cost or free tool that allows the developer to achieve similar functionality as the above via a web browser. Get them started in a pain-free way and if they're keen provide the ability to modify to their own needs.

I'm not a huge web designer myself. Enough to get this demo to work (for me at least) but for the final version I would probably need some input.

 

 

Pretty neat.  I couldn't actually get it to display live data for some reason.  I tried in the source, and the EXE and when running both only 8080 gave me a static image of the FP, and 8001 was page not available.

 

There is a weird "bug". When you open the "Show Public URL" dialog the web service seems to freeze until you close that dialog again.

  • Like 2
Link to comment
  • NI's own Web UI Builder (dead, mainly thanks to Silverlight requirement I heard). Is that what you meant, hooovahh?

Watch the Wednesday Keynote >> NI's Software Platform >> Around 7 minute mark

 

http://www.ni.com/niweek/keynote-videos/

 

"Port the entire LabVIEW engine to Java script".

 

Yeah I was messing with the Show Public URL function so that was probably it.  I commend your efforts and hope it is in a semi-complete state when I have a need for this type of thing.

Link to comment

Excellent idea.

 

However, I am having issues getting the demo to work. (I have not used the webserver before so it might be user error).

I am doing the following:

1) Open Labview project "FPPublisher.lvproj"

2) Enable Webserver.

        a) Select "Tools->Options...->Web Server"

post-4041-0-53099000-1443012981.jpg
 

        b) Select "Configure Web Application Server". A web page will open.

post-4041-0-84502100-1443013110.jpg
 

3) Open and Run "FPPublisher.lvproj->My Computer->To Publish->Main.vi"

4) Check Web Server Application has been published

        a) In  "Configure Web Application Server->Web Services Management"

post-4041-0-30680900-1443013407.jpg
 
In my case nothing shows in this box, which I think is causing the problem.
 

5) Get server webpage

        a) In project explorer, right click "FPPublisher.lvproj->My Computer->WebService->Public Content->Main.html->Show Public Content URL"

post-4041-0-09782400-1443013990.jpg
        b) Select either "local debugging" or "Application" and then "Copy URL".
6) View in webrowser.
        a) Paste URL into Chrome
 

If I use the "local debugging" url I get:

post-4041-0-85635000-1443014302.jpg
or the application url, I get:
post-4041-0-48693300-1443014305.jpg
 
Any suggestions/ideas of what I am doing wrong?
 
Appreciate your help
Ian

 

 

post-4041-0-53099000-1443012981.jpg

post-4041-0-84502100-1443013110.jpg

post-4041-0-30680900-1443013407.jpg

post-4041-0-09782400-1443013990.jpg

post-4041-0-85635000-1443014302.jpg

post-4041-0-48693300-1443014305.jpg

Link to comment

You need to right click on the web service in the project and select start. Doing "publish" will have it run in the application web server context, while "start" runs in the project context (and I think probably doesn't show up in the WIF viewer).

 

That's right, you shouldn't have to play with the Webserver configuration at all.

I guess my "How to run it" description wasn't great. I've edited the post and added some screenshots to make it clear.

Link to comment
  • 1 month later...
  • 3 weeks later...
  • 1 month later...

It supports a bunch of common controls that can be represented as HTML5 and it supports representing any control as an image.

 

This last part doesn't seem to be working.  The path control and any other test controls I drop down don't seem to be recognized.  I've started working my way through your configuration code, but I thought I might check and see if there is a simple mistake I've made.

 

Edit//  Looks like some work is still to be done to get generic objects/controls to display as images.  I've worked on that some and made it work.  There are some other things I want to do as well.  Perhaps I'll post my changes when I'm done, though don't count on me to take things over.

Edited by Jordan Kuehn
Link to comment
  • 1 month later...

So what is the likelihood that this type of thing could be used on a real-time system?

 

I have a simulated RT system in a VM and I started testing with it and I made some progress, but things still don't quite work.  I copied all the www files to the right location on the RT system, including the config file made setting the image type or not, and I modified the example to run without the event structure but instead poll the button values, then I ran the VI on the RT system.  I got an error in the following VI because it tried to read the front panel, when there isn't one on RT.  (Errro 1013)

 

FPPublisher\WebFrontPanel_class\CreateHTML.vi

 

This part of the code is relatively minor and just reads the size and color of a panel so I replaced the read with some constants for a test.  After this the code ran without error so I thought I may get lucky.  I went to the file browser from MAX and navigated to the following URL path in a web browser.

 

http://192.168.56.101/files/ni-rt/startup/www/Example.html

 

The page loaded up and...it was mostly blank.

 

post-6627-0-84121000-1456325965.png

 

I viewed the page source and it is attached.  Any idea why this wouldn't work?  I looked into several of the properties you call to make the page and I didn't find one that said it wasn't supported on real-time.

Example.htm

Link to comment

Okay I think I found the issue, of which I'd be curious to hear if NI has anything to say about it.  The issue is with getting the references to the controls and indicators.  On RT there is no front panel, so getting references to those controls isn't possible.  But the normal way you would do this is to use the Front Panel Property on the VI.  Reading the help is says it is available in Real-Time OS...but there is no FP in Real-Time...so it returns an error...so is this really available if it will always return an error?  Seems like these two things don't agree.

 

The reason this didn't return an error is because of a bug in the following VI.

 

\FPPublisher\WebFrontPanel_class\WebFrontPanel_Create.vi

 

The two for loops return references and errors, but if the loop runs 0 times (empty arrays) then the input error is cleared.  This should either be changed to shift registers, or add the incoming error to the merge errors already in the VI.

  • Like 1
Link to comment

On RT there is no front panel, so getting references to those controls isn't possible.

 

I don't suppose you have access to one of the shiny new Linux RT cRIOs that have a mini-DisplayPort for built-in GUIs? (cRIO-9030) I wonder if that works.

 

I've built a program for a cRIO-9030 which uses control/indicator property nodes and an event structure, so that means the references exist there. The cRIO is now with the customer though, so I can't experiment with it anymore.

Edited by JKSH
Link to comment

Okay I think I found the issue, of which I'd be curious to hear if NI has anything to say about it.  The issue is with getting the references to the controls and indicators.  On RT there is no front panel, so getting references to those controls isn't possible.  But the normal way you would do this is to use the Front Panel Property on the VI.  Reading the help is says it is available in Real-Time OS...but there is no FP in Real-Time...so it returns an error...so is this really available if it will always return an error?  Seems like these two things don't agree.

Theres a bunch of those, to the point that I don't find those properties in the help very trustworthy. I believe the explanation is that it can work on RT in interactive mode with the front panel open but not in an exe form? 

 

It will definitely work on the linux crios with displayports, as you have to check a little box which tells labview to compile it with the UI components.

 

You can use an invoke node on the VI, I think (control value.get all) but then you lose the signalling property nodes.

Edited by smithd
Link to comment

Yeah I made a post on the the NI forums about this.

 

http://forums.ni.com/t5/LabVIEW/Property-is-supported-in-RT-but-will-always-return-an-error/m-p/3258138

 

It seems some of these UI nodes might work on the newer RT systems running Linux and have monitor outputs, and on remote front panels (I have yet to get this to work but crossrulz said it was possible).

 

So I'm thinking the only way to get this HTML5 version to work on RT, is to get these properties to work on RT, and at least for my vxWorks VM of RT, I haven't found a way to make them work.  If remote front panels causes other RT systems to have these nodes work, then I wonder if it is possible to publish these remote front panels, then have the RT connect to them, there by allowing the methods to work, and then you would be able to use this code to make HTML5 pages of it.  For my application, I think I can live with remote front panels and have the LabVIEW Web components installed.

Link to comment

Yeah I made a post on the the NI forums about this.

 

http://forums.ni.com/t5/LabVIEW/Property-is-supported-in-RT-but-will-always-return-an-error/m-p/3258138

 

It seems some of these UI nodes might work on the newer RT systems running Linux and have monitor outputs, and on remote front panels (I have yet to get this to work but crossrulz said it was possible).

 

So I'm thinking the only way to get this HTML5 version to work on RT, is to get these properties to work on RT, and at least for my vxWorks VM of RT, I haven't found a way to make them work.  If remote front panels causes other RT systems to have these nodes work, then I wonder if it is possible to publish these remote front panels, then have the RT connect to them, there by allowing the methods to work, and then you would be able to use this code to make HTML5 pages of it.  For my application, I think I can live with remote front panels and have the LabVIEW Web components installed.

 

When they say "RT" they really mean the Pharlap RT OS which is now called the NI Hypervisor, I think. (Windows PXI racks). That is Windows with an RT kernel.

 

Interesting that new embedded platforms are coming with GUIs. Should be able to get VNC working on them too.

 

Does anyone have a VMware or Virtualbox image of one of these GUI enabled systems?

Edited by ShaunR
Link to comment

When they say "RT" they really mean the Pharlap RT OS which is now called the NI Hypervisor, I think. (Windows PXI racks). That is Windows with an RT kernel.

 

Interesting that new embedded platforms are coming with GUIs. Should be able to get VNC working on them too.

 

Does anyone have a VMware or Virtualbox image of one of these GUI enabled systems?

Yeah again being a bit new to the RT scene I don't know all of the various OSs that were out there or supported.  At the moment the only official way to turn an industrial PC into an RT LabVIEW compatible OS is to follow these instructions, which as I said I think loads up some vxWorks  Pharlap OS.  Basically load up MAX, load the boot image on a USB drive, boot your PC with it and install.  There are several restrictions, the greatest one is you need to have a compatible network card, which generally supports Intel based ones, and a couple others.  Using instructions for VirtualBox posted on NI.com I was able to do this in a VM.

 

But what I don't see is any instructions or ways to do this with the newer Linux based RT OS.  If I had my hands on one I wonder if I could just pull the harddrive, perform an image of it, and then use that in a VM, but I don't.  I've been searching but I don't see anything on the idea exchange to add support for the Linux OS on industrial PCs.

 

EDIT:  It seems most of the Linux based RT systems have an ARM processor, but some are x86, these are the ones that pulling the hard drive image on might be useful.

Link to comment

Yeah again being a bit new to the RT scene I don't know all of the various OSs that were out there or supported.  At the moment the only official way to turn an industrial PC into an RT LabVIEW compatible OS is to follow these instructions, which as I said I think loads up some vxWorks/Pharlap OS.  Basically load up MAX, load the boot image on a USB drive, boot your PC with it and install.  There are several restrictions, the greatest one is you need to have a compatible network card, which generally supports Intel based ones, and a couple others.  Using instructions for VirtualBox posted on NI.com I was able to do this in a VM.

 

But what I don't see is any instructions or ways to do this with the newer Linux based RT OS.  If I had my hands on one I wonder if I could just pull the harddrive, perform an image of it, and then use that in a VM, but I don't.  I've been searching but I don't see anything on the idea exchange to add support for the Linux OS on industrial PCs.

 

Yeah. That's not what I'm after, though. I just want to open an appliance that someone else has gone through the excruciating pain of creating. Call me lazy but I've been mauled by Linux distros and the RIO evaluation board usb image so someone else can go through that for these platforms, thank you very much :D

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.