From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-29-2021 09:13 AM
Dear all,
I'm looking for a way to handle binary web socket other than importing my own JS code.
In the same line I'd like to display the blob (received via the above binary was) in an image indicator, but only found URL image indicator.
Does binary WS and image indicator exist in G web ?
Thanks
Christophe
09-30-2021 09:11 AM
Hey!
If you take a look at the "Write String.gvi" from the Websocket Palette, open it and take a look at the websocket.jsli you can see that there is an WSSendByteArray function. This should allow you to send binary data so all you need to do is create a "Write Byte Array.gvi" with this .jsli. Right now I don't have the time to dig deeper into this but maybe this is a good starting point for you.
To show you picture you might be able to use the URL image indicator. Just place an empty picture in you project link it to the image indicator and at runtime replace the file with you new data (maybe a refresh of the page/ indicator is required).
09-30-2021 03:42 PM
Hi Christophe,
WebVIs do support binary WebSockets. You can use both WebSocket Read and WebSocket Write in binary mode. When the node is dropped from the palette you have the option to configure string or binary mode. For nodes that are already dropped you can configure the mode from the properties pane. See the following:
The URL image indicator does not support a binary buffer directly. One option is to use the community library File for WebVI which includes the Base64.gcomp >> Create Data Url VI which can take a byte array and content type and create a data url formatted string to pass to the URL Image control. See the following:
10-01-2021 07:12 AM - edited 10-01-2021 07:30 AM
Hi Milan, Hi Jens,
Thanks for your replies.
@Milan thanks for taking the time to build small animation.
I'm still in the "NXG" style adaption stage for the G Web module...
Best
Christophe
10-01-2021 10:06 AM
Hi Christophe,
The above discussion applies to NXG 5 Web Module as well 👍
10-01-2021 10:12 AM
Too many years (30+) with current/future G to adapt well to NXG!
Thanks for your help, my remote experimentation client previously written in JS is now written in LV 🙂
Hopefully the G Web module is eventually migrated to current G.
Ch.
10-04-2021 01:48 AM
@_Chris wrote:
Hopefully the G Web module is eventually migrated to current G.
That seems very unlikely to me. If you think about all the functionality to render the website in NXG/ G Web with all the new HTML class and CSS stuff. I'm kinda new to LabVIEW but was very disappointed about the end of NXG. I still don't believe that there will be functionality like a zoomable Blockdiagram in LV.