Sharon_ Posted December 21, 2010 Report Share Posted December 21, 2010 Hi friends, I've got an interesting project( atleast for me ). I have a set of of equipents which are controlled by a webpage(html with button and slide bars..etc). We can also control the devices using modbus- I am using my labview code here. And we can read back the status of the device (in labview or any other modbus software) registers even if the devices are controlled from web page controls. What I would like to know is that, Is it possible for us to load the webpage in labview and push the webpage button from labview(automatically or manually) and read back the status registers? Interesting? I did browse thru' NI website but I couldnot find anything related to that. Please help me...!!!! Regards, Sharon Quote Link to comment
ShaunR Posted December 21, 2010 Report Share Posted December 21, 2010 (edited) Hi friends, I've got an interesting project( atleast for me ). I have a set of of equipents which are controlled by a webpage(html with button and slide bars..etc). We can also control the devices using modbus- I am using my labview code here. And we can read back the status of the device (in labview or any other modbus software) registers even if the devices are controlled from web page controls. What I would like to know is that, Is it possible for us to load the webpage in labview and push the webpage button from labview(automatically or manually) and read back the status registers? Interesting? I did browse thru' NI website but I couldnot find anything related to that. Please help me...!!!! Regards, Sharon Well. The easiest way (If using windows) is probably to load an active X or .net browser into a labview container and when a DocumentComplete event occurs; scrape the page for the info you want. Edited December 21, 2010 by ShaunR Quote Link to comment
Sharon_ Posted December 27, 2010 Author Report Share Posted December 27, 2010 Well. The easiest way (If using windows) is probably to load an active X or .net browser into a labview container and when a DocumentComplete event occurs; scrape the page for the info you want. Hi Shaun, Do I need to use labview internet tool kit for this? I dont know what you mean by 'DocumentComplete event'. I am sorry. Could you please give me more hints on that? Thanks for your time..!!! Sharon Quote Link to comment
ShaunR Posted December 27, 2010 Report Share Posted December 27, 2010 Hi Shaun, Do I need to use labview internet tool kit for this? I dont know what you mean by 'DocumentComplete event'. I am sorry. Could you please give me more hints on that? Thanks for your time..!!! Sharon No. But you do need "Windows". Here is a .NET example of what I mean. Quote Link to comment
Sharon_ Posted December 27, 2010 Author Report Share Posted December 27, 2010 No. But you do need "Windows". Here is a .NET example of what I mean. Thank you Shaun..!!! Quote Link to comment
Sharon_ Posted February 8, 2011 Author Report Share Posted February 8, 2011 (edited) No. But you do need "Windows". Here is a .NET example of what I mean. Hi Shaun, Your Vi is very useful in loading the webpages.My next step is to click the button shown on the webpage. I know that I need to use some events like 'OnClick'. But I dont know how to use it with the functions inclusded in the VI. If I simply add onclick event- my labview crashes. Or does the functions mentioned in the attachment VI support only for browser related events(whatever we in the property window)? Could somebody help me...!!!? Thanks for your time..!!! Sharon. Edited February 8, 2011 by Sharon_ Quote Link to comment
ShaunR Posted February 8, 2011 Report Share Posted February 8, 2011 Hi Shaun, Your Vi is very useful in loading the webpages.My next step is to click the button shown on the webpage. I know that I need to use some events like 'OnClick'. But I dont know how to use it with the functions inclusded in the VI. If I simply add onclick event- my labview crashes. Or does the functions mentioned in the attachment VI support only for browser related events(whatever we in the property window)? Could somebody help me...!!!? Thanks for your time..!!! Sharon. I'm no expert on .NET. I avoid it like the plague. .I think it is possible to get things like mouse-hover, clicked object etc (I've vaguely remember seeing the event). But I have never tried it. - perhaps someone else knows more. What I have done in the past though is to ensure the web page is "old-style" i.e very little javascript. This means that a button (for example a "Submit") causes the page to refresh and therefore once pressed, your DocumentComplete event fires again with the page refresh.. If however the page is mainly javascript, that doesn't necessarily happen as it's all handled by the browser. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.