12-15-2020 02:36 AM - edited 12-15-2020 03:33 AM
Hi,
have used LV for 15 years but I'm a newbee using LV and web communication. I need to connect to a server using a HTTP commands and send log-data to that server. The API consist of GET, PUT, POST, PATCH and DELETE.
I also need to have a auth in the header. It seems that I need to use GET to fetch a token but that must be the private key or?
I have some example-code in bash (linux). Not difficult to understand. However, I don't know how to start. Do I start with OpenHandle?
Can anyone here give me a hint how to start? Any examples? If I send data every minute, do I need to reconnect every time or can I have the connection open until application ends?
(Let me guess: I need to use Data Communication/Protocols/HTTP Client? Set API-key?)
12-15-2020 07:24 AM - edited 12-15-2020 07:36 AM
I need a Nap, Hi TakeANap!
I am fairly new to LabView, but following are the few things I implemented and used in Web API- LabView communication using HTTP:
1) Finding VIs: Functions Pallet- Data Communication- Protocols-HTTP
2) Block Diagram for GET: (Use private key only if applicable)
2) Block Diagram for POST: (Use private key only if applicable)
I hope this helps in someway.
I am a dummy for web communication, but for connection open, maybe try and test it. You may have to add an idle case where the reference is stored in shift registers and no VI is using it then change the case as desired and use the reference from shift register.
I would try my best to answer any specific question you may have.
Good Luck!
12-15-2020 08:20 AM - edited 12-15-2020 08:27 AM
huh! my response is not there anymore. That's rude.
12-15-2020 12:50 PM
What are the while loops for? They don't do anything...
Other than the while loops and the coloring of the structure diagrams that is the way to do it.
12-15-2020 12:57 PM
@XM43 wrote:
huh! my response is not there anymore. That's rude.
Unless the response itself was rude, it's probably a technical problem.
Only moderators can remove posts, and they won't unless it's reported and there's a reason.
12-15-2020 01:07 PM
wiebe@CARYA wrote:
What are the while loops for? They don't do anything...
Other than the while loops and the coloring of the structure diagrams that is the way to do it.
Yes Sir! my mistake, while loops are there as part of my template VI. But yes, it does not do anything.
Please now that I am new to LabView, actually 6 months into any kind of programming. So yes, I am playing with every possible thing that I come across in LabView including background colors.
12-15-2020 01:09 PM
wiebe@CARYA wrote:
@XM43 wrote:
huh! my response is not there anymore. That's rude.
Unless the response itself was rude, it's probably a technical problem.
Only moderators can remove posts, and they won't unless it's reported and there's a reason.
Okay, understood. I hope my response was not rude.
12-15-2020 01:15 PM
@XM43 wrote:
wiebe@CARYA wrote:
What are the while loops for? They don't do anything...
Other than the while loops and the coloring of the structure diagrams that is the way to do it.
Yes Sir! my mistake, while loops are there as part of my template VI. But yes, it does not do anything.
Please now that I am new to LabView, actually 6 months into any kind of programming. So yes, I am playing with every possible thing that I come across in LabView including background colors.
Sure. Kudo for posting!
Note you can also color the structures themselves. But (also) please don't.
12-15-2020 01:25 PM - edited 12-15-2020 01:29 PM
wiebe@CARYA wrote:
@XM43 wrote:
wiebe@CARYA wrote:
What are the while loops for? They don't do anything...
Other than the while loops and the coloring of the structure diagrams that is the way to do it.
Yes Sir! my mistake, while loops are there as part of my template VI. But yes, it does not do anything.
Please now that I am new to LabView, actually 6 months into any kind of programming. So yes, I am playing with every possible thing that I come across in LabView including background colors.Sure. Kudo for posting!
Note you can also color the structures themselves. But (also) please don't.
Haha, yes, I do not do that anymore and I will keep that in mind. But a bit darker color is soothing for eyes especially if you are working for longer hours.
Oh and thank you for Kudos 😀
12-15-2020 01:31 PM - edited 12-15-2020 01:32 PM
@XM43 wrote:
wiebe@CARYA wrote:
@XM43 wrote:
wiebe@CARYA wrote:
What are the while loops for? They don't do anything...
Other than the while loops and the coloring of the structure diagrams that is the way to do it.
Yes Sir! my mistake, while loops are there as part of my template VI. But yes, it does not do anything.
Please now that I am new to LabView, actually 6 months into any kind of programming. So yes, I am playing with every possible thing that I come across in LabView including background colors.Sure. Kudo for posting!
Note you can also color the structures themselves. But (also) please don't.
Haha, yes, I do not do that anymore and I will keep that in mind. But a bit darker color is soothing for eyes especially if you are working for longer hours.
Oh and thank you for Kudos, my first Kudos 😀
Actually your 2nd.
You got the first here: Solved: Re: Requesting suggestion for possible software architecture design with PC- RT-& FPGA
EDIT: Never mind, that crossed.