LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sensor values from myRIO (using HTTP) to IoT platform(ThingSpeak) using API keys

Highlighted

I am working on a mini solar system. I want to use LabVIEW to publish sensor values from a real-time target,  myRIO (using HTTP) to IoT platform(ThingSpeak) using API keys.

 

myRIO would be a standalone device which collect sensor values and continuously send data to IoT platform at regular intervals.

 

I created a simple test program (API Test.vi) and was able to send data to IoT platform(ThingSpeak) from my PC. How about deploying this VI onto a real-time target? I have tried deploying it on to myRIO and it's doesn't seem to work. What are the drivers and configuration needed in myRIO.

 

Please help, thanks.

 

 

 

 

0 Kudos
Message 1 of 4
(272 Views)
Highlighted

Hi Jason,

 


@Jason_Y wrote:

I created a simple test program (API Test.vi) and was able to send data to IoT platform(ThingSpeak) from my PC. How about deploying this VI onto a real-time target? I have tried deploying it on to myRIO and it's doesn't seem to work. What are the drivers and configuration needed in myRIO.


Usually you just deploy the VI to your RT target.

What are the errors you get when the VI "doesn't seem to work"? Did you try to debug the VI?

 

And why do you need to open and close a HTTP connection each 100ms?

IMHO you should not use a GET request to publish data to a server: did you try to PUT or POST instead?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 4
(257 Views)
Highlighted

Hi GerdW,

 

Thanks for the feedbacks. I have improved the VI and it works the same but with a simplified diagram.

I did not get any errors while running as startup. The data wasn't sent to IoT platform(ThingSpeak) when running on myRIO itself. Are there any special installation of drivers needed to ensure it works or do I just need to connect myRIO directly to the internet.

 

Thanks,

Jason

0 Kudos
Message 3 of 4
(220 Views)
Highlighted

I have just found out that myRIO alone can only do WLAN, therefore direct compiling of VIs that sends data to ThingSpeak didn't work on my real-time target. Are there any work around to this problem that could allow me to connect to internet?

0 Kudos
Message 4 of 4
(170 Views)