From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

To support modern web thin clients, the LabVIEW webservice needs to support the OPTIONS request. When a web browser makes a cross origin request there are a few rules that the response must comply with before the browser will provide with the result to the web application. The OPTIONS request is needed to respond to these requests.

 

A cross origin request is any request where an application running on one domain needs to make a request to another domain. For example, if there was a javascript application running on the domain www.labview.com and it needed to make a AJAX request to api.labview.com, the browser considers this a cross origin request. This is a common setup when the thin client is being hosted by one server, and the webservice is being hosted by another server. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

 

Depending on the request, the browser may issue a "preflight" request. "Standard" requests are GET and POST requests without custom header fields only require the response has an additional headers. Other requests (PUT, DELETE, GET w/ headers, POST w/ headers) require a preflight request. A preflight request is an OPTIONS request. If the OPTIONS request doesn't get an appropriate response, the browser will not even make the actual request. https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request

 

For example, I'm starting an application and here's how I'd like it setup.

 

1. Windows PC. This is the central server for the application. There will be a normal LabVIEW application running on this computer. There will also be a web service run on this computer. The web service will mainly host a web application written using HTML/CSS/Javascript (although it could be written using HTML vis from NXG).

 

2. A bunch of CRIOs. These CRIOs will also host their own web service to get system information, measurements, and diagnostics. As new CRIOs are commissioned, they'll report to the Windows PC.

 

Now a user uses their web browser to access to the windows PC. The Javascript Application (which is hosted on the Windows web service) provides the user with a list of all commissioned CRIOs. They then click on one and the javascript application starts to make requests directly to the CRIO's web service. Since these CRIO's are on a separate IP address, the browser flags this as a CORS request. This means that an OPTIONS request can be sent. Since I can't handle an OPTIONS request in a LabVIEW web service, I can't implement this.

 

This is just one example. Another case would be an Apache hosted web application hosted on an Amazon EC2 needs to make requests to a LabVIEW web service running in a different domain. Basically any time a web application (AKA something running in the browser) needs to communicate with a LabVIEW web service you'll run into this problem.

I would like to see more native support for compression and encryption/hash algorithms.

 

When it comes to compression and encryption. We are very much the poor relations to other languages that have a plethora of source and examples for SHA1, DES, 3DES, Blowfish, HMAC, Ryjindel, AES (encryption) and LZO, LZMA, LZW, GZip, JPEG2000 (compression) to name but a few.

 

Apart from "Zip" (which can only be used on files) and "twofish" (which is hardly an industry standard because of security concerns) we have very little choice but to use DLLs and SOs meaning our applications violate one of the biggest reasons for using LabView........cross-platform. We have very little in our tool-kit to make efficient and secure network applications for example. Especially if we are required to interface to existing systems that ave used these technologies for many years.

 

We cannot even write applications to access Twitter any more!

 

With the introduction of "Stream" prototypes in the new LV2010, it is essential to have these tools in our palettes.

Several users of XNET miss an important function from the driver: to read signals' logical value from the database.

For example, the value of 1 means 'Initialized', 0 means 'not initialized'. We would like to read those strings.

 

See this thread.

The current implementation for remote debugging needs two ports to be opened on a stand-alone firewall in between.

  • Port 3580 to connect to the NI service locator on the target machine
  • A random port for the application on the target to connect to
    This port is dynamically assigned to the application by asking the OS for a free one

 

This dynamic port cannot be pre-configured on the stand-alone firewall except by opening up the whole port rang above 1024.

The latter is something no IT person with any sense of security will do !

 

So we need to be able to pre-configure a certain port for the target application, so that we can open a dedicated port for this connection on the firewall as well.

Otherwise this whole remote debugging feature is useless to many companies.

 

There have been multiple cases in the last few years where customers (huge ones) have come across this issue. 

The Run Method is pretty much the only option we have in LabVIEW to scale an application dynamically by instantiating new VIs - but there is one big catch - for some reason it requires the unser interface to be idle(!).

 

Related methods like setting control values e.g. do not have this requirement so they do not pose a problem - but the main method for dynamic instantiation does - and can be blocked by something as simple as a user that opens the calendar view of a date and time control (which of course never should do this either, but that's another issue/idea).

 

Personally I use the run method to create new trend windows (you never know how many trends a user wants to see at the same time), create session handlers for remote clients etc. The times it is used to actually create user interfaces it is not a big problem that the run method is in the user interface thread, but for session handlers and other things that needs to be created in the background based on requests from the outside? A HUGE issue.

In the current LabVIEW XML Schema, the flatten to XML string supports variants, but not variant attributes (and by extension waveform attributes as well). This is unfortunate as variant attributes remain one of the best ways of implementing a dictionary type data structure and they are also a useful way of adding additional metadata to waveform signals. In both cases, serializing the attributes to XML strings properly would greatly facilitate data exchange with non LabVIEW code.

Currently the only way to set/modify Tcp socket options is by directly calling some system library, as done for example in this post.

 

This not only causes code difficult to understand ("what does that library call do again?") but also poses problems when you want to use your code on different operating systems: Currently the only way to do this is using "conditional disable structures", and then Labview still tries to load the code used for a different operating system...

 

Labview should have a standard way to set socket options within Labview code, at least for the most important options (Nagle algorithm leaps to mind...). This could either be done as additional inputs to the "Tcp open connection"-VI, or (much better) using property nodes for Tcp connections.

 

 Connecting to remote panels using LabVIEW is difficult if private networks, local private and external public IPs (under NAT), and firewalls, etc. are involved. It requires significant knowledge as well as external networking configurations (port forwarding, etc.), and possibly admin privileges to modify those.

 

There are plenty of companies that have found a way around all this. The prime example is chrome remote desktop, which seamlessly works even if target computers are in hidden locations on private networks, as long as each machine can access the internet with an outgoing UDP connection. The way I understand it, each computer registers with the Google server, which in turn patches the two outgoing connections together in a way that both will communicate directly afterwards. All traffic tunnels inside the plain Google chat protocol (udp based). Similar mechanisms have been developed for security systems (example) and many more.

 

Since the bulk of the traffic is directly between the endpoints, the traffic load on the external connection management server is very minimal. It simply keeps an updated list of active nodes and handles the patching if requested.

 

I envision a very similar mechanism where LabVIEW users can associate all their applications and distributed computers with a given user ID (e.g. ni profile), and, at all times be able to get a list of all currently running remote systems published under that user ID. If we want to connect to one of them, the connection server would patch things together without the need of any networking configuration. Optionally, users could publish any given panel under a public key, that can be distributed to allow public connections by any other LabVIEW user.

 

This is a very general idea. Details of the best implementation would need to be worked out. Thanks for voting!

 

If you are using TCP to communicate to a different code environment, you may want to set some of the socket options. For example, for responsive control, you will want to disable Nagle's algorithm. There is currently no obvious or easy way to do this. TCP Get Raw Net Object.vi in <vi.lib>\utility\tcp.llb will provide the raw socket ID, but you then need to call setsockopt() on your particular platform using the call library node. You can do this with the code provide here. A much better way would be adding a property node to the TCP reference that allowed you to set and query the options directly.

It would be nice if we had the option to terminate a TCP Read on a single character rather than only a CR/LF. There are many times where you would terminate a read on some end character such as a 0x03 (ETX). In order to accomplish this now we need to have a tight loop which reads from the connection a single byte at a time. Even better would be if we could specify a string as the termination sequence. However, I would be happy with a single character option.

When you are generating data from a source and sending it across a TCP connection, it would be useful to be able to get information about when packets are being dropped and resent in the connection. If lots of drops are being detected, a program might be able to slow down the data acquisition or take other action to reduce the amount of information being transmitted to account for the lower bandwidth connection. Currently there is no way to get this information from the TCP primitives.

 

This idea comes out of the Certified LabVIEW Architect Summit held yesterday and today at NI headquarters in Austin, TX.

 

The current bluetooth VIs (as of LV 2014) don't support communication with the new protocol Bluetooth 4.0, referred as Bluetooth Low Energy (or Bluetooth Smart).

 

New VIs dedicated to BLE or adding support on current VIs is needed for all developers of this new bluetooth stack.

 

As we increasingly integrate with HTTP servers the LabVIEW functions appear more and more limited.

 

Authentication is a major concern and in enterprise environments one option is NTLM (or Windows Authentication).

 

I would like to see the HTTP client support this as in this case we had to abandon using LabVIEW for the integration.

When using the Sahred variable (SV) with "Bind to source", the SV uses the datatype of its source.

If you are using the datatype "double" you can see all fractional digits.

That doesn't make sense all the time - e.g. if you want to display temperature values.

 

Our idea is to give the user the opportunity of controlling the number of digit of precision.

 

Digits of precision.jpg

 

Thanks

The current low level implementation of TCP functions only accesses a data stream, but not the raw data of the tcp telegram. It would be nice to have a low level TCP "Read/Write Telegram" function to get additional information from header or footer, like time stamps. Maybe as a buffered stream, like the current functions.

 

The resulting cluster could look something like this:

http://www.cisco.com/c/dam/en_us/about/ac123/ac147/downloads/customer/internetprotocoljournal/ipj_3-2/images/figure01.gif

I would like to see the functionality of the TCP and UDP primitives expanded to include more state information, better control of the connections and the capability to receive events for the connection.

 

Items that I can see which would be helpful would include the following:

  1. Ability to enable/disable the Nagling algorithm.
  2. Ability to abort a TCP connection with a TCP-RST. (The wire is there on the TCP-Close primitive but it doesn't do anything)
  3. Ability to receive an event when data is present.
  4. Ability to receive an event when the data has actually be put on the wire. (Currently the write VIs return as soon as the data is buffered. There is no ability to have the application wait until the data is actually delivered.)
  5. More access to the IOCTLs that are available on a socket connection that a programmer has access to via Linux or Windows socket libraries.

When using the LabVIEW Internet Toolkit FTP library to transfer large files, there is no way to determine the progress.

 

I propose a notifier be added to the FTP Registry object data. This notifier would be updated by the low level TCP Read Stream and TCP Write Stream vis and monitored by a UI to display progress of the transfer.

 

See this NI Forum post...

 

FTP transfer progress bar

http://forums.ni.com/ni/board/message?board.id=170&message.id=470946 

 

 

 

 

Please add to AF:
Ability to seamlessly communicate over the network and create your own queue specifications. For example actors should be able to talk between physical systems. Using the Network Actor is not a good solution, because it is simply to verbose and difficult to understand. The philosophy of AKKA should be embraced here "
This effort has been undertaken to ensure that all functions are available equally when running within a single process or on a cluster of hundreds of machines. The key for enabling this is to go from remote to local by way of optimization instead of trying to go from local to remote by way of generalization. See this classic paper for a detailed discussion on why the second approach is bound to fail."

HTML5 supports WebSockets which allows low-latency, two-way communication between browser and server.  There are various screen-sharing technologies in existence based on this, but integrating a similar server in LabVIEW would enable capabilities that could be accessed from any desktop or mobile browser, no configuration required on the client side.  The key to this feature is the ability to configure the server and enable sharing from within LabVIEW or from a VI (i.e. a LabVIEW-aware server).

 

An idea of what this could do:

  • Remote control of LabVIEW development machine

remoteaccess_composite.png 

 

  • Selective sharing of windows, for instance allowing interaction with only LabVIEW windows.  The server application would have a mechanism for selecting which of the open windows to share.

app selection.png

  • A view-only mode so users could check the status of a running application from anywhere, including their cell phone.

 

remoteaccess_fo.png 

  • A brat or Express VI that when dropped in a VI would automatically share the VI when run.
  • Third-party toolkits and applications could build in sharing capability for their own app using the API.

 

This feature would be more powerful than Remote Panels in that:

  • It would give access to the LabVIEW development environment in addition to running applications.
  • No configuration or special software required on the client side, enabling multiple platforms including mobile.