G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending an Email from a WebVI

Solved!
Go to solution

Hello!  I'm currently trying to develop a WebVI that can send emails as alerts when specific values change.  However, it appears that G Web Development Software doesn't have the same VIs for handling emails that LabVIEW does.  I assume that I would need to use HTTP commands, but I'm not very familiar with how exactly to work with these effectively, so I was wondering if there were any good tutorials out there for building block diagram programs that can send emails in this way.  I've tried to do research on my own, but all the tutorials I can find are either for LabVIEW (which simply says to use their built-in email VIs) or are for non-block based coding, which I've been having trouble translating into a G Web format.  It doesn't matter to me exactly how the emails are sent, or what sender address they have, or even whether they're able to hold content beyond some simple text, as long as I'm able to send them!  I'm just not sure exactly how to do this with the VIs that are available in G Web.

 

Additionally, I have one more question.  My current goal is for this WebVI to act as a monitoring system for some tags in Systemlink Cloud, which will alert people when the values exceed certain thresholds.  My question is, when a WebVI is hosted on Systemlink Cloud, is it always running?  If the WebVI is a loop that continually checks for values to change, will it keep checking these values even when no specific computer is opening and looking at the WebVI?

 

Thank you!

0 Kudos
Message 1 of 2
(1,514 Views)
Solution
Accepted by topic author Veets

However, it appears that G Web Development Software doesn't have the same VIs for handling emails that LabVIEW does.

Correct. WebVIs made with G Web Development Software run in the browser and can only communicate over limited protocols available in the browser. The LabVIEW SMTP VIs for email are not usable in browsers. Web Browsers cannot use the SMTP protocol.

 

You either need to talk to your own backend (likely a LabVIEW app using the tags and messages or a LabVIEW Web Service that can then use the SMTP protocol) or a 3rd party web service over HTTP that can send the email on your behalf.

 


My question is, when a WebVI is hosted on Systemlink Cloud, is it always running?  If the WebVI is a loop that continually checks for values to change, will it keep checking these values even when no specific computer is opening and looking at the WebVI?


No, WebVIs are not running on SystemLink Cloud, the files are only hosted there. The WebVI runs in the web browser. Think of it like having a network file share that hosts an exe file that you copy to your computer to run. A WebVI is HTML, JavaScript, and CSS that is hosted on a web server and downloaded by your web browser to run in the browser. When you close the tab you are closing the program running on your machine.

 

A description of how WebVIs execute is included in the How to Build a Web UI for Your LabVIEW-Based Test System presentation in the "G Web Development: Services" part of the talk as a reference.

 

Also just so you are aware, SystemLink Server (which you can think of as the G Web Development Software services plus additional useful services, see "Difference Between G Web and SystemLink Server"), includes a Monitoring and Alarms service capable of using Rules to monitor the value of tags and create Email alerts, etc. But those capabilities would be for a locally managed SystemLink Server instead of SystemLink Cloud.

 

To specifically leverage SystemLink Cloud and do continuous monitoring you would need to create a local LabVIEW application that is running to monitor the tag values and create the alerts / messages you need.


Milan
Message 2 of 2
(1,484 Views)