取消
顯示結果 
搜尋替代 
您的意思是: 

Labview 2011 Mac - SSL support?

已解決!
前往解決方案

Hi folks,

 

For the past 4-5 years I've been using TCP OPEN & GETs to acquire weather forecast data from the National Weather Service web site. They've just changed to HTTPS, so I now need to switch to SSL. In Labview 2011 Mac, I see the VIs that look like they'd support SSL (OpenHandle & ConfigSSL), but they're not working on my initial attempts.

 

In searching, I see blogs saying that Labview 2010 Mac does not support SSL. But, I don't see any verification info past Labview 2010 (Mac).

 

Can anyone confirm that Labview 2011 Mac supports SSL (or not)?

 

Thanks...

0 積分
1 條訊息(共 9 條)
4,233 檢視

Hi rmp,

 

After some research, I found this forum where they speak about the same issue you have. On the last page (4th) I see that someone posted that the SSL  support was added on LabVIEW 2012 but not in LabVIEW2011:

https://forums.ni.com/t5/LabVIEW/get-HTTP-on-LabVIEW-2010-for-Mac/td-p/1485774/page/4

 

Also, there is an explanation on page 3 of why it was not included in those LabVIEW versions, it has something to do with legal procedures regarding the usage of those protocols.

2 條訊息(共 9 條)
4,187 檢視

Thanks jdel12,

 

I discovered that post also, this morning. I'm thinking of a few options here:

 - I really don't want to spend $3000 (maybe $more) to upgrade my Labview, just to add SSL support

 - I could get the academic version... but, I couldn't confirm that it's offered for the Mac, or would have the SSL/TCP tools. So I'd have to get a PC. But, I really want my app to run on my Mac.

 - I could use a different language on the Mac (Swift, Java, Python) just to acquire the data from the HTTPS site and make it available on my Mac. But, I've really struggled with the Object Oriented paradigm, so I'm gnashing teeth over this approach.

 - I don't think automator will do this (I need to programmatically change the URL to select different latitude/longitude locations).

 

Maybe I'll see if I can pay someone to develop the Mac app that just reads a HTTPS:URL from a text file, does the SSL/TCP GET and writes the response to a text file...

 

Thanks again.... feel free to reply if you can think of other options I might have missed.

0 積分
3 條訊息(共 9 條)
4,182 檢視

Hi rmp,

 

Right now I don't see any more workarounds for this, I think you got them all... If I come up with something else, I'll post it right away.

0 積分
4 條訊息(共 9 條)
4,174 檢視

You might be able to find a script solution for your MacOS, then use "System Exec VI" to call the script.

 

You might need to write the data to a intermediate or temporary file

0 積分
5 條訊息(共 9 條)
4,161 檢視

Thanks Phillip,

That's exactly what I've been working on. I'm close to finishing an Applescript that:

 - takes commands from a text file in Documents (commands now are "idle" or a URL)

 - writes the source of the URL to a text file in Documents

 

Yes, I need to see if the System Exec call is available for OSX in Labview Mac 2011. Right now, I have the Applescript running as a server and my app is a client.

 

Luckily, OSX has cURL which seems to handle HTTPS just fine.

 

This solves the problem for OSX, but sadly, now my app is OSX-specific... I'd rather have an app that runs on PC or OSX. But, I might make a PC flavor of the app.

0 積分
6 條訊息(共 9 條)
4,156 檢視
解決方案
由主題作者所接受 rmp

It's all working well. I ended up writing an Applescript that takes a URL via text file and writes the page contents to a different text file. The Applescript uses cURL to access the HTTPS site. In Labview Mac 2011 I:

1) write the HTTPS url to a text file

2) Use the System Exec vi to execute a Unix Shell command that launches the Applescript app. The Shell command invokes osascript to launch the Applescript app.

3) When the System Exec completes (I think it's synchronous), I read the web page contents from a different text file.

 

Thanks for motivating me to get through this!

0 積分
7 條訊息(共 9 條)
4,136 檢視

@rmp wrote:

3) When the System Exec completes (I think it's synchronous), I read the web page contents from a different text file.


The System Exec function has a boolean (wait until completion). If you leave this at its default value of true it should only return after the process that was launched through it has terminated.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 積分
8 條訊息(共 9 條)
4,132 檢視

Thanks Rolf,

 

You are absolutely correct about System Exec.

 

And, now after a few more days, I realize that Applescript is not needed at all. The simpler approach is:

1) Use System Exec to access the Shell command within OSX:

    - "Shell" is like typing commands into the OSX "Terminal" application. It gives access to any Unix command (that is supported by OSX)

    - System Exec also has an output terminal for "Standard Output" so the text results that "Terminal" would normally display is available at this terminal

2) Use Shell to launch the Unix cURL command which supports HTTPS calls

 

So, for example:

1. Wire "curl https://api.weather.gov/gridpoints/LWX/79,75" to System Exec "command line" input.

2. Leave System Exec's "wait until completion?(T)" true

3. Wire System Exec's "standard output" to a labview text indicator

4. Launch the vi and you'll see the text from the HTTPS web site

0 積分
9 條訊息(共 9 條)
4,122 檢視