Discussion:
Changing web server refresh to less than one second
(too old to reply)
tmunsell
2008-07-23 01:10:05 UTC
Permalink
I just set up another PC on our network to display our engine test VI.  Is there any way to increase the refresh rate to less than one second.  I tried entering .5 sec on the config screen, but it changed back to one second.  I'm using LabVIEW 8.5.1. Thanks,Todd MunsellWood Group Pratt & Whitney Industrial Turbine Services
JoeLabView
2008-07-23 03:10:08 UTC
Permalink
How are you programming your refresh rate?  Can you show the code?
 
R
tmunsell
2008-07-23 04:40:05 UTC
Permalink
My VIs refresh rate is set to the CPU speed.  It's the web server app that only give me 1+ second options.
Bob_H.
2008-07-23 21:40:05 UTC
Permalink
Hello Todd, Thank you very much for contacting National Instruments!&nbsp; I have been looking into this issue and I think I may have found something that will help you.&nbsp; Take a look at <a href="http://digital.ni.com/public.nsf/allkb/651D0F36A947272686256B250054B585?OpenDocument" target="_blank">this knowledgebase article</a> that describes setting the refresh rate for a webpage with the LabVIEW Web Server.&nbsp; It looks like by setting the value equal to 0 the web page will refresh as quickly as possible.&nbsp; Hopefully this information helps!&nbsp; If you need more information please let us know and give us a little bit more information on your application.
tmunsell
2008-07-25 03:40:07 UTC
Permalink
Thanks for the reply. I checked out the link, but can't find the HTML file to edit.&nbsp; From what I understand, the file is re-sent continuously to the client PC on the network.&nbsp; If this is indeed the case, then how can I edit each instance that is sent?I tried setting the refresh to zero in the web server, but now the entire screen redraws, and very intermittently.... not a steady stream of data.&nbsp; At least with the one second refresh, only the data on the screen changes, not the entire image.&nbsp; I'm at a loss on this one.&nbsp; We have a customer coming up this weekend and I'd like to get this working beforehand if possible.Thanks again.
tmunsell
2008-07-25 05:10:05 UTC
Permalink
Update:I found the html file in the www. folder under the Labview 8.5 folder.I edited the file as per the link you gave me, but it was redrawing the entire screen, the same as it did when using the zero setting in the web server options.Also, each time I start the web server, it forces me to create a new html file and overwriting the previous one before letting me start the server.&nbsp; That means that each time I start the server, I'd have to go in and edit the new html file.Is there another way to display a screen in real-time, possibly using the WinXP IIS as the local server?This should be a temporary fix anyway.&nbsp; I've created a duplicate app to run on the other PC, but we are having trouble getting it to interface properly with the Daytronic System 10 communications cards.&nbsp; Labview only seems to work with the built-in System 10 comm port for some odd reason.&nbsp; The add-on (B-slot) comm cards were sent to Daytronic today for troubleshooting.&nbsp; If they can get them working properly, then I won't be needing to use the LV server anymore unless I want to make the screen available to customers over the internet.&nbsp; Currently, we are using Webex for that purpose.The reason for wanting a seperate app running on a different PC is so the customer who witnesses the run remotely won't have to see all the warning lights I've set up on the main engine run screen that the operator uses.Thanks.Message Edited by tmunsell on 07-25-2008 12:53 AMMessage Edited by tmunsell on 07-25-2008 12:54 AM
Bob_H.
2008-07-28 15:10:07 UTC
Permalink
Hello Todd, I am sorry I was under the impression that you were looking to refresh the entire page.&nbsp; I see that you have created a new application to run on the client computer.&nbsp; What method of communication are you using between the two?&nbsp; Have you thought about creating an application that uses either <a href="http://zone.ni.com/devzone/cda/tut/p/id/4679" target="_blank">shared variables</a> or a <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/creating_tcp_client/" target="_blank">TCP</a> connection in order to communicate only that data that you need on the client side.&nbsp; I believe that you may be able to get the quicker communication method this way if you are not satisfied with the refresh rate of the remote front panels.&nbsp; This would also help you get around the issue of creating a new html file in order to start the web server.&nbsp; Please let us know if you have any further questions and we will do our best to assist you.
tmunsell
2008-07-28 17:40:06 UTC
Permalink
Thanks for the reply, Bob.I think I'll try using the TCP/IP&nbsp; or shared variable method, whichever requires less coding.&nbsp; Time is an issue now, so I can't spend several days doing this.The method I was using with the web server was refreshing at a rate of once per second, but didn't appear to refresh the entire page.&nbsp; Maybe it was, but the redraw wasn't visible.&nbsp; Only the data was refreshing, which is what I wanted.&nbsp; When I tried using zero as the refresh rate, the entire screen would redraw, but even then it was happening very slowly (every 1+ seconds), then I would get a page file error in WinXP saying that the memory was low.&nbsp; The client has 512MB RAM.I'll have to do some reading on how to set up the TCP method.&nbsp; I'm still fairly new to LV and am learning as I go along.Thanks again.Message Edited by tmunsell on 07-28-2008 01:18 PM
Bob_H.
2008-07-28 18:10:07 UTC
Permalink
Hello Todd, My recommendation to you for a solution with less coding is Shared Variables.&nbsp; There is some extra overhead that goes along with Shared Variables but it is less coding than the TCP method.&nbsp; The TCP method is not necessarily difficult but with Shared Variables you just need to bind them to a source and then you will be able to read and write to them depending on the properties that you specify.&nbsp; The article that I linked in my previous post will help you with more information about Shared Variables (especially the network published section).&nbsp; Again, it is up to you on which method you choose.&nbsp; If you have any further questions when working out the TCP or Shared Variable solution I would recommend that you create a new post as you will get more hits on a TCP/Shared Variable question than the Web Server question.&nbsp; If there is anything else I can do for you please just let me know!
tmunsell
2008-07-29 01:40:04 UTC
Permalink
Thanks again.&nbsp; I'll try that.BTW, I just spoke with out rep from Daytronic Corp. who was testing the comm cards with his System 10 and PC.&nbsp; They worked fine for him.&nbsp; The only difference is that he is using LabVIEW 7.0 and we are using 8.5.1.&nbsp; They don't have any subVIs written for the newer LV versions.&nbsp; That may be the cause the the issue we're having with using the comm cards to access the DAQ.&nbsp; They do not have the time or money to update their subVIs for the newer LV versions, but I'd have to think that there is a way to change them myself to make them work.&nbsp; Ideally, I want to use a modified version of the app I'm using on another PC without having to bother with the network to pass the data.&nbsp; I already have a cable made to connect the other PC to the System 10.I almost forgot something.... I found a version 8 System 10 subVI package using the NI search, but it didn't work either.Do you know what might have changed in the newer LV versions that could cause this issue?&nbsp; I've attached a zip file of their subVIs.&nbsp; Like I mentioned earlier, LV works fine using the main (built-in) comm port on the System 10 DAQ.&nbsp; It's just the additional cards that do not work correctly.&nbsp; They seem to establish the comm link OK, but the binary data that the System 10 sends is not interpreted and displayed correctly.&nbsp; It's usually all gibberish on the screen.Of the Daytronic subVIs, the subVI that I use to test with is the "example.vi", which is used for binary data.The "simple terminal" subVI works fine, but I can't use it to test the data link since it's configured differently.When I use the main System 10 comm port, the simple terminal doens't work and the example.vi does.&nbsp; Why wouldn't it work with the other ports/cards?Could you please check these out when you have the time and see if you can find something that isn't configured correctly?&nbsp; I may be overlooking something obvious, since I'm still learning LV.ThanksMessage Edited by tmunsell on 07-28-2008 09:18 PM


labvdr7.zip:
http://forums.ni.com/attachments/ni/170/344637/1/labvdr7.zip
tmunsell
2008-07-29 01:40:04 UTC
Permalink
I hope that post isn't too confusing.&nbsp; I'm getting a bit confused, myself. :) To try to sum it up.....If the example.vi works, then my app will work.If the simple terminal.vi works, then my app will NOT work.I've also attached a copy of the app I'm using.&nbsp; I know... it's a bit cluttered, but I haven't yet mastered the structures method, and I thought this way would be easier for the other folks I work with to understand the app if they need to make a change when I'm not here.&nbsp; They know next to nothing about LV, but can understand schematics well.&nbsp; Using the layered structures confuses me sometimes, so I'm sure they'd be lost when trying to intrepret them.


GG4 Panel.zip:
http://forums.ni.com/attachments/ni/170/344638/1/GG4 Panel.zip
tmunsell
2008-08-07 06:40:05 UTC
Permalink
Well, I finally managed to modify Daytronic's sub-VIs to work with LV 8.5 I had to change a switchable setting to a fixed false boolean value, because for some reason, LV kept switching it back to the default true value.&nbsp; It took a while to change all the sub-VIs, but now it all works with the add-on comm cards.&nbsp; Now I just have to change the other apps I made.I wish I could figure out the "multi-channel read" VIs.&nbsp; I'm not sure how to configure them, so I have to use individual sub-VIs for each channel of data.&nbsp; At least I'm finally making progress after several months of fiddling with this problem....&nbsp; Thanks again for the help.
Continue reading on narkive:
Loading...