Sam Sharp GDevCon#2

Efficient Working with Databases in LabVIEW – GDevCon#2

In August 2019 at the Repertory Theatre in Birmingham, I gave a presentation at GDevCon#2 discussing working with databases in LabVIEW. The videos from the event have now been edited and uploaded to the GDevCon YouTube channel.

The playlist with all of the great content from GDevCon#2 is here – https://www.youtube.com/playlist?list=PLUQdW1SDWK3mb0879Az7IKk9BXI-5dv-A

In the presentation I offer some hints & tips for working with databases in LabVIEW (best practice, security). Then I propose a method for speeding up development by applying techniques learnt from Yii’s (a PHP Framework) ActiveRecord implementation. Finally, I demonstrate an OO-based LabVIEW ActiveRecord implementation and some scripting tools I have developed for generating the classes automatically from a database schema.

You can find the video of my presentation and the presentation slides below:

Presentation Video
Presentation Slides

If you have any questions about the presentation please leave a comment below. If you would like to discuss whether MediaMongrels Ltd can help streamline database communications then feel free to get in touch.

Free LabVIEW™ for everyone – LabVIEW Community Edition coming soon!

One of the most newsworthy aspects of GDevCon#2 was a very special announcement from National Instruments that they would be releasing the LabVIEW Community Edition – a free version of LabVIEW™ Professional for non-commercial use.

Yes, that’s right…

You will be able to download and use LabVIEW™ for FREE!

Read more

Version 2.0 of the LabVIEW™ WebSockets API now available!

WebSockets API V2.0 now available!

MediaMongrels Ltd are pleased to announce the release of Version 2.0 of the LabVIEW™ WebSockets API on the LabVIEW Tools Network. This new version of the WebSockets API is the first major rewrite since its initial release and includes new features and some bug fixes.

Overview

  • Now with more objects! The library has moved to a simpler, object-oriented API to better distinguish between client/server connections. The underlying TCP/IP functionality has been replaced with a ‘Socket’ abstraction that includes socket client/server and socket listener classes with implementations for the NI VISA TCP/IP functions.
  • Read / Write VIs: The read/write VIs now handle text and binary data frames, ping/pong frames and fragmented messages.
  • Documentation: The library is now certified under the LabVIEW Tools Network program and includes detailed help documentation available from the LabVIEW help menu (Help -> MediaMongrels Ltd -> WebSockets API) as well as including a WebSockets Client Example for connection to 3rd party WebSockets Servers.
  • Paving the way for Secure WebSockets and LabVIEW NXG Support: The V2.X library rewrite paves the way for LabVIEW NXG support. The new Socket abstraction allows the NI VISA TCP/IP functions to be replaced

Full release on the LabVIEW™ Tools Network

The new version of the library has now been certified for the LabVIEW™ Tools Network – you can download the latest version from VI Package Manager here: Install LabVIEW WebSockets API (VIPM)

Screenshots

The screenshots below show the new API for a client and a server connection respectively.

Client API

Server API

Legacy API

Due to the rewrite, the new API breaks backwards compatibility with the previous version of the library. To minimise disruption when upgrading, Legacy API functions are included in the library. With the Legacy API, the VI calls remain the same as previous versions but the TCP/IP refnum wire has been replaced with a WebSockets API connection reference. Compare the Pre-V2.X to the V2.X Legacy API below.

WebSockets API Upgrade to V2.X with Legacy API functions

Release Notes

Major rewrite of the WebSockets library:
– New: Moved library to an OO approach for WebSockets connections (Client/Server Classes)
– New: Abstracted underlying socket functionality (e.g. NI VISA TCP) for future secure WebSockets support
– New: Added TCP socket listener for listening for server socket connections
– New: Simplified API
– New: Added high-level Read function which internally handles fragmented and Ping frames
– New: Added WebSockets Client Example VI and modified examples to use new classes
– New: Added unit testing to source repository
– New: Added detailed documentation (.chm file) to LabVIEW Help menu and added examples to NI Example Finder
– New: Added palette support for LV2020
– Fix: Fixed incorrectly applied timeout values (timeout = approx. maximum time until VI returns)
– Fix: WebSocket-Client-Key is now correctly generated as a random string rather than being a constant

Note: A backwards compatibility layer is retained for legacy applications allowing upgrade with minimal application changes. It is strongly recommended to update applications to use the new library VIs.

Sam Sharp – LabVIEW Champion 2019

It is a great pleasure to be recognised for your contributions to a community and as a LabVIEW Developer, there is no greater recognition than the LabVIEW Champions programme.

The LabVIEW Champions are an elite group of “individuals who demonstrate technical excellence and a willingness to give back to the community”. There are ~120 active LabVIEW Champions worldwide.

It is therefore a great honour that Sam Sharp, the founder of MediaMongrels Ltd, was admitted as a LabVIEW Champion in March 2019.

This great award comes from years of delivering successful LabVIEW projects and contributions to the community such as:

  • Presentations at User Group Meetings, the CLA Summit and GDevCon
  • Contributions to the NI Forums
  • Founding member of GDevCon (tickets for #2 in August are on sale now!)

Thank-you to NI and the community for this great achievement and a huge congratulations to everyone else that became a LabVIEW Champion in 2019. What a great community!

 

Midlands LabVIEW User Group: Malleables, Pragmatic Test Rigs and Code Reviews

On Monday, I was at the latest meeting of the Midlands LabVIEW User Group at the MTC in Coventry (across the road from the AMRC for the IIoT event a few months ago).

Lovely day to learn LabVIEW!

I was presenting on Malleable VIs but also up on the projector alongside me was Ian Billingsley from CCS presenting on their pragmatic approach to test rig design using LabVIEW/TestStand and Peter Horn from NI with ‘Code Reviews for Teams that don’t have time for Code Reviews’.

Ian Billingsley – CCS

First up was Ian – his presentation was very interesting as it is always good to see how others are customising TestStand. It looks like they have found a robust and adaptable architecture that allows continuous monitoring of the test rig along with controlling it from TestStand. There were also some interesting discussions about when/why you should use TestStand and the benefits of building a simulation interface into your software. If you didn’t make it to the MLUG meeting, he will be giving a revised version of the presentation at GDevCon in September.

Peter Horn – National Instruments

Second up was Peter talking about how Code Reviews are a Good Idea™ and that if you don’t currently do code reviews, you probably should. You don’t have to implement some huge process where you sit down for 3 hours and get grilled on every wire bend. I believe in the benefits of having someone else look at your code – both to improve software quality and as a learning exercise for the reviewee/reviewer. The key message of the presentation was that you have to find a process that works for you/your team (whether that’s formal/informal/tool-driven code reviews) and to nurture the appropriate culture for them within the team (it’s not to pick faults).

Me!

Finally, I gave my presentation on Malleable VIs – an introduction to Malleables and some practical examples of how I have used them in my code. I demonstrated some examples from my previous blog posts but also some fresh examples with the Type Specialisation Structure introduced in LabVIEW 2018. Whilst preparing the presentation, I discovered an obvious workaround to the property node limitation of Malleable VIs – just wrap the property node calls into a SubVI!

Here’s a sneak peak from the presentation of a Malleable VI that can set the enable/disable state of a scalar/array of controls – using a scalar/array of ‘Enabled/Disabled/Disabled and Greyed Out’ enums or booleans:

Set Enabled State.vim – Various supported use cases of the Malleable VI for enabling/disabling controls.

You find find the full slides from my presentation as a PDF here: Malleables in the Wild – MLUG 2018

In Summary

LabVIEW User Group meetings are a great way to network with and learn from fellow LabVIEW developers. Thanks to Argenta for organising another successful MLUG.

Just don’t ask us to take the CLAD exam any time soon! (We had some CLAD practice questions to work through as the coding challenge this time around – I’m blaming our poor performance on the lighting / projector!)

NI Event: Implementing Industrial Internet of Things (IIoT)

On Wednesday 28th March I attended the ‘Implementing the Industrial Internet of Things’ event organised by National Instruments.  The aim of event was to give an overview of the technologies and considerations needed to implement the Industrial Internet of Things (IIoT).

The event took place at the fantastic and very modern looking Advanced Manufacturing Training Centre in Coventry. There was a very varied group of attendees at the event including Engineers, NI Alliance Partners (such as MediaMongrels Ltd), Academics, IT Professionals and even Market Analysts, all looking to learn more about the future of connected industry.

Content Overview

One of the early slides highlighted a couple of interesting statistics:

50 billion connected devices by 2020 – Cisco

~50% of connected devices deployed between 2015 and 2025 will be industrial – IHS Markit

This was followed by an overview of the various systems and components that make up an IIoT solution, as shown in the slide below:

© National Instruments

The event then was broken down into various presentations covering the following topics and showing how they fit within the IIoT  ecosystem:

  • Data Acquisition (hardware selection, sensor placement, sample rates, FPGA for high-speed acquisition, adequately describe data e.g. metadata)
  • Processing and Feature Extraction (where to process data? edge node, on-premises server or cloud?)
  • Control (using FPGA or RT for real-time control)
  • Communication (synchronisation of data, Time Sensitive Networking – technology allowing deterministic communication between critical machines/processes)
  • Security (securing edge nodes, use secure protocols e.g. https, use detection as well as protection)
  • Deployment (how to deploy to multiple systems? demo of NI SystemLink)
  • Data Management (how much data to store? how long for? database technologies)
  • Analytics & Machine Learning (use of process experts still relevant for training machine learning algorithms)
  • Visualisation (e.g. real-time data dashboards, augmented reality)

Of course, there is nothing new about these components individually, it is the bringing of them together to allow better business and engineering decisions to be made faster that I feel makes up the core idea of the Industrial Internet of Things. The benefits could be a reduction in downtime (e.g. through predictive maintenance) or improvements in productivity and quality (discovering and resolving inefficiencies).

As a National Instruments event, they were keen to show how their products and services can be used to deliver IIoT solutions (e.g. using an NI CompactRIO as an edge node, DIAdem for Data Management) but the event didn’t go into specifics or detailed implementation – it was more to provide an overview of the various technologies and to highlight some IIoT success stories.

It is clear to see that National Instruments is putting a lot of investment into IIoT – from their IIoT Lab in Austin, IIoT products/services (e.g. InsightCM, SystemLink) to wider collaboration with various related technologies (e.g. Augmented Reality, Industrial Networking).

Summary

Overall, it was a good opportunity to network with like-minded professionals and interesting to see how previous projects fit within the ‘IIoT’ remit. I also learnt more about some of the new technologies/products that will help deliver IIoT solutions in the future (e.g. Time Sensitive Networking, NI SystemLink).

You can find the presentations from the event here.

MediaMongrels Ltd. has experience developing solutions that fit into the Industrial Internet of Things – from embedded control and monitoring (edge node solutions) to test asset monitoring & real-time web-based dashboards for process monitoring. Please contact us if you’d like to discuss your requirements.

 

 

 

Proud Supporters of GDevCon

MediaMongrels Ltd is proud to be part of the GDevCon Alliance, a partnership of LabVIEW™ experts and community leaders who have put together GDevCon, an independent Graphical Programming Conference. GDevCon#1 is taking place on the 4th-5th September 2018 at Girton College in Cambridge.

Sign up to the mailing list at https://www.gdevcon.com to receive all the latest news & updates leading up to GDevCon#1!

 

 

New website now live

It is long overdue but the site has had a complete overhaul and refresh to bring it in line with modern design & standards.

The new site will allow us to add new content more easily and we’ve also added a blog section – we’ll be posting more regularly with news and LabVIEW™ hints & tips.