Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 
swatts
3634 Views
9 Comments

Howdy Doody LabVIEW Lovelies

Emails are great for circumventing firewalls and IT. It has been very useful for our bug reporting system to have an on-board email client and a dedicating email address. We just give it out to customers and away we go!

So here's how we did it.

First we need a POP email client and one can be downloaded here.

We wrote a bit of code to plug the email details into our bug reporting database (this gives us a metric of how quickly we respond to an issue for ISO9000).

EMail1.png

We can then query the database and search for any new emails in the system, this is done on a button press with my pretty email button.

EmailButton.png

All nice and easy....except when you add attachment and also every single email server appears to format it's emails differently (currently I'm fixing it on command but I really need to do some more studying of this).

First issue was attachments. Some descriptions of this are included here

Email is sent as text and therefore the attachment will need encoding into data that is safe to transport. The most common method appears to be base 64. For us base 64 is pretty marvelous for encoding blobs in databases (Binary Large OBjects) for similar reasons to emails we don't want spurious control characters as part of your SQL query. In fact I would now recommend encoding any entered free text as base64 into a query.

Here is how it looks in my database.

base64.png

So the only time I want to decode it is when I display the attachment.

Base64Decode.png

Someone cleverer than I wrote this (search base 64 decode).

An attachment is essentially made of 3 parts, the filename, the mimetype and the encoded attachment data, you then recreate the file in a temp directory and display it in a universal mimetype display (the webbrowser does this very well)

The other challenge is parsing the email and I haven't got a very robust solution to this at the moment, every new email I get from a different server appears to have a different standard. I need to hit the books I think or do a reiterating parse until I get something useful (yuck!)

There! an article with LabVIEW in it, hope it is useful

Lots of love Steve

PS there is a bug in the Pop VIs that can't handle large attachments, I'll be happy to help (supply code) if there is an interest.

PPS encode and decode base64 is useful for other stuff too where you need to restrict the types of characters.

swatts
6662 Views
33 Comments

Hello My Sweets

6aca8542-fe64-432b-b268-c197782843b5-large.jpeg

This article is a plea! Sadly the people who really would benefit from listening to this plea will probably not read it, but it may add power to you my dear readers.

PLEASE PLEASE PLEASE DEAR CUSTOMER IF YOU SPEND $$$$$$$ ON SOFTWARE, DON'T SPEND 0.000$ ON THE HARDWARE IT WILL LIVE ON!

Most LabVIEW programmers in the western world charge between $50 and $250 an hour. Most software that is written will cost in excess of $10k.

As discussed many times in this blog a well designed program will cost less to maintain than a badly designed one. Taking software maintenance out of the loop, let's reflect on some of the uses of our systems and how saving money on the hardware can be a bad thing?

Production Test

A reasonable percentage of our systems will be part of the production environment, generally these projects are costed on a payback basis, this payback is generally ❤️ years (if you can get the payback <2 years you are almost certain to get the job!). For most industry sectors the expected life time for a test system will be >5 years.

The cost of failure here can be as follows......

  • Inability to produce
  • Reduced capacity to produce
  • Disruption in the product flow
  • Poor test quality
  • Lateness
  • Cost of repair/support

Monitoring

We are looking for accurate measurements here, generally these projects are justified on a pre-existing failures and retrospectively costed on the cost of putting the failure right. They usually sit on the machines for years.

The consequences of failure here could be...

  • Machine Damage
  • Machine downtime
  • Poor decision making

Control

Here we usually need lack of down-time and responsiveness, these projects are often new requirements or replacement systems. The costing therefore is a pretty standard process improvement or cost saving.

In addition to the costs discussed earlier we have......

  • Difficulty tuning
  • Poor machine capability
  • Destruction of the thing being controlled
  • Safety

In summary bespoke software is expensive, LabVIEW is usually written to do high value and important things. The cost of failure for the customer is high!

For us the real cost of failure is that the project fails and is not used, this can result in loss of business and reputation. i.e. damned expensive!

SO WHY THE HELL IS SO MUCH OF MY SOFTWARE BEING PUT ON $200 DELL VOSTROS!!!

By way of example here's a case study...

We provided the software to control a vacuum furnace designed by a bespoke machine manufacturer to a large Aerospace company, the total cost of the system was approximately $350k, our software services were probably <10% of the total cost. To save money they used second hand vacuum equipments, scrimped on the sensors, heating elements and lid control. The prospects for the job were that we could modernise vacuum furnace design and sell these on, we could also replace the aerospace companies 4 vacuum furnaces. The system never worked correctly in all the areas where money was "saved", we suffered additional software costs struggling to get the system working. Unsurprisingly none of the prospective work surfaced.

On top of this consider the concept of rare resource, in most companies the guys and girls who write the bespoke software are usually bogged down with far too much work. Isn't it just good business to ensure this resource is used efficiently and believe me trying to get cheap-ass hardware to work is not efficient!!!

Starting the week in feisty mood.

Lots of love

Steve

swatts
8014 Views
8 Comments

HAPPY NEW YEAR!!

I hate shopping!, I detest trawling around shops looking at stuff I'm not interested in, I abhor the heat, the boredom, other shoppers!

But I don't hate all shopping, here's a list of things I like shopping for....

  • Comics
  • Music
  • Boots
  • Coats
  • Custom made jewelry

The first 4 I like buying for me, the last one is weird in that I don't wear jewelry, so my wife is the lucky recipient. (this is leading somewhere I promise)

So for my wife I commissioned this ring (surprisingly inexpensive at approx $200 and a delightful experience from start to finish, click on the picture for more details)

IMG_1798.jpeg

When she finished it she sent an email with pictures, the heading of which was TA DA!!

And this got me thinking, the antithesis of the WTF! is the TA DA!!, where-as someone reviewing your code will judge it in WTF!s, when you unveil a piece of software that is very cool we should exclaim TA DA!!.

So may your 2015 bring many TA DA!!s and few WTF!s

Lots of Love

Steve

I WANT YOUR TA DA!!s PLEASE ADD A BIT OF CODE THAT YOU ARE REALLY PROUD OF TO THE COMMENTS, LET'S START 2015 FEELING SMUG