LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Temperaturedata from a webserver via http JSON request to LabView

Solved!
Go to solution

Hi Miriam,

 


@MiriamLea wrote:

I set a timeout on the left handside to 1000 ms.

And to be honest I don't know what the point of the wait function,


No, you don't set a "timeout" by placing this wait function "left handside" to wait for 1000ms!

 

Please read the (context) help for all functions in your block diagram!

Please read even more carefully the help for HTTPGet: after doing so you should have learned about the timeout for that specific function!

 


@MiriamLea wrote:

I just though I might need to, to run this VI continiously. 

Do you have an idea what I'm doing wrong here?


To run a function/an algorithm continuously you need to use some sort of loop.

There is no loop shown in your code!

 

Please don't use the "Run continuously" button in the menu bar of your VI: this is ONLY meant for debugging purposes! (It also behaves slightly different than running an algorithm in your own loop structure…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 14
(820 Views)

Thank you for your advice. I now added a while loop around each program. But it still gives me the same error code. Do you have an idea what I should change? I just started using LabVIEW and I have little knowledge, as you probably already supposed. I'm sorry for that.

MultipleWebserverwithloop.png

 Thank you and greetings, Miriam

0 Kudos
Message 12 of 14
(816 Views)

Hi Miriam,

 


@MiriamLea wrote:

I now added a while loop around each program. But it still gives me the same error code.


Do both devices give that error or only one of them?

 

Now you need to change more things:

  • The HTTP-Open and HTTP-Close belong outside the loop! The Open is executed before the loop, the Close after the loop. (Did you look at the example VIs coming with LabVIEW?)
  • Why are there 4 stop buttons now? Do you really need 2 stop buttons per loop???

Simplified for one device:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 14
(812 Views)

Hi GerdW,

 

  • now both loops give that error. But not every time the loop runs, everother time one loop is giving an error.  
  • Okey I put the HTTP-open and the HTTP-close outside of the loop, but can you explain why? No I haven't really looked at examples, where can I find them?
  • I also deleted two stop buttons, as you said they had nothing to do there. I just copied that example from somewhere and tried to edit it

MultipleWebserverhttpout.png

 I really appreciate your help, thank you very much!
Greetings, Miriam

0 Kudos
Message 14 of 14
(806 Views)