I am building a labview VI to set the parameters and get the signals instead of using a web UI. I managed to open a web socket, handshake, and receive the periodic updates from the RP NGINX server. After ungzipping this data, it looks like a standard json string like:
So far so good. I assume when I actually hook the update methods to an actual variable, the curley braces won't be empty.
and other variations of this with no luck. The json parser from the ngx_http_rp_module seems to search for two keywords: "datasets" and "params". Including them prevents a total app crash but doesn't toggle the LED.
I know you can interface with RP via scpi but this has its limits because you can't access registers for your own fpga code. The webui interface is nicely put together for exactly this purpose but I'd like to use a labview interface instead of the web browser so I can aggregate the data alongside all the other stuff in my lab.
Any help would be appreciated.
I managed to intercept an update message from the websocket which gave me the data format:
Echoing this back as "value":true and it worked. The LED can now be toggled. However, I still haven't managed to find the http sequence to start the app. At the moment I have to start the app in the bazaar via web browser.
I got it working by using the HTTP client vi's installed with labview to send a GET with the magic url:
To start app-
http://<rp IP or .local addr>/bazaar?start=<name of app>
and to stop app-
http://<rp IP or .local addr>/bazaar?stop=<name of app>
Also, as a point of clarification for whoever might attempt this, while HTTP client is installed with labview, the websockets is obtained through the VI package manager.
Applications, development tools, FPGA, C, WEB
1 post • Page 1 of 1
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 5 guests